GCC Middle and Back End API Reference
df.h File Reference
#include "regset.h"
#include "alloc-pool.h"
#include "timevar.h"
Include dependency graph for df.h:

Go to the source code of this file.

Data Structures

struct  df_problem
 
struct  dataflow
 
struct  df_mw_hardreg
 
struct  df_base_ref
 
struct  df_artificial_ref
 
struct  df_regular_ref
 
union  df_ref_d
 
struct  df_insn_info
 
struct  df_link
 
struct  df_ref_info
 
struct  df_reg_info
 
class  df_d
 
struct  df_scan_bb_info
 
class  df_rd_bb_info
 
class  df_md_bb_info
 
class  df_lr_bb_info
 
class  df_live_bb_info
 
class  df_word_lr_bb_info
 
class  df_mir_bb_info
 
struct  web_entry_base
 

Macros

#define DF_SCAN_BB_INFO(BB)   (df_scan_get_bb_info ((BB)->index))
 
#define DF_RD_BB_INFO(BB)   (df_rd_get_bb_info ((BB)->index))
 
#define DF_LR_BB_INFO(BB)   (df_lr_get_bb_info ((BB)->index))
 
#define DF_LIVE_BB_INFO(BB)   (df_live_get_bb_info ((BB)->index))
 
#define DF_WORD_LR_BB_INFO(BB)   (df_word_lr_get_bb_info ((BB)->index))
 
#define DF_MD_BB_INFO(BB)   (df_md_get_bb_info ((BB)->index))
 
#define DF_MIR_BB_INFO(BB)   (df_mir_get_bb_info ((BB)->index))
 
#define DF_LIVE_IN(BB)   (&DF_LIVE_BB_INFO (BB)->in)
 
#define DF_LIVE_OUT(BB)   (&DF_LIVE_BB_INFO (BB)->out)
 
#define DF_MIR_IN(BB)   (&DF_MIR_BB_INFO (BB)->in)
 
#define DF_MIR_OUT(BB)   (&DF_MIR_BB_INFO (BB)->out)
 
#define DF_LR_IN(BB)   (&DF_LR_BB_INFO (BB)->in)
 
#define DF_LR_OUT(BB)   (&DF_LR_BB_INFO (BB)->out)
 
#define DF_WORD_LR_IN(BB)   (&DF_WORD_LR_BB_INFO (BB)->in)
 
#define DF_WORD_LR_OUT(BB)   (&DF_WORD_LR_BB_INFO (BB)->out)
 
#define DF_REF_REAL_REG(REF)
 
#define DF_REF_REGNO(REF)   ((REF)->base.regno)
 
#define DF_REF_REAL_LOC(REF)
 
#define DF_REF_REG(REF)   ((REF)->base.reg)
 
#define DF_REF_LOC(REF)
 
#define DF_REF_BB(REF)
 
#define DF_REF_BBNO(REF)   (DF_REF_BB (REF)->index)
 
#define DF_REF_INSN_INFO(REF)   ((REF)->base.insn_info)
 
#define DF_REF_INSN(REF)   ((REF)->base.insn_info->insn)
 
#define DF_REF_INSN_UID(REF)   (INSN_UID (DF_REF_INSN(REF)))
 
#define DF_REF_CLASS(REF)   ((REF)->base.cl)
 
#define DF_REF_TYPE(REF)   ((REF)->base.type)
 
#define DF_REF_CHAIN(REF)   ((REF)->base.chain)
 
#define DF_REF_ID(REF)   ((REF)->base.id)
 
#define DF_REF_FLAGS(REF)   ((REF)->base.flags)
 
#define DF_REF_FLAGS_IS_SET(REF, v)   ((DF_REF_FLAGS (REF) & (v)) != 0)
 
#define DF_REF_FLAGS_SET(REF, v)   (DF_REF_FLAGS (REF) |= (v))
 
#define DF_REF_FLAGS_CLEAR(REF, v)   (DF_REF_FLAGS (REF) &= ~(v))
 
#define DF_REF_ORDER(REF)   ((REF)->base.ref_order)
 
#define DF_REF_IS_ARTIFICIAL(REF)   (DF_REF_CLASS (REF) == DF_REF_ARTIFICIAL)
 
#define DF_REF_REG_MARK(REF)   (DF_REF_FLAGS_SET ((REF),DF_REF_REG_MARKER))
 
#define DF_REF_REG_UNMARK(REF)   (DF_REF_FLAGS_CLEAR ((REF),DF_REF_REG_MARKER))
 
#define DF_REF_IS_REG_MARKED(REF)   (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER))
 
#define DF_REF_NEXT_LOC(REF)   ((REF)->base.next_loc)
 
#define DF_REF_NEXT_REG(REF)   ((REF)->base.next_reg)
 
#define DF_REF_PREV_REG(REF)   ((REF)->base.prev_reg)
 
#define DF_REF_EXTRACT_WIDTH(REF)   ((REF)->extract_ref.width)
 
#define DF_REF_EXTRACT_OFFSET(REF)   ((REF)->extract_ref.offset)
 
#define DF_REF_EXTRACT_MODE(REF)   ((REF)->extract_ref.mode)
 
#define DF_REF_REG_DEF_P(REF)   (DF_REF_TYPE (REF) == DF_REF_REG_DEF)
 
#define DF_REF_REG_USE_P(REF)   (!DF_REF_REG_DEF_P (REF))
 
#define DF_REF_REG_MEM_STORE_P(REF)   (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE)
 
#define DF_REF_REG_MEM_LOAD_P(REF)   (DF_REF_TYPE (REF) == DF_REF_REG_MEM_LOAD)
 
#define DF_REF_REG_MEM_P(REF)
 
#define DF_MWS_REG_DEF_P(MREF)   (DF_MWS_TYPE (MREF) == DF_REF_REG_DEF)
 
#define DF_MWS_REG_USE_P(MREF)   (!DF_MWS_REG_DEF_P (MREF))
 
#define DF_MWS_NEXT(MREF)   ((MREF)->next)
 
#define DF_MWS_TYPE(MREF)   ((MREF)->type)
 
#define DF_DEFS_TABLE_SIZE()   (df->def_info.table_size)
 
#define DF_DEFS_GET(ID)   (df->def_info.refs[(ID)])
 
#define DF_DEFS_SET(ID, VAL)   (df->def_info.refs[(ID)]=(VAL))
 
#define DF_DEFS_COUNT(ID)   (df->def_info.count[(ID)])
 
#define DF_DEFS_BEGIN(ID)   (df->def_info.begin[(ID)])
 
#define DF_USES_TABLE_SIZE()   (df->use_info.table_size)
 
#define DF_USES_GET(ID)   (df->use_info.refs[(ID)])
 
#define DF_USES_SET(ID, VAL)   (df->use_info.refs[(ID)]=(VAL))
 
#define DF_USES_COUNT(ID)   (df->use_info.count[(ID)])
 
#define DF_USES_BEGIN(ID)   (df->use_info.begin[(ID)])
 
#define DF_REG_SIZE(DF)   (df->regs_inited)
 
#define DF_REG_DEF_GET(REG)   (df->def_regs[(REG)])
 
#define DF_REG_DEF_CHAIN(REG)   (df->def_regs[(REG)]->reg_chain)
 
#define DF_REG_DEF_COUNT(REG)   (df->def_regs[(REG)]->n_refs)
 
#define DF_REG_USE_GET(REG)   (df->use_regs[(REG)])
 
#define DF_REG_USE_CHAIN(REG)   (df->use_regs[(REG)]->reg_chain)
 
#define DF_REG_USE_COUNT(REG)   (df->use_regs[(REG)]->n_refs)
 
#define DF_REG_EQ_USE_GET(REG)   (df->eq_use_regs[(REG)])
 
#define DF_REG_EQ_USE_CHAIN(REG)   (df->eq_use_regs[(REG)]->reg_chain)
 
#define DF_REG_EQ_USE_COUNT(REG)   (df->eq_use_regs[(REG)]->n_refs)
 
#define DF_REGNO_FIRST_DEF(REGNUM)   (DF_REG_DEF_GET(REGNUM) ? DF_REG_DEF_GET (REGNUM) : 0)
 
#define DF_REGNO_LAST_USE(REGNUM)   (DF_REG_USE_GET(REGNUM) ? DF_REG_USE_GET (REGNUM) : 0)
 
#define DF_INSN_SIZE()   ((df)->insns_size)
 
#define DF_INSN_INFO_GET(INSN)   (df->insns[(INSN_UID (INSN))])
 
#define DF_INSN_INFO_SET(INSN, VAL)   (df->insns[(INSN_UID (INSN))]=(VAL))
 
#define DF_INSN_INFO_LUID(II)   ((II)->luid)
 
#define DF_INSN_INFO_DEFS(II)   ((II)->defs)
 
#define DF_INSN_INFO_USES(II)   ((II)->uses)
 
#define DF_INSN_INFO_EQ_USES(II)   ((II)->eq_uses)
 
#define DF_INSN_INFO_MWS(II)   ((II)->mw_hardregs)
 
#define DF_INSN_LUID(INSN)   (DF_INSN_INFO_LUID (DF_INSN_INFO_GET (INSN)))
 
#define DF_INSN_DEFS(INSN)   (DF_INSN_INFO_DEFS (DF_INSN_INFO_GET (INSN)))
 
#define DF_INSN_USES(INSN)   (DF_INSN_INFO_USES (DF_INSN_INFO_GET (INSN)))
 
#define DF_INSN_EQ_USES(INSN)   (DF_INSN_INFO_EQ_USES (DF_INSN_INFO_GET (INSN)))
 
#define DF_INSN_UID_GET(UID)   (df->insns[(UID)])
 
#define DF_INSN_UID_SET(UID, VAL)   (df->insns[(UID)]=(VAL))
 
#define DF_INSN_UID_SAFE_GET(UID)
 
#define DF_INSN_UID_LUID(INSN)   (DF_INSN_UID_GET (INSN)->luid)
 
#define DF_INSN_UID_DEFS(INSN)   (DF_INSN_UID_GET (INSN)->defs)
 
#define DF_INSN_UID_USES(INSN)   (DF_INSN_UID_GET (INSN)->uses)
 
#define DF_INSN_UID_EQ_USES(INSN)   (DF_INSN_UID_GET (INSN)->eq_uses)
 
#define DF_INSN_UID_MWS(INSN)   (DF_INSN_UID_GET (INSN)->mw_hardregs)
 
#define FOR_EACH_INSN_INFO_DEF(ITER, INSN)    for (ITER = DF_INSN_INFO_DEFS (INSN); ITER; ITER = DF_REF_NEXT_LOC (ITER))
 
#define FOR_EACH_INSN_INFO_USE(ITER, INSN)    for (ITER = DF_INSN_INFO_USES (INSN); ITER; ITER = DF_REF_NEXT_LOC (ITER))
 
#define FOR_EACH_INSN_INFO_EQ_USE(ITER, INSN)    for (ITER = DF_INSN_INFO_EQ_USES (INSN); ITER; ITER = DF_REF_NEXT_LOC (ITER))
 
#define FOR_EACH_INSN_INFO_MW(ITER, INSN)    for (ITER = DF_INSN_INFO_MWS (INSN); ITER; ITER = DF_MWS_NEXT (ITER))
 
#define FOR_EACH_INSN_DEF(ITER, INSN)    FOR_EACH_INSN_INFO_DEF(ITER, DF_INSN_INFO_GET (INSN))
 
#define FOR_EACH_INSN_USE(ITER, INSN)    FOR_EACH_INSN_INFO_USE(ITER, DF_INSN_INFO_GET (INSN))
 
#define FOR_EACH_INSN_EQ_USE(ITER, INSN)    FOR_EACH_INSN_INFO_EQ_USE(ITER, DF_INSN_INFO_GET (INSN))
 
#define FOR_EACH_ARTIFICIAL_USE(ITER, BB_INDEX)
 
#define FOR_EACH_ARTIFICIAL_DEF(ITER, BB_INDEX)
 
#define df_scan   (df->problems_by_index[DF_SCAN])
 
#define df_rd   (df->problems_by_index[DF_RD])
 
#define df_lr   (df->problems_by_index[DF_LR])
 
#define df_live   (df->problems_by_index[DF_LIVE])
 
#define df_chain   (df->problems_by_index[DF_CHAIN])
 
#define df_word_lr   (df->problems_by_index[DF_WORD_LR])
 
#define df_note   (df->problems_by_index[DF_NOTE])
 
#define df_md   (df->problems_by_index[DF_MD])
 
#define df_mir   (df->problems_by_index[DF_MIR])
 

Typedefs

typedef void(* df_alloc_function) (bitmap)
 
typedef void(* df_reset_function) (bitmap)
 
typedef void(* df_free_bb_function) (basic_block, void *)
 
typedef void(* df_local_compute_function) (bitmap)
 
typedef void(* df_init_function) (bitmap)
 
typedef void(* df_dataflow_function) (struct dataflow *, bitmap, int *, int)
 
typedef void(* df_confluence_function_0) (basic_block)
 
typedef bool(* df_confluence_function_n) (edge)
 
typedef bool(* df_transfer_function) (int)
 
typedef void(* df_finalizer_function) (bitmap)
 
typedef void(* df_free_function) (void)
 
typedef void(* df_remove_problem_function) (void)
 
typedef void(* df_dump_problem_function) (FILE *)
 
typedef void(* df_dump_bb_problem_function) (basic_block, FILE *)
 
typedef void(* df_dump_insn_problem_function) (const rtx_insn *, FILE *)
 
typedef void(* df_verify_solution_start) (void)
 
typedef void(* df_verify_solution_end) (void)
 
typedef union df_ref_ddf_ref
 

Enumerations

enum  df_problem_id {
  DF_SCAN , DF_LR , DF_LIVE , DF_RD ,
  DF_CHAIN , DF_WORD_LR , DF_NOTE , DF_MD ,
  DF_MIR , DF_LAST_PROBLEM_PLUS1
}
 
enum  df_flow_dir { DF_NONE , DF_FORWARD , DF_BACKWARD }
 
enum  df_ref_class { DF_REF_BASE , DF_REF_ARTIFICIAL , DF_REF_REGULAR }
 
enum  df_ref_type { DF_REF_REG_DEF , DF_REF_REG_USE , DF_REF_REG_MEM_LOAD , DF_REF_REG_MEM_STORE }
 
enum  df_ref_flags {
  DF_REF_CONDITIONAL = 1 << 0 , DF_REF_AT_TOP = 1 << 1 , DF_REF_IN_NOTE = 1 << 2 , DF_HARD_REG_LIVE = 1 << 3 ,
  DF_REF_PARTIAL = 1 << 4 , DF_REF_READ_WRITE = 1 << 5 , DF_REF_MAY_CLOBBER = 1 << 6 , DF_REF_MUST_CLOBBER = 1 << 7 ,
  DF_REF_SIGN_EXTRACT = 1 << 8 , DF_REF_ZERO_EXTRACT = 1 << 9 , DF_REF_STRICT_LOW_PART = 1 << 10 , DF_REF_SUBREG = 1 << 11 ,
  DF_REF_MW_HARDREG = 1 << 12 , DF_REF_CALL_STACK_USAGE = 1 << 13 , DF_REF_REG_MARKER = 1 << 14 , DF_REF_PRE_POST_MODIFY = 1 << 15
}
 
enum  df_ref_order {
  DF_REF_ORDER_NO_TABLE , DF_REF_ORDER_UNORDERED , DF_REF_ORDER_UNORDERED_WITH_NOTES , DF_REF_ORDER_BY_REG ,
  DF_REF_ORDER_BY_REG_WITH_NOTES , DF_REF_ORDER_BY_INSN , DF_REF_ORDER_BY_INSN_WITH_NOTES
}
 
enum  df_chain_flags { DF_DU_CHAIN = 1 , DF_UD_CHAIN = 2 }
 
enum  df_scan_flags { DF_SCAN_EMPTY_ENTRY_EXIT = 1 }
 
enum  df_changeable_flags {
  DF_LR_RUN_DCE = 1 << 0 , DF_NO_HARD_REGS = 1 << 1 , DF_EQ_NOTES = 1 << 2 , DF_NO_REGS_EVER_LIVE = 1 << 3 ,
  DF_NO_INSN_RESCAN = 1 << 4 , DF_DEFER_INSN_RESCAN = 1 << 5 , DF_RD_PRUNE_DEAD_DEFS = 1 << 6 , DF_VERIFY_SCHEDULED = 1 << 7
}
 

Functions

void df_add_problem (const struct df_problem *)
 
int df_set_flags (int)
 
int df_clear_flags (int)
 
void df_set_blocks (bitmap)
 
void df_remove_problem (struct dataflow *)
 
void df_finish_pass (bool)
 
void df_analyze_problem (struct dataflow *, bitmap, int *, int)
 
void df_analyze ()
 
void df_analyze_loop (class loop *)
 
int df_get_n_blocks (enum df_flow_dir)
 
int * df_get_postorder (enum df_flow_dir)
 
void df_simple_dataflow (enum df_flow_dir, df_init_function, df_confluence_function_0, df_confluence_function_n, df_transfer_function, bitmap, int *, int)
 
void df_mark_solutions_dirty (void)
 
bool df_get_bb_dirty (basic_block)
 
void df_set_bb_dirty (basic_block)
 
void df_compact_blocks (void)
 
void df_bb_replace (int, basic_block)
 
void df_bb_delete (int)
 
void df_verify (void)
 
df_ref df_bb_regno_first_def_find (basic_block, unsigned int)
 
df_ref df_bb_regno_last_def_find (basic_block, unsigned int)
 
df_ref df_find_def (rtx_insn *, rtx)
 
bool df_reg_defined (rtx_insn *, rtx)
 
df_ref df_find_use (rtx_insn *, rtx)
 
bool df_reg_used (rtx_insn *, rtx)
 
rtx df_find_single_def_src (rtx)
 
void df_worklist_dataflow (struct dataflow *, bitmap, int *, int)
 
void df_print_regset (FILE *file, const_bitmap r)
 
void df_print_word_regset (FILE *file, const_bitmap r)
 
void df_dump (FILE *)
 
void df_dump_region (FILE *)
 
void df_dump_start (FILE *)
 
void df_dump_top (basic_block, FILE *)
 
void df_dump_bottom (basic_block, FILE *)
 
void df_dump_insn_top (const rtx_insn *, FILE *)
 
void df_dump_insn_bottom (const rtx_insn *, FILE *)
 
void df_refs_chain_dump (df_ref, bool, FILE *)
 
void df_regs_chain_dump (df_ref, FILE *)
 
void df_insn_debug (rtx_insn *, bool, FILE *)
 
void df_insn_debug_regno (rtx_insn *, FILE *)
 
void df_regno_debug (unsigned int, FILE *)
 
void df_ref_debug (df_ref, FILE *)
 
void debug_df_insn (rtx_insn *)
 
void debug_df_regno (unsigned int)
 
void debug_df_reg (rtx)
 
void debug_df_defno (unsigned int)
 
void debug_df_useno (unsigned int)
 
void debug_df_ref (df_ref)
 
void debug_df_chain (struct df_link *)
 
struct df_linkdf_chain_create (df_ref, df_ref)
 
void df_chain_unlink (df_ref)
 
void df_chain_copy (df_ref, struct df_link *)
 
void df_grow_bb_info (struct dataflow *)
 
void df_chain_dump (struct df_link *, FILE *)
 
void df_print_bb_index (basic_block bb, FILE *file)
 
void df_rd_add_problem (void)
 
void df_rd_simulate_artificial_defs_at_top (basic_block, bitmap)
 
void df_rd_simulate_one_insn (basic_block, rtx_insn *, bitmap)
 
void df_lr_add_problem (void)
 
void df_lr_verify_transfer_functions (void)
 
void df_live_verify_transfer_functions (void)
 
void df_live_add_problem (void)
 
void df_live_set_all_dirty (void)
 
void df_chain_add_problem (unsigned int)
 
void df_word_lr_add_problem (void)
 
bool df_word_lr_mark_ref (df_ref, bool, bitmap)
 
bool df_word_lr_simulate_defs (rtx_insn *, bitmap)
 
void df_word_lr_simulate_uses (rtx_insn *, bitmap)
 
void df_word_lr_simulate_artificial_refs_at_top (basic_block, bitmap)
 
void df_word_lr_simulate_artificial_refs_at_end (basic_block, bitmap)
 
void df_note_add_problem (void)
 
void df_md_add_problem (void)
 
void df_md_simulate_artificial_defs_at_top (basic_block, bitmap)
 
void df_md_simulate_one_insn (basic_block, rtx_insn *, bitmap)
 
void df_mir_add_problem (void)
 
void df_mir_simulate_one_insn (basic_block, rtx_insn *, bitmap, bitmap)
 
void df_simulate_find_noclobber_defs (rtx_insn *, bitmap)
 
void df_simulate_find_defs (rtx_insn *, bitmap)
 
void df_simulate_defs (rtx_insn *, bitmap)
 
void df_simulate_uses (rtx_insn *, bitmap)
 
void df_simulate_initialize_backwards (basic_block, bitmap)
 
void df_simulate_one_insn_backwards (basic_block, rtx_insn *, bitmap)
 
void df_simulate_finalize_backwards (basic_block, bitmap)
 
void df_simulate_initialize_forwards (basic_block, bitmap)
 
void df_simulate_one_insn_forwards (basic_block, rtx_insn *, bitmap)
 
void simulate_backwards_to_point (basic_block, regset, rtx)
 
bool can_move_insns_across (rtx_insn *, rtx_insn *, rtx_insn *, rtx_insn *, basic_block, regset, regset, rtx_insn **)
 
void df_scan_alloc (bitmap)
 
void df_scan_add_problem (void)
 
void df_grow_reg_info (void)
 
void df_grow_insn_info (void)
 
void df_scan_blocks (void)
 
void df_uses_create (rtx *, rtx_insn *, int)
 
struct df_insn_infodf_insn_create_insn_record (rtx_insn *)
 
void df_insn_delete (rtx_insn *)
 
void df_bb_refs_record (int, bool)
 
bool df_insn_rescan (rtx_insn *)
 
bool df_insn_rescan_debug_internal (rtx_insn *)
 
void df_insn_rescan_all (void)
 
void df_process_deferred_rescans (void)
 
void df_recompute_luids (basic_block)
 
void df_insn_change_bb (rtx_insn *, basic_block)
 
void df_maybe_reorganize_use_refs (enum df_ref_order)
 
void df_maybe_reorganize_def_refs (enum df_ref_order)
 
void df_ref_change_reg_with_loc (rtx, unsigned int)
 
void df_notes_rescan (rtx_insn *)
 
void df_hard_reg_init (void)
 
void df_update_entry_block_defs (void)
 
void df_update_exit_block_uses (void)
 
void df_update_entry_exit_and_calls (void)
 
bool df_hard_reg_used_p (unsigned int)
 
unsigned int df_hard_reg_used_count (unsigned int)
 
bool df_regs_ever_live_p (unsigned int)
 
bool df_epilogue_uses_p (unsigned int)
 
void df_set_regs_ever_live (unsigned int, bool)
 
void df_compute_regs_ever_live (bool)
 
void df_scan_verify (void)
 
struct df_scan_bb_infodf_scan_get_bb_info (unsigned int index)
 
class df_rd_bb_infodf_rd_get_bb_info (unsigned int index)
 
class df_lr_bb_infodf_lr_get_bb_info (unsigned int index)
 
class df_md_bb_infodf_md_get_bb_info (unsigned int index)
 
class df_live_bb_infodf_live_get_bb_info (unsigned int index)
 
class df_word_lr_bb_infodf_word_lr_get_bb_info (unsigned int index)
 
class df_mir_bb_infodf_mir_get_bb_info (unsigned int index)
 
bitmap df_get_live_out (basic_block bb)
 
bitmap df_get_live_in (basic_block bb)
 
df_ref df_get_artificial_defs (unsigned int bb_index)
 
df_ref df_get_artificial_uses (unsigned int bb_index)
 
df_ref df_single_def (const df_insn_info *info)
 
df_ref df_single_use (const df_insn_info *info)
 

Variables

bitmap_obstack df_bitmap_obstack
 
class df_ddf
 

Macro Definition Documentation

◆ df_chain

◆ DF_DEFS_BEGIN

◆ DF_DEFS_COUNT

◆ DF_DEFS_GET

#define DF_DEFS_GET ( ID)    (df->def_info.refs[(ID)])

◆ DF_DEFS_SET

#define DF_DEFS_SET ( ID,
VAL )   (df->def_info.refs[(ID)]=(VAL))

◆ DF_DEFS_TABLE_SIZE

#define DF_DEFS_TABLE_SIZE ( )    (df->def_info.table_size)
Macros to get the refs out of def_info or use_info refs table.  If
the focus of the dataflow has been set to some subset of blocks
with df_set_blocks, these macros will only find the uses and defs
in that subset of blocks.

These macros should be used with care.  The def macros are only
usable after a call to df_maybe_reorganize_def_refs and the use
macros are only usable after a call to
df_maybe_reorganize_use_refs.  HOWEVER, BUILDING AND USING THESE
ARRAYS ARE A CACHE LOCALITY KILLER.   

Referenced by check_invariant_table_size(), check_iv_ref_table_size(), clear_iv_info(), df_dump_start(), and free_inv_motion_data().

◆ DF_INSN_DEFS

#define DF_INSN_DEFS ( INSN)    (DF_INSN_INFO_DEFS (DF_INSN_INFO_GET (INSN)))

◆ DF_INSN_EQ_USES

#define DF_INSN_EQ_USES ( INSN)    (DF_INSN_INFO_EQ_USES (DF_INSN_INFO_GET (INSN)))

◆ DF_INSN_INFO_DEFS

#define DF_INSN_INFO_DEFS ( II)    ((II)->defs)

◆ DF_INSN_INFO_EQ_USES

#define DF_INSN_INFO_EQ_USES ( II)    ((II)->eq_uses)

Referenced by df_insn_debug_regno().

◆ DF_INSN_INFO_GET

◆ DF_INSN_INFO_LUID

◆ DF_INSN_INFO_MWS

#define DF_INSN_INFO_MWS ( II)    ((II)->mw_hardregs)

◆ DF_INSN_INFO_SET

#define DF_INSN_INFO_SET ( INSN,
VAL )   (df->insns[(INSN_UID (INSN))]=(VAL))

◆ DF_INSN_INFO_USES

#define DF_INSN_INFO_USES ( II)    ((II)->uses)

◆ DF_INSN_LUID

◆ DF_INSN_SIZE

#define DF_INSN_SIZE ( )    ((df)->insns_size)
Macros to access the elements within the insn_info structure table.   

Referenced by df_grow_insn_info(), df_scan_free_internal(), and regstat_bb_compute_calls_crossed().

◆ DF_INSN_UID_DEFS

◆ DF_INSN_UID_EQ_USES

#define DF_INSN_UID_EQ_USES ( INSN)    (DF_INSN_UID_GET (INSN)->eq_uses)

◆ DF_INSN_UID_GET

#define DF_INSN_UID_GET ( UID)    (df->insns[(UID)])

◆ DF_INSN_UID_LUID

#define DF_INSN_UID_LUID ( INSN)    (DF_INSN_UID_GET (INSN)->luid)

Referenced by df_insn_uid_debug().

◆ DF_INSN_UID_MWS

#define DF_INSN_UID_MWS ( INSN)    (DF_INSN_UID_GET (INSN)->mw_hardregs)

◆ DF_INSN_UID_SAFE_GET

#define DF_INSN_UID_SAFE_GET ( UID)
Value:
(((unsigned)(UID) < DF_INSN_SIZE ()) \
: NULL)
#define DF_INSN_SIZE()
Definition df.h:747
#define DF_INSN_UID_GET(UID)
Definition df.h:761
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
#define NULL
Definition system.h:50

Referenced by dead_debug_local_finish(), dead_debug_reset_uses(), df_insn_change_bb(), df_insn_delete(), df_insn_info_delete(), df_insn_rescan(), df_insn_rescan_all(), df_insn_rescan_debug_internal(), df_notes_rescan(), and df_process_deferred_rescans().

◆ DF_INSN_UID_SET

#define DF_INSN_UID_SET ( UID,
VAL )   (df->insns[(UID)]=(VAL))

Referenced by df_insn_info_delete().

◆ DF_INSN_UID_USES

◆ DF_INSN_USES

#define DF_INSN_USES ( INSN)    (DF_INSN_INFO_USES (DF_INSN_INFO_GET (INSN)))

◆ df_live

◆ DF_LIVE_BB_INFO

#define DF_LIVE_BB_INFO ( BB)    (df_live_get_bb_info ((BB)->index))

◆ DF_LIVE_IN

#define DF_LIVE_IN ( BB)    (&DF_LIVE_BB_INFO (BB)->in)
Most transformations that wish to use live register analysis will
use these macros.  This info is the and of the lr and live sets.   

Referenced by combine_and_move_insns(), df_get_live_in(), df_live_verify_solution_end(), df_live_verify_solution_start(), initialize_uninitialized_regs(), and mark_elimination().

◆ DF_LIVE_OUT

◆ df_lr

◆ DF_LR_BB_INFO

#define DF_LR_BB_INFO ( BB)    (df_lr_get_bb_info ((BB)->index))

◆ DF_LR_IN

◆ DF_LR_OUT

◆ df_md

#define df_md   (df->problems_by_index[DF_MD])

◆ DF_MD_BB_INFO

#define DF_MD_BB_INFO ( BB)    (df_md_get_bb_info ((BB)->index))

◆ df_mir

◆ DF_MIR_BB_INFO

#define DF_MIR_BB_INFO ( BB)    (df_mir_get_bb_info ((BB)->index))

◆ DF_MIR_IN

◆ DF_MIR_OUT

#define DF_MIR_OUT ( BB)    (&DF_MIR_BB_INFO (BB)->out)

◆ DF_MWS_NEXT

◆ DF_MWS_REG_DEF_P

#define DF_MWS_REG_DEF_P ( MREF)    (DF_MWS_TYPE (MREF) == DF_REF_REG_DEF)

Referenced by df_mws_dump(), and df_note_bb_compute().

◆ DF_MWS_REG_USE_P

#define DF_MWS_REG_USE_P ( MREF)    (!DF_MWS_REG_DEF_P (MREF))

Referenced by df_note_bb_compute().

◆ DF_MWS_TYPE

#define DF_MWS_TYPE ( MREF)    ((MREF)->type)

◆ df_note

#define df_note   (df->problems_by_index[DF_NOTE])

◆ df_rd

◆ DF_RD_BB_INFO

#define DF_RD_BB_INFO ( BB)    (df_rd_get_bb_info ((BB)->index))

Referenced by latch_dominating_def().

◆ DF_REF_BB

#define DF_REF_BB ( REF)
Value:
? (REF)->artificial_ref.bb \
#define DF_REF_IS_ARTIFICIAL(REF)
Definition df.h:677
#define DF_REF_INSN(REF)
Definition df.h:663
basic_block BLOCK_FOR_INSN(const_rtx insn)
Definition rtl.h:1486

Referenced by can_move_invariant_reg(), check_dependency(), compute_local_properties(), compute_transp(), df_get_conditional_uses(), df_ref_change_reg_with_loc_1(), df_ref_equal_p(), invariant_for_use(), iv_get_reaching_def(), latch_dominating_def(), and split_live_ranges_for_shrink_wrap().

◆ DF_REF_BBNO

#define DF_REF_BBNO ( REF)    (DF_REF_BB (REF)->index)

◆ DF_REF_CHAIN

◆ DF_REF_CLASS

#define DF_REF_CLASS ( REF)    ((REF)->base.cl)

◆ DF_REF_EXTRACT_MODE

#define DF_REF_EXTRACT_MODE ( REF)    ((REF)->extract_ref.mode)

◆ DF_REF_EXTRACT_OFFSET

#define DF_REF_EXTRACT_OFFSET ( REF)    ((REF)->extract_ref.offset)

◆ DF_REF_EXTRACT_WIDTH

#define DF_REF_EXTRACT_WIDTH ( REF)    ((REF)->extract_ref.width)
The following two macros may only be applied if one of
DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT is true.  

◆ DF_REF_FLAGS

◆ DF_REF_FLAGS_CLEAR

#define DF_REF_FLAGS_CLEAR ( REF,
v )   (DF_REF_FLAGS (REF) &= ~(v))

Referenced by df_ref_create_structure().

◆ DF_REF_FLAGS_IS_SET

◆ DF_REF_FLAGS_SET

#define DF_REF_FLAGS_SET ( REF,
v )   (DF_REF_FLAGS (REF) |= (v))

Referenced by df_ref_create_structure().

◆ DF_REF_ID

◆ DF_REF_INSN

◆ DF_REF_INSN_INFO

◆ DF_REF_INSN_UID

#define DF_REF_INSN_UID ( REF)    (INSN_UID (DF_REF_INSN(REF)))

◆ DF_REF_IS_ARTIFICIAL

#define DF_REF_IS_ARTIFICIAL ( REF)    (DF_REF_CLASS (REF) == DF_REF_ARTIFICIAL)
If DF_REF_IS_ARTIFICIAL () is true, this is not a real
definition/use, but an artificial one created to model always live
registers, eh uses, etc.   

Referenced by df_chain_dump(), df_find_single_def_src(), df_ref_change_reg_with_loc_1(), df_ref_debug(), equivalent_reg_at_start(), indirect_jump_optimize(), mark_artificial_uses(), mark_reg_dependencies(), reset_unmarked_insns_debug_uses(), and sp_based_mem_offset().

◆ DF_REF_IS_REG_MARKED

#define DF_REF_IS_REG_MARKED ( REF)    (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER))

◆ DF_REF_LOC

◆ DF_REF_NEXT_LOC

◆ DF_REF_NEXT_REG

◆ DF_REF_ORDER

#define DF_REF_ORDER ( REF)    ((REF)->base.ref_order)

◆ DF_REF_PREV_REG

#define DF_REF_PREV_REG ( REF)    ((REF)->base.prev_reg)

◆ DF_REF_REAL_LOC

#define DF_REF_REAL_LOC ( REF)
Value:
(GET_CODE (*((REF)->regular_ref.loc)) == SUBREG \
? &SUBREG_REG (*((REF)->regular_ref.loc)) : ((REF)->regular_ref.loc))
#define SUBREG_REG(RTX)
Definition rtl.h:2053
#define GET_CODE(RTX)
Definition rtl.h:725

Referenced by dead_debug_global_replace_temp(), dead_debug_insert_temp(), dead_debug_promote_uses(), df_create_unused_note(), df_note_bb_compute(), find_moveable_pseudos(), inv_can_prop_to_addr_use(), record_use(), replace_ref(), split_live_ranges_for_shrink_wrap(), and union_match_dups().

◆ DF_REF_REAL_REG

#define DF_REF_REAL_REG ( REF)
Value:
(GET_CODE ((REF)->base.reg) == SUBREG \
? SUBREG_REG ((REF)->base.reg) : ((REF)->base.reg))
Macros to access the elements within the ref structure.   

Referenced by calculate_bb_reg_pressure(), compute_regs_asm_clobbered(), entry_register(), initialize_uninitialized_regs(), replace_ref(), union_defs(), update_bb_reg_pressure(), and word_dce_process_block().

◆ DF_REF_REG

◆ DF_REF_REG_DEF_P

◆ DF_REF_REG_MARK

#define DF_REF_REG_MARK ( REF)    (DF_REF_FLAGS_SET ((REF),DF_REF_REG_MARKER))

Referenced by df_reg_chain_mark().

◆ DF_REF_REG_MEM_LOAD_P

#define DF_REF_REG_MEM_LOAD_P ( REF)    (DF_REF_TYPE (REF) == DF_REF_REG_MEM_LOAD)

◆ DF_REF_REG_MEM_P

#define DF_REF_REG_MEM_P ( REF)
Value:
#define DF_REF_REG_MEM_STORE_P(REF)
Definition df.h:693
#define DF_REF_REG_MEM_LOAD_P(REF)
Definition df.h:694

◆ DF_REF_REG_MEM_STORE_P

#define DF_REF_REG_MEM_STORE_P ( REF)    (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE)

◆ DF_REF_REG_UNMARK

#define DF_REF_REG_UNMARK ( REF)    (DF_REF_FLAGS_CLEAR ((REF),DF_REF_REG_MARKER))

Referenced by df_refs_verify().

◆ DF_REF_REG_USE_P

#define DF_REF_REG_USE_P ( REF)    (!DF_REF_REG_DEF_P (REF))

◆ DF_REF_REGNO

#define DF_REF_REGNO ( REF)    ((REF)->base.regno)

Referenced by bbs_ok_for_cmove_arith(), find_comparison_dom_walker::before_dom_children(), build_insn_chain(), build_store_vectors(), can_combine_def_p(), can_merge_compare_into_arith(), check_dependency(), combine_and_move_insns(), compute_regs_asm_clobbered(), compute_store_table(), create_log_links(), dce_process_block(), dead_debug_insert_temp(), dead_or_predicable(), deletable_insn_p(), df_add_refs_to_table(), df_bb_regno_first_def_find(), df_bb_regno_last_def_find(), df_chain_bb_dump(), df_chain_create_bb_process_use(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), df_create_unused_note(), df_find_def(), df_find_use(), df_get_conditional_uses(), df_install_ref(), df_install_ref_incremental(), df_install_refs(), df_live_bb_local_compute(), df_lr_bb_local_compute(), df_md_bb_local_compute_process_def(), df_md_simulate_artificial_defs_at_top(), df_md_simulate_one_insn(), df_mir_simulate_one_insn(), df_note_bb_compute(), df_rd_bb_local_compute_process_def(), df_rd_simulate_artificial_defs_at_top(), df_rd_simulate_one_insn(), df_ref_change_reg_with_loc_1(), df_ref_compare(), df_ref_create_structure(), df_ref_debug(), df_ref_dump(), df_ref_equal_p(), df_reg_chain_mark(), df_reg_chain_unlink(), df_remove_dead_eq_notes(), df_reorganize_refs_by_reg_by_insn(), df_simulate_defs(), df_simulate_finalize_backwards(), df_simulate_find_defs(), df_simulate_find_noclobber_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_initialize_forwards(), df_simulate_uses(), df_word_lr_bb_local_compute(), equivalent_reg_at_start(), find_flags_uses_in_insn(), find_inc(), find_moveable_pseudos(), forward_propagate_subreg(), init_rename_info(), initialize_uninitialized_regs(), make_set_regs_unavailable(), mark_oprs_set(), mark_target_live_regs(), merge_in_block(), move_insn_for_shrink_wrap(), peep2_find_free_register(), pre_check_invariant_p(), regstat_bb_compute_calls_crossed(), regstat_bb_compute_ri(), remove_reg_equal_equiv_notes_for_defs(), try_merge_compare(), union_match_dups(), and word_dce_process_block().

◆ DF_REF_TYPE

#define DF_REF_TYPE ( REF)    ((REF)->base.type)

◆ DF_REG_DEF_CHAIN

◆ DF_REG_DEF_COUNT

◆ DF_REG_DEF_GET

#define DF_REG_DEF_GET ( REG)    (df->def_regs[(REG)])

◆ DF_REG_EQ_USE_CHAIN

#define DF_REG_EQ_USE_CHAIN ( REG)    (df->eq_use_regs[(REG)]->reg_chain)

◆ DF_REG_EQ_USE_COUNT

#define DF_REG_EQ_USE_COUNT ( REG)    (df->eq_use_regs[(REG)]->n_refs)

◆ DF_REG_EQ_USE_GET

#define DF_REG_EQ_USE_GET ( REG)    (df->eq_use_regs[(REG)])

◆ DF_REG_SIZE

#define DF_REG_SIZE ( DF)    (df->regs_inited)
Macros to access the register information from scan dataflow record.   

Referenced by df_rd_dump_defs_set(), df_rd_start_dump(), df_scan_free_internal(), df_scan_verify(), find_invariants_to_move(), and ira().

◆ DF_REG_USE_CHAIN

◆ DF_REG_USE_COUNT

#define DF_REG_USE_COUNT ( REG)    (df->use_regs[(REG)]->n_refs)

◆ DF_REG_USE_GET

#define DF_REG_USE_GET ( REG)    (df->use_regs[(REG)])

◆ DF_REGNO_FIRST_DEF

#define DF_REGNO_FIRST_DEF ( REGNUM)    (DF_REG_DEF_GET(REGNUM) ? DF_REG_DEF_GET (REGNUM) : 0)
Macros to access the elements within the reg_info structure table.   

Referenced by find_invariants_to_move().

◆ DF_REGNO_LAST_USE

#define DF_REGNO_LAST_USE ( REGNUM)    (DF_REG_USE_GET(REGNUM) ? DF_REG_USE_GET (REGNUM) : 0)

Referenced by find_invariants_to_move().

◆ df_scan

◆ DF_SCAN_BB_INFO

#define DF_SCAN_BB_INFO ( BB)    (df_scan_get_bb_info ((BB)->index))

◆ DF_USES_BEGIN

#define DF_USES_BEGIN ( ID)    (df->use_info.begin[(ID)])

◆ DF_USES_COUNT

#define DF_USES_COUNT ( ID)    (df->use_info.count[(ID)])

◆ DF_USES_GET

#define DF_USES_GET ( ID)    (df->use_info.refs[(ID)])

Referenced by debug_df_useno().

◆ DF_USES_SET

#define DF_USES_SET ( ID,
VAL )   (df->use_info.refs[(ID)]=(VAL))

◆ DF_USES_TABLE_SIZE

#define DF_USES_TABLE_SIZE ( )    (df->use_info.table_size)

Referenced by df_dump_start().

◆ df_word_lr

◆ DF_WORD_LR_BB_INFO

#define DF_WORD_LR_BB_INFO ( BB)    (df_word_lr_get_bb_info ((BB)->index))

◆ DF_WORD_LR_IN

#define DF_WORD_LR_IN ( BB)    (&DF_WORD_LR_BB_INFO (BB)->in)
These macros are used by passes that are not tolerant of
uninitialized variables.  This intolerance should eventually
be fixed.   

Referenced by word_dce_process_block().

◆ DF_WORD_LR_OUT

#define DF_WORD_LR_OUT ( BB)    (&DF_WORD_LR_BB_INFO (BB)->out)

Referenced by word_dce_process_block().

◆ FOR_EACH_ARTIFICIAL_DEF

◆ FOR_EACH_ARTIFICIAL_USE

◆ FOR_EACH_INSN_DEF

◆ FOR_EACH_INSN_EQ_USE

#define FOR_EACH_INSN_EQ_USE ( ITER,
INSN )    FOR_EACH_INSN_INFO_EQ_USE(ITER, DF_INSN_INFO_GET (INSN))

◆ FOR_EACH_INSN_INFO_DEF

◆ FOR_EACH_INSN_INFO_EQ_USE

◆ FOR_EACH_INSN_INFO_MW

#define FOR_EACH_INSN_INFO_MW ( ITER,
INSN )    for (ITER = DF_INSN_INFO_MWS (INSN); ITER; ITER = DF_MWS_NEXT (ITER))

Referenced by df_note_bb_compute().

◆ FOR_EACH_INSN_INFO_USE

◆ FOR_EACH_INSN_USE

Typedef Documentation

◆ df_alloc_function

typedef void(* df_alloc_function) (bitmap)
Function prototypes added to df_problem instance.   
Allocate the problem specific data.   

◆ df_confluence_function_0

typedef void(* df_confluence_function_0) (basic_block)
Confluence operator for blocks with 0 out (or in) edges.   

◆ df_confluence_function_n

typedef bool(* df_confluence_function_n) (edge)
Confluence operator for blocks with 1 or more out (or in) edges.
Return true if BB input data has changed.   

◆ df_dataflow_function

typedef void(* df_dataflow_function) (struct dataflow *, bitmap, int *, int)
Iterative dataflow function.   

◆ df_dump_bb_problem_function

typedef void(* df_dump_bb_problem_function) (basic_block, FILE *)
Function to dump top or bottom of basic block results to FILE.   

◆ df_dump_insn_problem_function

typedef void(* df_dump_insn_problem_function) (const rtx_insn *, FILE *)
Function to dump before or after an insn to FILE.   

◆ df_dump_problem_function

typedef void(* df_dump_problem_function) (FILE *)
Function to dump basic block independent results to FILE.   

◆ df_finalizer_function

typedef void(* df_finalizer_function) (bitmap)
Function to massage the information after the problem solving.   

◆ df_free_bb_function

typedef void(* df_free_bb_function) (basic_block, void *)
Free the basic block info.  Called from the block reordering code
to get rid of the blocks that have been squished down.    

◆ df_free_function

typedef void(* df_free_function) (void)
Function to free all of the problem specific datastructures.   

◆ df_init_function

typedef void(* df_init_function) (bitmap)
Init the solution specific data.   

◆ df_local_compute_function

typedef void(* df_local_compute_function) (bitmap)
Local compute function.   

◆ df_ref

◆ df_remove_problem_function

typedef void(* df_remove_problem_function) (void)
Function to remove this problem from the stack of dataflow problems
without effecting the other problems in the stack except for those
that depend on this problem.   

◆ df_reset_function

typedef void(* df_reset_function) (bitmap)
This function is called if the problem has global data that needs
to be cleared when ever the set of blocks changes.  The bitmap
contains the set of blocks that may require special attention.
This call is only made if some of the blocks are going to change.
If everything is to be deleted, the wholesale deletion mechanisms
apply.  

◆ df_transfer_function

typedef bool(* df_transfer_function) (int)
Transfer function for blocks. 
Return true if BB output data has changed.   

◆ df_verify_solution_end

typedef void(* df_verify_solution_end) (void)
Function to dump top or bottom of basic block results to FILE.   

◆ df_verify_solution_start

typedef void(* df_verify_solution_start) (void)
Function to dump top or bottom of basic block results to FILE.   

Enumeration Type Documentation

◆ df_chain_flags

Enumerator
DF_DU_CHAIN 
DF_UD_CHAIN 

◆ df_changeable_flags

Enumerator
DF_LR_RUN_DCE 
DF_NO_HARD_REGS 
DF_EQ_NOTES 
DF_NO_REGS_EVER_LIVE 
DF_NO_INSN_RESCAN 
DF_DEFER_INSN_RESCAN 
DF_RD_PRUNE_DEAD_DEFS 
DF_VERIFY_SCHEDULED 

◆ df_flow_dir

Dataflow direction.   
Enumerator
DF_NONE 
DF_FORWARD 
DF_BACKWARD 

◆ df_problem_id

Data flow problems.  All problems must have a unique id here.   
Scanning is not really a dataflow problem, but it is useful to have
the basic block functions in the vector so that things get done in
a uniform manner.  The last four problems can be added or deleted
at any time are always defined (though LIVE is always there at -O2
or higher); the others are always there.   
Enumerator
DF_SCAN 
DF_LR 
DF_LIVE 
DF_RD 
DF_CHAIN 
DF_WORD_LR 
DF_NOTE 
DF_MD 
DF_MIR 
DF_LAST_PROBLEM_PLUS1 

◆ df_ref_class

Descriminator for the various df_ref types.   
Enumerator
DF_REF_BASE 
DF_REF_ARTIFICIAL 
DF_REF_REGULAR 

◆ df_ref_flags

Enumerator
DF_REF_CONDITIONAL 
DF_REF_AT_TOP 
DF_REF_IN_NOTE 
DF_HARD_REG_LIVE 
DF_REF_PARTIAL 
DF_REF_READ_WRITE 
DF_REF_MAY_CLOBBER 
DF_REF_MUST_CLOBBER 
DF_REF_SIGN_EXTRACT 
DF_REF_ZERO_EXTRACT 
DF_REF_STRICT_LOW_PART 
DF_REF_SUBREG 
DF_REF_MW_HARDREG 
DF_REF_CALL_STACK_USAGE 
DF_REF_REG_MARKER 
DF_REF_PRE_POST_MODIFY 

◆ df_ref_order

The possible ordering of refs within the df_ref_info.   
Enumerator
DF_REF_ORDER_NO_TABLE 
DF_REF_ORDER_UNORDERED 
DF_REF_ORDER_UNORDERED_WITH_NOTES 
DF_REF_ORDER_BY_REG 
DF_REF_ORDER_BY_REG_WITH_NOTES 
DF_REF_ORDER_BY_INSN 
DF_REF_ORDER_BY_INSN_WITH_NOTES 

◆ df_ref_type

The first of these us a set of a registers.  The remaining three
are all uses of a register (the mem_load and mem_store relate to
how the register as an addressing operand).   
Enumerator
DF_REF_REG_DEF 
DF_REF_REG_USE 
DF_REF_REG_MEM_LOAD 
DF_REF_REG_MEM_STORE 

◆ df_scan_flags

Enumerator
DF_SCAN_EMPTY_ENTRY_EXIT 

Function Documentation

◆ can_move_insns_across()

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 )
extern
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, ggc_alloc(), 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().

◆ debug_df_chain()

void debug_df_chain ( struct df_link * link)
extern

References df_chain_dump(), fputc(), and ggc_alloc().

◆ debug_df_defno()

void debug_df_defno ( unsigned int defno)
extern

◆ debug_df_insn()

void debug_df_insn ( rtx_insn * insn)
extern
Functions for debugging from GDB.   

References debug_rtx(), df_insn_debug(), ggc_alloc(), and df_insn_info::insn.

◆ debug_df_ref()

void debug_df_ref ( df_ref ref)
extern

References df_ref_debug(), and ggc_alloc().

◆ debug_df_reg()

void debug_df_reg ( rtx reg)
extern

References df_regno_debug(), ggc_alloc(), and REGNO.

◆ debug_df_regno()

void debug_df_regno ( unsigned int regno)
extern

References df_regno_debug(), and ggc_alloc().

◆ debug_df_useno()

void debug_df_useno ( unsigned int defno)
extern

◆ df_add_problem()

void df_add_problem ( const struct df_problem * problem)
extern
This symbol turns on checking that each modification of the cfg has
been identified to the appropriate df routines.  It is not part of
verification per se because the check that the final solution has
not changed covers this.  However, if the solution is not being
properly recomputed because the cfg is being modified, adding in
calls to df_check_cfg_clean can be used to find the source of that
kind of problem.   
Functions defined in df-core.cc.   
Add PROBLEM (and any dependent problems) to the DF instance.   

References df_problem::dependent_problem, df, df_add_problem(), ggc_alloc(), i, df_problem::id, df_d::num_problems_defined, dataflow::problem, df_d::problems_by_index, and df_d::problems_in_order.

Referenced by df_add_problem(), df_chain_add_problem(), df_live_add_problem(), df_lr_add_problem(), df_md_add_problem(), df_mir_add_problem(), df_note_add_problem(), df_rd_add_problem(), df_scan_add_problem(), and df_word_lr_add_problem().

◆ df_analyze()

◆ df_analyze_loop()

◆ df_analyze_problem()

void df_analyze_problem ( struct dataflow * dflow,
bitmap blocks_to_consider,
int * postorder,
int n_blocks )
extern
Execute dataflow analysis on a single dataflow problem.

  BLOCKS_TO_CONSIDER are the blocks whose solution can either be
  examined or will be computed.  For calls from DF_ANALYZE, this is
  the set of blocks that has been passed to DF_SET_BLOCKS.

References ggc_alloc(), timevar_pop(), and timevar_push().

Referenced by df_analyze_1(), and fast_dce().

◆ df_bb_delete()

void df_bb_delete ( int bb_index)
extern
Free all of the per basic block dataflow from all of the problems.
This is typically called before a basic block is deleted and the
problem will be reanalyzed.   

References BASIC_BLOCK_FOR_FN, cfun, df, df_clear_bb_dirty(), df_clear_bb_info(), df_get_bb_info(), df_mark_solutions_dirty(), ggc_alloc(), i, df_d::num_problems_defined, and df_d::problems_in_order.

Referenced by cfg_layout_merge_blocks(), rtl_delete_block(), and rtl_merge_blocks().

◆ df_bb_refs_record()

void df_bb_refs_record ( int bb_index,
bool scan_insns )
extern

◆ df_bb_regno_first_def_find()

df_ref df_bb_regno_first_def_find ( basic_block bb,
unsigned int regno )
extern
Return first def of REGNO within BB.   

References DF_REF_REGNO, FOR_BB_INSNS, FOR_EACH_INSN_DEF, INSN_P, and NULL.

◆ df_bb_regno_last_def_find()

df_ref df_bb_regno_last_def_find ( basic_block bb,
unsigned int regno )
extern
Return last def of REGNO within BB.   

References DF_REF_REGNO, FOR_BB_INSNS_REVERSE, FOR_EACH_INSN_DEF, INSN_P, and NULL.

◆ df_bb_replace()

void df_bb_replace ( int old_index,
basic_block new_block )
extern
Shove NEW_BLOCK in at OLD_INDEX.  Called from ifcvt to hack a
block.  There is no excuse for people to do this kind of thing.   

References BASIC_BLOCK_FOR_FN, cfun, df, df_clear_bb_dirty(), df_get_bb_info(), df_grow_bb_info(), df_set_bb_dirty(), df_set_bb_info(), dump_file, gcc_assert, ggc_alloc(), basic_block_def::index, NULL, df_d::num_problems_defined, df_d::problems_in_order, and SET_BASIC_BLOCK_FOR_FN.

Referenced by find_if_case_1().

◆ df_chain_add_problem()

void df_chain_add_problem ( unsigned int chain_flags)
extern
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, ggc_alloc(), and problem_CHAIN.

Referenced by find_and_remove_re(), find_defs(), init_dce(), and iv_analysis_loop_init().

◆ df_chain_copy()

void df_chain_copy ( df_ref to_ref,
struct df_link * from_ref )
extern
Copy the du or ud chain starting at FROM_REF and attach it to
TO_REF.   

References df_chain_create(), and ggc_alloc().

◆ df_chain_create()

struct df_link * df_chain_create ( df_ref src,
df_ref dst )
extern
Functions defined in df-problems.cc.  
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().

◆ df_chain_dump()

void df_chain_dump ( struct df_link * link,
FILE * file )
extern
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, ggc_alloc(), 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().

◆ df_chain_unlink()

void df_chain_unlink ( df_ref ref)
extern
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().

◆ df_clear_flags()

int df_clear_flags ( int changeable_flags)
extern
Clear the MASK flags in the DFLOW problem.  The old flags are
returned.  If a flag is not allowed to be changed this will fail if
checking is enabled.   

References df_d::changeable_flags, df, and ggc_alloc().

Referenced by df_insn_rescan_all(), df_lr_finalize(), df_process_deferred_rescans(), fast_dce(), if_convert(), ira(), run_fast_df_dce(), and run_word_dce().

◆ df_compact_blocks()

◆ df_compute_regs_ever_live()

void df_compute_regs_ever_live ( bool reset)
extern
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(), ggc_alloc(), i, df_d::redo_entry_and_exit, and regs_ever_live.

Referenced by df_analyze_1(), reginfo_init(), and rest_of_handle_df_initialize().

◆ df_dump()

◆ df_dump_bottom()

void df_dump_bottom ( basic_block bb,
FILE * file )
extern
Dump the bottom of the block information for BB.   

References df_dump_bb_problem_data().

Referenced by df_dump(), print_rtl_with_bb(), and rtl_dump_bb().

◆ df_dump_insn_bottom()

void df_dump_insn_bottom ( const rtx_insn * insn,
FILE * file )
extern
Dump information about INSN after dumping INSN itself.   

References df_dump_insn_problem_data().

Referenced by print_rtl_with_bb(), and rtl_dump_bb().

◆ df_dump_insn_top()

void df_dump_insn_top ( const rtx_insn * insn,
FILE * file )
extern
Dump information about INSN before dumping INSN itself.   

References df_dump_insn_problem_data().

Referenced by print_rtl_with_bb(), and rtl_dump_bb().

◆ df_dump_region()

void df_dump_region ( FILE * file)
extern

◆ df_dump_start()

void df_dump_start ( FILE * file)
extern

◆ df_dump_top()

void df_dump_top ( basic_block bb,
FILE * file )
extern
Dump the top of the block information for BB.   

References df_dump_bb_problem_data().

Referenced by df_dump(), print_rtl_with_bb(), and rtl_dump_bb().

◆ df_epilogue_uses_p()

bool df_epilogue_uses_p ( unsigned int regno)
extern
Return true if REGNO is used by the epilogue.   

References crtl, EPILOGUE_USES, and TEST_HARD_REG_BIT.

Referenced by df_get_exit_block_use_set(), and init_resource_info().

◆ df_find_def()

df_ref df_find_def ( rtx_insn * insn,
rtx reg )
extern
Finds the reference corresponding to the definition of REG in INSN.
DF is the dataflow object.   

References DF_REF_REGNO, FOR_EACH_INSN_DEF, gcc_assert, GET_CODE, ggc_alloc(), NULL, REG_P, REGNO, and SUBREG_REG.

Referenced by biv_p(), df_reg_defined(), find_invariant_insn(), and iv_analyze_result().

◆ df_find_single_def_src()

rtx df_find_single_def_src ( rtx reg)
extern

◆ df_find_use()

df_ref df_find_use ( rtx_insn * insn,
rtx reg )
extern

◆ df_finish_pass()

◆ df_get_artificial_defs()

df_ref df_get_artificial_defs ( unsigned int bb_index)
inline
Get basic block info.   
Get the artificial defs for a basic block.   

References df_scan_bb_info::artificial_defs, and df_scan_get_bb_info().

Referenced by df_bb_verify(), df_md_bb_local_compute(), df_rd_bb_local_compute(), and df_reorganize_refs_by_insn_bb().

◆ df_get_artificial_uses()

df_ref df_get_artificial_uses ( unsigned int bb_index)
inline
Get the artificial uses for a basic block.   

References df_scan_bb_info::artificial_uses, and df_scan_get_bb_info().

Referenced by df_bb_verify(), df_chain_create_bb(), and df_reorganize_refs_by_insn_bb().

◆ df_get_bb_dirty()

bool df_get_bb_dirty ( basic_block bb)
extern
Return true if BB needs it's transfer functions recomputed.   

References bitmap_bit_p, df_live, df_lr, basic_block_def::index, and dataflow::out_of_date_transfer_functions.

Referenced by find_if_header(), if_convert(), and try_head_merge_bb().

◆ df_get_live_in()

◆ df_get_live_out()

◆ df_get_n_blocks()

int df_get_n_blocks ( enum df_flow_dir dir)
extern
Return the number of basic blocks from the last call to df_analyze.   

References df, DF_FORWARD, DF_NONE, gcc_assert, df_d::n_blocks, df_d::postorder, and df_d::postorder_inverted.

Referenced by calculate_global_remat_bb_data(), dse_step4(), fast_dce(), and lra_create_live_ranges_1().

◆ df_get_postorder()

int * df_get_postorder ( enum df_flow_dir dir)
extern
Return a pointer to the array of basic blocks in the reverse postorder.
Depending on the direction of the dataflow problem,
it returns either the usual reverse postorder array
or the reverse postorder of inverted traversal.  

References df, DF_FORWARD, DF_NONE, gcc_assert, df_d::postorder, and df_d::postorder_inverted.

Referenced by calculate_global_remat_bb_data(), dse_step4(), fast_dce(), and lra_create_live_ranges_1().

◆ df_grow_bb_info()

◆ df_grow_insn_info()

void df_grow_insn_info ( void )
extern
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, DF_INSN_SIZE, get_max_uid(), ggc_alloc(), df_d::insns, and df_d::insns_size.

Referenced by df_insn_create_insn_record(), df_live_local_compute(), df_live_verify_transfer_functions(), df_mir_local_compute(), df_recompute_luids(), and df_scan_alloc().

◆ df_grow_reg_info()

void df_grow_reg_info ( void )
extern
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 object_allocator< T >::allocate(), df_ref_info::begin, df_ref_info::count, df_d::def_info, df_d::def_regs, df, df_scan, df_d::eq_use_regs, ggc_alloc(), i, max_reg_num(), 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_scan_alloc(), and regstat_init_n_sets_and_refs().

◆ df_hard_reg_init()

void df_hard_reg_init ( void )
extern
Initialize some platform specific structures.   

References CLEAR_HARD_REG_SET, elim_reg_set, ggc_alloc(), i, initialized, and SET_HARD_REG_BIT.

Referenced by rest_of_handle_df_initialize().

◆ df_hard_reg_used_count()

unsigned int df_hard_reg_used_count ( unsigned int reg)
extern
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.

◆ df_hard_reg_used_p()

bool df_hard_reg_used_p ( unsigned int reg)
extern
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().

◆ df_insn_change_bb()

void df_insn_change_bb ( rtx_insn * insn,
basic_block new_bb )
extern
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 BLOCK_FOR_INSN(), DEBUG_INSN_P, df, df_insn_rescan(), DF_INSN_UID_SAFE_GET, df_set_bb_dirty(), dump_file, ggc_alloc(), basic_block_def::index, df_insn_info::insn, INSN_P, INSN_UID(), NULL, and set_block_for_insn().

Referenced by reorder_insns(), and update_bb_for_insn_chain().

◆ df_insn_create_insn_record()

◆ df_insn_debug()

void df_insn_debug ( rtx_insn * insn,
bool follow_chain,
FILE * file )
extern

◆ df_insn_debug_regno()

◆ df_insn_delete()

◆ df_insn_rescan()

bool df_insn_rescan ( rtx_insn * insn)
extern
Rescan INSN.  Return TRUE if the rescanning produced any changes.   

References bitmap_clear_bit(), bitmap_set_bit, BLOCK_FOR_INSN(), df_d::changeable_flags, copy_all, DEBUG_INSN_P, 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_free_fields(), df_insn_info_init_fields(), DF_INSN_LUID, df_insn_refs_collect(), df_insn_refs_verify(), DF_INSN_UID_SAFE_GET, DF_NO_INSN_RESCAN, df_refs_add_to_chains(), df_scan, df_set_bb_dirty(), dump_file, df_insn_info::eq_uses, ggc_alloc(), df_insn_info::insn, INSN_P, INSN_UID(), df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, df_insn_info::mw_hardregs, NULL, and df_insn_info::uses.

Referenced by add_insn_after(), add_insn_before(), adjust_for_new_dest(), can_move_invariant_reg(), change_loop(), cleanup_subreg_operands(), combine_and_move_insns(), confirm_change_group(), copyprop_hardreg_forward_1(), dead_debug_global_replace_temp(), dead_debug_local_finish(), delete_trivially_dead_insns(), delete_unmarked_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(), make_more_copies(), match_asm_constraints_1(), peep2_update_life(), propagate_for_debug(), propagate_for_debug_subst(), remove_insn_scratches(), remove_scratches(), replace_ref(), resolve_clobber(), resolve_debug(), restore_operands(), try_combine(), and update_ld_motion_stores().

◆ df_insn_rescan_all()

void df_insn_rescan_all ( void )
extern

◆ df_insn_rescan_debug_internal()

◆ df_live_add_problem()

void df_live_add_problem ( void )
extern
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().

◆ df_live_get_bb_info()

◆ df_live_set_all_dirty()

void df_live_set_all_dirty ( void )
extern
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().

◆ df_live_verify_transfer_functions()

◆ df_lr_add_problem()

void df_lr_add_problem ( void )
extern
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_lr, and problem_LR.

Referenced by rest_of_handle_df_initialize().

◆ df_lr_get_bb_info()

◆ df_lr_verify_transfer_functions()

◆ df_mark_solutions_dirty()

◆ df_maybe_reorganize_def_refs()

◆ df_maybe_reorganize_use_refs()

◆ df_md_add_problem()

void df_md_add_problem ( void )
extern
Create a new MD instance and add it to the existing instance
of DF.   

References df_add_problem(), and problem_MD.

◆ df_md_get_bb_info()

◆ df_md_simulate_artificial_defs_at_top()

void df_md_simulate_artificial_defs_at_top ( basic_block bb,
bitmap local_md )
extern
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, ggc_alloc(), and basic_block_def::index.

◆ df_md_simulate_one_insn()

void df_md_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap local_md )
extern
Add the effect of the defs of INSN to the reaching definitions bitmap
LOCAL_MD.   

References bitmap_clear_bit(), bitmap_set_bit, df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_FLAGS, DF_REF_ID, DF_REF_MAY_CLOBBER, DF_REF_PARTIAL, DF_REF_REGNO, FOR_EACH_INSN_DEF, and ggc_alloc().

◆ df_mir_add_problem()

void df_mir_add_problem ( void )
extern
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().

◆ df_mir_get_bb_info()

◆ df_mir_simulate_one_insn()

void df_mir_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap kill,
bitmap gen )
extern

◆ df_note_add_problem()

void df_note_add_problem ( void )
extern
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().

◆ df_notes_rescan()

◆ df_print_bb_index()

void df_print_bb_index ( basic_block bb,
FILE * file )
extern
Print some basic block info as part of df_dump.   

References FOR_EACH_EDGE, ggc_alloc(), basic_block_def::index, basic_block_def::preds, and basic_block_def::succs.

Referenced by df_dump(), and dse_step4().

◆ df_print_regset()

◆ df_print_word_regset()

void df_print_word_regset ( FILE * file,
const_bitmap r )
extern
Write information about registers and basic blocks into FILE.  The
bitmap is in the form used by df_byte_lr.  This is part of making a
debugging dump.   

References bitmap_bit_p, ggc_alloc(), i, max_reg_num(), NULL, and r.

Referenced by df_word_lr_bottom_dump(), df_word_lr_top_dump(), and word_dce_process_block().

◆ df_process_deferred_rescans()

◆ df_rd_add_problem()

void df_rd_add_problem ( void )
extern
Create a new RD instance and add it to the existing instance
of DF.   

References df_add_problem(), and problem_RD.

◆ df_rd_get_bb_info()

◆ df_rd_simulate_artificial_defs_at_top()

void df_rd_simulate_artificial_defs_at_top ( basic_block bb,
bitmap local_rd )
extern
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, ggc_alloc(), and basic_block_def::index.

Referenced by df_chain_create_bb().

◆ df_rd_simulate_one_insn()

void df_rd_simulate_one_insn ( basic_block bb,
rtx_insn * insn,
bitmap local_rd )
extern

◆ df_recompute_luids()

◆ df_ref_change_reg_with_loc()

void df_ref_change_reg_with_loc ( rtx loc,
unsigned int new_regno )
extern
Change the regno of register LOC to NEW_REGNO and update the df
information accordingly.  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(), df_ref_change_reg_with_loc_1(), DF_REG_DEF_GET, DF_REG_EQ_USE_GET, DF_REG_USE_GET, GET_MODE, ggc_alloc(), REGNO, and set_mode_and_regno().

◆ df_ref_debug()

◆ df_refs_chain_dump()

void df_refs_chain_dump ( df_ref ref,
bool follow_chain,
FILE * file )
extern

◆ df_reg_defined()

bool df_reg_defined ( rtx_insn * insn,
rtx reg )
extern
Return true if REG is defined in INSN, zero otherwise.   

References df_find_def(), and NULL.

◆ df_reg_used()

bool df_reg_used ( rtx_insn * insn,
rtx reg )
extern
Return true if REG is referenced in INSN, zero otherwise.   

References df_find_use(), and NULL.

◆ df_regno_debug()

void df_regno_debug ( unsigned int regno,
FILE * file )
extern

◆ df_regs_chain_dump()

void df_regs_chain_dump ( df_ref ref,
FILE * file )
extern
Dump either a ref-def or reg-use chain.   

References df_ref_dump(), DF_REF_NEXT_REG, and ggc_alloc().

Referenced by df_regno_debug().

◆ df_regs_ever_live_p()

◆ df_remove_problem()

◆ df_scan_add_problem()

void df_scan_add_problem ( void )
extern
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_SCAN.

Referenced by rest_of_handle_df_initialize().

◆ df_scan_alloc()

◆ df_scan_blocks()

◆ df_scan_get_bb_info()

◆ df_scan_verify()

◆ df_set_bb_dirty()

◆ df_set_blocks()

◆ df_set_flags()

◆ df_set_regs_ever_live()

void df_set_regs_ever_live ( unsigned int regno,
bool value )
extern
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(), finish_spills(), ira_setup_eliminable_regset(), lra(), lra_constraints(), mark_home_live_1(), reload(), rename_chains(), spill_hard_reg(), and update_equiv_regs_prescan().

◆ df_simple_dataflow()

void df_simple_dataflow ( enum df_flow_dir dir,
df_init_function init_fun,
df_confluence_function_0 con_fun_0,
df_confluence_function_n con_fun_n,
df_transfer_function trans_fun,
bitmap blocks,
int * postorder,
int n_blocks )
extern
Interface for calling iterative dataflow with user defined
confluence and transfer functions.  All that is necessary is to
supply DIR, a direction, CONF_FUN_0, a confluence function for
blocks with no logical preds (or NULL), CONF_FUN_N, the normal
confluence function, TRANS_FUN, the basic block transfer function,
and BLOCKS, the set of blocks to examine, POSTORDER the blocks in
postorder, and N_BLOCKS, the number of blocks in POSTORDER.  

References df_problem::con_fun_0, df_problem::con_fun_n, df_worklist_dataflow(), df_problem::dir, ggc_alloc(), df_problem::init_fun, dataflow::problem, df_problem::trans_fun, user_dflow, and user_problem.

Referenced by calculate_global_remat_bb_data(), dse_step4(), and lra_create_live_ranges_1().

◆ df_simulate_defs()

void df_simulate_defs ( rtx_insn * insn,
bitmap live )
extern

◆ df_simulate_finalize_backwards()

void df_simulate_finalize_backwards ( basic_block bb,
bitmap live )
extern
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().

◆ df_simulate_find_defs()

void df_simulate_find_defs ( rtx_insn * insn,
bitmap defs )
extern
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().

◆ df_simulate_find_noclobber_defs()

void df_simulate_find_noclobber_defs ( rtx_insn * insn,
bitmap defs )
extern
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().

◆ df_simulate_initialize_backwards()

void df_simulate_initialize_backwards ( basic_block bb,
bitmap live )
extern

◆ df_simulate_initialize_forwards()

void df_simulate_initialize_forwards ( basic_block bb,
bitmap live )
extern
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().

◆ df_simulate_one_insn_backwards()

void df_simulate_one_insn_backwards ( basic_block bb,
rtx_insn * insn,
bitmap live )
extern

◆ df_simulate_one_insn_forwards()

void df_simulate_one_insn_forwards ( basic_block bb,
rtx_insn * insn,
bitmap live )
extern

◆ df_simulate_uses()

void df_simulate_uses ( rtx_insn * insn,
bitmap live )
extern

◆ df_single_def()

df_ref df_single_def ( const df_insn_info * info)
inline
If INSN defines exactly one register, return the associated reference,
otherwise return null.   

References defs, DF_INSN_INFO_DEFS, DF_REF_NEXT_LOC, and NULL.

Referenced by find_moveable_pseudos().

◆ df_single_use()

df_ref df_single_use ( const df_insn_info * info)
inline
If INSN uses exactly one register, return the associated reference,
otherwise return null.   

References DF_INSN_INFO_USES, DF_REF_NEXT_LOC, and NULL.

Referenced by find_moveable_pseudos().

◆ df_update_entry_block_defs()

◆ df_update_entry_exit_and_calls()

void df_update_entry_exit_and_calls ( void )
extern
Recompute the parts of scanning that are based on regs_ever_live
because something changed in that array.   

References CALL_P, cfun, df_insn_rescan(), df_update_entry_block_defs(), df_update_exit_block_uses(), FOR_BB_INSNS, FOR_EACH_BB_FN, and INSN_P.

Referenced by df_compute_regs_ever_live(), df_process_deferred_rescans(), thread_prologue_and_epilogue_insns(), and try_shrink_wrapping_separate().

◆ df_update_exit_block_uses()

◆ df_uses_create()

void df_uses_create ( rtx * loc,
rtx_insn * insn,
int ref_flags )
extern
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 BLOCK_FOR_INSN(), DF_INSN_INFO_GET, DF_REF_IN_NOTE, DF_REF_REG_USE, df_uses_record(), gcc_assert, ggc_alloc(), and NULL.

◆ df_verify()

void df_verify ( void )
extern
Verify that there is a place for everything and everything is in
its place.  This is too expensive to run after every pass in the
mainline.  However this is an excellent debugging tool if the
dataflow information is not being updated properly.  You can just
sprinkle calls in until you find the place that is changing an
underlying structure without calling the proper updating
routine.   

References df_d::changeable_flags, df, df_live, df_live_verify_transfer_functions(), df_lr_verify_transfer_functions(), df_scan_verify(), and ggc_alloc().

Referenced by df_analyze_1().

◆ df_word_lr_add_problem()

void df_word_lr_add_problem ( void )
extern
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().

◆ df_word_lr_get_bb_info()

◆ df_word_lr_mark_ref()

bool df_word_lr_mark_ref ( df_ref ref,
bool is_set,
regset live )
extern
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(), ggc_alloc(), 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().

◆ df_word_lr_simulate_artificial_refs_at_end()

void df_word_lr_simulate_artificial_refs_at_end ( basic_block ,
bitmap  )
extern

◆ df_word_lr_simulate_artificial_refs_at_top()

void df_word_lr_simulate_artificial_refs_at_top ( basic_block ,
bitmap  )
extern

◆ df_word_lr_simulate_defs()

bool df_word_lr_simulate_defs ( rtx_insn * insn,
bitmap live )
extern
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_word_lr_bb_info::def, DF_REF_CONDITIONAL, DF_REF_FLAGS, df_word_lr_mark_ref(), and FOR_EACH_INSN_DEF.

Referenced by word_dce_process_block().

◆ df_word_lr_simulate_uses()

void df_word_lr_simulate_uses ( rtx_insn * insn,
bitmap live )
extern
Simulate the effects of the uses of INSN on LIVE.   

References df_word_lr_mark_ref(), FOR_EACH_INSN_USE, and df_word_lr_bb_info::use.

Referenced by word_dce_process_block().

◆ df_worklist_dataflow()

void df_worklist_dataflow ( struct dataflow * dataflow,
bitmap blocks_to_consider,
int * blocks_in_postorder,
int n_blocks )
extern
Worklist-based dataflow solver. It uses sbitmap as a worklist,
with "n"-th bit representing the n-th block in the reverse-postorder order.
The solver is a double-queue algorithm similar to the "double stack" solver
from Cooper, Harvey and Kennedy, "Iterative data-flow analysis, Revisited".
The only significant difference is that the worklist in this implementation
is always sorted in RPO of the CFG visiting direction.   

References BITMAP_ALLOC, bitmap_clear(), bitmap_set_bit, cfun, df_bitmap_obstack, DF_NONE, df_worklist_dataflow_doublequeue(), df_problem::dir, EXECUTE_IF_SET_IN_BITMAP, free(), gcc_assert, ggc_alloc(), i, df_problem::init_fun, last_basic_block_for_fn, and dataflow::problem.

Referenced by df_lr_finalize(), and df_simple_dataflow().

◆ simulate_backwards_to_point()

void simulate_backwards_to_point ( basic_block bb,
regset live,
rtx point )
extern
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(), ggc_alloc(), df_insn_info::insn, and PREV_INSN().

Referenced by dead_or_predicable(), and try_head_merge_bb().

Variable Documentation

◆ df

class df_d* df
extern
This is used for debugging and for the dumpers to find the latest
instance so that the df info can be added to the dumps.  This
should not be used by regular code.   

Referenced by compact_blocks(), create_task_copyfn(), decompose_multiword_subregs(), df_add_problem(), df_add_refs_to_table(), df_analyze(), df_analyze_1(), df_analyze_loop(), df_bb_delete(), df_bb_refs_collect(), df_bb_refs_record(), df_bb_replace(), df_chain_bb_dump(), df_chain_create_bb(), df_chain_create_bb_process_use(), df_chain_insn_bottom_dump(), df_chain_insn_top_dump(), df_clear_bb_dirty(), df_clear_flags(), df_compact_blocks(), df_compute_regs_ever_live(), df_count_refs(), df_dump_bb_problem_data(), df_dump_insn_problem_data(), df_dump_region(), df_dump_start(), df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_find_use(), df_finish_pass(), df_get_call_refs(), df_get_n_blocks(), df_get_postorder(), df_grow_insn_info(), df_grow_reg_info(), df_hard_reg_used_count(), df_hard_reg_used_p(), df_insn_change_bb(), df_insn_delete(), df_insn_info_delete(), df_insn_rescan(), df_insn_rescan_all(), df_insn_rescan_debug_internal(), df_install_ref(), df_install_ref_incremental(), df_install_refs(), df_live_verify_transfer_functions(), df_lr_confluence_0(), df_lr_confluence_n(), df_lr_finalize(), df_lr_local_compute(), df_lr_verify_transfer_functions(), df_mark_solutions_dirty(), df_maybe_reorganize_def_refs(), df_maybe_reorganize_use_refs(), df_md_bb_local_compute(), df_md_bb_local_compute_process_def(), df_md_simulate_one_insn(), df_notes_rescan(), df_process_deferred_rescans(), df_rd_bb_local_compute(), df_rd_bb_local_compute_process_def(), df_rd_dump_defs_set(), df_rd_local_compute(), df_rd_simulate_one_insn(), df_rd_start_dump(), df_rd_transfer_function(), df_ref_change_reg_with_loc(), df_ref_create_structure(), df_ref_record(), df_refs_add_to_chains(), df_reg_chain_unlink(), df_remove_problem(), df_reorganize_refs_by_insn(), df_reorganize_refs_by_reg(), df_reorganize_refs_by_reg_by_insn(), df_reorganize_refs_by_reg_by_reg(), df_scan_alloc(), df_scan_blocks(), df_scan_free(), df_scan_free_internal(), df_scan_start_dump(), df_scan_verify(), df_set_bb_dirty(), df_set_blocks(), df_set_flags(), df_set_regs_ever_live(), df_simulate_fixup_sets(), df_update_entry_block_defs(), df_update_exit_block_uses(), df_verify(), df_word_lr_local_compute(), dump_reg_info(), fast_dce(), find_invariants_to_move(), glibc_linux_libm_function_max_error(), ira(), latch_dominating_def(), print_rtl_with_bb(), reginfo_init(), remove_edge_and_dominated_blocks(), remove_reg_equal_equiv_notes_for_regno(), rest_of_handle_df_finish(), rest_of_handle_df_initialize(), and rtl_dump_bb().

◆ df_bitmap_obstack

bitmap_obstack df_bitmap_obstack
extern
An obstack for bitmap not related to specific dataflow problems.
This obstack should e.g. be used for bitmaps with a short life time
such as temporary bitmaps.  This obstack is declared in df-core.cc.   
An obstack for bitmap not related to specific dataflow problems.
This obstack should e.g. be used for bitmaps with a short life time
such as temporary bitmaps.   

Referenced by df_analyze(), df_analyze_loop(), df_chain_add_problem(), df_compact_blocks(), df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_insn_rescan_all(), df_live_add_problem(), df_lr_add_problem(), df_mir_add_problem(), df_note_compute(), df_process_deferred_rescans(), df_rd_confluence_n(), df_rd_dump_defs_set(), df_rd_local_compute(), df_rd_transfer_function(), df_scan_verify(), df_set_blocks(), df_update_entry_block_defs(), df_update_exit_block_uses(), df_word_lr_add_problem(), df_worklist_dataflow(), df_worklist_dataflow_doublequeue(), regstat_compute_calls_crossed(), regstat_compute_ri(), rest_of_handle_df_finish(), and rest_of_handle_df_initialize().