GCC Middle and Back End API Reference
tree-ssa.h File 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

Functions

void redirect_edge_var_map_add (edge, tree, tree, source_location)
void redirect_edge_var_map_clear (edge)
void redirect_edge_var_map_dup (edge, edge)
edge_var_map_vectorredirect_edge_var_map_vector (edge)
void redirect_edge_var_map_destroy (void)
edge ssa_redirect_edge (edge, basic_block)
void flush_pending_stmts (edge)
void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *, unsigned *)
void gimple_replace_ssa_lhs (gimple, tree)
tree target_for_debug_bind (tree)
void insert_debug_temp_for_var_def (gimple_stmt_iterator *, tree)
void insert_debug_temps_for_defs (gimple_stmt_iterator *)
void reset_debug_uses (gimple)
void release_defs_bitset (bitmap toremove)
void verify_ssa (bool)
void init_tree_ssa (struct function *)
void delete_tree_ssa (void)
bool tree_ssa_useless_type_conversion (tree)
tree tree_ssa_strip_useless_type_conversions (tree)
bool ssa_undefined_value_p (tree)
void execute_update_addresses_taken (void)
static tree redirect_edge_var_map_def ()
static tree redirect_edge_var_map_result ()
static source_location redirect_edge_var_map_location ()

Typedef Documentation

typedef struct _edge_var_map edge_var_map
   A vector of var maps.  

Function Documentation

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, memset(), 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 gimple_replace_ssa_lhs ( gimple  ,
tree   
)
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_add ( edge  ,
tree  ,
tree  ,
source_location   
)
void redirect_edge_var_map_clear ( edge  )
static tree redirect_edge_var_map_def ( )
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().

void redirect_edge_var_map_dup ( edge  ,
edge   
)
static source_location redirect_edge_var_map_location ( )
inlinestatic
   Given an edge_var_map V, return the PHI arg location.  

Referenced by flush_pending_stmts(), and remove_forwarder_block_with_phi().

static tree redirect_edge_var_map_result ( )
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   
)
bool ssa_undefined_value_p ( tree  )
tree target_for_debug_bind ( tree  )
tree tree_ssa_strip_useless_type_conversions ( tree  )
bool tree_ssa_useless_type_conversion ( tree  )
void verify_ssa ( bool  )