GCC Middle and Back End API Reference
df-scan.c File 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_hardregdf_mw_hardreg_ptr
typedef struct df_scan_bb_infodf_scan_bb_info_t

Functions

static void df_ref_record (enum df_ref_class, struct df_collection_rec *, rtx, rtx *, basic_block, struct df_insn_info *, enum df_ref_type, int ref_flags)
static void df_def_record_1 (struct df_collection_rec *, rtx *, basic_block, struct df_insn_info *, int ref_flags)
static void df_defs_record (struct df_collection_rec *, rtx, basic_block, struct df_insn_info *, int ref_flags)
static void df_uses_record (struct df_collection_rec *, rtx *, enum df_ref_type, basic_block, struct df_insn_info *, int ref_flags)
static void df_install_ref_incremental (df_ref)
static df_ref df_ref_create_structure (enum df_ref_class, struct df_collection_rec *, rtx, rtx *, basic_block, struct df_insn_info *, enum df_ref_type, int ref_flags)
static void df_insn_refs_collect (struct df_collection_rec *, basic_block, struct df_insn_info *)
static void df_canonize_collection_rec (struct df_collection_rec *)
static void df_get_regular_block_artificial_uses (bitmap)
static void df_get_eh_block_artificial_uses (bitmap)
static void df_record_entry_block_defs (bitmap)
static void df_record_exit_block_uses (bitmap)
static void df_get_exit_block_use_set (bitmap)
static void df_get_entry_block_def_set (bitmap)
static void df_grow_ref_info (struct df_ref_info *, unsigned int)
static void df_ref_chain_delete_du_chain (df_ref *)
static void df_ref_chain_delete (df_ref *)
static void df_refs_add_to_chains (struct df_collection_rec *, basic_block, rtx)
static bool df_insn_refs_verify (struct df_collection_rec *, basic_block, rtx, bool)
static void df_entry_block_defs_collect (struct df_collection_rec *, bitmap)
static void df_exit_block_uses_collect (struct df_collection_rec *, bitmap)
static void df_install_ref (df_ref, struct df_reg_info *, struct df_ref_info *, bool)
static int df_ref_compare (const void *, const void *)
static int df_mw_compare (const void *, const void *)
static void df_insn_info_delete (unsigned int)
static void df_scan_free_internal ()
static void df_scan_free_bb_info ()
void df_scan_alloc ()
static void df_scan_free ()
static void df_scan_start_dump ()
static void df_scan_start_block ()
void df_scan_add_problem ()
void df_grow_reg_info ()
static void df_grow_ref_info ()
static void df_check_and_grow_ref_info (struct df_ref_info *ref_info, unsigned bitmap_addend)
void df_grow_insn_info ()
void df_scan_blocks ()
void df_uses_create ()
df_ref df_ref_create (rtx reg, rtx *loc, rtx insn, basic_block bb, enum df_ref_type ref_type, int ref_flags)
static void df_install_ref_incremental ()
static void df_free_ref ()
static void df_reg_chain_unlink ()
static void df_ref_compress_rec ()
void df_ref_remove ()
struct df_insn_infodf_insn_create_insn_record ()
static void df_ref_chain_delete_du_chain ()
static void df_ref_chain_delete ()
static void df_mw_hardreg_chain_delete ()
static void df_insn_info_delete ()
void df_insn_delete ()
static void df_free_collection_rec ()
bool df_insn_rescan ()
bool df_insn_rescan_debug_internal ()
void df_insn_rescan_all ()
void df_process_deferred_rescans ()
static unsigned int df_count_refs (bool include_defs, bool include_uses, bool include_eq_uses)
static void df_reorganize_refs_by_reg_by_reg (struct df_ref_info *ref_info, bool include_defs, bool include_uses, bool include_eq_uses)
static void df_reorganize_refs_by_reg_by_insn (struct df_ref_info *ref_info, bool include_defs, bool include_uses, bool include_eq_uses)
static void df_reorganize_refs_by_reg (struct df_ref_info *ref_info, bool include_defs, bool include_uses, bool include_eq_uses)
static unsigned int df_add_refs_to_table (unsigned int offset, struct df_ref_info *ref_info, df_ref *ref_vec)
static unsigned int df_reorganize_refs_by_insn_bb (basic_block bb, unsigned int offset, struct df_ref_info *ref_info, bool include_defs, bool include_uses, bool include_eq_uses)
static void df_reorganize_refs_by_insn (struct df_ref_info *ref_info, bool include_defs, bool include_uses, bool include_eq_uses)
void df_maybe_reorganize_use_refs ()
void df_maybe_reorganize_def_refs ()
void df_insn_change_bb ()
static void df_ref_change_reg_with_loc_1 (struct df_reg_info *old_df, struct df_reg_info *new_df, int new_regno, rtx loc)
void df_ref_change_reg_with_loc ()
static unsigned int df_mw_hardreg_chain_delete_eq_uses ()
void df_notes_rescan ()
static bool df_ref_equal_p ()
static int df_ref_compare ()
static void df_swap_refs ()
static void df_sort_and_compress_refs ()
static bool df_mw_equal_p ()
static int df_mw_compare ()
static void df_sort_and_compress_mws ()
static void df_canonize_collection_rec ()
static df_refdf_install_refs (basic_block bb, vec< df_ref, va_stack > old_vec, struct df_reg_info **reg_info, struct df_ref_info *ref_info, bool is_notes)
static struct df_mw_hardreg ** df_install_mws ()
bool df_read_modify_subreg_p ()
static void df_find_hard_reg_defs_1 ()
static void df_find_hard_reg_defs ()
static void df_get_conditional_uses ()
static void df_get_call_refs (struct df_collection_rec *collection_rec, basic_block bb, struct df_insn_info *insn_info, int flags)
void df_recompute_luids ()
static void df_bb_refs_collect ()
void df_bb_refs_record ()
static void df_get_regular_block_artificial_uses ()
static void df_get_eh_block_artificial_uses ()
static void df_mark_reg ()
static void df_get_entry_block_def_set ()
static void df_record_entry_block_defs ()
void df_update_entry_block_defs ()
static void df_get_exit_block_use_set ()
static void df_exit_block_uses_collect ()
static void df_record_exit_block_uses ()
void df_update_exit_block_uses ()
void df_hard_reg_init ()
void df_update_entry_exit_and_calls ()
bool df_hard_reg_used_p ()
unsigned int df_hard_reg_used_count ()
bool df_regs_ever_live_p ()
void df_set_regs_ever_live ()
void df_compute_regs_ever_live ()
static unsigned int df_reg_chain_mark (df_ref refs, unsigned int regno, bool is_def, bool is_eq_use)
static void df_reg_chain_verify_unmarked ()
static bool df_refs_verify (vec< df_ref, va_stack > new_rec, df_ref *old_rec, bool abort_if_fail)
static bool df_mws_verify (vec< df_mw_hardreg_ptr, va_stack > new_rec, struct df_mw_hardreg **old_rec, bool abort_if_fail)
static bool df_bb_verify ()
static bool df_entry_block_bitmap_verify ()
static bool df_exit_block_bitmap_verify ()
void df_scan_verify ()

Variables

static HARD_REG_SET elim_reg_set
static df_ref df_null_ref_rec [1]
static struct df_mw_hardregdf_null_mw_rec [1]
static bool regs_ever_live [FIRST_PSEUDO_REGISTER]
static struct df_problem problem_SCAN
static bool initialized = false

Macro Definition Documentation

#define df_scan_free_mws_vec (   V)
#define df_scan_free_ref_vec (   V)
Value:
do { \
if (V && *V) \
free (V); \
} while (0)
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
#define HAVE_sibcall_epilogue   0

Referenced by expand_call().


Typedef Documentation

@verbatim Scanning of rtl for dataflow analysis.

Copyright (C) 1999-2013 Free Software Foundation, Inc. Originally contributed by Michael P. Hayes (m.hay.nosp@m.es@e.nosp@m.lec.c.nosp@m.ante.nosp@m.rbury.nosp@m..ac..nosp@m.nz, mhaye.nosp@m.s@re.nosp@m.dhat..nosp@m.com) Major rewrite contributed by Danny Berlin (dberl.nosp@m.in@d.nosp@m.berli.nosp@m.n.or.nosp@m.g) and Kenneth Zadeck (zadec.nosp@m.k@na.nosp@m.tural.nosp@m.brid.nosp@m.ge.co.nosp@m.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/.


Function Documentation

static unsigned int df_add_refs_to_table ( unsigned int  offset,
struct df_ref_info ref_info,
df_ref ref_vec 
)
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 bool df_bb_verify ( )
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 void df_canonize_collection_rec ( struct df_collection_rec )
static
static void df_canonize_collection_rec ( )
static
static void df_check_and_grow_ref_info ( struct df_ref_info ref_info,
unsigned  bitmap_addend 
)
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 unsigned int df_count_refs ( bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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 void df_def_record_1 ( struct df_collection_rec collection_rec,
rtx loc,
basic_block  bb,
struct df_insn_info insn_info,
int  flags 
)
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 void df_defs_record ( struct df_collection_rec collection_rec,
rtx  x,
basic_block  bb,
struct df_insn_info insn_info,
int  flags 
)
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 bool df_entry_block_bitmap_verify ( )
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 void df_entry_block_defs_collect ( struct df_collection_rec collection_rec,
bitmap  entry_block_defs 
)
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 bool df_exit_block_bitmap_verify ( )
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 void df_exit_block_uses_collect ( struct df_collection_rec ,
bitmap   
)
static
static void df_exit_block_uses_collect ( )
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 void df_find_hard_reg_defs ( )
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 void df_find_hard_reg_defs_1 ( )
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 void df_free_collection_rec ( )
static
static void df_get_call_refs ( struct df_collection_rec collection_rec,
basic_block  bb,
struct df_insn_info insn_info,
int  flags 
)
static
static void df_get_conditional_uses ( )
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 void df_get_eh_block_artificial_uses ( bitmap  )
static

Referenced by df_scan_blocks(), and df_scan_verify().

static void df_get_eh_block_artificial_uses ( )
static
Get the artificial use set for an eh block.  

References bitmap_clear(), bitmap_set_bit(), and reload_completed.

static void df_get_entry_block_def_set ( bitmap  )
static
static void df_get_entry_block_def_set ( )
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 void df_get_exit_block_use_set ( bitmap  )
static
static void df_get_exit_block_use_set ( )
static
static void df_get_regular_block_artificial_uses ( bitmap  )
static

Referenced by df_scan_blocks(), and df_scan_verify().

static void df_get_regular_block_artificial_uses ( )
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 void df_grow_ref_info ( struct df_ref_info ,
unsigned  int 
)
static
static void df_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().

struct df_insn_info* df_insn_create_insn_record ( )
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 ( )
static void df_insn_info_delete ( unsigned  int)
static
static void df_insn_info_delete ( )
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 void df_insn_refs_collect ( struct df_collection_rec collection_rec,
basic_block  bb,
struct df_insn_info insn_info 
)
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 bool df_insn_refs_verify ( struct df_collection_rec collection_rec,
basic_block  bb,
rtx  insn,
bool  abort_if_fail 
)
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().

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.

static struct df_mw_hardreg** df_install_mws ( )
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 void df_install_ref ( df_ref  this_ref,
struct df_reg_info reg_info,
struct df_ref_info ref_info,
bool  add_to_table 
)
static
static void df_install_ref_incremental ( df_ref  )
static

Referenced by df_ref_create_structure().

static df_ref* df_install_refs ( basic_block  bb,
vec< df_ref, va_stack old_vec,
struct df_reg_info **  reg_info,
struct df_ref_info ref_info,
bool  is_notes 
)
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 void df_mark_reg ( )
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().

static int df_mw_compare ( const void *  ,
const void *   
)
static
static int df_mw_compare ( )
static
static bool df_mw_equal_p ( )
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 void df_mw_hardreg_chain_delete ( )
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 unsigned int df_mw_hardreg_chain_delete_eq_uses ( )
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 bool df_mws_verify ( vec< df_mw_hardreg_ptr, va_stack new_rec,
struct df_mw_hardreg **  old_rec,
bool  abort_if_fail 
)
static
Verify that NEW_REC and OLD_REC have exactly the same members.  

References df_mw_equal_p().

Referenced by df_insn_refs_verify().

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 void df_record_entry_block_defs ( bitmap  )
static
static void df_record_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 void df_record_exit_block_uses ( bitmap  )
static
static void df_record_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 void df_ref_chain_delete ( )
static
Delete all refs in the ref chain.   

References df_reg_chain_unlink(), and free().

static void df_ref_chain_delete_du_chain ( )
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 void df_ref_change_reg_with_loc_1 ( struct df_reg_info old_df,
struct df_reg_info new_df,
int  new_regno,
rtx  loc 
)
static
static int df_ref_compare ( const void *  ,
const void *   
)
static
static int df_ref_compare ( )
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 void df_ref_compress_rec ( )
static
Remove REF from VEC.   

References df_null_ref_rec, and free().

Referenced by df_ref_remove().

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 bool df_ref_equal_p ( )
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 bool df_refs_verify ( vec< df_ref, va_stack new_rec,
df_ref old_rec,
bool  abort_if_fail 
)
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 unsigned int df_reg_chain_mark ( df_ref  refs,
unsigned int  regno,
bool  is_def,
bool  is_eq_use 
)
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 void df_reg_chain_verify_unmarked ( )
static
Verify that all of the registers in the chain are unmarked.   

Referenced by df_scan_verify().

static void df_reorganize_refs_by_insn ( struct df_ref_info ref_info,
bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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 unsigned int df_reorganize_refs_by_insn_bb ( basic_block  bb,
unsigned int  offset,
struct df_ref_info ref_info,
bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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 void df_reorganize_refs_by_reg ( struct df_ref_info ref_info,
bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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 void df_reorganize_refs_by_reg_by_insn ( struct df_ref_info ref_info,
bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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 void df_reorganize_refs_by_reg_by_reg ( struct df_ref_info ref_info,
bool  include_defs,
bool  include_uses,
bool  include_eq_uses 
)
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().

static void df_scan_free ( )
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 void df_scan_start_block ( )
static
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 void df_sort_and_compress_mws ( )
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 void df_sort_and_compress_refs ( )
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 void df_swap_refs ( )
static
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_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().


Variable Documentation

HARD_REG_SET elim_reg_set
static
The set of hard registers in eliminables[i].from.  

Referenced by df_hard_reg_init(), and df_ref_create_structure().

bool initialized = false
static
struct df_problem problem_SCAN
static
Initial value:
{
DF_SCAN,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sizeof (struct df_scan_bb_info),
TV_DF_SCAN,
false
}
bool regs_ever_live[FIRST_PSEUDO_REGISTER]
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().