GCC Middle and Back End API Reference
ccp_propagate Class Reference
Inheritance diagram for ccp_propagate:
Collaboration diagram for ccp_propagate:

Public Member Functions

enum ssa_prop_result visit_stmt (gimple *, edge *, tree *) final override
 
enum ssa_prop_result visit_phi (gphi *) final override
 
void ssa_propagate (void)
 

Private Member Functions

void simulate_stmt (gimple *stmt)
 
void simulate_block (basic_block)
 

Member Function Documentation

◆ simulate_block()

void ssa_propagation_engine::simulate_block ( basic_block block)
privateinherited

◆ simulate_stmt()

◆ ssa_propagate()

void ssa_propagation_engine::ssa_propagate ( void )
inherited

◆ visit_phi()

enum ssa_prop_result ccp_propagate::visit_phi ( gphi * phi)
finaloverridevirtual
Loop through the PHI_NODE's parameters for BLOCK and compare their
lattice values to determine PHI_NODE's lattice value.  The value of a
PHI node is determined calling ccp_lattice_meet with all the arguments
of the PHI node that are incoming via executable edges.   

Implements ssa_propagation_engine.

References ccp_lattice_meet(), CDI_DOMINATORS, CONSTANT, dominated_by_p(), dump_file, dump_flags, dump_lattice_value(), get_value_for_expr(), ggc_alloc(), gimple_bb(), gimple_phi_arg(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), i, NULL_TREE, print_generic_expr(), print_gimple_stmt(), set_lattice_value(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_PROP_INTERESTING, SSA_PROP_NOT_INTERESTING, SSA_PROP_VARYING, TDF_DETAILS, TREE_CODE, UNDEFINED, and VARYING.

◆ visit_stmt()

enum ssa_prop_result ccp_propagate::visit_stmt ( gimple * stmt,
edge * taken_edge_p,
tree * output_p )
finaloverridevirtual
Evaluate statement STMT.  If the statement produces an output value and
its evaluation changes the lattice value of its output, return
SSA_PROP_INTERESTING and set *OUTPUT_P to the SSA_NAME holding the
output value.

If STMT is a conditional branch and we can determine its truth
value, set *TAKEN_EDGE_P accordingly.  If STMT produces a varying
value, return SSA_PROP_VARYING.   

Implements ssa_propagation_engine.

References dump_file, dump_flags, FOR_EACH_SSA_TREE_OPERAND, ggc_alloc(), gimple_call_lhs(), NULL_TREE, print_gimple_stmt(), set_value_varying(), SSA_OP_ALL_DEFS, SSA_PROP_VARYING, TDF_DETAILS, visit_assignment(), and visit_cond_stmt().


The documentation for this class was generated from the following file: