GCC Middle and Back End API Reference
|
#include <gimple.h>
Data Fields | |
gimple_stmt_iterator | gsi |
void * | info |
struct pointer_set_t * | pset |
tree | callback_result |
BOOL_BITFIELD | val_only: 1 |
BOOL_BITFIELD | is_lhs: 1 |
BOOL_BITFIELD | changed: 1 |
BOOL_BITFIELD | want_locations: 1 |
BOOL_BITFIELD | removed_stmt: 1 |
Convenience routines to walk all statements of a gimple function. Note that this is useful exclusively before the code is converted into SSA form. Once the program is in SSA form, the standard operand interface should be used to analyze/modify statements.
tree walk_stmt_info::callback_result |
Operand returned by the callbacks. This is set when calling walk_gimple_seq. If the walk_stmt_fn or walk_tree_fn callback returns non-NULL, this field will contain the tree returned by the last callback.
Referenced by gimple_seq_add_seq().
BOOL_BITFIELD walk_stmt_info::changed |
Optional. Set to true by the callback functions if they made any changes.
Referenced by get_local_debug_decl().
gimple_stmt_iterator walk_stmt_info::gsi |
Points to the current statement being walked.
Referenced by dest_safe_for_nrv_p(), get_local_debug_decl(), gimple_make_forwarder_block(), gimple_redirect_edge_and_branch(), and lower_send_clauses().
void* walk_stmt_info::info |
Additional data that the callback functions may want to carry through the recursion.
Referenced by count_uses_and_derefs(), create_omp_child_function(), examine_call_tm(), find_assert_locations(), note_nonlocal_vla_type(), stmt_references_abnormal_ssa_name(), verify_gimple_stmt(), and volatile_var_p().
BOOL_BITFIELD walk_stmt_info::is_lhs |
True if we are currently walking the LHS of an assignment.
Referenced by count_ptr_derefs(), get_local_debug_decl(), note_nonlocal_vla_type(), walk_gimple_asm(), and walk_gimple_seq_mod().
struct pointer_set_t* walk_stmt_info::pset |
Pointer map used to mark visited tree nodes when calling walk_tree on each operand. If set to NULL, duplicate tree nodes will be visited more than once.
Referenced by walk_gimple_seq().
BOOL_BITFIELD walk_stmt_info::removed_stmt |
True if we've removed the statement that was processed.
Referenced by gimple_seq_add_seq().
BOOL_BITFIELD walk_stmt_info::val_only |
Indicates whether the operand being examined may be replaced with something that matches is_gimple_val (if true) or something slightly more complicated (if false). "Something" technically means the common subset of is_gimple_lvalue and is_gimple_rhs, but we never try to form anything more complicated than that, so we don't bother checking.
Also note that CALLBACK should update this flag while walking the sub-expressions of a statement. For instance, when walking the statement 'foo (&var)', the flag VAL_ONLY will initially be set to true, however, when walking &var, the operand of that ADDR_EXPR does not need to be a GIMPLE value.
Referenced by get_local_debug_decl(), note_nonlocal_vla_type(), walk_gimple_asm(), and walk_gimple_seq_mod().
BOOL_BITFIELD walk_stmt_info::want_locations |
True if we're interested in location information.