GCC Middle and Back End API Reference
|
Variables | |
static bool | df_in_progress = false |
static bool | can_alter_cfg = false |
static vec< rtx > | worklist |
static sbitmap | marked |
static bitmap_obstack | dce_blocks_bitmap_obstack |
static bitmap_obstack | dce_tmp_bitmap_obstack |
|
static |
Return true if store to MEM, starting OFF bytes from stack pointer, is a call argument store, and clear corresponding bits from SP_BYTES bitmap if it is.
References bitmap_clear_bit(), and HOST_WIDE_INT.
Referenced by find_call_stack_args().
|
static |
Process basic block BB. Return true if the live_in set has changed. REDO_OUT is true if the info at the bottom of the block needs to be recalculated before starting. AU is the proper set of artificial uses. Track global substitution of uses of dead pseudos in debug insns using GLOBAL_DEBUG.
References bitmap_bit_p(), bitmap_clear(), bitmap_copy(), bitmap_empty_p(), bitmap_equal_p(), control_flow_insn_p(), dead_debug_add(), dead_debug_insert_temp(), dead_debug_local_finish(), dead_debug_local_init(), DEBUG_TEMP_AFTER_WITH_REG_FORCE, DEBUG_TEMP_BEFORE_WITH_VALUE, df_print_regset(), df_simulate_defs(), df_simulate_finalize_backwards(), df_simulate_initialize_backwards(), df_simulate_uses(), dump_file, basic_block_def::index, mark_insn(), marked_insn_p(), basic_block_def::succs, and dead_debug_local::used.
Referenced by fast_dce().
|
static |
Return true if INSN is a normal instruction that can be deleted by the DCE pass.
References can_alter_cfg, function::can_delete_dead_exceptions, cfun, deletable_insn_p_1(), df_in_progress, find_call_stack_args(), global_regs, insn_nothrow_p(), and reload_completed.
Referenced by find_call_stack_args(), and prescan_insns_for_dce().
|
static |
A subroutine for which BODY is part of the instruction being tested; either the top-level pattern, or an element of a PARALLEL. The instruction is known not to be a bare USE or CLOBBER.
References volatile_refs_p().
Referenced by deletable_insn_p().
|
static |
Delete every instruction that hasn't been marked.
References dbg_cnt(), delete_insn_and_edges(), delete_unreachable_blocks(), dump_file, marked_insn_p(), df_link::next, noop_move_p(), and remove_reg_equal_equiv_notes_for_defs().
Referenced by fast_dce(), and rest_of_handle_ud_dce().
|
static |
Perform fast DCE once initialization is done. If WORD_LEVEL is true, use the word level dce, otherwise do it at the pseudo level.
References all_blocks, bb_has_eh_pred(), bitmap_bit_p(), bitmap_clear(), bitmap_set_bit(), dce_process_block(), dead_debug_global_finish(), dead_debug_global_init(), delete_unmarked_insns(), df, df_analyze_problem(), DF_BACKWARD, df_clear_flags(), df_get_n_blocks(), df_get_postorder(), DF_LR_RUN_DCE, df_set_flags(), df_d::eh_block_artificial_uses, basic_block_def::index, postorder, basic_block_def::preds, prescan_insns_for_dce(), processed, df_d::regular_block_artificial_uses, edge_def::src, and word_dce_process_block().
Referenced by rest_of_handle_fast_dce(), and run_word_dce().
|
static |
Try to find all stack stores of CALL_INSN arguments if ACCUMULATE_OUTGOING_ARGS. If all stack stores have been found and it is therefore safe to eliminate the call, return true, otherwise return false. This function should be first called with DO_MARK false, and only when the CALL_INSN is actually going to be marked called again with DO_MARK true.
References bitmap_clear(), bitmap_empty_p(), bitmap_set_bit(), check_argument_store(), defs, deletable_insn_p(), HOST_WIDE_INT, mark_insn(), df_link::next, df_link::ref, and rtx_equal_p().
Referenced by deletable_insn_p(), and mark_insn().
|
static |
Free the data allocated by init_dce.
References bitmap_obstack_release(), and sbitmap_free().
Referenced by rest_of_handle_fast_dce(), rest_of_handle_ud_dce(), and run_word_dce().
|
static |
References dbg_cnt().
|
static |
References dbg_cnt().
|
static |
Initialize global variables for a new DCE pass.
References bitmap_clear(), bitmap_obstack_initialize(), can_alter_cfg, df_analyze(), df_chain_add_problem(), df_dump(), df_in_progress, DF_RD_PRUNE_DEAD_DEFS, df_set_flags(), DF_UD_CHAIN, dump_file, get_max_uid(), and sbitmap_alloc().
Referenced by rest_of_handle_fast_dce(), rest_of_handle_ud_dce(), and run_word_dce().
rtl_opt_pass* make_pass_fast_rtl_dce | ( | ) |
rtl_opt_pass* make_pass_ud_rtl_dce | ( | ) |
|
static |
UD-based DSE routines.
Mark instructions that define artificially-used registers, such as the frame pointer and the stack pointer.
References defs, df_get_artificial_uses(), basic_block_def::index, mark_insn(), df_link::next, and df_link::ref.
Referenced by rest_of_handle_ud_dce().
|
static |
If INSN has not yet been marked as needed, mark it now, and add it to the worklist.
References bitmap_set_bit(), df_in_progress, dump_file, find_call_stack_args(), and marked_insn_p().
Referenced by dce_process_block(), find_call_stack_args(), mark_artificial_uses(), mark_nonreg_stores_1(), mark_nonreg_stores_2(), mark_reg_dependencies(), prescan_insns_for_dce(), and word_dce_process_block().
|
static |
Mark INSN if BODY stores to a non-register destination.
References mark_nonreg_stores_1(), mark_nonreg_stores_2(), and note_stores().
Referenced by prescan_insns_for_dce().
|
static |
A note_stores callback used by mark_nonreg_stores. DATA is the instruction containing DEST.
References mark_insn().
Referenced by mark_nonreg_stores().
|
static |
A note_stores callback used by mark_nonreg_stores. DATA is the instruction containing DEST.
References mark_insn().
Referenced by mark_nonreg_stores().
|
static |
Mark every instruction that defines a register value that INSN uses.
References defs, dump_file, mark_insn(), df_link::next, print_simple_rtl(), and df_link::ref.
Referenced by rest_of_handle_ud_dce().
|
inlinestatic |
Return true if INSN has been marked as needed.
References bitmap_bit_p().
Referenced by dce_process_block(), delete_unmarked_insns(), mark_insn(), reset_unmarked_insns_debug_uses(), and word_dce_process_block().
|
static |
Go through the instructions and mark those whose necessity is not dependent on inter-instruction information. Make sure all other instructions are not marked.
References bitmap_bit_p(), bitmap_clear(), deletable_insn_p(), df_in_progress, dump_file, mark_insn(), and mark_nonreg_stores().
Referenced by fast_dce(), and rest_of_handle_ud_dce().
|
static |
Remove all REG_EQUAL and REG_EQUIV notes referring to the registers INSN writes to.
References remove_reg_equal_equiv_notes_for_regno().
Referenced by delete_unmarked_insns().
|
static |
Scan all BBs for debug insns and reset those that reference values defined in unmarked insns.
References defs, df_insn_rescan_debug_internal(), marked_insn_p(), df_link::next, and df_link::ref.
Referenced by rest_of_handle_ud_dce().
|
static |
Fast register level DCE.
References fast_dce(), fini_dce(), and init_dce().
Referenced by run_fast_dce(), and run_fast_df_dce().
|
static |
UD-chain based DCE.
References delete_unmarked_insns(), df_remove_problem(), fini_dce(), init_dce(), mark_artificial_uses(), mark_reg_dependencies(), prescan_insns_for_dce(), and reset_unmarked_insns_debug_uses().
void run_fast_dce | ( | void | ) |
Run a fast DCE pass.
References rest_of_handle_fast_dce().
Referenced by cleanup_cfg(), and do_reload().
void run_fast_df_dce | ( | void | ) |
This is an internal call that is used by the df live register problem to run fast dce as a side effect of creating the live information. The stack is organized so that the lr problem is run, this pass is run, which updates the live info and the df scanning info, and then returns to allow the rest of the problems to be run. This can be called by elsewhere but it will not update the bit vectors for any other problems than LR.
References df_clear_flags(), DF_DEFER_INSN_RESCAN, df_in_progress, DF_NO_INSN_RESCAN, df_set_flags(), and rest_of_handle_fast_dce().
Referenced by df_lr_finalize().
void run_word_dce | ( | void | ) |
Fast byte level DCE.
References df_clear_flags(), DF_DEFER_INSN_RESCAN, DF_NO_INSN_RESCAN, df_set_flags(), df_word_lr_add_problem(), fast_dce(), fini_dce(), init_dce(), timevar_pop(), and timevar_push().
Referenced by decompose_multiword_subregs().
|
static |
------------------------------------------------------------------------- Fast DCE functions -------------------------------------------------------------------------
Process basic block BB. Return true if the live_in set has changed. REDO_OUT is true if the info at the bottom of the block needs to be recalculated before starting. AU is the proper set of artificial uses. Track global substitution of uses of dead pseudos in debug insns using GLOBAL_DEBUG.
References bitmap_bit_p(), bitmap_clear(), bitmap_copy(), bitmap_empty_p(), bitmap_equal_p(), control_flow_insn_p(), dead_debug_add(), dead_debug_insert_temp(), dead_debug_local_finish(), dead_debug_local_init(), DEBUG_TEMP_AFTER_WITH_REG_FORCE, DEBUG_TEMP_BEFORE_WITH_VALUE, df_print_word_regset(), df_word_lr_simulate_defs(), df_word_lr_simulate_uses(), dump_file, basic_block_def::index, mark_insn(), marked_insn_p(), basic_block_def::succs, and dead_debug_local::used.
Referenced by fast_dce().
|
static |
True if we are allowed to alter the CFG in this pass.
Referenced by deletable_insn_p(), and init_dce().
|
static |
Bitmap obstacks used for block processing by the fast algorithm.
|
static |
|
static |
@verbatim RTL dead code elimination.
Copyright (C) 2005-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
------------------------------------------------------------------------- Core mark/delete routines -------------------------------------------------------------------------
True if we are invoked while the df engine is running; in this case, we don't want to reenter it.
Referenced by deletable_insn_p(), init_dce(), mark_insn(), prescan_insns_for_dce(), and run_fast_df_dce().
|
static |
Bitmap of instructions marked as needed indexed by INSN_UID.
Referenced by check_regexp_units_distribution(), const_ok_for_output_1(), and dbxout_symbol_location().
Instructions that have been marked but whose dependencies have not yet been processed.
Referenced by augment_live_range(), compute_antic_aux(), compute_antinout_edge(), compute_avail(), compute_available(), compute_laterin(), compute_live_loop_exits(), compute_nearerout(), compute_partial_antic_aux(), df_worklist_dataflow_doublequeue(), execute_late_warn_uninitialized(), find_unreachable_blocks(), has_nonexceptional_receiver(), merge_phi_nodes(), prune_unused_phi_nodes(), remove_dead_inserted_code(), tm_memopt_compute_antic(), tm_memopt_compute_available(), tree_unswitch_single_loop(), try_combine_chains(), vect_analyze_scalar_cycles_1(), vect_mark_stmts_to_be_vectorized(), verify_non_ssa_vars(), vt_find_locations(), and walk_dominator_tree().