GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "fold-const.h"
#include "calls.h"
#include "cfganal.h"
#include "tree-eh.h"
#include "gimplify.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-niter.h"
#include "tree-into-ssa.h"
#include "tree-dfa.h"
#include "cfgloop.h"
#include "tree-scalar-evolution.h"
#include "tree-ssa-propagate.h"
#include "gimple-fold.h"
#include "tree-ssa.h"
#include "ipa-modref-tree.h"
#include "ipa-modref.h"
Data Structures | |
struct | stmt_stats |
Macros | |
#define | STMT_NECESSARY GF_PLF_1 |
Variables | |
static struct stmt_stats | stats |
static vec< gimple * > | worklist |
static sbitmap | processed |
static sbitmap | last_stmt_necessary |
static sbitmap | bb_contains_live_stmts |
static control_dependences * | cd |
static sbitmap | visited_control_parents |
static bool | cfg_altered |
static int * | bb_postorder |
static bitmap | visited = NULL |
static unsigned int | longest_chain = 0 |
static unsigned int | total_chain = 0 |
static unsigned int | nr_walks = 0 |
static bool | chain_ovfl = false |
#define STMT_NECESSARY GF_PLF_1 |
Return true if STMT is a conditional if (ptr != NULL) where ptr was returned by a removable allocation function.
References dyn_cast(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), integer_zerop(), is_removable_allocation_p(), SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by eliminate_unnecessary_stmts(), and propagate_necessity().
|
static |
Returns whether the control parents of BB are preserved.
References bitmap_bit_p, bitmap_set_bit, cd, EXECUTE_IF_SET_IN_BITMAP, control_dependences::get_edge_src(), control_dependences::get_edges_dependent_on(), basic_block_def::index, last_stmt_necessary, and visited_control_parents.
Referenced by eliminate_unnecessary_stmts().
Return true for PHI nodes with one or identical arguments can be removed.
References gimple_phi_arg_def(), gimple_phi_num_args(), and i.
Referenced by propagate_necessity(), and remove_dead_phis().
Eliminate unnecessary statements. Any instruction not marked as necessary contributes nothing to the program, and can be deleted.
References as_a(), bb_contains_live_stmts, bb_postorder, bitmap_bit_p, bitmap_clear(), bitmap_set_bit, build_one_cst(), CDI_DOMINATORS, cfg_altered, cfun, checks_return_value_of_removable_allocation_p(), clear_special_calls(), control_parents_preserved_p(), DECL_UID, delete_basic_block(), dom_info_available_p(), dump_file, dump_flags, dyn_cast(), ei_next(), ei_safe_edge(), ei_start, ENTRY_BLOCK_PTR_FOR_FN, EXIT_BLOCK_PTR_FOR_FN, find_unreachable_blocks(), first_dom_son(), basic_block_def::flags, FOR_EACH_BB_FN, FOR_EACH_IMM_USE_STMT, FOR_EACH_SSA_USE_OPERAND, free(), gcc_assert, gcc_checking_assert, get_all_dominated_blocks(), gimple_bb(), gimple_call_arg(), gimple_call_builtin_p(), gimple_call_from_new_or_delete(), gimple_call_internal_fn(), gimple_call_internal_p(), gimple_call_lhs(), gimple_call_num_args(), gimple_call_operator_delete_p(), gimple_call_set_lhs(), gimple_clobber_p(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_set_lhs(), gimple_debug_bind_get_var(), gimple_debug_bind_p(), gimple_nop_p(), gimple_phi_result(), gimple_plf(), gimple_set_plf(), gsi_end_p(), gsi_last_bb(), gsi_next(), gsi_prev(), gsi_start_phis(), gsi_stmt(), i, basic_block_def::index, integer_nonzerop(), integer_zerop(), is_gimple_call(), is_gimple_debug(), is_removable_allocation_p(), mark_virtual_phi_result_for_renaming(), maybe_clean_or_replace_eh_stmt(), maybe_optimize_arith_overflow(), notice_special_calls(), NULL, NULL_TREE, basic_block_def::prev_bb, print_gimple_stmt(), processed, release_ssa_name(), remove_dead_phis(), remove_dead_stmt(), remove_edge(), safe_dyn_cast(), single_succ(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSA_OP_USE, stmt_can_make_abnormal_goto(), STMT_NECESSARY, basic_block_def::succs, TDF_DETAILS, TDF_SLIM, TREE_CODE, TREE_TYPE, update_stmt(), USE_FROM_PTR, and virtual_operand_p().
Referenced by perform_tree_ssa_dce().
Helper for maybe_optimize_arith_overflow. Find in *TP if there are any uses of data (SSA_NAME) other than REALPART_EXPR referencing it.
References NULL_TREE, TREE_CODE, and TYPE_P.
Referenced by maybe_optimize_arith_overflow().
|
static |
Find obviously necessary statements. These are things like most function calls, and stores to file level variables. If EL is NULL, control statements are conservatively marked as necessary. Otherwise it contains the list of edges used by control dependence analysis.
References cfun, current_function_decl, dump_file, loop_exit::e, ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_PURE, loop::exits, finite_loop_p(), flags_from_decl_or_type(), FOR_EACH_BB_FN, FOR_EACH_EDGE, gimple_set_plf(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), loop::latch, mark_control_dependent_edges_necessary(), mark_irreducible_loops(), mark_stmt_if_obviously_necessary(), loop_exit::next, loop::num, STMT_NECESSARY, and basic_block_def::succs.
Referenced by perform_tree_ssa_dce().
|
inlinestatic |
1 if CALLEE is the function __cxa_atexit. 2 if CALLEE is the function __aeabi_atexit. 0 otherwise.
References DECL_NAME, IDENTIFIER_POINTER, and NULL_TREE.
Referenced by is_removable_cxa_atexit_call().
Return true if STMT is a call to allocation function that can be optimized out if the memory block is never used for anything else then NULL pointer check or free. If NON_NULL_CHECK is false, we can furhter assume that return value is never checked to be non-NULL.
References BUILT_IN_NORMAL, CASE_BUILT_IN_ALLOCA, DECL_FUNCTION_CODE(), DECL_IS_REPLACEABLE_OPERATOR_NEW_P, fndecl_built_in_p(), gimple_call_fndecl(), gimple_call_from_new_or_delete(), and NULL_TREE.
Referenced by checks_return_value_of_removable_allocation_p(), eliminate_unnecessary_stmts(), mark_stmt_if_obviously_necessary(), and propagate_necessity().
True if STMT is a call to __cxa_atexit (or __aeabi_atexit) and the function argument to that call is a const or pure non-looping function decl.
References ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_NORETURN, ECF_PURE, flags_from_decl_or_type(), gimple_call_arg(), gimple_call_fndecl(), gimple_call_num_args(), is_cxa_atexit(), TREE_CODE, and TREE_OPERAND.
Referenced by mark_all_reaching_defs_necessary_1(), mark_stmt_if_obviously_necessary(), and propagate_necessity().
|
inlinestatic |
True if we should treat any stmt with a vdef as necessary.
Referenced by mark_aliased_reaching_defs_necessary(), mark_all_reaching_defs_necessary(), mark_stmt_if_obviously_necessary(), and propagate_necessity().
|
static |
Look for a non-virtual PHIs and make a forwarder block when all PHIs have the same argument on a set of edges. This is to not consider control dependences of individual edges for same values but only for the common set.
References add_phi_arg(), bb_has_abnormal_pred(), CDI_DOMINATORS, CONSTANT_CLASS_P, copy_ssa_name(), basic_block_def::count, count, create_phi_node(), EDGE_COUNT, FOR_EACH_BB_FN, free_dominance_info(), get_virtual_phi(), gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_nonvirtual_phis(), loop::header, i, iterative_hash_expr(), LOOP_CLOSED_SSA, loop_exit_edge_p(), basic_block_def::loop_father, loops_state_satisfies_p(), operand_equal_p(), gphi_iterator::phi(), PHI_ARG_DEF_FROM_EDGE, basic_block_def::preds, redirect_edge_and_branch_force(), redirect_edge_var_map_clear(), SET_PHI_ARG_DEF, single_succ_edge(), sort_phi_args(), split_edge(), todo, TODO_cleanup_cfg, TREE_CODE, UNKNOWN_LOCATION, virtual_operand_p(), and profile_count::zero().
Referenced by perform_tree_ssa_dce().
gimple_opt_pass * make_pass_cd_dce | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_dce | ( | gcc::context * | ctxt | ) |
References ao_ref_init(), chain_ovfl, gcc_assert, gcc_checking_assert, gimple_bb(), gimple_vuse(), keep_all_vdefs_p(), longest_chain, mark_aliased_reaching_defs_necessary_1(), nr_walks, NULL, total_chain, and walk_aliased_vdefs().
Referenced by propagate_necessity().
Worker for the walker that marks reaching definitions of REF, which is based on a non-aliased decl, necessary. It returns true whenever the defining statement of the current VDEF is a kill for REF, as no dominating may-defs are necessary for REF anymore. DATA points to the basic-block that contains the stmt that refers to REF.
References ao_ref_base(), ao_ref::base, CDI_DOMINATORS, cfun, dominated_by_p(), get_ref_base_and_extent(), gimple_bb(), gimple_clobber_p(), gimple_get_lhs(), gimple_has_lhs(), known_eq, mark_operand_necessary(), ao_ref::max_size, ao_ref::offset, offset, operand_equal_p(), ao_ref::ref, SSA_NAME_DEF_STMT, stmt_can_throw_internal(), and TREE_CODE.
Referenced by mark_aliased_reaching_defs_necessary().
|
static |
References gcc_checking_assert, gimple_vuse(), keep_all_vdefs_p(), mark_all_reaching_defs_necessary_1(), NULL, visited, and walk_aliased_vdefs().
Referenced by propagate_necessity().
Worker for the walker that marks reaching definitions of REF, which is not based on a non-aliased decl. For simplicity we need to end up marking all may-defs necessary that are not based on a non-aliased decl. The only job of this walker is to skip may-defs based on a non-aliased decl.
References bitmap_bit_p, BUILT_IN_NORMAL, CASE_BUILT_IN_ALLOCA, chain_ovfl, DECL_FUNCTION_CODE(), DECL_IS_OPERATOR_DELETE_P, DECL_IS_REPLACEABLE_OPERATOR_NEW_P, dyn_cast(), fndecl_built_in_p(), gcc_assert, gimple_assign_lhs(), gimple_assign_single_p(), gimple_call_fndecl(), gimple_call_from_new_or_delete(), gimple_clobber_p(), gimple_nop_p(), gimple_plf(), is_removable_cxa_atexit_call(), mark_operand_necessary(), NULL_TREE, processed, ref_may_be_aliased(), SSA_NAME_DEF_STMT, SSA_NAME_VERSION, and STMT_NECESSARY.
Referenced by mark_all_reaching_defs_necessary().
|
static |
Mark control dependent edges of BB as necessary. We have to do this only once for each basic block so we set the appropriate bit after we're done. When IGNORE_SELF is true, ignore BB in the list of control dependences.
References bitmap_set_bit, cd, cfun, ENTRY_BLOCK_PTR_FOR_FN, EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK_PTR_FOR_FN, gcc_assert, control_dependences::get_edge_src(), control_dependences::get_edges_dependent_on(), basic_block_def::index, mark_control_dependent_edges_necessary(), mark_last_stmt_necessary(), and visited_control_parents.
Referenced by find_obviously_necessary_stmts(), mark_control_dependent_edges_necessary(), and propagate_necessity().
|
static |
Mark the last statement of BB as necessary.
References bb_contains_live_stmts, bitmap_set_bit, gsi_last_bb(), basic_block_def::index, is_ctrl_stmt(), last_stmt_necessary, and mark_stmt_necessary().
Referenced by mark_control_dependent_edges_necessary(), and propagate_necessity().
|
inlinestatic |
Mark the statement defining operand OP as necessary.
References bb_contains_live_stmts, bitmap_bit_p, bitmap_set_bit, dump_file, dump_flags, gcc_assert, gimple_bb(), gimple_nop_p(), gimple_plf(), gimple_set_plf(), print_generic_expr(), print_gimple_stmt(), processed, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, STMT_NECESSARY, TDF_DETAILS, and worklist.
Referenced by mark_aliased_reaching_defs_necessary_1(), mark_all_reaching_defs_necessary_1(), and propagate_necessity().
Mark STMT as necessary if it obviously is. Add it to the worklist if it can make other statements necessary. If AGGRESSIVE is false, control statements are conservatively marked as necessary.
References as_a(), cfun, ECF_NORETURN, EDGE_COUNT, gcc_assert, gimple_bb(), gimple_call_ctrl_altering_p(), gimple_call_flags(), gimple_call_internal_p(), gimple_clobber_p(), gimple_debug_bind_get_var(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_debug_nonbind_marker_p(), gimple_has_side_effects(), gimple_vdef(), is_ctrl_altering_stmt(), is_removable_allocation_p(), is_removable_cxa_atexit_call(), keep_all_vdefs_p(), mark_stmt_necessary(), simple_goto_p(), SSA_OP_USE, stmt_could_throw_p(), stmt_may_clobber_global_p(), TREE_CODE, and zero_ssa_operands().
Referenced by find_obviously_necessary_stmts().
If STMT is not already marked necessary, mark it, and add it to the worklist if ADD_TO_WORKLIST is true.
References add_to_worklist(), bb_contains_live_stmts, bitmap_set_bit, dump_file, dump_flags, gcc_assert, gimple_bb(), gimple_plf(), gimple_set_plf(), is_gimple_debug(), print_gimple_stmt(), STMT_NECESSARY, TDF_DETAILS, TDF_SLIM, and worklist.
Referenced by mark_last_stmt_necessary(), and mark_stmt_if_obviously_necessary().
|
static |
If the IMAGPART_EXPR of the {ADD,SUB,MUL}_OVERFLOW result is never used, but REALPART_EXPR is, optimize the {ADD,SUB,MUL}_OVERFLOW internal calls into plain unsigned {PLUS,MINUS,MULT}_EXPR, and if needed reset debug uses.
References build2_loc(), build_complex(), build_complex_type(), build_zero_cst(), drop_tree_overflow(), dump_file, dump_flags, find_non_realpart_uses(), fold_build2_loc(), fold_convert_loc(), FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_call_arg(), gimple_call_lhs(), gimple_debug_bind_get_value(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), gimple_location(), gimplify_and_update_call_from_tree(), gsi_stmt(), is_gimple_assign(), is_gimple_debug(), NULL, print_generic_stmt(), print_gimple_stmt(), TDF_DETAILS, TDF_SLIM, TREE_CODE, TREE_OPERAND, TREE_OVERFLOW, TREE_TYPE, unsigned_type_for(), update_stmt(), USE_STMT, and walk_tree.
Referenced by eliminate_unnecessary_stmts().
|
static |
Main routine to eliminate dead code. AGGRESSIVE controls the aggressiveness of the algorithm. In conservative mode, we ignore control dependence and simply declare all but the most trivially dead branches necessary. This mode is fast. In aggressive mode, control dependences are taken into account, which results in more dead code elimination, but at the cost of some time.
References BITMAP_ALLOC, bitmap_clear(), BITMAP_FREE, calculate_dominance_info(), cd, CDI_DOMINATORS, CDI_POST_DOMINATORS, cfg_altered, cfun, chain_ovfl, dump_file, dump_flags, eliminate_unnecessary_stmts(), find_obviously_necessary_stmts(), free_dominance_info(), free_numbers_of_iterations_estimates(), last_basic_block_for_fn, longest_chain, loop_optimizer_finalize(), loop_optimizer_init(), LOOPS_HAVE_RECORDED_EXITS, LOOPS_NORMAL, make_forwarders_with_degenerate_phis(), mark_dfs_back_edges(), nr_walks, NULL, print_stats(), propagate_necessity(), sbitmap_alloc(), scev_finalize(), scev_initialize(), scev_initialized_p(), scev_reset(), statistics_counter_event(), TDF_DETAILS, TDF_STATS, todo, TODO_cleanup_cfg, TODO_update_ssa, total_chain, tree_dce_done(), tree_dce_init(), visited, and visited_control_parents.
|
static |
|
static |
Propagate necessity using the operands of necessary statements. Process the uses on each statement in the worklist, and add all feeding statements which contribute to the calculation of this value to the worklist. In conservative mode, EL is NULL.
References as_a(), bitmap_bit_p, bitmap_clear(), CDI_POST_DOMINATORS, cfun, chain_ovfl, checks_return_value_of_removable_allocation_p(), DECL_IS_OPERATOR_DELETE_P, DECL_IS_REPLACEABLE_OPERATOR_NEW_P, degenerate_phi_p(), dump_file, dump_flags, dyn_cast(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_SSA_TREE_OPERAND, gcc_unreachable, get_immediate_dominator(), gimple_asm_input_op(), gimple_asm_ninputs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_bb(), gimple_call_arg(), gimple_call_builtin_p(), gimple_call_fndecl(), gimple_call_from_new_or_delete(), gimple_call_num_args(), gimple_call_operator_delete_p(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), gimple_return_retval(), gimple_vuse(), i, basic_block_def::index, ipa_modref_callee_reads_no_memory_p(), is_gimple_call(), is_gimple_min_invariant(), is_removable_allocation_p(), is_removable_cxa_atexit_call(), keep_all_vdefs_p(), longest_chain, mark_aliased_reaching_defs_necessary(), mark_all_reaching_defs_necessary(), mark_control_dependent_edges_necessary(), mark_last_stmt_necessary(), mark_operand_necessary(), nr_walks, NULL_TREE, PHI_ARG_DEF, print_gimple_stmt(), ref_may_be_aliased(), SSA_NAME_DEF_STMT, SSA_OP_USE, TDF_DETAILS, TDF_SLIM, total_chain, TREE_CODE, TREE_OPERAND, TREE_VALUE, valid_new_delete_pair_p(), virtual_operand_p(), visited, visited_control_parents, and worklist.
Referenced by perform_tree_ssa_dce().
Return true if REF is based on an aliased base, otherwise false.
References DECL_P, handled_component_p(), may_be_aliased(), TREE_CODE, and TREE_OPERAND.
Referenced by mark_all_reaching_defs_necessary_1(), and propagate_necessity().
|
static |
Remove dead PHI nodes from block BB.
References degenerate_phi_p(), dump_file, dump_flags, FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, gimple_phi_arg_def(), gimple_phi_result(), gimple_plf(), gimple_set_plf(), gsi_end_p(), gsi_next(), gsi_start_phis(), LOOP_CLOSED_SSA, loops_state_satisfies_p(), gphi_iterator::phi(), print_gimple_stmt(), remove_phi_node(), SET_USE, SSA_NAME_OCCURS_IN_ABNORMAL_PHI, STMT_NECESSARY, TDF_DETAILS, TDF_SLIM, TREE_CODE, and virtual_operand_p().
Referenced by eliminate_unnecessary_stmts().
|
static |
Remove dead statement pointed to by iterator I. Receives the basic block BB containing I so that we don't have to look it up.
References profile_probability::always(), bb_contains_live_stmts, bb_postorder, cfun, DECL_HAS_VALUE_EXPR_P, DECL_IGNORED_P, dump_file, dump_flags, EXIT_BLOCK_PTR_FOR_FN, FOR_EACH_EDGE, free(), gcc_assert, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_build_debug_bind(), gsi_insert_after(), gsi_remove(), GSI_SAME_STMT, gsi_stmt(), i, inverted_rev_post_order_compute(), is_ctrl_stmt(), is_gimple_reg_type(), is_gimple_val(), is_global_var(), last_basic_block_for_fn, loop_exit_edge_p(), basic_block_def::loop_father, LOOPS_NEED_FIXUP, loops_state_set(), MAY_HAVE_DEBUG_BIND_STMTS, n_basic_blocks_for_fn, NULL, print_gimple_stmt(), release_defs(), single_succ_edge(), single_succ_p(), basic_block_def::succs, TDF_DETAILS, TDF_SLIM, TREE_CODE, TREE_TYPE, unlink_stmt_vdef(), unshare_expr(), and VAR_P.
Referenced by eliminate_unnecessary_stmts().
A cheap DCE interface. WORKLIST is a list of possibly dead stmts and is consumed by this function. The function has linear complexity in the number of dead stmts with a constant factor like the average SSA use operands number.
References bitmap_clear_first_set_bit(), bitmap_empty_p(), bitmap_set_bit, cfun, dump_file, dump_flags, FOR_EACH_IMM_USE_STMT, FOR_EACH_PHI_OR_STMT_USE, gimple_bb(), gimple_has_side_effects(), gsi_for_stmt(), gsi_remove(), has_zero_uses(), i, is_a(), is_gimple_debug(), need_eh_cleanup, print_gimple_stmt(), release_defs(), remove_phi_node(), single_ssa_def_operand(), ssa_name, SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, SSA_NAME_VERSION, SSA_OP_ALL_DEFS, SSA_OP_USE, statistics_counter_event(), stmt_could_throw_p(), stmt_unremovable_because_of_non_call_eh_p(), TDF_DETAILS, TREE_CODE, unlink_stmt_vdef(), USE_FROM_PTR, and worklist.
Referenced by analyze_candidates_and_replace(), execute_fixup_cfg(), remove_unreachable::handle_early(), tree_loop_interchange::interchange(), object_sizes_execute(), remove_unreachable::remove_and_update_globals(), replace_phi_edge_with_variable(), substitute_and_fold_engine::substitute_and_fold(), tree_lower_complex(), and scc_copy_prop::~scc_copy_prop().
|
static |
Sort PHI argument values for make_forwarders_with_degenerate_phis.
Referenced by make_forwarders_with_degenerate_phis().
|
static |
Cleanup after this pass.
References bb_contains_live_stmts, cd, last_stmt_necessary, NULL, processed, sbitmap_free(), visited_control_parents, and worklist.
Referenced by perform_tree_ssa_dce().
|
static |
Initialization for this pass. Set up the used data structures.
References bb_contains_live_stmts, bitmap_clear(), cfg_altered, cfun, last_basic_block_for_fn, last_stmt_necessary, num_ssa_names, processed, sbitmap_alloc(), and worklist.
Referenced by perform_tree_ssa_dce().
Return that NEW_CALL and DELETE_CALL are a valid pair of new and delete operators.
References DECL_ASSEMBLER_NAME, gimple_call_fndecl(), and valid_new_delete_pair_p().
Referenced by new_delete_mismatch_p(), propagate_necessity(), and valid_new_delete_pair_p().
|
static |
Vector indicating that BB contains statements that are live.
Referenced by eliminate_unnecessary_stmts(), mark_last_stmt_necessary(), mark_operand_necessary(), mark_stmt_necessary(), remove_dead_stmt(), tree_dce_done(), and tree_dce_init().
|
static |
When non-NULL holds map from basic block index into the postorder.
Referenced by cmp_bb_postorder(), eliminate_unnecessary_stmts(), remove_dead_stmt(), and sort_bbs_postorder().
|
static |
Before we can determine whether a control branch is dead, we need to compute which blocks are control dependent on which edges. We expect each block to be control dependent on very few edges so we use a bitmap for each block recording its edges. An array holds the bitmap. The Ith bit in the bitmap is set if that block is dependent on the Ith edge.
Referenced by add_multivariate_self_dist(), loop_distribution::build_rdg(), control_parents_preserved_p(), create_edge_for_control_dependence(), create_rdg_cd_edges(), deps_ok_for_redirect_from_bb_to_bb(), loop_distribution::distribute_loop(), loop_distribution::execute(), gcd_of_steps_may_divide_p(), identifier_to_locale(), mark_control_dependent_edges_necessary(), perform_tree_ssa_dce(), and tree_dce_done().
|
static |
TRUE if this pass alters the CFG (by removing control statements). FALSE otherwise. If this pass alters the CFG, then it will arrange for the dominators to be recomputed.
Referenced by eliminate_unnecessary_stmts(), perform_tree_ssa_dce(), and tree_dce_init().
|
static |
Vector indicating that the last statement of a basic block has already been marked as necessary.
Referenced by control_parents_preserved_p(), mark_last_stmt_necessary(), tree_dce_done(), and tree_dce_init().
|
static |
Referenced by mark_aliased_reaching_defs_necessary(), perform_tree_ssa_dce(), and propagate_necessity().
|
static |
Referenced by mark_aliased_reaching_defs_necessary(), perform_tree_ssa_dce(), and propagate_necessity().
|
static |
Vector indicating an SSA name has already been processed and marked as necessary.
Referenced by eliminate_unnecessary_stmts(), fast_dce(), mark_all_reaching_defs_necessary_1(), mark_operand_necessary(), loop_distribution::rdg_build_partitions(), tree_dce_done(), and tree_dce_init().
|
static |
|
static |
Referenced by mark_aliased_reaching_defs_necessary(), perform_tree_ssa_dce(), and propagate_necessity().
Referenced by add_partitioned_vars_to_ptset(), add_type_duplicate(), strlen_pass::before_dom_children(), vect_optimize_slp_pass::build_vertices(), vect_optimize_slp_pass::build_vertices(), check_reduction_path(), chrec_contains_symbols(), chrec_contains_symbols(), chrec_contains_symbols_defined_in_loop(), chrec_contains_symbols_defined_in_loop(), chrec_contains_undetermined(), chrec_contains_undetermined(), cleanup_control_flow_pre(), uninit_analysis::collect_phi_def_edges(), compute_topo_order(), copy_gimple_seq_and_replace_locals(), determine_known_aggregate_parts(), dfs_enumerate_from(), dfs_find_deadend(), do_invalidate(), do_rpo_vn_1(), dot_slp_tree(), dot_slp_tree(), dot_slp_tree(), draw_cfg_nodes_no_loops(), dse_classify_store(), dse_classify_store(), rpo_elim::eliminate_avail(), find_always_executed_bbs(), find_comparison_args(), ana::exploded_graph::find_previous_entry_to(), find_vdef_in_loop(), fold_marked_statements(), get_continuation_for_phi(), get_loop_body_in_bfs_order(), get_loop_body_in_if_conv_order(), get_loop_hot_path(), get_maxval_strlen(), get_range_strlen(), get_range_strlen(), get_range_strlen_dynamic(), get_range_strlen_dynamic(), get_range_strlen_phi(), get_range_strlen_tree(), insert_clobber_before_stack_restore(), insert_clobbers_for_var(), inverted_rev_post_order_compute(), ipa_lower_emutls(), ipa_polymorphic_call_context::ipa_polymorphic_call_context(), is_addr_local(), uninit_analysis::is_use_guarded(), uninit_analysis::is_use_guarded(), live_worklist(), loe_visit_block(), loop_inverted_rev_post_order_compute(), loop_rev_post_order_compute(), malloc_candidate_p(), malloc_candidate_p_1(), mark_all_reaching_defs_necessary(), mark_dfs_back_edges(), maybe_add_nop_after_section_switch(), maybe_lower_iteration_bound(), maybe_skip_until(), odr_subtypes_equivalent_p(), odr_types_equivalent_p(), odr_types_equivalent_p(), uninit_analysis::overlap(), perform_tree_ssa_dce(), post_order_compute(), pre_and_rev_post_order_compute_fn(), pre_expr_reaches_here_p(), pre_expr_reaches_here_p_work(), pred_blocks_visited_p(), predict_paths_for_bb(), propagate_necessity(), reachable_at_most_once(), remove_reachable_equiv_notes(), rev_post_order_and_mark_dfs_back_seme(), run_rpo_vn(), should_hoist_expr_to_dom(), single_pred_before_succ_order(), SSA_VAL(), starts_infinite_loop_p(), jump_threader::thread_across_edge(), jump_threader::thread_around_empty_blocks(), jump_threader::thread_through_normal_block(), topo_visit(), translate_vuse_through_block(), tree_contains_chrecs(), tree_contains_chrecs(), unshare_body(), update_alias_info_with_stack_vars(), vect_analyze_slp(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_mark_live_stmts(), vect_bb_slp_scalar_cost(), vect_bb_vectorization_profitable_p(), vect_gather_slp_loads(), vect_gather_slp_loads(), vect_lower_load_permutations(), vect_make_slp_decision(), vect_mark_slp_stmts(), vect_mark_slp_stmts(), vect_mark_slp_stmts_relevant(), vect_mark_slp_stmts_relevant(), vect_match_slp_patterns(), vect_match_slp_patterns_2(), vect_print_slp_graph(), vect_print_slp_graph(), vect_remove_slp_scalar_calls(), vect_remove_slp_scalar_calls(), vect_slp_analyze_operations(), vect_slp_gather_vectorized_scalar_stmts(), vect_slp_prune_covered_roots(), vect_update_slp_vf_for_node(), verify_eh_throw_stmt_node(), verify_gimple_in_cfg(), verify_loop_structure(), verify_node_sharing_1(), verify_ssa(), verify_vssa(), visit_hist(), visit_phi(), vt_stack_adjustments(), vuse_valueize(), walk_aliased_vdefs(), walk_aliased_vdefs_1(), walk_non_aliased_vuses(), and walk_ssa_copies().
|
static |
Vector indicating that a basic block has already had all the edges processed that it is control dependent on.
Referenced by control_parents_preserved_p(), mark_control_dependent_edges_necessary(), perform_tree_ssa_dce(), propagate_necessity(), and tree_dce_done().