GCC Middle and Back End API Reference
tree-ssa-propagate.h File Reference

Go to the source code of this file.

Typedefs

typedef enum ssa_prop_result(* ssa_prop_visit_stmt_fn )(gimple, edge *, tree *)
typedef enum ssa_prop_result(* ssa_prop_visit_phi_fn )(gimple)
typedef bool(* ssa_prop_fold_stmt_fn )(gimple_stmt_iterator *gsi)
typedef tree(* ssa_prop_get_value_fn )(tree)

Enumerations

enum  ssa_prop_result { SSA_PROP_NOT_INTERESTING, SSA_PROP_INTERESTING, SSA_PROP_VARYING }

Functions

static void prop_set_simulate_again ()
static bool prop_simulate_again_p ()
void ssa_propagate (ssa_prop_visit_stmt_fn, ssa_prop_visit_phi_fn)
bool valid_gimple_rhs_p (tree)
void move_ssa_defining_stmt_for_defs (gimple, gimple)
bool update_gimple_call (gimple_stmt_iterator *, tree, int,...)
bool update_call_from_tree (gimple_stmt_iterator *, tree)
bool stmt_makes_single_store (gimple)
bool substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn, bool)

Typedef Documentation

typedef bool(* ssa_prop_fold_stmt_fn)(gimple_stmt_iterator *gsi)
typedef tree(* ssa_prop_get_value_fn)(tree)
typedef enum ssa_prop_result(* ssa_prop_visit_phi_fn)(gimple)
typedef enum ssa_prop_result(* ssa_prop_visit_stmt_fn)(gimple, edge *, tree *)
Call-back functions used by the value propagation engine.   

Enumeration Type Documentation

Lattice values used for propagation purposes.  Specific instances
   of a propagation engine must return these values from the statement
   and PHI visit functions to direct the engine.   
Enumerator:
SSA_PROP_NOT_INTERESTING 
SSA_PROP_INTERESTING 
SSA_PROP_VARYING 

Function Documentation

void move_ssa_defining_stmt_for_defs ( gimple  ,
gimple   
)
static void prop_set_simulate_again ( )
inlinestatic
If SIM_P is true, statement S will be simulated again.   

References gimple_set_visited().

Referenced by ccp_initialize(), init_copy_prop(), init_dont_simulate_again(), simulate_stmt(), and vrp_initialize().

static bool prop_simulate_again_p ( )
inlinestatic
Return true if statement T should be simulated again.   

References gimple_visited_p().

Referenced by add_ssa_edge(), init_copy_prop(), and simulate_stmt().

void ssa_propagate ( ssa_prop_visit_stmt_fn  visit_stmt,
ssa_prop_visit_phi_fn  visit_phi 
)
In tree-ssa-propagate.c   
Entry point to the propagation engine.

   VISIT_STMT is called for every statement visited.
   VISIT_PHI is called for every PHI node visited.   

References cfg_blocks_empty_p(), cfg_blocks_get(), interesting_ssa_edges, process_ssa_edge_worklist(), simulate_block(), ssa_prop_fini(), ssa_prop_init(), ssa_prop_visit_phi, ssa_prop_visit_stmt, varying_ssa_edges, and visit_phi().

Referenced by do_ssa_ccp(), execute_copy_prop(), execute_vrp(), and tree_lower_complex().

bool stmt_makes_single_store ( gimple  )
bool substitute_and_fold ( ssa_prop_get_value_fn  get_value_fn,
ssa_prop_fold_stmt_fn  fold_fn,
bool  do_dce 
)
Perform final substitution and folding of propagated values.

   PROP_VALUE[I] contains the single value that should be substituted
   at every use of SSA name N_I.  If PROP_VALUE is NULL, no values are
   substituted.

   If FOLD_FN is non-NULL the function will be invoked on all statements
   before propagating values for pass specific simplification.

   DO_DCE is true if trivially dead stmts can be removed.

   If DO_DCE is true, the statements within a BB are walked from
   last to first element.  Otherwise we scan from first to last element.

   Return TRUE when something changed.   

References cfun, dump_file, dump_flags, fold_stmt(), get_gimple_rhs_class(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_assign_set_rhs_with_ops(), gimple_assign_single_p(), gimple_call_flags(), gimple_get_lhs(), gimple_has_side_effects(), gimple_nop_p(), gimple_purge_dead_eh_edges(), GIMPLE_SINGLE_RHS, gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_last_bb(), gsi_next(), gsi_prev(), gsi_remove(), GSI_SAME_STMT, gsi_start_bb(), gsi_start_phis(), gsi_stmt(), has_zero_uses(), i2, is_gimple_assign(), is_gimple_call(), is_gimple_debug(), may_propagate_copy(), maybe_clean_eh_stmt(), maybe_clean_or_replace_eh_stmt(), memset(), prop_stats_d::num_const_prop, prop_stats_d::num_copy_prop, prop_stats_d::num_dce, prop_stats_d::num_stmts_folded, print_gimple_stmt(), prop_stats, recompute_tree_invariant_for_addr_expr(), release_defs(), remove_phi_node(), replace_phi_args_in(), replace_uses_in(), statistics_counter_event(), stmt_could_throw_p(), update_call_from_tree(), update_stmt(), and virtual_operand_p().

Referenced by ccp_finalize(), fini_copy_prop(), and vrp_finalize().

bool update_call_from_tree ( gimple_stmt_iterator ,
tree   
)
bool update_gimple_call ( gimple_stmt_iterator ,
tree  ,
int  ,
  ... 
)
bool valid_gimple_rhs_p ( tree  )