GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "cfganal.h"
#include "dce.h"
#include "valtrack.h"
#include "dumpfile.h"
#include "rtl-iter.h"
#include "regs.h"
#include "function-abi.h"
Data Structures | |
class | df_rd_problem_data |
struct | df_lr_problem_data |
struct | problem_LR_DCE |
struct | df_live_problem_data |
struct | df_mir_problem_data |
struct | df_word_lr_problem_data |
struct | df_md_problem_data |
Macros | |
#define | REG_DEAD_DEBUGGING 0 |
#define | DF_SPARSE_THRESHOLD 32 |
#define | df_chain_problem_p(FLAG) |
#define | MEMREF_NORMAL 1 |
#define | MEMREF_VOLATILE 2 |
Variables | |
static bitmap_head | seen_in_block |
static bitmap_head | seen_in_insn |
static const struct df_problem | problem_RD |
static const struct df_problem | problem_LR |
static bitmap_head | df_live_scratch |
static const struct df_problem | problem_LIVE |
static const struct df_problem | problem_MIR |
static const struct df_problem | problem_CHAIN |
static const struct df_problem | problem_WORD_LR |
static const struct df_problem | problem_NOTE |
static bitmap_head | df_md_scratch |
static const struct df_problem | problem_MD |
#define df_chain_problem_p | ( | FLAG | ) |
Referenced by df_chain_bb_dump(), df_chain_create_bb_process_use(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), and df_chain_remove_problem().
#define DF_SPARSE_THRESHOLD 32 |
Referenced by df_rd_bb_local_compute_process_def(), and df_rd_local_compute().
#define MEMREF_NORMAL 1 |
Used by the next two functions to encode information about the memory references we found.
Referenced by can_move_insns_across(), find_memory(), and find_memory_stores().
#define MEMREF_VOLATILE 2 |
Referenced by can_move_insns_across(), find_memory(), and find_memory_stores().
#define REG_DEAD_DEBUGGING 0 |
Standard problems for dataflow support routines. Copyright (C) 1999-2025 Free Software Foundation, Inc. Originally contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) and Kenneth Zadeck (zadeck@naturalbridge.com). 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/>.
Note that turning REG_DEAD_DEBUGGING on will cause gcc.c-torture/unsorted/dump-noaddr.c to fail because it prints addresses in the dumps.
Referenced by df_create_unused_note(), df_note_bb_compute(), df_remove_dead_and_unused_notes(), df_remove_dead_eq_notes(), df_set_dead_notes_for_mw(), and df_set_unused_notes_for_mw().
bool can_move_insns_across | ( | rtx_insn * | from, |
rtx_insn * | to, | ||
rtx_insn * | across_from, | ||
rtx_insn * | across_to, | ||
basic_block | merge_bb, | ||
regset | merge_live, | ||
regset | other_branch_live, | ||
rtx_insn ** | pmove_upto ) |
Return true if it is safe to move a group of insns, described by the range FROM to TO, backwards across another group of insns, described by ACROSS_FROM to ACROSS_TO. It is assumed that there are no insns between ACROSS_TO and FROM, but they may be in different basic blocks; MERGE_BB is the block from which the insns will be moved. The caller must pass in a regset MERGE_LIVE which specifies the registers live after TO. This function may be called in one of two cases: either we try to move identical instructions from all successor blocks into their predecessor, or we try to move from only one successor block. If OTHER_BRANCH_LIVE is nonnull, it indicates that we're dealing with the second case. It should contain a set of registers live at the end of ACROSS_TO which must not be clobbered by moving the insns. In that case, we're also more careful about moving memory references and trapping insns. We return false if it is not safe to move the entire group, but it may still be possible to move a subgroup. PMOVE_UPTO, if nonnull, is set to point at the last moveable insn in such a case.
References BITMAP_ALLOC, bitmap_and_compl_into(), bitmap_and_into(), bitmap_copy(), BITMAP_FREE, bitmap_intersect_p(), CALL_P, df_simulate_defs(), df_simulate_find_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), df_simulate_uses(), EXECUTE_IF_SET_IN_BITMAP, find_memory(), find_memory_stores(), fixed_regs, global_regs, i, df_insn_info::insn, may_trap_or_fault_p(), may_trap_p(), MEMREF_NORMAL, MEMREF_VOLATILE, NEXT_INSN(), NONDEBUG_INSN_P, NOTE_KIND, NOTE_P, note_stores(), NULL, NULL_RTX, PATTERN(), PREV_INSN(), reg_obstack, reload_completed, RTL_CONST_OR_PURE_CALL_P, targetm, and volatile_insn_p().
Referenced by dead_or_predicable(), and try_head_merge_bb().
void df_chain_add_problem | ( | unsigned int | chain_flags | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_chain, and problem_CHAIN.
Referenced by find_and_remove_re(), find_defs(), init_dce(), and iv_analysis_loop_init().
|
static |
Create def-use or use-def chains.
References all_blocks, df_chain, and df_chain_remove_problem().
|
static |
Debugging info.
References df, df_chain_dump(), df_chain_problem_p, DF_DU_CHAIN, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_CHAIN, DF_REF_FLAGS, DF_REF_REGNO, DF_UD_CHAIN, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, and basic_block_def::index.
Referenced by df_chain_bottom_dump(), and df_chain_top_dump().
|
static |
References df_chain_bb_dump().
Copy the du or ud chain starting at FROM_REF and attach it to TO_REF.
References df_chain_create(), df_link::next, and df_link::ref.
Create a du or ud chain from SRC to DST and link it into SRC.
References df_chain, DF_REF_CHAIN, and link::next.
Referenced by df_chain_copy(), and df_chain_create_bb_process_use().
|
static |
Create chains from reaching defs bitmaps for basic block BB.
References BASIC_BLOCK_FOR_FN, bitmap_clear(), bitmap_copy(), bitmap_default_obstack, bitmap_initialize(), bitmap_set_bit, cfun, df, df_chain, df_chain_create_bb_process_use(), DF_EQ_NOTES, df_get_artificial_uses(), DF_INSN_UID_EQ_USES, DF_INSN_UID_USES, DF_NO_HARD_REGS, df_rd_get_bb_info(), df_rd_simulate_artificial_defs_at_top(), df_rd_simulate_one_insn(), DF_REF_AT_TOP, FOR_BB_INSNS, df_rd_bb_info::in, basic_block_def::index, INSN_P, and INSN_UID().
Referenced by df_chain_finalize().
Create the chains for a list of USEs.
References count, df, df_chain_create(), df_chain_problem_p, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_DEFS_GET, DF_DU_CHAIN, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_NEXT_LOC, DF_REF_REGNO, DF_UD_CHAIN, and EXECUTE_IF_SET_IN_BITMAP.
Referenced by df_chain_create_bb().
void df_chain_dump | ( | struct df_link * | link, |
FILE * | file ) |
Generic versions to get the void* version of the block info. Only used inside the problem instance vectors.
Dump a def-use or use-def chain for REF to FILE.
References DF_REF_BBNO, DF_REF_FLAGS, DF_REF_ID, DF_REF_IN_NOTE, DF_REF_INSN_UID, DF_REF_IS_ARTIFICIAL, DF_REF_REG_DEF_P, and link::next.
Referenced by debug_df_chain(), df_chain_bb_dump(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), df_ref_debug(), and df_refs_chain_dump().
|
static |
Create def-use chains from reaching use bitmaps for basic blocks in BLOCKS.
References all_blocks, df_chain_create_bb(), and EXECUTE_IF_SET_IN_BITMAP.
|
static |
Free all storage associated with the problem.
References BITMAP_FREE, df_chain, and free().
|
static |
Remove the chain problem completely.
References BITMAP_FREE, df_chain, df_chain_remove_problem(), and free().
|
static |
|
static |
|
static |
Remove this problem from the stack of dataflow problems.
References BASIC_BLOCK_FOR_FN, bitmap_clear(), cfun, df_chain, df_chain_problem_p, DF_DU_CHAIN, DF_INSN_INFO_GET, DF_REF_CHAIN, DF_UD_CHAIN, EXECUTE_IF_SET_IN_BITMAP, FOR_BB_INSNS, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_EQ_USE, FOR_EACH_INSN_INFO_USE, INSN_P, and NULL.
Referenced by df_chain_alloc(), df_chain_fully_remove_problem(), and df_chain_reset().
|
static |
Reset all of the chains when the set of basic blocks changes.
References df_chain_remove_problem().
|
static |
References df_chain_bb_dump().
void df_chain_unlink | ( | df_ref | ref | ) |
Delete a du or ud chain that leave or point to REF.
References df_chain, df_chain_unlink_1(), DF_REF_CHAIN, df_link::next, NULL, and df_link::ref.
Referenced by df_ref_chain_delete_du_chain(), and df_reg_chain_unlink().
Delete any du or ud chains that start at REF and point to TARGET.
References df_chain, DF_REF_CHAIN, df_link::next, NULL, and df_link::ref.
Referenced by df_chain_unlink().
|
static |
Create a REG_UNUSED note if necessary for DEF in INSN updating LIVE. Do not generate notes for registers in ARTIFICIAL_USES.
References bitmap_bit_p, dead_debug_insert_temp(), debug, DEBUG_TEMP_AFTER_WITH_REG, df_ignore_stack_reg(), df_print_note(), df_ref_debug(), DF_REF_FLAGS, DF_REF_LOC, DF_REF_MW_HARDREG, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_REGNO, df_set_note(), dump_file, REG_DEAD_DEBUGGING, and REG_NOTES.
Referenced by df_note_bb_compute().
|
inlinestatic |
After reg-stack, the x86 floating point stack regs are difficult to analyze because of all of the pushes, pops and rotations. Thus, we just leave the notes alone.
Referenced by df_create_unused_note(), df_note_bb_compute(), and df_remove_dead_and_unused_notes().
void df_live_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_live, and problem_LIVE.
Referenced by do_reload(), doloop_optimize_loops(), if_convert(), initialize_uninitialized_regs(), move_loop_invariants(), reorg_loops(), rest_of_handle_df_initialize(), and try_shrink_wrapping_separate().
|
static |
Allocate or reset bitmaps for DF_LIVE blocks. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_grow_bb_info(), df_live, df_live_get_bb_info(), df_live_scratch, EXECUTE_IF_SET_IN_BITMAP, df_live_bb_info::gen, df_live_bb_info::in, df_live_problem_data::in, df_live_bb_info::kill, df_live_problem_data::live_bitmaps, NULL, bitmap_head::obstack, df_live_bb_info::out, and df_live_problem_data::out.
|
static |
Compute local uninitialized register info for basic block BB.
References BASIC_BLOCK_FOR_FN, bitmap_set_bit, cfun, df_insn_create_insn_record(), DF_INSN_INFO_LUID, DF_INSN_UID_GET, df_live_get_bb_info(), DF_REF_CONDITIONAL, DF_REF_FLAGS_IS_SET, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_BB_INSNS, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_INSN_INFO_DEF, gcc_assert, df_live_bb_info::gen, df_insn_info::insn, INSN_P, INSN_UID(), df_live_bb_info::kill, and df_insn_info::luid.
Referenced by df_live_local_compute(), and df_live_verify_transfer_functions().
|
static |
Debugging info at bottom of bb.
References df_live, df_live_get_bb_info(), df_print_regset(), basic_block_def::index, df_live_bb_info::out, and df_live_problem_data::out.
Forward confluence function that ignores fake edges.
References bitmap_ior_into(), df_live_get_bb_info(), df_live_bb_info::in, and df_live_bb_info::out.
|
static |
And the LR info with the may-initialized registers to produce the LIVE info.
References all_blocks, bitmap_and_into(), df_live, df_live_get_bb_info(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_live_bb_info::in, df_lr_bb_info::in, df_live_bb_info::out, and df_lr_bb_info::out.
|
static |
Free all storage associated with the problem.
References BITMAP_FREE, bitmap_obstack_release(), bitmap_release(), df_live, df_live_scratch, free(), df_live_problem_data::live_bitmaps, and NULL.
|
static |
Free basic block info.
References bitmap_clear(), df_live_bb_info::gen, df_live_bb_info::in, df_live_bb_info::kill, and df_live_bb_info::out.
|
static |
Initialize the solution vectors.
References all_blocks, bitmap_and(), bitmap_clear(), df_live_get_bb_info(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_live_bb_info::gen, df_live_bb_info::in, df_live_bb_info::out, and df_lr_bb_info::out.
|
static |
Compute local uninitialized register info.
References all_blocks, bitmap_clear(), df_grow_insn_info(), df_live, df_live_bb_local_compute(), and EXECUTE_IF_SET_IN_BITMAP.
|
static |
Reset the global solution for recalculation.
References all_blocks, bitmap_clear(), df_live_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, df_live_bb_info::in, and df_live_bb_info::out.
void df_live_set_all_dirty | ( | void | ) |
Set all of the blocks as dirty. This needs to be done if this problem is added after all of the insns have been scanned.
References bitmap_set_bit, cfun, df_live, FOR_ALL_BB_FN, and basic_block_def::index.
Referenced by do_reload(), doloop_optimize_loops(), if_convert(), initialize_uninitialized_regs(), move_loop_invariants(), reorg_loops(), and try_shrink_wrapping_separate().
|
static |
Debugging info at top of bb.
References df_live, df_live_get_bb_info(), df_print_regset(), df_live_bb_info::gen, df_live_bb_info::in, df_live_problem_data::in, basic_block_def::index, and df_live_bb_info::kill.
|
static |
Transfer function for the forwards may-initialized problem.
References bitmap_and(), bitmap_and_into(), bitmap_ior_and_compl(), df_live_get_bb_info(), df_live_scratch, df_lr_get_bb_info(), df_live_bb_info::gen, df_live_bb_info::in, df_lr_bb_info::in, df_live_bb_info::kill, kill, df_live_bb_info::out, and df_lr_bb_info::out.
|
static |
Compare the saved datastructure and the new solution to the dataflow equations.
References bitmap_clear(), bitmap_equal_p(), cfun, df_live, DF_LIVE_IN, DF_LIVE_OUT, FOR_ALL_BB_FN, free(), gcc_unreachable, df_live_problem_data::in, basic_block_def::index, NULL, and df_live_problem_data::out.
|
static |
Build the datastructure to verify that the solution to the dataflow equations is not dirty.
References bitmap_copy(), bitmap_initialize(), cfun, df_live, DF_LIVE_IN, DF_LIVE_OUT, FOR_ALL_BB_FN, df_live_problem_data::in, basic_block_def::index, last_basic_block_for_fn, df_live_problem_data::live_bitmaps, and df_live_problem_data::out.
void df_live_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
References all_blocks, bitmap_bit_p, bitmap_clear(), bitmap_copy(), bitmap_default_obstack, bitmap_equal_p(), bitmap_initialize(), bitmap_intersect_compl_p(), bitmap_set_bit, cfun, df, df_grow_insn_info(), df_live, df_live_bb_local_compute(), df_live_get_bb_info(), df_scan_get_bb_info(), FOR_ALL_BB_FN, gcc_assert, df_live_bb_info::gen, basic_block_def::index, and df_live_bb_info::kill.
Referenced by df_finish_pass(), and df_verify().
void df_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, and df_lr.
Referenced by rest_of_handle_df_initialize().
|
static |
Allocate or reset bitmaps for DF_LR blocks. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_lr_bb_info::def, df_grow_bb_info(), df_lr, df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_lr_bb_info::in, df_lr_problem_data::in, df_lr_problem_data::lr_bitmaps, NULL, bitmap_head::obstack, df_lr_bb_info::out, df_lr_problem_data::out, and df_lr_bb_info::use.
Referenced by df_lr_dce_finalize().
|
static |
Compute local live register info for basic block BB.
References BASIC_BLOCK_FOR_FN, bitmap_clear_bit(), bitmap_set_bit, cfun, df_lr_bb_info::def, DF_INSN_INFO_GET, df_live, df_lr_get_bb_info(), df_recompute_luids(), DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_PARTIAL, DF_REF_REGNO, FOR_BB_INSNS_REVERSE, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE, NONDEBUG_INSN_P, and df_lr_bb_info::use.
Referenced by df_lr_local_compute(), and df_lr_verify_transfer_functions().
|
static |
Debugging info at bottom of bb.
References df_lr, df_lr_get_bb_info(), df_print_regset(), basic_block_def::index, df_lr_bb_info::out, and df_lr_problem_data::out.
|
static |
Confluence function that processes infinite loops. This might be a noreturn function that throws. And even if it isn't, getting the unwind info right helps debugging.
References bitmap_copy(), cfun, df, df_lr_get_bb_info(), EXIT_BLOCK_PTR_FOR_FN, basic_block_def::index, and df_lr_bb_info::out.
Confluence function that ignores fake edges.
References bitmap_ior_and_compl_into(), bitmap_ior_into(), changed, df, df_lr_get_bb_info(), eh_edge_abi, df_lr_bb_info::in, and df_lr_bb_info::out.
|
static |
Run the fast DCE after building LR. This is a separate problem so that the "dirty" flag is only cleared after a DCE pass is actually run.
References all_blocks, df, df_clear_flags(), df_lr, df_lr_alloc(), df_lr_finalize(), df_lr_local_compute(), DF_LR_RUN_DCE, df_set_flags(), df_worklist_dataflow(), and run_fast_df_dce().
|
static |
References df_lr.
Referenced by df_lr_dce_finalize().
|
static |
Free all storage associated with the problem.
References BITMAP_FREE, bitmap_obstack_release(), df_lr, free(), df_lr_problem_data::lr_bitmaps, and NULL.
|
static |
Free basic block info.
References bitmap_clear(), df_lr_bb_info::def, df_lr_bb_info::in, df_lr_bb_info::out, and df_lr_bb_info::use.
|
static |
Initialize the solution vectors.
References all_blocks, bitmap_clear(), bitmap_copy(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_lr_bb_info::in, df_lr_bb_info::out, and df_lr_bb_info::use.
|
static |
Compute local live register info for each basic block within BLOCKS.
References all_blocks, bitmap_clear(), bitmap_copy(), bitmap_set_bit, df, df_lr, df_lr_bb_local_compute(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK, fixed_regs, global_regs, i, INVALID_REGNUM, PIC_OFFSET_TABLE_REGNUM, reload_completed, and df_lr_bb_info::use.
Referenced by df_lr_dce_finalize().
|
static |
Reset the global solution for recalculation.
References all_blocks, bitmap_clear(), df_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, df_lr_bb_info::in, and df_lr_bb_info::out.
|
static |
Debugging info at top of bb.
References df_lr_bb_info::def, df_lr, df_lr_get_bb_info(), df_print_regset(), df_lr_bb_info::in, df_lr_problem_data::in, basic_block_def::index, and df_lr_bb_info::use.
|
static |
Transfer function.
References bitmap_ior_and_compl(), df_lr_bb_info::def, df_lr_get_bb_info(), df_lr_bb_info::in, df_lr_bb_info::out, and df_lr_bb_info::use.
|
static |
Compare the saved datastructure and the new solution to the dataflow equations.
References bitmap_clear(), bitmap_equal_p(), cfun, df_lr, DF_LR_IN, DF_LR_OUT, FOR_ALL_BB_FN, free(), gcc_unreachable, df_lr_problem_data::in, basic_block_def::index, NULL, and df_lr_problem_data::out.
|
static |
Build the datastructure to verify that the solution to the dataflow equations is not dirty.
References bitmap_copy(), bitmap_initialize(), cfun, df_lr, DF_LR_IN, DF_LR_OUT, FOR_ALL_BB_FN, df_lr_problem_data::in, basic_block_def::index, last_basic_block_for_fn, df_lr_problem_data::lr_bitmaps, and df_lr_problem_data::out.
void df_lr_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
References all_blocks, bitmap_bit_p, bitmap_clear(), bitmap_copy(), bitmap_default_obstack, bitmap_equal_p(), bitmap_initialize(), bitmap_intersect_compl_p(), bitmap_set_bit, cfun, df_lr_bb_info::def, df, df_lr, df_lr_bb_local_compute(), df_lr_get_bb_info(), df_scan_get_bb_info(), FOR_ALL_BB_FN, gcc_assert, basic_block_def::index, and df_lr_bb_info::use.
Referenced by df_finish_pass(), and df_verify().
void df_md_add_problem | ( | void | ) |
Create a new MD instance and add it to the existing instance of DF.
References df_add_problem(), and problem_MD.
|
static |
Allocate or reset bitmaps for DF_MD. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_grow_bb_info(), df_md, df_md_get_bb_info(), df_md_scratch, EXECUTE_IF_SET_IN_BITMAP, df_md_bb_info::gen, df_md_bb_info::in, df_md_bb_info::init, df_md_bb_info::kill, df_md_problem_data::md_bitmaps, bitmap_head::obstack, and df_md_bb_info::out.
|
static |
Compute local multiple def info for basic block BB.
References BASIC_BLOCK_FOR_FN, cfun, df, df_get_artificial_defs(), DF_INSN_UID_DEFS, df_md_bb_local_compute_process_def(), df_md_get_bb_info(), DF_NO_HARD_REGS, DF_REF_AT_TOP, FOR_BB_INSNS, INSN_P, and INSN_UID().
Referenced by df_md_local_compute().
|
static |
References bitmap_bit_p, bitmap_clear(), bitmap_clear_bit(), bitmap_set_bit, df, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_NEXT_LOC, DF_REF_PARTIAL, DF_REF_REGNO, df_md_bb_info::gen, df_md_bb_info::kill, and seen_in_insn.
Referenced by df_md_bb_local_compute().
|
static |
Debugging info at bottom of bb.
References df_md_get_bb_info(), df_print_regset(), basic_block_def::index, and df_md_bb_info::out.
|
static |
References bitmap_copy(), df_md_get_bb_info(), df_md_bb_info::in, basic_block_def::index, and df_md_bb_info::init.
In of target gets or of out of source.
References bitmap_ior_and_compl_into(), bitmap_ior_into(), df_md_get_bb_info(), eh_edge_abi, df_md_bb_info::in, and df_md_bb_info::out.
|
static |
Free all storage associated with the problem.
References bitmap_obstack_release(), bitmap_release(), df_md, df_md_scratch, free(), df_md_problem_data::md_bitmaps, and NULL.
|
static |
|
static |
Initialize the solution bit vectors for problem.
References all_blocks, bitmap_copy(), df_md_get_bb_info(), df_md_transfer_function(), EXECUTE_IF_SET_IN_BITMAP, df_md_bb_info::in, and df_md_bb_info::init.
|
static |
Compute local reaching def info for each basic block within BLOCKS.
References all_blocks, BASIC_BLOCK_FOR_FN, bitmap_bit_p, bitmap_clear(), bitmap_default_obstack, bitmap_initialize(), bitmap_ior_and_into(), bitmap_release(), cfun, compute_dominance_frontiers(), df_get_live_in(), df_md_bb_local_compute(), df_md_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, FOR_ALL_BB_FN, free(), basic_block_def::index, df_md_bb_info::init, df_md_bb_info::kill, kill, last_basic_block_for_fn, and seen_in_insn.
|
static |
Reset the global solution for recalculation.
References all_blocks, bitmap_clear(), df_md_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, df_md_bb_info::in, and df_md_bb_info::out.
void df_md_simulate_artificial_defs_at_top | ( | basic_block | bb, |
bitmap | local_md ) |
Add the effect of the top artificial defs of BB to the multiple definitions bitmap LOCAL_MD.
References bitmap_clear_bit(), bitmap_set_bit, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, and basic_block_def::index.
void df_md_simulate_one_insn | ( | basic_block | bb, |
rtx_insn * | insn, | ||
bitmap | local_md ) |
Add the effect of the defs of INSN to the reaching definitions bitmap LOCAL_MD.
References bitmap_clear_bit(), bitmap_set_bit, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, and FOR_EACH_INSN_DEF.
|
static |
Debugging info at top of bb.
References df_md_get_bb_info(), df_print_regset(), df_md_bb_info::gen, df_md_bb_info::in, basic_block_def::index, df_md_bb_info::init, and df_md_bb_info::kill.
|
static |
References BASIC_BLOCK_FOR_FN, bitmap_and(), bitmap_and_into(), bitmap_ior_and_compl(), cfun, df_get_live_in(), df_get_live_out(), df_md_get_bb_info(), df_md_scratch, df_md_bb_info::gen, df_md_bb_info::in, df_md_bb_info::kill, kill, and df_md_bb_info::out.
Referenced by df_md_init().
void df_mir_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF.
References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_mir, and problem_MIR.
Referenced by find_and_remove_re().
|
static |
Allocate or reset bitmaps for DF_MIR blocks. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_mir_bb_info::con_visited, df_grow_bb_info(), df_mir, df_mir_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_mir_bb_info::gen, df_mir_bb_info::in, df_mir_problem_data::in, df_mir_bb_info::kill, df_mir_problem_data::mir_bitmaps, NULL, bitmap_head::obstack, df_mir_bb_info::out, and df_mir_problem_data::out.
|
static |
Compute local uninitialized register info for basic block BB.
References BASIC_BLOCK_FOR_FN, cfun, df_insn_create_insn_record(), DF_INSN_INFO_LUID, DF_INSN_UID_GET, df_mir_get_bb_info(), df_mir_simulate_one_insn(), FOR_BB_INSNS, gcc_assert, df_mir_bb_info::gen, df_insn_info::insn, INSN_P, INSN_UID(), df_mir_bb_info::kill, and df_insn_info::luid.
Referenced by df_mir_local_compute().
|
static |
Debugging info at bottom of bb.
References df_mir_get_bb_info(), df_print_regset(), basic_block_def::index, and df_mir_bb_info::out.
|
static |
Initialize IN sets for blocks with no predecessors: when landing on such blocks, assume all registers are uninitialized.
References bitmap_clear(), df_mir_bb_info::con_visited, df_mir_get_bb_info(), df_mir_bb_info::in, and basic_block_def::index.
Forward confluence function that ignores fake edges.
References bitmap_and_into(), bitmap_copy(), df_mir_bb_info::con_visited, df_mir_get_bb_info(), df_mir_bb_info::in, and df_mir_bb_info::out.
|
static |
Free all storage associated with the problem.
References bitmap_obstack_release(), df_mir, free(), df_mir_problem_data::mir_bitmaps, and NULL.
|
static |
Free basic block info.
References bitmap_clear(), df_mir_bb_info::gen, df_mir_bb_info::in, df_mir_bb_info::kill, and df_mir_bb_info::out.
|
static |
Initialize the solution vectors.
References all_blocks, and df_mir_reset().
|
static |
Compute local uninitialized register info.
References all_blocks, df_grow_insn_info(), df_mir_bb_local_compute(), and EXECUTE_IF_SET_IN_BITMAP.
|
static |
Reset the global solution for recalculation.
References all_blocks, bitmap_clear(), df_mir_bb_info::con_visited, df_mir_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, df_mir_bb_info::in, and df_mir_bb_info::out.
Referenced by df_mir_init().
void df_mir_simulate_one_insn | ( | basic_block | bb, |
rtx_insn * | insn, | ||
bitmap | kill, | ||
bitmap | gen ) |
Apply the effects of the gen/kills in INSN to the corresponding bitmaps.
References bitmap_clear_bit(), bitmap_set_bit, DF_REF_CONDITIONAL, DF_REF_FLAGS_IS_SET, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_INSN_DEF, df_mir_bb_info::gen, and kill.
Referenced by df_mir_bb_local_compute(), and find_removable_extensions().
|
static |
Debugging info at top of bb.
References df_mir_get_bb_info(), df_print_regset(), df_mir_bb_info::gen, df_mir_bb_info::in, basic_block_def::index, and df_mir_bb_info::kill.
|
static |
Transfer function for the forwards must-initialized problem.
References bitmap_ior_and_compl(), df_mir_get_bb_info(), df_mir_bb_info::gen, df_mir_bb_info::in, df_mir_bb_info::kill, kill, and df_mir_bb_info::out.
|
static |
Compare the saved datastructure and the new solution to the dataflow equations.
References bitmap_clear(), bitmap_equal_p(), bitmap_obstack_release(), cfun, df_mir, DF_MIR_IN, DF_MIR_OUT, FOR_ALL_BB_FN, free(), gcc_unreachable, df_mir_problem_data::in, basic_block_def::index, df_mir_problem_data::mir_bitmaps, NULL, and df_mir_problem_data::out.
|
static |
Build the datastructure to verify that the solution to the dataflow equations is not dirty.
References bitmap_copy(), bitmap_initialize(), bitmap_obstack_initialize(), cfun, df_mir, DF_MIR_IN, DF_MIR_OUT, FOR_ALL_BB_FN, df_mir_problem_data::in, basic_block_def::index, last_basic_block_for_fn, df_mir_problem_data::mir_bitmaps, and df_mir_problem_data::out.
void df_note_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References df_add_problem(), and problem_NOTE.
Referenced by cse_main(), ira(), iv_analysis_loop_init(), peephole2_optimize(), regrename_optimize(), rest_of_handle_combine(), rest_of_handle_dse(), and rest_of_handle_stack_adjustments().
|
static |
References all_blocks, and df_note.
|
static |
Recompute the REG_DEAD and REG_UNUSED notes and compute register info: lifetime, bb, and number of defs and uses for basic block BB. The three bitvectors are scratch regs used here.
References BASIC_BLOCK_FOR_FN, bitmap_bit_p, bitmap_clear(), bitmap_clear_bit(), bitmap_copy(), bitmap_set_bit, CALL_P, cfun, dead_debug_add(), dead_debug_insert_temp(), dead_debug_local_finish(), dead_debug_local_init(), debug, debug_insn, DEBUG_INSN_P, DEBUG_TEMP_BEFORE_WITH_REG, df_create_unused_note(), df_get_live_out(), df_ignore_stack_reg(), DF_INSN_INFO_GET, df_insn_rescan_debug_internal(), DF_MWS_REG_DEF_P, DF_MWS_REG_USE_P, df_print_note(), df_print_regset(), DF_REF_AT_TOP, DF_REF_CONDITIONAL, df_ref_debug(), DF_REF_FLAGS, DF_REF_FLAGS_IS_SET, DF_REF_LOC, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_MW_HARDREG, DF_REF_PARTIAL, DF_REF_READ_WRITE, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_REGNO, df_remove_dead_and_unused_notes(), df_remove_dead_eq_notes(), df_set_dead_notes_for_mw(), df_set_note(), df_set_unused_notes_for_mw(), dump_file, FOR_BB_INSNS_REVERSE, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_MW, FOR_EACH_INSN_INFO_USE, gen_rtx_UNKNOWN_VAR_LOC, INSN_P, INSN_UID(), INSN_VAR_LOCATION_LOC, NULL, REG_DEAD_DEBUGGING, REG_NOTES, and df_mw_hardreg::start_regno.
Referenced by df_note_compute().
|
static |
Compute register info: lifetime, bb, and number of defs and uses.
References all_blocks, bitmap_clear(), bitmap_initialize(), df_bitmap_obstack, df_note_bb_compute(), and EXECUTE_IF_SET_IN_BITMAP.
|
static |
void df_print_bb_index | ( | basic_block | bb, |
FILE * | file ) |
Print some basic block info as part of df_dump.
References FOR_EACH_EDGE, basic_block_def::index, basic_block_def::preds, and basic_block_def::succs.
Referenced by df_dump(), and dse_step4().
This is only used if REG_DEAD_DEBUGGING is in effect.
References dump_file, INSN_UID(), and print_rtl().
Referenced by df_create_unused_note(), df_note_bb_compute(), df_remove_dead_and_unused_notes(), df_remove_dead_eq_notes(), df_set_dead_notes_for_mw(), and df_set_unused_notes_for_mw().
void df_rd_add_problem | ( | void | ) |
Create a new RD instance and add it to the existing instance of DF.
References df_add_problem(), and problem_RD.
|
static |
Allocate or reset bitmaps for DF_RD blocks. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), df_rd_problem_data::dense_invalidated_by_eh, df_grow_bb_info(), df_rd, df_rd_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_rd_bb_info::gen, df_rd_bb_info::in, df_rd_bb_info::kill, bitmap_head::obstack, df_rd_bb_info::out, df_rd_problem_data::rd_bitmaps, df_rd_problem_data::sparse_invalidated_by_eh, and df_rd_bb_info::sparse_kill.
|
static |
Compute local reaching def info for basic block BB.
References BASIC_BLOCK_FOR_FN, bitmap_clear(), bitmap_ior_into(), cfun, df, df_get_artificial_defs(), DF_INSN_UID_DEFS, DF_NO_HARD_REGS, df_rd_bb_local_compute_process_def(), df_rd_get_bb_info(), DF_REF_AT_TOP, FOR_BB_INSNS_REVERSE, INSN_P, INSN_UID(), seen_in_block, and seen_in_insn.
Referenced by df_rd_local_compute().
|
static |
Process a list of DEFs for df_rd_bb_local_compute. This is a bit more complicated than just simulating, because we must produce the gen and kill sets and hence deal with the two possible representations of kill sets.
References begin(), bitmap_bit_p, bitmap_clear_range(), bitmap_set_bit, bitmap_set_range(), df, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_NO_HARD_REGS, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_NEXT_LOC, DF_REF_PARTIAL, DF_REF_REGNO, DF_SPARSE_THRESHOLD, df_rd_bb_info::gen, df_rd_bb_info::kill, seen_in_block, seen_in_insn, and df_rd_bb_info::sparse_kill.
Referenced by df_rd_bb_local_compute().
|
static |
Debugging info at bottom of bb.
References df_rd_dump_defs_set(), df_rd_get_bb_info(), basic_block_def::index, and df_rd_bb_info::out.
In of target gets or of out of source.
References bitmap_and_compl(), bitmap_clear_range(), bitmap_ior_into(), changed, df_rd_problem_data::dense_invalidated_by_eh, df_bitmap_obstack, DF_DEFS_BEGIN, DF_DEFS_COUNT, df_rd, df_rd_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_rd_bb_info::in, df_rd_bb_info::out, and df_rd_problem_data::sparse_invalidated_by_eh.
|
static |
References bitmap_and_into(), bitmap_clear(), bitmap_count_bits(), bitmap_empty_p(), bitmap_initialize(), bitmap_set_range(), df, df_bitmap_obstack, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_NO_HARD_REGS, DF_REG_SIZE, EXECUTE_IF_SET_IN_BITMAP, and HARD_REGISTER_NUM_P.
Referenced by df_rd_bottom_dump(), and df_rd_top_dump().
|
static |
Free all storage associated with the problem.
References bitmap_obstack_release(), df_rd, free(), NULL, and df_rd_problem_data::rd_bitmaps.
|
static |
Free basic block info.
References bitmap_clear(), df_rd_bb_info::gen, df_rd_bb_info::in, df_rd_bb_info::kill, df_rd_bb_info::out, and df_rd_bb_info::sparse_kill.
|
static |
Initialize the solution bit vectors for problem.
References all_blocks, bitmap_clear(), bitmap_copy(), df_rd_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_rd_bb_info::gen, df_rd_bb_info::in, and df_rd_bb_info::out.
|
static |
Compute local reaching def info for each basic block within BLOCKS.
References all_blocks, bitmap_initialize(), bitmap_release(), bitmap_set_bit, bitmap_set_range(), df_rd_problem_data::dense_invalidated_by_eh, df, df_bitmap_obstack, DF_DEFS_BEGIN, DF_DEFS_COUNT, df_maybe_reorganize_def_refs(), DF_NO_HARD_REGS, df_rd, df_rd_bb_local_compute(), DF_REF_ORDER_BY_REG, DF_SPARSE_THRESHOLD, eh_edge_abi, EXECUTE_IF_SET_IN_BITMAP, seen_in_block, seen_in_insn, and df_rd_problem_data::sparse_invalidated_by_eh.
void df_rd_simulate_artificial_defs_at_top | ( | basic_block | bb, |
bitmap | local_rd ) |
Add the effect of the top artificial defs of BB to the reaching definitions bitmap LOCAL_RD.
References bitmap_clear_range(), bitmap_set_bit, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_REF_AT_TOP, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, and basic_block_def::index.
Referenced by df_chain_create_bb().
void df_rd_simulate_one_insn | ( | basic_block | bb, |
rtx_insn * | insn, | ||
bitmap | local_rd ) |
Add the effect of the defs of INSN to the reaching definitions bitmap LOCAL_RD.
References bitmap_clear_range(), bitmap_set_bit, df, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, and FOR_EACH_INSN_DEF.
Referenced by df_chain_create_bb().
|
static |
Debugging info.
References df_rd_problem_data::dense_invalidated_by_eh, df, DF_DEFS_BEGIN, DF_DEFS_COUNT, df_rd, DF_REG_SIZE, dump_bitmap(), and df_rd_problem_data::sparse_invalidated_by_eh.
|
static |
Debugging info at top of bb.
References df_rd_dump_defs_set(), df_rd_get_bb_info(), df_rd_bb_info::gen, df_rd_bb_info::in, basic_block_def::index, and df_rd_bb_info::kill.
|
static |
Transfer function.
References BITMAP_ALLOC, bitmap_and_compl(), bitmap_and_into(), bitmap_clear(), bitmap_clear_range(), bitmap_empty_p(), bitmap_equal_p(), BITMAP_FREE, bitmap_initialize(), bitmap_ior_and_compl(), bitmap_ior_into(), bitmap_move(), bitmap_set_range(), changed, df, df_bitmap_obstack, DF_DEFS_BEGIN, DF_DEFS_COUNT, df_lr_get_bb_info(), df_rd, df_rd_get_bb_info(), DF_RD_PRUNE_DEAD_DEFS, EXECUTE_IF_SET_IN_BITMAP, df_rd_bb_info::gen, df_rd_bb_info::in, df_rd_bb_info::kill, kill, df_lr_bb_info::out, df_rd_bb_info::out, df_rd_problem_data::rd_bitmaps, and df_rd_bb_info::sparse_kill.
|
static |
Remove all of the REG_DEAD or REG_UNUSED notes from INSN.
References df_ignore_stack_reg(), df_print_note(), free_EXPR_LIST_node(), REG_DEAD_DEBUGGING, REG_NOTE_KIND, REG_NOTES, REGNO, and XEXP.
Referenced by df_note_bb_compute().
Remove REG_EQUAL/REG_EQUIV notes referring to dead pseudos using LIVE as the bitmap of currently live registers.
References bitmap_bit_p, df_notes_rescan(), df_print_note(), DF_REF_FLAGS, DF_REF_IN_NOTE, DF_REF_LOC, DF_REF_REGNO, FOR_EACH_INSN_EQ_USE, free_EXPR_LIST_node(), loc_mentioned_in_p(), REG_DEAD_DEBUGGING, REG_NOTE_KIND, REG_NOTES, and XEXP.
Referenced by df_note_bb_compute().
|
static |
Set the REG_DEAD notes for the multiword hardreg use in INSN based on the bits in LIVE. DO_NOT_GEN is used to keep REG_DEAD notes from being set if the instruction both reads and writes the register.
References bitmap_bit_p, df_print_note(), df_print_regset(), df_set_note(), df_whole_mw_reg_dead_p(), dump_file, df_mw_hardreg::end_regno, df_mw_hardreg::mw_reg, r, REG_DEAD_DEBUGGING, REG_NOTES, regno_reg_rtx, and df_mw_hardreg::start_regno.
Referenced by df_note_bb_compute().
Set a NOTE_TYPE note for REG in INSN.
References add_reg_note(), DEBUG_INSN_P, and gcc_checking_assert.
Referenced by df_create_unused_note(), df_note_bb_compute(), df_set_dead_notes_for_mw(), and df_set_unused_notes_for_mw().
|
static |
Set the REG_UNUSED notes for the multiword hardreg defs in INSN based on the bits in LIVE. Do not generate notes for registers in artificial uses. DO_NOT_GEN is updated so that REG_DEAD notes are not generated if the reg is both read and written by the instruction.
References bitmap_bit_p, bitmap_set_bit, dead_debug_insert_temp(), debug, DEBUG_TEMP_AFTER_WITH_REG, df_print_note(), df_set_note(), df_whole_mw_reg_unused_p(), dump_file, df_mw_hardreg::end_regno, df_mw_hardreg::mw_reg, r, REG_DEAD_DEBUGGING, REG_NOTES, regno_reg_rtx, and df_mw_hardreg::start_regno.
Referenced by df_note_bb_compute().
Simulate the effects of the defs of INSN on LIVE.
References bitmap_clear_bit(), bitmap_set_bit, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_INSN_DEF, and df_insn_info::insn.
Referenced by can_move_insns_across(), dce_process_block(), and df_simulate_one_insn_backwards().
void df_simulate_finalize_backwards | ( | basic_block | bb, |
bitmap | live ) |
Apply the artificial uses and defs at the top of BB in a backwards direction.
References bitmap_clear_bit(), bitmap_set_bit, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, and basic_block_def::index.
Referenced by dce_process_block().
Find the set of DEFs for INSN.
References bitmap_set_bit, defs, DF_REF_REGNO, and FOR_EACH_INSN_DEF.
Referenced by can_move_insns_across(), and dead_or_predicable().
Find the set of real DEFs, which are not clobbers, for INSN.
References bitmap_set_bit, defs, DF_REF_FLAGS, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, DF_REF_REGNO, FOR_EACH_INSN_DEF, and df_insn_info::insn.
Referenced by df_simulate_one_insn_forwards().
Find the set of uses for INSN. This includes partial defs.
References bitmap_set_bit, DF_INSN_INFO_GET, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE, df_insn_info::insn, and df_insn_info::uses.
Referenced by can_move_insns_across().
|
inlinestatic |
Add back the always live regs in BB to LIVE.
References bb_has_eh_pred(), bitmap_ior_into(), and df.
Referenced by df_simulate_one_insn_backwards(), and df_simulate_one_insn_forwards().
void df_simulate_initialize_backwards | ( | basic_block | bb, |
bitmap | live ) |
Apply the artificial uses and defs at the end of BB in a backwards direction.
References bitmap_clear_bit(), bitmap_set_bit, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, and basic_block_def::index.
Referenced by can_move_insns_across(), dce_process_block(), gen_call_used_regs_seq(), and simulate_backwards_to_point().
void df_simulate_initialize_forwards | ( | basic_block | bb, |
bitmap | live ) |
Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or DF_LR_IN for basic block BB, for forward scanning by marking artificial defs live.
References bitmap_set_bit, DF_REF_AT_TOP, DF_REF_FLAGS, DF_REF_REGNO, FOR_EACH_ARTIFICIAL_DEF, and basic_block_def::index.
Referenced by combine_stack_adjustments_for_block(), dse_step1(), and peephole2_optimize().
void df_simulate_one_insn_backwards | ( | basic_block | bb, |
rtx_insn * | insn, | ||
bitmap | live ) |
Simulate the backwards effects of INSN on the bitmap LIVE.
References df_simulate_defs(), df_simulate_fixup_sets(), df_simulate_uses(), df_insn_info::insn, and NONDEBUG_INSN_P.
Referenced by can_move_insns_across(), gen_call_used_regs_seq(), peep2_update_life(), simulate_backwards_to_point(), and try_head_merge_bb().
void df_simulate_one_insn_forwards | ( | basic_block | bb, |
rtx_insn * | insn, | ||
bitmap | live ) |
Simulate the forwards effects of INSN on the bitmap LIVE.
References bitmap_clear_range(), df_note, df_simulate_find_noclobber_defs(), df_simulate_fixup_sets(), gcc_assert, df_insn_info::insn, INSN_P, REG_NOTE_KIND, REG_NOTES, REG_NREGS, REGNO, and XEXP.
Referenced by combine_stack_adjustments_for_block(), dse_step1(), and peep2_fill_buffer().
Simulate the effects of the uses of INSN on LIVE.
References bitmap_set_bit, DEBUG_INSN_P, DF_REF_REGNO, FOR_EACH_INSN_USE, and df_insn_info::insn.
Referenced by can_move_insns_across(), dce_process_block(), dead_or_predicable(), and df_simulate_one_insn_backwards().
|
static |
A subroutine of df_set_dead_notes_for_mw, with a selection of its arguments. Return true if the register value described by MWS's mw_reg is known to be completely dead, and if mw_reg can therefore be used in a REG_DEAD note.
References bitmap_bit_p, DF_REF_PARTIAL, df_mw_hardreg::flags, gcc_assert, df_mw_hardreg::mw_reg, r, REG_P, and df_mw_hardreg::start_regno.
Referenced by df_set_dead_notes_for_mw().
|
static |
A subroutine of df_set_unused_notes_for_mw, with a selection of its arguments. Return true if the register value described by MWS's mw_reg is known to be completely unused, and if mw_reg can therefore be used in a REG_UNUSED note.
References bitmap_bit_p, DF_REF_PARTIAL, df_mw_hardreg::flags, gcc_assert, df_mw_hardreg::mw_reg, r, REG_P, and df_mw_hardreg::start_regno.
Referenced by df_set_unused_notes_for_mw().
void df_word_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References BITMAP_ALLOC, df_add_problem(), df_bitmap_obstack, df_word_lr, and problem_WORD_LR.
Referenced by run_word_dce().
|
static |
Allocate or reset bitmaps for DF_WORD_LR blocks. The solution bits are not touched unless the block is new.
References all_blocks, bitmap_clear(), bitmap_initialize(), bitmap_obstack_initialize(), bitmap_set_bit, cfun, df_word_lr_bb_info::def, df_grow_bb_info(), df_word_lr, df_word_lr_get_bb_info(), ENTRY_BLOCK, EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK, FOR_EACH_BB_FN, df_word_lr_bb_info::in, basic_block_def::index, bitmap_head::obstack, df_word_lr_bb_info::out, df_word_lr_bb_info::use, and df_word_lr_problem_data::word_lr_bitmaps.
|
static |
Compute local live register info for basic block BB.
References BASIC_BLOCK_FOR_FN, cfun, df_word_lr_bb_info::def, DF_INSN_INFO_GET, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_REGNO, df_word_lr_get_bb_info(), df_word_lr_mark_ref(), FOR_BB_INSNS_REVERSE, FOR_EACH_ARTIFICIAL_DEF, FOR_EACH_ARTIFICIAL_USE, FOR_EACH_INSN_INFO_DEF, FOR_EACH_INSN_INFO_USE, gcc_assert, NONDEBUG_INSN_P, and df_word_lr_bb_info::use.
Referenced by df_word_lr_local_compute().
|
static |
Debugging info at bottom of bb.
References df_print_word_regset(), df_word_lr_get_bb_info(), basic_block_def::index, and df_word_lr_bb_info::out.
Confluence function that ignores fake edges.
References bitmap_ior_into(), df_word_lr_get_bb_info(), df_word_lr_bb_info::in, and df_word_lr_bb_info::out.
|
static |
Free all storage associated with the problem.
References BITMAP_FREE, bitmap_obstack_release(), df_word_lr, free(), NULL, and df_word_lr_problem_data::word_lr_bitmaps.
|
static |
Free basic block info.
References bitmap_clear(), df_word_lr_bb_info::def, df_word_lr_bb_info::in, df_word_lr_bb_info::out, and df_word_lr_bb_info::use.
|
static |
Initialize the solution vectors.
References all_blocks, bitmap_clear(), bitmap_copy(), df_word_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, df_word_lr_bb_info::in, df_word_lr_bb_info::out, and df_word_lr_bb_info::use.
|
static |
Compute local live register info for each basic block within BLOCKS.
References all_blocks, bitmap_clear(), df, df_word_lr, df_word_lr_bb_local_compute(), EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK, and gcc_unreachable.
Examine REF, and if it is for a reg we're interested in, set or clear the bits corresponding to its subwords from the bitmap according to IS_SET. LIVE is the bitmap we should update. We do not track hard regs or pseudos of any size other than 2 * UNITS_PER_WORD. We return true if we changed the bitmap, or if we encountered a register we're not tracking.
References bitmap_clear_bit(), bitmap_set_bit, changed, DF_REF_FLAGS_IS_SET, DF_REF_PARTIAL, DF_REF_REG, gcc_assert, GET_CODE, GET_MODE, GET_MODE_SIZE(), read_modify_subreg_p(), reg_mode, REGNO, subreg_lowpart_p(), and SUBREG_REG.
Referenced by df_word_lr_bb_local_compute(), df_word_lr_simulate_defs(), and df_word_lr_simulate_uses().
|
static |
Reset the global solution for recalculation.
References all_blocks, bitmap_clear(), df_word_lr_get_bb_info(), EXECUTE_IF_SET_IN_BITMAP, gcc_assert, df_word_lr_bb_info::in, and df_word_lr_bb_info::out.
Simulate the effects of the defs of INSN on LIVE. Return true if we changed any bits, which is used by the caller to determine whether a set is necessary. We also return true if there are other reasons not to delete an insn.
References changed, DF_REF_CONDITIONAL, DF_REF_FLAGS, df_word_lr_mark_ref(), and FOR_EACH_INSN_DEF.
Referenced by word_dce_process_block().
Simulate the effects of the uses of INSN on LIVE.
References df_word_lr_mark_ref(), and FOR_EACH_INSN_USE.
Referenced by word_dce_process_block().
|
static |
Debugging info at top of bb.
References df_word_lr_bb_info::def, df_print_word_regset(), df_word_lr_get_bb_info(), df_word_lr_bb_info::in, basic_block_def::index, and df_word_lr_bb_info::use.
|
static |
Transfer function.
References bitmap_ior_and_compl(), df_word_lr_bb_info::def, df_word_lr_get_bb_info(), df_word_lr_bb_info::in, df_word_lr_bb_info::out, and df_word_lr_bb_info::use.
|
static |
Return an OR of MEMREF_NORMAL or MEMREF_VOLATILE for the MEMs in X.
References FOR_EACH_SUBRTX, GET_CODE, df_insn_info::insn, MEM_P, MEM_READONLY_P, MEM_VOLATILE_P, MEMREF_NORMAL, MEMREF_VOLATILE, and PATTERN().
Referenced by can_move_insns_across().
A subroutine of can_move_insns_across_p called through note_stores. DATA points to an integer in which we set either the bit for MEMREF_NORMAL or the bit for MEMREF_VOLATILE if we find a MEM of either kind.
References GET_CODE, MEM_P, MEM_VOLATILE_P, MEMREF_NORMAL, MEMREF_VOLATILE, pflags, stack_pointer_rtx, and XEXP.
Referenced by can_move_insns_across().
void simulate_backwards_to_point | ( | basic_block | bb, |
regset | live, | ||
rtx | point ) |
Scan BB backwards, using df_simulate functions to keep track of lifetimes, up to insn POINT. The result is stored in LIVE.
References BB_END, bitmap_copy(), df_get_live_out(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), df_insn_info::insn, and PREV_INSN().
Referenced by dead_or_predicable(), and try_head_merge_bb().
|
static |
Scratch var used by transfer functions. This is used to implement an optimization to reduce the amount of space used to compute the combined lr and live analysis.
Referenced by df_live_alloc(), df_live_free(), and df_live_transfer_function().
|
static |
Scratch var used by transfer functions. This is used to do md analysis only for live registers.
Referenced by df_md_alloc(), df_md_free(), and df_md_transfer_function().
|
static |
Referenced by df_chain_add_problem().
|
static |
All of the information associated with every instance of the problem.
Referenced by df_live_add_problem().
|
static |
All of the information associated with every instance of the problem.
|
static |
Referenced by df_md_add_problem().
|
static |
All of the information associated with every instance of the problem.
Referenced by df_mir_add_problem().
|
static |
|
static |
All of the information associated with every instance of the problem.
Referenced by df_rd_add_problem().
|
static |
All of the information associated with every instance of the problem.
Referenced by df_word_lr_add_problem().
|
static |
Referenced by df_rd_bb_local_compute(), df_rd_bb_local_compute_process_def(), and df_rd_local_compute().
|
static |