GCC Middle and Back End API Reference
|
Data Structures | |
struct | df_collection_rec |
struct | df_scan_problem_data |
Macros | |
#define | HAVE_epilogue 0 |
#define | HAVE_prologue 0 |
#define | HAVE_sibcall_epilogue 0 |
#define | EPILOGUE_USES(REGNO) 0 |
#define | df_scan_free_ref_vec(V) |
#define | df_scan_free_mws_vec(V) |
Typedefs | |
typedef struct df_mw_hardreg * | df_mw_hardreg_ptr |
typedef struct df_scan_bb_info * | df_scan_bb_info_t |
Variables | |
static HARD_REG_SET | elim_reg_set |
static df_ref | df_null_ref_rec [1] |
static struct df_mw_hardreg * | df_null_mw_rec [1] |
static bool | regs_ever_live [FIRST_PSEUDO_REGISTER] |
static struct df_problem | problem_SCAN |
static bool | initialized = false |
#define df_scan_free_mws_vec | ( | V | ) |
Referenced by df_insn_info_delete(), df_insn_rescan_debug_internal(), df_mw_hardreg_chain_delete_eq_uses(), df_refs_add_to_chains(), and df_scan_free_internal().
#define df_scan_free_ref_vec | ( | V | ) |
The following two macros free the vecs that hold either the refs or the mw refs. They are a little tricky because the vec has 0 elements is special and is not to be freed.
Referenced by df_refs_add_to_chains(), and df_scan_free_internal().
#define EPILOGUE_USES | ( | REGNO | ) | 0 |
Referenced by df_get_exit_block_use_set(), and init_resource_info().
#define HAVE_epilogue 0 |
Referenced by cfg_layout_finalize(), df_get_exit_block_use_set(), find_end_label(), and thread_prologue_and_epilogue_insns().
#define HAVE_prologue 0 |
Referenced by df_get_entry_block_def_set(), final_start_function(), and thread_prologue_and_epilogue_insns().
#define HAVE_sibcall_epilogue 0 |
Referenced by expand_call().
typedef struct df_mw_hardreg* df_mw_hardreg_ptr |
@verbatim Scanning of rtl for dataflow analysis.
Copyright (C) 1999-2013 Free Software Foundation, Inc. Originally contributed by Michael P. Hayes (m.hay, es@e lec.c ante rbury .ac. nzmhaye) Major rewrite contributed by Danny Berlin ( s@re dhat. comdberl) and Kenneth Zadeck ( in@d berli n.or gzadec). k@na tural brid ge.co m
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/.
typedef struct df_scan_bb_info* df_scan_bb_info_t |
|
static |
Add the refs in REF_VEC to the table in REF_INFO starting at OFFSET.
References df_d::changeable_flags, df, DF_NO_HARD_REGS, offset, and df_ref_info::refs.
Referenced by df_reorganize_refs_by_insn_bb().
|
static |
Collect all artificial refs at the block level for BB and add them to COLLECTION_REC.
References bb_has_eh_pred(), df_collection_rec::def_vec, df, df_canonize_collection_rec(), df_entry_block_defs_collect(), df_exit_block_uses_collect(), DF_REF_ARTIFICIAL, DF_REF_AT_TOP, df_ref_record(), DF_REF_REG_DEF, DF_REF_REG_USE, df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_collection_rec::eq_use_vec, df_d::exit_block_uses, basic_block_def::flags, basic_block_def::index, df_collection_rec::mw_vec, regno_reg_rtx, df_d::regular_block_artificial_uses, and df_collection_rec::use_vec.
Referenced by df_bb_refs_record(), and df_bb_verify().
void df_bb_refs_record | ( | ) |
Record all the refs within the basic block BB_INDEX and scan the instructions if SCAN_INSNS.
References df_collection_rec::def_vec, df, df_bb_refs_collect(), df_grow_bb_info(), df_insn_create_insn_record(), df_insn_refs_collect(), df_refs_add_to_chains(), df_set_bb_dirty(), df_collection_rec::eq_use_vec, df_insn_info::insn, df_insn_info::luid, df_collection_rec::mw_vec, and df_collection_rec::use_vec.
Referenced by create_basic_block_structure(), and df_scan_blocks().
|
static |
Return true if all refs in the basic block are correct and complete. Due to df_ref_chain_verify, it will cause all refs that are verified to have DF_REF_MARK bit set.
References df_collection_rec::def_vec, df_bb_refs_collect(), df_free_collection_rec(), df_get_artificial_defs(), df_get_artificial_uses(), df_insn_refs_verify(), df_refs_verify(), df_scan_get_bb_info(), df_collection_rec::eq_use_vec, basic_block_def::index, df_insn_info::insn, memset(), df_collection_rec::mw_vec, and df_collection_rec::use_vec.
Referenced by df_scan_verify().
|
static |
|
static |
Sort and remove duplicates from the COLLECTION_REC.
References df_collection_rec::def_vec, df_sort_and_compress_mws(), df_sort_and_compress_refs(), df_collection_rec::eq_use_vec, df_collection_rec::mw_vec, and df_collection_rec::use_vec.
|
static |
Check and grow the ref information if necessary. This routine guarantees total_size + BITMAP_ADDEND amount of entries in refs array. It updates ref_info->refs_size only and does not change ref_info->total_size.
References df_grow_ref_info(), df_ref_info::refs_size, and df_ref_info::total_size.
Referenced by df_install_ref(), df_reorganize_refs_by_insn(), df_reorganize_refs_by_reg_by_insn(), and df_reorganize_refs_by_reg_by_reg().
void df_compute_regs_ever_live | ( | ) |
Compute "regs_ever_live" information from the underlying df information. Set the vector to all false if RESET.
References changed, df, df_hard_reg_used_p(), df_update_entry_exit_and_calls(), memset(), df_d::redo_entry_and_exit, and regs_ever_live.
Referenced by df_analyze(), reginfo_init(), and rest_of_handle_df_initialize().
|
static |
Count the number of refs. Include the defs if INCLUDE_DEFS. Include the uses if INCLUDE_USES. Include the eq_uses if INCLUDE_EQ_USES.
References df, and df_d::regs_inited.
Referenced by df_reorganize_refs_by_insn(), df_reorganize_refs_by_reg_by_insn(), and df_reorganize_refs_by_reg_by_reg().
|
static |
Process all the registers defined in the rtx pointed by LOC. Autoincrement/decrement definitions will be picked up by df_uses_record. Any change here has to be matched in df_find_hard_reg_defs_1.
References df_read_modify_subreg_p(), DF_REF_BASE, DF_REF_PARTIAL, DF_REF_READ_WRITE, df_ref_record(), DF_REF_REG_DEF, DF_REF_REG_USE, DF_REF_REGULAR, DF_REF_STRICT_LOW_PART, DF_REF_SUBREG, and DF_REF_ZERO_EXTRACT.
Referenced by df_defs_record().
|
static |
Process all the registers defined in the pattern rtx, X. Any change here has to be matched in df_find_hard_reg_defs.
References df_def_record_1(), DF_REF_CONDITIONAL, DF_REF_MUST_CLOBBER, df_mw_hardreg::flags, and SET.
Referenced by df_get_call_refs(), and df_insn_refs_collect().
|
static |
Returns true if the entry block has correct and complete df_ref set. If not it either aborts if ABORT_IF_FAIL is true or returns false.
References bitmap_clear(), bitmap_equal_p(), df, df_bitmap_obstack, df_get_entry_block_def_set(), df_print_regset(), and df_d::entry_block_defs.
Referenced by df_scan_verify().
|
static |
Return the (conservative) set of hard registers that are defined on entry to the function. It uses df->entry_block_defs to determine which register reference to include.
References df_canonize_collection_rec(), DF_REF_ARTIFICIAL, df_ref_record(), DF_REF_REG_DEF, and regno_reg_rtx.
Referenced by df_bb_refs_collect(), and df_record_entry_block_defs().
|
static |
Returns true if the exit block has correct and complete df_ref set. If not it either aborts if ABORT_IF_FAIL is true or returns false.
References bitmap_clear(), bitmap_equal_p(), df, df_bitmap_obstack, df_get_exit_block_use_set(), df_print_regset(), and df_d::exit_block_uses.
Referenced by df_scan_verify().
|
static |
Referenced by df_bb_refs_collect(), and df_record_exit_block_uses().
|
static |
Return the refs of hard registers that are used in the exit block. It uses df->exit_block_uses to determine register to include.
References bb_has_eh_pred(), bitmap_bit_p(), df_canonize_collection_rec(), DF_REF_ARTIFICIAL, df_ref_record(), DF_REF_REG_USE, regno_reg_rtx, and reload_completed.
|
static |
Set bits in *DEFS for hard registers defined in the pattern X. This has to match the logic in df_defs_record.
References defs, df_find_hard_reg_defs_1(), and SET.
Referenced by df_get_call_refs().
|
static |
Set bits in *DEFS for hard registers found in the rtx DST, which is the destination of a set or clobber. This has to match the logic in df_defs_record_1.
Referenced by df_find_hard_reg_defs().
|
static |
Free all of the refs and the mw_hardregs in COLLECTION_REC.
References df_collection_rec::def_vec, df_free_ref(), df_collection_rec::eq_use_vec, df_scan_problem_data::mw_reg_pool, df_collection_rec::mw_vec, pool_free(), and df_collection_rec::use_vec.
Referenced by df_bb_verify(), and df_insn_rescan().
|
static |
|
static |
Get call's extra defs and uses (track caller-saved registers).
References bitmap_bit_p(), df, df_defs_record(), df_find_hard_reg_defs(), DF_REF_BASE, DF_REF_CALL_STACK_USAGE, DF_REF_MAY_CLOBBER, df_ref_record(), DF_REF_REG_DEF, DF_REF_REG_USE, df_uses_record(), df_d::exit_block_uses, global_regs, df_insn_info::insn, refers_to_regno_p(), and regno_reg_rtx.
Referenced by df_insn_refs_collect().
|
static |
For all DF_REF_CONDITIONAL defs, add a corresponding uses.
References df_collection_rec::def_vec, DF_REF_CONDITIONAL, df_ref_create_structure(), and DF_REF_REG_USE.
Referenced by df_insn_refs_collect().
|
static |
Referenced by df_scan_blocks(), and df_scan_verify().
|
static |
Get the artificial use set for an eh block.
References bitmap_clear(), bitmap_set_bit(), and reload_completed.
|
static |
Referenced by df_entry_block_bitmap_verify(), df_scan_blocks(), and df_update_entry_block_defs().
|
static |
Set the bit for regs that are considered being defined at the entry.
References bitmap_clear(), bitmap_set_bit(), current_function_decl, df_regs_ever_live_p(), epilogue_completed, global_regs, HAVE_prologue, reload_completed, and targetm.
|
static |
Referenced by df_exit_block_bitmap_verify(), df_scan_blocks(), and df_update_exit_block_uses().
|
static |
Set the bit for regs that are considered being used at the exit.
References bitmap_clear(), bitmap_set_bit(), df_mark_reg(), df_regs_ever_live_p(), diddle_return_value(), epilogue_completed, EPILOGUE_USES, global_regs, HAVE_epilogue, and reload_completed.
|
static |
Referenced by df_scan_blocks(), and df_scan_verify().
|
static |
Get the artificial use set for a regular (i.e. non-exit/non-entry) block.
References bitmap_clear(), bitmap_set_bit(), and reload_completed.
void df_grow_insn_info | ( | void | ) |
Grow the ref information. If the current size is less than the number of instructions, grow to 25% more than the number of instructions.
References df, get_max_uid(), df_d::insns, df_d::insns_size, and memset().
Referenced by df_insn_create_insn_record(), df_live_local_compute(), df_live_verify_transfer_functions(), df_recompute_luids(), and df_scan_alloc().
|
static |
Referenced by df_check_and_grow_ref_info().
|
static |
Grow the ref information.
References memset(), df_ref_info::refs, and df_ref_info::refs_size.
void df_grow_reg_info | ( | void | ) |
First, grow the reg_info information. If the current size is less than the number of pseudos, grow to 25% more than the number of pseudos. Second, assure that all of the slots up to max_reg_num have been filled with reg_info structures.
References df_ref_info::begin, df_ref_info::count, df_d::def_info, df_d::def_regs, df, df_d::eq_use_regs, max_reg_num(), memset(), pool_alloc(), df_scan_problem_data::reg_pool, df_d::regs_inited, df_d::regs_size, df_d::use_info, and df_d::use_regs.
Referenced by df_insn_delete(), df_insn_rescan(), df_notes_rescan(), df_ref_change_reg_with_loc(), df_ref_create(), df_scan_alloc(), and regstat_init_n_sets_and_refs().
void df_hard_reg_init | ( | void | ) |
Initialize some platform specific structures.
References elim_reg_set.
Referenced by rest_of_handle_df_initialize().
unsigned int df_hard_reg_used_count | ( | ) |
A count of the number of times REG is actually used in the some instruction. There are a fair number of conditions that affect the setting of this array. See the comment in df.h for df->hard_regs_live_count for the conditions that this array is set.
References df, and df_d::hard_regs_live_count.
bool df_hard_reg_used_p | ( | ) |
Return true if hard REG is actually used in the some instruction. There are a fair number of conditions that affect the setting of this array. See the comment in df.h for df->hard_regs_live_count for the conditions that this array is set.
References df, and df_d::hard_regs_live_count.
Referenced by df_compute_regs_ever_live().
void df_insn_change_bb | ( | ) |
Change all of the basic block references in INSN to use the insn's current basic block. This function is called from routines that move instructions from one block to another.
References df, df_insn_rescan(), df_set_bb_dirty(), dump_file, and basic_block_def::index.
Referenced by get_ebb_head_tail(), move_insn(), reorder_insns(), and update_bb_for_insn_chain().
|
read |
Create the insn record for INSN. If there was one there, zero it out.
References df_grow_insn_info(), df_insn_info::insn, df_scan_problem_data::insn_pool, memset(), and pool_alloc().
Referenced by df_bb_refs_record(), df_insn_rescan(), df_live_bb_local_compute(), df_notes_rescan(), and df_recompute_luids().
void df_insn_delete | ( | ) |
Delete all of the refs information from INSN, either right now or marked for later in deferred mode.
References bitmap_clear_bit(), bitmap_set_bit(), df_d::changeable_flags, df, DF_DEFER_INSN_RESCAN, df_grow_bb_info(), df_grow_reg_info(), df_insn_info_delete(), df_set_bb_dirty(), dump_file, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, and reload_completed.
Referenced by delete_insn(), and set_insn_deleted().
|
static |
Referenced by df_insn_delete(), df_insn_rescan(), df_insn_rescan_all(), df_process_deferred_rescans(), and df_scan_free_bb_info().
|
static |
Delete all of the refs information from the insn with UID. Internal helper for df_insn_delete, df_insn_rescan, and other df-scan routines that don't have to work in deferred mode and do not have to mark basic blocks for re-processing.
References bitmap_clear_bit(), df_insn_info::defs, df, df_mw_hardreg_chain_delete(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_free_mws_vec, df_insn_info::eq_uses, df_scan_problem_data::insn_pool, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, df_insn_info::mw_hardregs, pool_free(), and df_insn_info::uses.
|
static |
Collect all refs in the INSN. This function is free of any side-effect - it will create and return a lists of df_ref's in the COLLECTION_REC without putting those refs into existing ref chains and reg chains.
References df_collection_rec::def_vec, df_canonize_collection_rec(), df_defs_record(), df_get_call_refs(), df_get_conditional_uses(), DF_REF_BASE, DF_REF_CONDITIONAL, DF_REF_IN_NOTE, df_ref_record(), DF_REF_REG_USE, df_uses_record(), df_collection_rec::eq_use_vec, df_insn_info::insn, df_collection_rec::mw_vec, regno_reg_rtx, and df_collection_rec::use_vec.
Referenced by df_bb_refs_record(), df_insn_refs_verify(), and df_insn_rescan().
|
static |
Return true if the existing insn refs information is complete and correct. Otherwise (i.e. if there's any missing or extra refs), return the correct df_ref chain in REFS_RETURN. If ABORT_IF_FAIL, leave the refs that are verified (already in the ref chain) as DF_REF_MARKED(). If it's false, then it's a per-insn verification mode instead of the whole function, so unmark everything. If ABORT_IF_FAIL is set, this function never returns false.
References df_collection_rec::def_vec, df_insn_refs_collect(), df_mws_verify(), df_refs_verify(), df_collection_rec::eq_use_vec, df_collection_rec::mw_vec, and df_collection_rec::use_vec.
Referenced by df_bb_verify(), and df_insn_rescan().
bool df_insn_rescan | ( | ) |
Rescan INSN. Return TRUE if the rescanning produced any changes.
References bitmap_clear_bit(), bitmap_set_bit(), df_d::changeable_flags, df_collection_rec::def_vec, df_insn_info::defs, df, DF_DEFER_INSN_RESCAN, df_free_collection_rec(), df_grow_bb_info(), df_grow_reg_info(), df_insn_create_insn_record(), df_insn_info_delete(), df_insn_refs_collect(), df_insn_refs_verify(), DF_NO_INSN_RESCAN, df_null_mw_rec, df_null_ref_rec, df_refs_add_to_chains(), df_set_bb_dirty(), dump_file, df_collection_rec::eq_use_vec, df_insn_info::eq_uses, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, df_insn_info::mw_hardregs, df_collection_rec::mw_vec, df_collection_rec::use_vec, and df_insn_info::uses.
Referenced by add_insn_after(), add_insn_before(), adjust_for_new_dest(), apply_reg_moves(), change_loop(), cleanup_subreg_operands(), confirm_change_group(), dead_debug_global_replace_temp(), dead_debug_local_finish(), delete_trivially_dead_insns(), df_insn_change_bb(), df_insn_rescan_all(), df_notes_rescan(), df_process_deferred_rescans(), df_update_entry_exit_and_calls(), emit_insn_after_1(), match_asm_constraints_1(), optimize_reg_copy_2(), peep2_update_life(), propagate_for_debug(), regrename_do_replace(), remove_scratches(), replace_ref(), resolve_clobber(), resolve_debug(), restore_operands(), schedule_insn(), try_combine(), update_df(), update_equiv_regs(), and update_ld_motion_stores().
void df_insn_rescan_all | ( | void | ) |
Rescan all of the insns in the function. Note that the artificial uses and defs are not touched. This function will destroy def-use or use-def chains.
References bitmap_clear(), bitmap_copy(), df_d::changeable_flags, df, df_bitmap_obstack, df_clear_flags(), DF_DEFER_INSN_RESCAN, df_insn_info_delete(), df_insn_rescan(), DF_NO_INSN_RESCAN, df_set_flags(), df_insn_info::insn, df_d::insns_to_delete, df_d::insns_to_notes_rescan, and df_d::insns_to_rescan.
bool df_insn_rescan_debug_internal | ( | ) |
Same as df_insn_rescan, but don't mark the basic block as dirty.
References bitmap_clear_bit(), df_insn_info::defs, df, df_mw_hardreg_chain_delete(), df_null_mw_rec, df_null_ref_rec, df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_free_mws_vec, dump_file, df_insn_info::eq_uses, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, df_insn_info::mw_hardregs, and df_insn_info::uses.
Referenced by dead_debug_reset_uses(), df_note_bb_compute(), reload(), and reset_unmarked_insns_debug_uses().
|
staticread |
This function takes the mws installs the entire group into the insn.
References count, df_null_mw_rec, and memcpy().
Referenced by df_refs_add_to_chains().
|
static |
Add the new df_ref to appropriate reg_info/ref_info chains.
References df, df_check_and_grow_ref_info(), DF_HARD_REG_LIVE, DF_REF_ORDER_NO_TABLE, df_d::hard_regs_live_count, df_reg_info::n_refs, df_ref_info::ref_order, df_ref_info::refs, df_reg_info::reg_chain, df_ref_info::table_size, and df_ref_info::total_size.
Referenced by df_install_ref_incremental(), and df_install_refs().
|
static |
Referenced by df_ref_create_structure().
|
static |
References df_d::analyze_subset, bitmap_bit_p(), df_d::blocks_to_analyze, count, df_d::def_info, df_d::def_regs, df, df_install_ref(), df_ref_compare(), df_ref_debug(), DF_REF_IN_NOTE, DF_REF_ORDER_BY_INSN_WITH_NOTES, DF_REF_ORDER_BY_REG_WITH_NOTES, DF_REF_ORDER_NO_TABLE, DF_REF_ORDER_UNORDERED, DF_REF_ORDER_UNORDERED_WITH_NOTES, df_set_bb_dirty(), dump_file, df_d::eq_use_regs, basic_block_def::index, df_ref_info::ref_order, df_d::use_info, and df_d::use_regs.
|
static |
This function takes one of the groups of refs (defs, uses or eq_uses) and installs the entire group into the insn. It also adds each of these refs into the appropriate chains.
References df_d::analyze_subset, bitmap_bit_p(), df_d::blocks_to_analyze, count, df, df_install_ref(), df_null_ref_rec, DF_REF_ORDER_BY_INSN, DF_REF_ORDER_BY_INSN_WITH_NOTES, DF_REF_ORDER_BY_REG, DF_REF_ORDER_BY_REG_WITH_NOTES, DF_REF_ORDER_UNORDERED, DF_REF_ORDER_UNORDERED_WITH_NOTES, basic_block_def::index, and df_ref_info::ref_order.
Referenced by df_refs_add_to_chains().
|
static |
Mark a register in SET. Hard registers in large modes get all of their component registers set as well.
References bitmap_set_bit(), and bitmap_set_range().
Referenced by df_get_exit_block_use_set().
void df_maybe_reorganize_def_refs | ( | ) |
If the def refs in DF are not organized, reorganize them.
References df_d::def_info, df, DF_REF_ORDER_BY_INSN, DF_REF_ORDER_BY_INSN_WITH_NOTES, DF_REF_ORDER_BY_REG, DF_REF_ORDER_BY_REG_WITH_NOTES, DF_REF_ORDER_NO_TABLE, DF_REF_ORDER_UNORDERED, DF_REF_ORDER_UNORDERED_WITH_NOTES, df_reorganize_refs_by_insn(), df_reorganize_refs_by_reg(), free(), order, df_ref_info::ref_order, df_ref_info::refs, and df_ref_info::refs_size.
Referenced by df_finish_pass(), df_rd_local_compute(), and df_set_blocks().
void df_maybe_reorganize_use_refs | ( | ) |
If the use refs in DF are not organized, reorganize them.
References df, DF_REF_ORDER_BY_INSN, DF_REF_ORDER_BY_INSN_WITH_NOTES, DF_REF_ORDER_BY_REG, DF_REF_ORDER_BY_REG_WITH_NOTES, DF_REF_ORDER_NO_TABLE, DF_REF_ORDER_UNORDERED, DF_REF_ORDER_UNORDERED_WITH_NOTES, df_reorganize_refs_by_insn(), df_reorganize_refs_by_reg(), free(), order, df_ref_info::ref_order, df_ref_info::refs, df_ref_info::refs_size, and df_d::use_info.
Referenced by build_single_def_use_links(), df_finish_pass(), and df_set_blocks().
|
static |
Referenced by df_notes_rescan(), and df_sort_and_compress_mws().
|
static |
Compare MW1 and MW2 for sorting.
References df_mw_hardreg::end_regno, df_mw_hardreg::flags, df_mw_hardreg::mw_order, df_mw_hardreg::mw_reg, and df_mw_hardreg::start_regno.
|
static |
Return true if the contents of two df_ref's are identical. It ignores DF_REF_MARKER.
References df_mw_hardreg::end_regno, df_mw_hardreg::flags, df_mw_hardreg::mw_reg, and df_mw_hardreg::start_regno.
Referenced by df_mws_verify(), and df_sort_and_compress_mws().
|
static |
Delete the hardreg chain.
References df_scan_problem_data::mw_reg_pool, and pool_free().
Referenced by df_insn_info_delete(), and df_insn_rescan_debug_internal().
|
static |
Delete the mw_hardregs that point into the eq_notes.
References count, deleted, df_null_mw_rec, DF_REF_IN_NOTE, df_scan_free_mws_vec, df_insn_info::mw_hardregs, df_scan_problem_data::mw_reg_pool, and pool_free().
Referenced by df_notes_rescan().
|
static |
Verify that NEW_REC and OLD_REC have exactly the same members.
References df_mw_equal_p().
Referenced by df_insn_refs_verify().
void df_notes_rescan | ( | ) |
Rescan only the REG_EQUIV/REG_EQUAL notes part of INSN.
References bitmap_bit_p(), bitmap_clear_bit(), bitmap_set_bit(), df_d::changeable_flags, count, df_insn_info::defs, df, df_canonize_collection_rec(), DF_DEFER_INSN_RESCAN, df_grow_bb_info(), df_grow_reg_info(), df_insn_create_insn_record(), df_insn_rescan(), df_mw_compare(), df_mw_hardreg_chain_delete_eq_uses(), DF_NO_INSN_RESCAN, df_null_mw_rec, df_null_ref_rec, df_ref_chain_delete(), DF_REF_IN_NOTE, DF_REF_REG_USE, df_refs_add_to_chains(), df_uses_record(), df_collection_rec::eq_use_vec, df_insn_info::eq_uses, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, memcpy(), memset(), df_insn_info::mw_hardregs, df_collection_rec::mw_vec, and df_insn_info::uses.
Referenced by canonicalize_insn(), change_loop(), cse_extended_basic_block(), cse_insn(), df_process_deferred_rescans(), df_remove_dead_eq_notes(), optimize_reg_copy_3(), remove_note(), resolve_reg_notes(), set_unique_reg_note(), update_df(), and update_equiv_regs().
void df_process_deferred_rescans | ( | void | ) |
Process all of the deferred rescans or deletions.
References bitmap_clear(), bitmap_copy(), df_d::changeable_flags, df, df_bitmap_obstack, df_clear_flags(), DF_DEFER_INSN_RESCAN, df_insn_info_delete(), df_insn_rescan(), DF_NO_INSN_RESCAN, df_notes_rescan(), df_set_flags(), df_update_entry_exit_and_calls(), dump_file, df_insn_info::insn, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, and df_d::redo_entry_and_exit.
Referenced by df_analyze(), df_finish_pass(), find_defs(), and iv_analysis_loop_init().
bool df_read_modify_subreg_p | ( | ) |
A set to a non-paradoxical SUBREG for which the number of word_mode units covered by the outer mode is smaller than that covered by the inner mode, is a read-modify-write operation. This function returns true iff the SUBREG X is such a SUBREG.
Referenced by df_def_record_1(), df_uses_record(), df_word_lr_mark_ref(), mark_pseudo_reg_dead(), mark_pseudo_reg_live(), mark_ref_dead(), and sched_analyze_1().
void df_recompute_luids | ( | ) |
Recompute the luids for the insns in BB.
References df_grow_insn_info(), df_insn_create_insn_record(), and df_insn_info::luid.
Referenced by attempt_change(), df_lr_bb_local_compute(), and merge_in_block().
|
static |
Referenced by df_scan_blocks(), and df_update_entry_block_defs().
|
static |
Record the (conservative) set of hard registers that are defined on entry to the function.
References df_collection_rec::def_vec, df_entry_block_defs_collect(), df_refs_add_to_chains(), and memset().
|
static |
Referenced by df_scan_blocks(), and df_update_exit_block_uses().
|
static |
Record the set of hard registers that are used in the exit block. It uses df->exit_block_uses to determine which bit to include.
References df_exit_block_uses_collect(), df_refs_add_to_chains(), memset(), and df_collection_rec::use_vec.
|
static |
|
static |
Delete all refs in the ref chain.
References df_reg_chain_unlink(), and free().
|
static |
|
static |
Delete all du chain (DF_REF_CHAIN()) of all refs in the ref chain.
References df_chain_unlink().
void df_ref_change_reg_with_loc | ( | ) |
Change the regno of all refs that contained LOC from OLD_REGNO to NEW_REGNO. Refs that do not match LOC are not changed which means that artificial refs are not changed since they have no loc. This call is to support the SET_REGNO macro.
References df, df_grow_reg_info(), and df_ref_change_reg_with_loc_1().
|
static |
Helper function for df_ref_change_reg_with_loc.
References count, df_ref_compare(), DF_REF_IN_NOTE, df_set_bb_dirty(), dump_file, df_insn_info::eq_uses, df_reg_info::n_refs, df_reg_info::reg_chain, regno_reg_rtx, and df_insn_info::uses.
Referenced by df_ref_change_reg_with_loc().
|
static |
Referenced by df_install_ref_incremental(), df_ref_change_reg_with_loc_1(), and df_sort_and_compress_refs().
|
static |
Compare REF1 and REF2 for sorting. This is only called from places where all of the refs are of the same type, in the same insn, and have the same bb. So these fields are not checked.
References DF_REF_ARTIFICIAL, and DF_REF_MW_HARDREG.
|
static |
df_ref df_ref_create | ( | rtx | reg, |
rtx * | loc, | ||
rtx | insn, | ||
basic_block | bb, | ||
enum df_ref_type | ref_type, | ||
int | ref_flags | ||
) |
Create a new ref of type DF_REF_TYPE for register REG at address LOC within INSN of BB. This function is only used externally.
References df_grow_reg_info(), DF_REF_BASE, df_ref_create_structure(), and DF_REF_REGULAR.
|
static |
Allocate a ref and initialize its fields.
References df_ref_d::artificial_ref, df_artificial_ref::bb, df_collection_rec::def_vec, df, DF_HARD_REG_LIVE, df_install_ref_incremental(), DF_REF_ARTIFICIAL, DF_REF_BASE, DF_REF_IN_NOTE, DF_REF_MAY_CLOBBER, DF_REF_REGULAR, elim_reg_set, df_collection_rec::eq_use_vec, df_regular_ref::loc, pool_alloc(), df_scan_problem_data::ref_artificial_pool, df_scan_problem_data::ref_base_pool, df_d::ref_order, df_scan_problem_data::ref_regular_pool, df_ref_d::regular_ref, and df_collection_rec::use_vec.
Referenced by df_get_conditional_uses(), df_ref_create(), and df_ref_record().
|
static |
Return true if the contents of two df_ref's are identical. It ignores DF_REF_MARKER.
References DF_REF_ARTIFICIAL, DF_REF_BASE, DF_REF_MW_HARDREG, DF_REF_REG_MARKER, and DF_REF_REGULAR.
Referenced by df_refs_verify(), and df_sort_and_compress_refs().
|
static |
Create new references of type DF_REF_TYPE for each part of register REG at address LOC within INSN of BB.
References df, df_ref_create_structure(), DF_REF_MW_HARDREG, DF_REF_PARTIAL, df_mw_hardreg::end_regno, df_mw_hardreg::flags, df_mw_hardreg::mw_order, df_mw_hardreg::mw_reg, df_scan_problem_data::mw_reg_pool, df_collection_rec::mw_vec, pool_alloc(), df_d::ref_order, regno_reg_rtx, df_mw_hardreg::start_regno, subreg_nregs(), and subreg_regno_offset().
Referenced by df_bb_refs_collect(), df_def_record_1(), df_entry_block_defs_collect(), df_exit_block_uses_collect(), df_get_call_refs(), df_insn_refs_collect(), and df_uses_record().
void df_ref_remove | ( | ) |
Unlink REF from all def-use/use-def chains, etc.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, df_insn_info::defs, df_ref_compress_rec(), df_ref_debug(), DF_REF_IN_NOTE, df_reg_chain_unlink(), df_scan_get_bb_info(), df_set_bb_dirty(), dump_file, df_insn_info::eq_uses, and df_insn_info::uses.
|
static |
Add a chain of df_refs to appropriate ref chain/reg_info/ref_info chains and update other necessary information.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, df_d::def_info, df_d::def_regs, df_collection_rec::def_vec, df_insn_info::defs, df, df_install_mws(), df_install_refs(), df_scan_free_mws_vec, df_scan_free_ref_vec, df_scan_get_bb_info(), df_d::eq_use_regs, df_collection_rec::eq_use_vec, df_insn_info::eq_uses, basic_block_def::index, df_insn_info::mw_hardregs, df_collection_rec::mw_vec, df_d::use_info, df_d::use_regs, df_collection_rec::use_vec, and df_insn_info::uses.
Referenced by df_bb_refs_record(), df_insn_rescan(), df_notes_rescan(), df_record_entry_block_defs(), and df_record_exit_block_uses().
|
static |
Verify that NEW_REC and OLD_REC have exactly the same members.
References df_ref_equal_p().
Referenced by df_bb_verify(), and df_insn_refs_verify().
|
static |
@verbatim Mark all refs in the reg chain. Verify that all of the registers
are in the correct chain.
References count, and DF_REF_IN_NOTE.
Referenced by df_scan_verify().
|
static |
Unlink and delete REF at the reg_use, reg_eq_use or reg_def chain. Also delete the def-use or use-def chain if it exists.
References df_d::analyze_subset, bitmap_bit_p(), df_d::blocks_to_analyze, df_d::def_info, df, df_chain_unlink(), df_free_ref(), DF_HARD_REG_LIVE, DF_REF_IN_NOTE, DF_REF_ORDER_BY_INSN_WITH_NOTES, DF_REF_ORDER_BY_REG_WITH_NOTES, DF_REF_ORDER_UNORDERED_WITH_NOTES, df_d::hard_regs_live_count, df_reg_info::n_refs, df_ref_info::ref_order, refs, df_ref_info::refs, df_reg_info::reg_chain, and df_d::use_info.
Referenced by df_ref_chain_delete(), and df_ref_remove().
|
static |
Verify that all of the registers in the chain are unmarked.
Referenced by df_scan_verify().
bool df_regs_ever_live_p | ( | ) |
Get the value of regs_ever_live[REGNO].
References regs_ever_live.
Referenced by check_new_reg_p(), choose_best_pseudo_reg(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_scan_start_dump(), find_hard_regno_for(), finish_spills(), init_hard_regs_data(), lra_constraints(), migrate_btr_defs(), only_leaf_regs_used(), peep2_find_free_register(), reg_to_stack(), reload(), reload_combine_recognize_pattern(), and requires_stack_frame_p().
|
static |
Organize the refs by insn into the table in REF_INFO. If blocks_to_analyze is defined, use that set, otherwise the entire program. Include the defs if INCLUDE_DEFS. Include the uses if INCLUDE_USES. Include the eq_uses if INCLUDE_EQ_USES.
References df_d::blocks_to_analyze, df, df_check_and_grow_ref_info(), df_count_refs(), df_reorganize_refs_by_insn_bb(), offset, df_ref_info::table_size, and df_ref_info::total_size.
Referenced by df_maybe_reorganize_def_refs(), and df_maybe_reorganize_use_refs().
|
static |
Count the number of refs in all of the insns of BB. Include the defs if INCLUDE_DEFS. Include the uses if INCLUDE_USES. Include the eq_uses if INCLUDE_EQ_USES.
References df_add_refs_to_table(), df_get_artificial_defs(), df_get_artificial_uses(), basic_block_def::index, df_insn_info::insn, and offset.
Referenced by df_reorganize_refs_by_insn().
|
static |
Take build ref table for either the uses or defs from the reg-use or reg-def chains.
References df_d::analyze_subset, df, df_reorganize_refs_by_reg_by_insn(), and df_reorganize_refs_by_reg_by_reg().
Referenced by df_maybe_reorganize_def_refs(), and df_maybe_reorganize_use_refs().
|
static |
Take build ref table for either the uses or defs from the reg-use or reg-def chains. This version processes the refs in insn order which is likely to be best if processing some segment of the function.
References df_ref_info::begin, df_d::blocks_to_analyze, df_d::changeable_flags, df_ref_info::count, df, df_check_and_grow_ref_info(), df_count_refs(), df_get_artificial_defs(), df_get_artificial_uses(), DF_NO_HARD_REGS, df_insn_info::insn, memset(), offset, df_ref_info::refs, df_d::regs_inited, df_ref_info::table_size, and df_ref_info::total_size.
Referenced by df_reorganize_refs_by_reg().
|
static |
Take build ref table for either the uses or defs from the reg-use or reg-def chains. This version processes the refs in reg order which is likely to be best if processing the whole function.
References df_ref_info::begin, df_d::changeable_flags, count, df_ref_info::count, df, df_check_and_grow_ref_info(), df_count_refs(), DF_NO_HARD_REGS, memset(), offset, df_ref_info::refs, df_d::regs_inited, df_ref_info::table_size, and df_ref_info::total_size.
Referenced by df_reorganize_refs_by_reg().
void df_scan_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().
Referenced by rest_of_handle_df_initialize().
void df_scan_alloc | ( | ) |
Allocate the problem data for the scanning problem. This should be called when the problem is created or when the entire function is to be rescanned.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, bitmap_obstack_initialize(), create_alloc_pool(), df, df_grow_bb_info(), df_grow_insn_info(), df_grow_reg_info(), df_scan_free_internal(), df_scan_get_bb_info(), df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_d::exit_block_uses, get_max_uid(), df_d::hardware_regs_used, basic_block_def::index, df_scan_problem_data::insn_bitmaps, df_scan_problem_data::insn_pool, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, df_scan_problem_data::mw_reg_pool, df_scan_problem_data::ref_artificial_pool, df_scan_problem_data::ref_base_pool, df_scan_problem_data::ref_regular_pool, df_scan_problem_data::reg_bitmaps, df_scan_problem_data::reg_pool, and df_d::regular_block_artificial_uses.
Referenced by do_reload(), partition_hot_cold_basic_blocks(), and rest_of_handle_df_initialize().
void df_scan_blocks | ( | void | ) |
Rescan all of the block_to_analyze or all of the blocks in the function if df_set_blocks if blocks_to_analyze is NULL;
References bitmap_ior_into(), df_d::def_info, df, df_bb_refs_record(), df_get_eh_block_artificial_uses(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_get_regular_block_artificial_uses(), df_record_entry_block_defs(), df_record_exit_block_uses(), DF_REF_ORDER_NO_TABLE, df_set_bb_dirty(), df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_d::exit_block_uses, basic_block_def::index, df_ref_info::ref_order, df_d::regular_block_artificial_uses, and df_d::use_info.
Referenced by do_reload(), partition_hot_cold_basic_blocks(), and rest_of_handle_df_initialize().
|
static |
Free all of the data associated with the scan problem.
References df_d::blocks_to_analyze, df, df_scan_free_internal(), and free().
|
static |
Free basic block info.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, df_insn_info_delete(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_get_bb_info(), and basic_block_def::index.
|
static |
Internal function to shut down the scanning problem.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, df_ref_info::begin, bitmap_clear(), bitmap_obstack_release(), df_ref_info::count, df_d::def_info, df_d::def_regs, df_insn_info::defs, df, df_scan_free_mws_vec, df_scan_free_ref_vec, df_scan_get_bb_info(), df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_d::eq_use_regs, df_insn_info::eq_uses, df_d::exit_block_uses, free(), free_alloc_pool(), df_d::hardware_regs_used, df_scan_problem_data::insn_bitmaps, df_scan_problem_data::insn_pool, df_d::insns, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, memset(), df_insn_info::mw_hardregs, df_scan_problem_data::mw_reg_pool, df_scan_problem_data::ref_artificial_pool, df_scan_problem_data::ref_base_pool, df_scan_problem_data::ref_regular_pool, df_ref_info::refs, df_scan_problem_data::reg_bitmaps, df_scan_problem_data::reg_pool, df_d::regs_size, df_d::regular_block_artificial_uses, df_d::use_info, df_d::use_regs, and df_insn_info::uses.
Referenced by df_scan_alloc(), and df_scan_free().
|
static |
Dump the bb_info for a given basic block.
References df_scan_bb_info::artificial_defs, df_scan_bb_info::artificial_uses, df_insn_debug(), df_refs_chain_dump(), df_scan_get_bb_info(), and basic_block_def::index.
|
static |
Dump the preamble for DF_SCAN dump.
References df, df_print_regset(), df_regs_ever_live_p(), df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_d::exit_block_uses, df_d::hardware_regs_used, df_d::regs_inited, regs_invalidated_by_call_regset, and df_d::regular_block_artificial_uses.
void df_scan_verify | ( | void | ) |
Return true if df_ref information for all insns in all blocks are correct and complete.
References bitmap_clear(), bitmap_equal_p(), bitmap_ior_into(), df, df_bb_verify(), df_bitmap_obstack, df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_get_eh_block_artificial_uses(), df_get_regular_block_artificial_uses(), df_reg_chain_mark(), df_reg_chain_verify_unmarked(), df_d::eh_block_artificial_uses, and df_d::regular_block_artificial_uses.
Referenced by df_verify().
void df_set_regs_ever_live | ( | ) |
Set regs_ever_live[REGNO] to VALUE. If this cause regs_ever_live to change, schedule that change for the next update.
References df, df_d::redo_entry_and_exit, and regs_ever_live.
Referenced by assign_hard_regno(), assign_spill_hard_regs(), emit_insn_from_expr_after(), finish_spills(), ira_setup_eliminable_regset(), leaf_renumber_regs_insn(), lra(), lra_constraints(), mark_home_live_1(), move_btr_def(), reload(), rename_chains(), and spill_hard_reg().
|
static |
Sort and compress a set of refs.
References count, df_mw_compare(), df_mw_equal_p(), df_scan_problem_data::mw_reg_pool, and pool_free().
Referenced by df_canonize_collection_rec().
|
static |
Sort and compress a set of refs.
References count, df_free_ref(), df_ref_compare(), df_ref_equal_p(), and df_swap_refs().
Referenced by df_canonize_collection_rec().
|
static |
Referenced by df_sort_and_compress_refs().
void df_update_entry_block_defs | ( | void | ) |
Update the defs in the entry block.
References df_scan_bb_info::artificial_defs, bitmap_clear(), bitmap_copy(), bitmap_equal_p(), changed, df, df_bitmap_obstack, df_get_entry_block_def_set(), df_record_entry_block_defs(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_get_bb_info(), df_set_bb_dirty(), df_d::entry_block_defs, refs, and df_scan_problem_data::reg_bitmaps.
Referenced by df_update_entry_exit_and_calls().
void df_update_entry_exit_and_calls | ( | void | ) |
Recompute the parts of scanning that are based on regs_ever_live because something changed in that array.
References df_insn_rescan(), df_update_entry_block_defs(), and df_update_exit_block_uses().
Referenced by df_compute_regs_ever_live(), df_process_deferred_rescans(), and thread_prologue_and_epilogue_insns().
void df_update_exit_block_uses | ( | void | ) |
Update the uses in the exit block.
References df_scan_bb_info::artificial_uses, bitmap_clear(), bitmap_copy(), bitmap_equal_p(), changed, df, df_bitmap_obstack, df_get_exit_block_use_set(), df_record_exit_block_uses(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_get_bb_info(), df_set_bb_dirty(), df_d::exit_block_uses, refs, and df_scan_problem_data::reg_bitmaps.
Referenced by df_update_entry_exit_and_calls(), and notice_stack_pointer_modification().
void df_uses_create | ( | ) |
Create new refs under address LOC within INSN. This function is only used externally. REF_FLAGS must be either 0 or DF_REF_IN_NOTE, depending on whether LOC is inside PATTERN (INSN) or a note.
References DF_REF_IN_NOTE, DF_REF_REG_USE, and df_uses_record().
Referenced by update_df().
|
static |
Process all the registers used in the rtx at address LOC.
References df_read_modify_subreg_p(), DF_REF_IN_NOTE, DF_REF_PARTIAL, DF_REF_PRE_POST_MODIFY, DF_REF_READ_WRITE, df_ref_record(), DF_REF_REG_DEF, DF_REF_REG_MEM_LOAD, DF_REF_REG_MEM_STORE, DF_REF_REG_USE, DF_REF_REGULAR, DF_REF_SIGN_EXTRACT, DF_REF_STRICT_LOW_PART, DF_REF_SUBREG, DF_REF_ZERO_EXTRACT, df_mw_hardreg::flags, df_insn_info::insn, and SET.
Referenced by df_get_call_refs(), df_insn_refs_collect(), df_notes_rescan(), and df_uses_create().
|
static |
|
static |
Referenced by df_insn_rescan(), df_insn_rescan_debug_internal(), df_install_refs(), df_notes_rescan(), and df_ref_compress_rec().
|
static |
The set of hard registers in eliminables[i].from.
Referenced by df_hard_reg_init(), and df_ref_create_structure().
|
static |
|
static |
|
static |
Indexed by hardware reg number, is true if that register is ever used in the current function. In df-scan.c, this is set up to record the hard regs used explicitly. Reload adds in the hard regs used for holding pseudo regs. Final uses it to generate the code in the function prologue and epilogue to save and restore registers as needed.
Referenced by df_compute_regs_ever_live(), df_regs_ever_live_p(), and df_set_regs_ever_live().