GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | _edge_var_map |
Typedefs | |
typedef struct _edge_var_map | edge_var_map |
typedef vec< edge_var_map, va_heap, vl_embed > | edge_var_map_vector |
typedef struct _edge_var_map edge_var_map |
typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector |
A vector of var maps.
void count_uses_and_derefs | ( | tree | ptr, |
gimple | stmt, | ||
unsigned * | num_uses_p, | ||
unsigned * | num_loads_p, | ||
unsigned * | num_stores_p | ||
) |
Count the number of direct and indirect uses for pointer PTR in statement STMT. The number of direct uses is stored in *NUM_USES_P. Indirect references are counted separately depending on whether they are store or load operations. The counts are stored in *NUM_STORES_P and *NUM_LOADS_P.
Find out the total number of uses of PTR in STMT.
Now count the number of indirect references to PTR. This is truly awful, but we don't have much choice. There are no parent pointers inside INDIRECT_REFs, so an expression like '*x_1 = foo (x_1, *x_1)' needs to be traversed piece by piece to find all the indirect and direct uses of x_1 inside. The only shortcut we can take is the fact that GIMPLE only allows INDIRECT_REFs inside the expressions below.
References count, count_ptr_derefs(), walk_stmt_info::info, count_ptr_d::num_loads, count_ptr_d::num_stores, count_ptr_d::ptr, and walk_gimple_op().
void delete_tree_ssa | ( | void | ) |
Deallocate memory associated with SSA data structures for FNDECL.
We no longer maintain the SSA operand cache at this point.
We no longer need the edge variable maps.
void execute_update_addresses_taken | ( | void | ) |
Compute TREE_ADDRESSABLE and DECL_GIMPLE_REG_P for local variables.
Collect into ADDRESSES_TAKEN all variables whose address is taken within the function body.
Note all addresses taken by the stmt.
If we have a call or an assignment, see if the lhs contains a local decl that requires not to be a gimple register.
We cannot move required conversions from the lhs to the rhs in asm statements, so require we do not need any.
We cannot iterate over all referenced vars because that can contain unused vars from BLOCK trees, which causes code generation differences for -g vs. -g0.
Operand caches need to be recomputed for operands referencing the updated variables and operands need to be rewritten to expose bare symbols.
Re-write TARGET_MEM_REFs of symbols we want to rewrite into SSA form.
We shouldn't have any fancy wrapping of component-refs on the LHS, but look through VIEW_CONVERT_EXPRs as that is easy.
Rewrite the RHS and make sure the resulting assignment is validly typed.
For var ={v} {CLOBBER}; where var lost TREE_ADDRESSABLE just remove the stmt.
Update SSA form here, we are called as non-pass as well.
void flush_pending_stmts | ( | edge | ) |
void init_tree_ssa | ( | struct function * | ) |
void insert_debug_temp_for_var_def | ( | gimple_stmt_iterator * | , |
tree | |||
) |
void insert_debug_temps_for_defs | ( | gimple_stmt_iterator * | ) |
void redirect_edge_var_map_clear | ( | edge | ) |
|
inlinestatic |
Given an edge_var_map V, return the PHI arg definition.
References _edge_var_map::result.
Referenced by flush_pending_stmts(), and remove_forwarder_block_with_phi().
void redirect_edge_var_map_destroy | ( | void | ) |
Clear the edge variable mappings.
References edge_def::dest, gsi_end_p(), gsi_next(), gsi_start_phis(), and redirect_edge_var_map_clear().
|
inlinestatic |
Given an edge_var_map V, return the PHI arg location.
Referenced by flush_pending_stmts(), and remove_forwarder_block_with_phi().
|
inlinestatic |
Given an edge_var_map V, return the PHI result.
References _edge_var_map::locus.
Referenced by remove_forwarder_block_with_phi().
edge_var_map_vector* redirect_edge_var_map_vector | ( | edge | ) |
void release_defs_bitset | ( | bitmap | toremove | ) |
void reset_debug_uses | ( | gimple | ) |
edge ssa_redirect_edge | ( | edge | , |
basic_block | |||
) |
void verify_ssa | ( | bool | ) |