GCC Middle and Back End API Reference
|
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) |
|
privateinherited |
Simulate the execution of BLOCK. Evaluate the statement associated with each variable reference inside the block.
References add_control_edge(), BB_VISITED, cfun, dump_file, dump_flags, EXIT_BLOCK_PTR_FOR_FN, basic_block_def::flags, FOR_EACH_EDGE, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), basic_block_def::index, NULL, ssa_propagation_engine::simulate_stmt(), basic_block_def::succs, and TDF_DETAILS.
Referenced by ssa_propagation_engine::ssa_propagate().
|
privateinherited |
Simulate the execution of STMT and update the work lists accordingly.
References add_control_edge(), add_ssa_edge(), as_a(), bitmap_clear_bit(), dump_file, dump_flags, FOR_EACH_EDGE, FOR_EACH_SSA_USE_OPERAND, gimple_bb(), gimple_nop_p(), gimple_phi_result(), gimple_uid(), NULL, NULL_TREE, PHI_ARG_DEF_FROM_EDGE, prop_set_simulate_again(), prop_simulate_again_p(), ssa_edge_worklist, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_OP_USE, SSA_PROP_INTERESTING, SSA_PROP_NOT_INTERESTING, SSA_PROP_VARYING, stmt_ends_bb_p(), basic_block_def::succs, TDF_DETAILS, TREE_CODE, USE_FROM_PTR, ssa_propagation_engine::visit_phi(), and ssa_propagation_engine::visit_stmt().
Referenced by ssa_propagation_engine::simulate_block(), and ssa_propagation_engine::ssa_propagate().
|
inherited |
Entry point to the propagation engine. The VISIT_STMT virtual function is called for every statement visited and the VISIT_PHI virtual function is called for every PHI node visited.
References add_control_edge(), BASIC_BLOCK_FOR_FN, bb_to_cfg_order, bitmap_clear_bit(), bitmap_empty_p(), bitmap_first_set_bit(), cfg_blocks, cfg_order_to_bb, cfun, curr_order, dump_file, dump_flags, ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, gimple_bb(), basic_block_def::index, NULL, print_gimple_stmt(), ssa_propagation_engine::simulate_block(), ssa_propagation_engine::simulate_stmt(), ssa_edge_worklist, ssa_prop_fini(), ssa_prop_init(), TDF_DETAILS, and uid_to_stmt.
Referenced by do_ssa_ccp(), execute_copy_prop(), and tree_lower_complex().
|
finaloverridevirtual |
Visit PHI node PHI. If all the arguments produce the same value, set it to be the value of the LHS of PHI.
Implements ssa_propagation_engine.
References dump_copy_of(), dump_file, dump_flags, get_copy_of_val(), gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), i, LOOP_CLOSED_SSA, loop_exit_edge_p(), loops_state_satisfies_p(), may_propagate_copy(), NULL_TREE, operand_equal_p(), print_gimple_stmt(), set_copy_of_val(), SSA_NAME_OCCURS_IN_ABNORMAL_PHI, SSA_PROP_INTERESTING, SSA_PROP_NOT_INTERESTING, SSA_PROP_VARYING, TDF_DETAILS, TREE_CODE, prop_value_t::value, and valueize_val().
|
finaloverridevirtual |
Evaluate statement STMT. If the statement produces a new output value, return SSA_PROP_INTERESTING and store the SSA_NAME holding the new value in *RESULT_P. If STMT is a conditional branch and we can determine its truth value, set *TAKEN_EDGE_P accordingly. If the new value produced by STMT is varying, return SSA_PROP_VARYING.
Implements ssa_propagation_engine.
References copy_prop_visit_assignment(), copy_prop_visit_cond_stmt(), dump_file, dump_flags, FOR_EACH_SSA_TREE_OPERAND, gimple_assign_lhs(), i, is_gimple_assign(), print_gimple_stmt(), set_copy_of_val(), SSA_OP_ALL_DEFS, SSA_PROP_VARYING, TDF_DETAILS, and TREE_CODE.