GCC Middle and Back End API Reference
|
Public Types | |
enum | reachability { ALL_BLOCKS , REACHABLE_BLOCKS , REACHABLE_BLOCKS_PRESERVING_FLAGS } |
Public Member Functions | |
rpo_elim (basic_block entry_) | |
tree | eliminate_avail (basic_block, tree op) final override |
void | eliminate_push_avail (basic_block, tree) final override |
edge | before_dom_children (basic_block) final override |
void | after_dom_children (basic_block) final override |
tree | eliminate_insert (basic_block, gimple_stmt_iterator *gsi, tree val) |
void | eliminate_stmt (basic_block, gimple_stmt_iterator *) |
unsigned | eliminate_cleanup (bool region_p=false) |
void | walk (basic_block) |
Data Fields | |
basic_block | entry |
vn_avail * | m_avail_freelist |
bool | do_pre |
unsigned int | el_todo |
unsigned int | eliminations |
unsigned int | insertions |
bitmap | inserted_exprs |
bitmap | need_eh_cleanup |
bitmap | need_ab_cleanup |
auto_vec< gimple * > | to_remove |
auto_vec< gimple * > | to_fixup |
auto_vec< tree > | avail |
auto_vec< tree > | avail_stack |
Static Public Attributes | |
static const edge | STOP = (edge)-1 |
Private Member Functions | |
bool | bb_reachable (struct function *, basic_block) |
void | propagate_unreachable_to_edges (basic_block, FILE *, dump_flags_t) |
Private Attributes | |
enum cdi_direction | m_dom_direction: 2 |
enum reachability | m_reachability: 2 |
bool | m_user_bb_to_rpo |
basic_block | m_unreachable_dom |
int * | m_bb_to_rpo |
Adaptor to the elimination engine using RPO availability.
|
inherited |
|
inline |
References CDI_DOMINATORS, eliminate_dom_walker::eliminate_dom_walker(), entry, m_avail_freelist, and NULL.
|
finaloverridevirtualinherited |
Make no longer available leaders no longer available.
Reimplemented from dom_walker.
References avail, avail_stack, NULL_TREE, SSA_NAME_VERSION, vn_ssa_aux::valnum, and VN_INFO().
|
privateinherited |
Return TRUE if BB is reachable, false otherwise.
References ALL_BLOCKS, CDI_DOMINATORS, dominated_by_p(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, m_reachability, m_unreachable_dom, and basic_block_def::preds.
Referenced by walk().
|
finaloverridevirtualinherited |
Perform elimination for the basic-block B during the domwalk.
Reimplemented from dom_walker.
References avail_stack, b, BB_EXECUTABLE, bitmap_bit_p, dump_file, dump_flags, eliminate_avail(), eliminate_push_avail(), eliminate_stmt(), eliminations, fold_convert, FOR_EACH_EDGE, gimple_build_assign(), gsi_after_labels(), gsi_end_p(), gsi_insert_before(), GSI_NEW_STMT, gsi_next(), gsi_start_bb(), gsi_start_phis(), inserted_exprs, may_propagate_copy(), NULL, NULL_TREE, PHI_ARG_DEF_PTR_FROM_EDGE, PHI_RESULT, print_generic_expr(), propagate_value(), remove_phi_node(), SSA_NAME_VERSION, TDF_DETAILS, to_remove, TREE_CODE, TREE_TYPE, USE_FROM_PTR, useless_type_conversion_p(), virtual_operand_p(), and vn_context_bb.
|
finaloverridevirtual |
Return a leader for OPs value that is valid at BB.
Reimplemented from eliminate_dom_walker.
References vn_ssa_aux::avail, BASIC_BLOCK_FOR_FN, cfun, dominated_by_p_w_unex(), dump_file, dump_flags, flow_bb_inside_loop_p(), gimple_bb(), basic_block_def::index, vn_avail::leader, vn_avail::location, LOOP_CLOSED_SSA, loops_state_satisfies_p(), vn_avail::next, NULL_TREE, print_generic_expr(), ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_VAL(), TDF_DETAILS, TREE_CODE, visited, vn_ssa_aux::visited, VN_INFO(), and VN_TOP.
Referenced by process_bb().
Remove queued stmts and perform delayed cleanups.
References bitmap_empty_p(), bitmap_set_bit, cfun, dump_file, dump_flags, dyn_cast(), el_todo, eliminate_avail(), eliminations, fixup_noreturn_call(), gimple_assign_set_rhs_from_tree(), gimple_bb(), gimple_build_assign(), gimple_get_lhs(), gimple_phi_result(), gimple_purge_all_dead_abnormal_call_edges(), gimple_purge_all_dead_eh_edges(), gsi_after_labels(), gsi_for_stmt(), gsi_insert_before(), gsi_remove(), GSI_SAME_STMT, gsi_stmt(), has_zero_uses(), basic_block_def::index, insertions, is_gimple_assign(), is_gimple_call(), maybe_clean_or_replace_eh_stmt(), need_ab_cleanup, need_eh_cleanup, print_gimple_stmt(), release_defs(), remove_phi_node(), statistics_counter_event(), stmt_can_make_abnormal_goto(), TDF_DETAILS, TDF_NONE, to_fixup, to_remove, TODO_cleanup_cfg, TREE_CODE, unlink_stmt_vdef(), and update_stmt().
Referenced by do_rpo_vn_1(), and eliminate_with_rpo_vn().
|
inherited |
Insert the expression recorded by SCCVN for VAL at *GSI. Returns the leader for the expression if insertion was successful.
References CONVERT_EXPR_CODE_P, dump_file, dump_flags, dyn_cast(), eliminate_avail(), vn_ssa_aux::expr, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_bb(), gimple_build(), gimple_seq_discard(), gimple_seq_first_stmt(), gimple_seq_singleton_p(), gsi_insert_seq_before(), GSI_SAME_STMT, insertions, NULL, NULL_TREE, print_generic_expr(), print_gimple_stmt(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, TDF_DETAILS, TREE_CODE, TREE_OPERAND, TREE_TYPE, vn_ssa_aux::valnum, vn_ssa_aux::visited, and VN_INFO().
Referenced by eliminate_stmt().
|
finaloverridevirtual |
Make LEADER a leader for its value at BB.
Reimplemented from eliminate_dom_walker.
References vn_ssa_aux::avail, dump_file, dump_flags, basic_block_def::index, is_gimple_min_invariant(), last_pushed_avail, vn_avail::leader, vn_avail::location, m_avail_freelist, vn_avail::next, vn_avail::next_undo, print_generic_expr(), SSA_NAME_VERSION, TDF_DETAILS, vn_ssa_aux::valnum, VN_INFO(), vn_ssa_aux_obstack, and VN_TOP.
Referenced by process_bb().
|
inherited |
References alias_set_subset_of(), ao_ref_alias_set(), ao_ref_base_alias_set(), ao_ref_init(), as_a(), b, vn_reference_s::base_set, bit_from_pos(), bitmap_bit_p, bitmap_set_bit, build2(), build3(), build_nonstandard_integer_type(), builtin_decl_unreachable(), cfun, component_ref_field_offset(), CONVERT_EXPR_CODE_P, current_function_decl, dbg_cnt(), DECL_BIT_FIELD_TYPE, DECL_FIELD_BIT_OFFSET, DECL_HARD_REGISTER, lang_hooks::decl_printable_name, do_pre, dump_enabled_p(), dump_file, dump_flags, dump_possible_polymorphic_call_targets(), dump_printf_loc(), dyn_cast(), EDGE_SUCC, el_todo, eliminate_avail(), eliminate_insert(), eliminate_push_avail(), eliminations, vn_ssa_aux::expr, flow_bb_inside_loop_p(), fold_convert, fold_stmt(), follow_all_ssa_edges(), FOR_EACH_SSA_TREE_OPERAND, FOR_EACH_SSA_USE_OPERAND, FUNC_OR_METHOD_TYPE_P, gcc_assert, gcc_unreachable, ipa_polymorphic_call_context::get_dynamic_type(), gimple_assign_lhs(), gimple_assign_load_p(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_assign_single_p(), gimple_bb(), gimple_call_fn(), gimple_call_noreturn_p(), gimple_call_set_fndecl(), gimple_call_set_fntype(), gimple_cond_false_p(), gimple_cond_make_false(), gimple_cond_make_true(), gimple_cond_true_p(), gimple_get_lhs(), gimple_has_volatile_ops(), gimple_nop_p(), gimple_switch_index(), gimple_vdef(), gimple_vuse(), gsi_end_p(), gsi_next(), gsi_prev(), gsi_start_bb(), gsi_stmt(), has_VN_INFO(), has_zero_uses(), loop::header, inserted_exprs, INTEGRAL_TYPE_P, is_gimple_assign(), is_gimple_call(), is_gimple_debug(), is_gimple_min_invariant(), is_gimple_reg(), is_global_var(), basic_block_def::loop_father, loop_outer(), MAX_FIXED_MODE_SIZE, may_propagate_copy(), maybe_clean_or_replace_eh_stmt(), maybe_duplicate_ssa_info_at_copy(), maybe_remove_unused_call_args(), MSG_OPTIMIZED_LOCATIONS, need_ab_cleanup, need_eh_cleanup, vn_ssa_aux::needs_insertion, NULL, NULL_TREE, loop::num, obj_type_ref_class(), OBJ_TYPE_REF_OBJECT, OBJ_TYPE_REF_TOKEN, operand_equal_p(), POINTER_TYPE_P, poly_int_tree_p(), possible_polymorphic_call_targets(), print_generic_expr(), print_gimple_expr(), print_gimple_stmt(), propagate_tree_value_into_stmt(), propagate_value(), recompute_tree_invariant_for_addr_expr(), vn_reference_s::set, simple_iv(), SSA_NAME_DEF_STMT, SSA_NAME_IN_FREE_LIST, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSA_OP_ALL_DEFS, SSA_OP_DEF, SSA_OP_USE, stmt_can_make_abnormal_goto(), TDF_DETAILS, to_fixup, to_remove, TODO_cleanup_cfg, TREE_CODE, TREE_INT_CST_LOW, TREE_OPERAND, tree_to_uhwi(), TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, type_has_mode_precision_p(), TYPE_PRECISION, TYPE_SIZE, TYPE_UNSIGNED, update_stmt(), USE_FROM_PTR, useless_type_conversion_p(), vn_ssa_aux::valnum, virtual_method_call_p(), vn_ssa_aux::visited, VN_INFO(), vn_reference_lookup(), VN_TOP, VN_WALKREWRITE, void_type_node, and VOID_TYPE_P.
Referenced by before_dom_children(), and process_bb().
|
privateinherited |
BB has been determined to be unreachable. Propagate that property to incoming and outgoing edges of BB as appropriate.
References CDI_DOMINATORS, dominated_by_p(), dump_file, dump_flags, FOR_EACH_EDGE, basic_block_def::index, m_unreachable_dom, basic_block_def::preds, basic_block_def::succs, and TDF_DETAILS.
Referenced by walk().
|
inherited |
Recursively walk the dominator tree. BB is the basic block we are currently visiting.
References after_dom_children(), bb_reachable(), before_dom_children(), CDI_DOMINATORS, cfun, dump_file, dump_flags, EDGE_COUNT, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, first_dom_son(), FOR_EACH_EDGE, free(), i, last_basic_block_for_fn, m_bb_to_rpo, m_dom_direction, m_reachability, m_unreachable_dom, m_user_bb_to_rpo, n_basic_blocks_for_fn, next_dom_son(), NULL, pre_and_rev_post_order_compute(), basic_block_def::preds, propagate_unreachable_to_edges(), REACHABLE_BLOCKS, set_all_edges_as_executable(), sort_bbs_postorder(), STOP, basic_block_def::succs, and worklist.
Referenced by array_bounds_checker::check(), eliminate_with_rpo_vn(), find_comparisons(), get_non_trapping(), ipa_analyze_node(), ipcp_transform_function(), rewrite_blocks(), and substitute_and_fold_engine::substitute_and_fold().
Referenced by after_dom_children(), eliminate_avail(), and eliminate_push_avail().
Referenced by after_dom_children(), before_dom_children(), and eliminate_push_avail().
|
inherited |
Referenced by eliminate_dom_walker(), and eliminate_stmt().
|
inherited |
Referenced by eliminate_cleanup(), eliminate_dom_walker(), and eliminate_stmt().
|
inherited |
Referenced by before_dom_children(), eliminate_cleanup(), eliminate_dom_walker(), eliminate_stmt(), and process_bb().
basic_block rpo_elim::entry |
Referenced by rpo_elim().
|
inherited |
Referenced by before_dom_children(), eliminate_dom_walker(), and eliminate_stmt().
|
inherited |
Referenced by eliminate_cleanup(), eliminate_dom_walker(), and eliminate_insert().
vn_avail* rpo_elim::m_avail_freelist |
Referenced by do_unwind(), eliminate_push_avail(), and rpo_elim().
|
privateinherited |
Referenced by dom_walker(), walk(), and ~dom_walker().
|
privateinherited |
Referenced by dom_walker(), and walk().
|
privateinherited |
Referenced by bb_reachable(), dom_walker(), and walk().
|
privateinherited |
Referenced by bb_reachable(), dom_walker(), propagate_unreachable_to_edges(), and walk().
|
privateinherited |
Referenced by dom_walker(), walk(), and ~dom_walker().
|
inherited |
Referenced by eliminate_cleanup(), eliminate_dom_walker(), eliminate_stmt(), and ~eliminate_dom_walker().
|
inherited |
Referenced by eliminate_cleanup(), eliminate_dom_walker(), eliminate_stmt(), and ~eliminate_dom_walker().
Referenced by rewrite_update_dom_walker::before_dom_children(), and walk().
Referenced by eliminate_cleanup(), and eliminate_stmt().
Referenced by before_dom_children(), eliminate_cleanup(), eliminate_stmt(), and process_bb().