GCC Middle and Back End API Reference
|
#include "bitmap.h"
#include "regset.h"
#include "sbitmap.h"
#include "basic-block.h"
#include "alloc-pool.h"
#include "timevar.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 |
struct | df_d |
struct | df_scan_bb_info |
struct | df_rd_bb_info |
struct | df_md_bb_info |
struct | df_lr_bb_info |
struct | df_live_bb_info |
struct | df_word_lr_bb_info |
struct | web_entry |
Macros | |
#define | DF_SCAN 0 |
#define | DF_LR 1 /* Live Registers backward. */ |
#define | DF_LIVE 2 /* Live Registers & Uninitialized Registers */ |
#define | DF_RD 3 /* Reaching Defs. */ |
#define | DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */ |
#define | DF_WORD_LR 5 /* Subreg tracking lr. */ |
#define | DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */ |
#define | DF_MD 7 /* Multiple Definitions. */ |
#define | DF_LAST_PROBLEM_PLUS1 (DF_MD + 1) |
#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_LIVE_IN(BB) (&DF_LIVE_BB_INFO (BB)->in) |
#define | DF_LIVE_OUT(BB) (&DF_LIVE_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_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) ((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) ((MREF) && !DF_MWS_REG_DEF_P (MREF)) |
#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_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 | 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]) |
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, FILE *) |
typedef void(* | df_verify_solution_start )(void) |
typedef void(* | df_verify_solution_end )(void) |
typedef union df_ref_d * | df_ref |
Variables | |
bitmap_obstack | df_bitmap_obstack |
struct df_d * | df |
#define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */ |
Referenced by df_chain_create(), df_chain_remove_problem(), and init_dce().
#define DF_DEFS_BEGIN | ( | ID | ) | (df->def_info.begin[(ID)]) |
#define DF_DEFS_COUNT | ( | ID | ) | (df->def_info.count[(ID)]) |
#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_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.
#define DF_INSN_DEFS | ( | INSN | ) | (DF_INSN_INFO_DEFS (DF_INSN_INFO_GET (INSN))) |
Referenced by process_bb_node_lives(), and split_all_insns().
#define DF_INSN_EQ_USES | ( | INSN | ) | (DF_INSN_INFO_EQ_USES (DF_INSN_INFO_GET (INSN))) |
#define DF_INSN_INFO_DEFS | ( | II | ) | ((II)->defs) |
Referenced by df_live_free_bb_info(), dump_hash_table(), and union_defs().
#define DF_INSN_INFO_EQ_USES | ( | II | ) | ((II)->eq_uses) |
Referenced by check_dependency(), find_invariant_insn(), and union_defs().
Referenced by check_dependency(), df_dump_insn_bottom(), df_get_call_refs(), df_hard_reg_used_p(), dump_hash_table(), and find_invariant_insn().
#define DF_INSN_INFO_LUID | ( | II | ) | ((II)->luid) |
Referenced by df_dump_insn_bottom(), df_get_call_refs(), and df_live_free_bb_info().
#define DF_INSN_INFO_USES | ( | II | ) | ((II)->uses) |
Referenced by check_dependency(), and find_invariant_insn().
#define DF_INSN_LUID | ( | INSN | ) | (DF_INSN_INFO_LUID (DF_INSN_INFO_GET (INSN))) |
Referenced by try_combine().
#define DF_INSN_SIZE | ( | ) | ((df)->insns_size) |
Macros to access the elements within the insn_info structure table.
#define DF_INSN_UID_DEFS | ( | INSN | ) | (DF_INSN_UID_GET (INSN)->defs) |
Referenced by df_dump_insn_problem_data(), df_hard_reg_used_p(), df_whole_mw_reg_dead_p(), and find_if_case_2().
#define DF_INSN_UID_EQ_USES | ( | INSN | ) | (DF_INSN_UID_GET (INSN)->eq_uses) |
Referenced by df_bb_regno_first_def_find(), df_chain_remove_problem(), df_dump_insn_problem_data(), and web_main().
#define DF_INSN_UID_GET | ( | UID | ) | (df->insns[(UID)]) |
Referenced by df_live_free_bb_info(), and df_ref_compress_rec().
#define DF_INSN_UID_LUID | ( | INSN | ) | (DF_INSN_UID_GET (INSN)->luid) |
Referenced by df_dump_insn_problem_data().
#define DF_INSN_UID_MWS | ( | INSN | ) | (DF_INSN_UID_GET (INSN)->mw_hardregs) |
Referenced by df_dump_insn_problem_data(), and df_whole_mw_reg_dead_p().
#define DF_INSN_UID_SAFE_GET | ( | UID | ) |
Referenced by df_insn_rescan_debug_internal(), and df_ref_chain_delete().
#define DF_INSN_UID_SET | ( | UID, | |
VAL | |||
) | (df->insns[(UID)]=(VAL)) |
#define DF_INSN_UID_USES | ( | INSN | ) | (DF_INSN_UID_GET (INSN)->uses) |
Referenced by df_bb_regno_first_def_find(), df_chain_remove_problem(), df_dump_insn_problem_data(), and web_main().
#define DF_INSN_USES | ( | INSN | ) | (DF_INSN_INFO_USES (DF_INSN_INFO_GET (INSN))) |
Referenced by find_call_stack_args(), gate_ud_dce(), and process_bb_node_lives().
#define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1) |
#define DF_LIVE 2 /* Live Registers & Uninitialized Registers */ |
#define DF_LIVE_BB_INFO | ( | BB | ) | (df_live_get_bb_info ((BB)->index)) |
#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 df_live_finalize(), and df_live_free().
#define DF_LIVE_OUT | ( | BB | ) | (&DF_LIVE_BB_INFO (BB)->out) |
Referenced by df_live_finalize(), and df_live_free().
#define DF_LR 1 /* Live Registers backward. */ |
Referenced by df_bb_delete(), df_lr_confluence_0(), df_lr_free(), df_lr_init(), df_lr_transfer_function(), df_lr_verify_solution_end(), and fast_dce().
#define DF_LR_BB_INFO | ( | BB | ) | (df_lr_get_bb_info ((BB)->index)) |
#define DF_LR_IN | ( | BB | ) | (&DF_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 df_lr_free(), and init_reg_last().
#define DF_LR_OUT | ( | BB | ) | (&DF_LR_BB_INFO (BB)->out) |
#define DF_MD 7 /* Multiple Definitions. */ |
#define DF_MD_BB_INFO | ( | BB | ) | (df_md_get_bb_info ((BB)->index)) |
#define DF_MWS_REG_DEF_P | ( | MREF | ) | (DF_MWS_TYPE (MREF) == DF_REF_REG_DEF) |
Referenced by df_dump_top(), and df_whole_mw_reg_dead_p().
#define DF_MWS_REG_USE_P | ( | MREF | ) | ((MREF) && !DF_MWS_REG_DEF_P (MREF)) |
#define DF_MWS_TYPE | ( | MREF | ) | ((MREF)->type) |
#define DF_NOTE 6 /* REG_DEAD and REG_UNUSED notes. */ |
Referenced by df_word_lr_confluence_n().
#define DF_RD 3 /* Reaching Defs. */ |
Referenced by df_rd_alloc().
#define DF_RD_BB_INFO | ( | BB | ) | (df_rd_get_bb_info ((BB)->index)) |
#define DF_REF_BB | ( | REF | ) |
Referenced by gate_fwprop().
#define DF_REF_BBNO | ( | REF | ) | (DF_REF_BB (REF)->index) |
Referenced by df_chain_dump(), and df_ref_compress_rec().
#define DF_REF_CHAIN | ( | REF | ) | ((REF)->base.chain) |
#define DF_REF_CLASS | ( | REF | ) | ((REF)->base.cl) |
#define DF_REF_EXTRACT_MODE | ( | REF | ) | ((REF)->extract_ref.mode) |
#define DF_REF_EXTRACT_OFFSET | ( | REF | ) | ((REF)->extract_ref.offset) |
#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.
#define DF_REF_FLAGS | ( | REF | ) | ((REF)->base.flags) |
Referenced by df_chain_create_bb_process_use(), df_chain_dump(), df_chain_finalize(), df_create_unused_note(), df_note_add_problem(), df_rd_bb_local_compute_process_def(), df_set_unused_notes_for_mw(), df_simulate_find_defs(), df_word_lr_add_problem(), invalidate_memory(), and regstat_get_setjmp_crosses().
#define DF_REF_FLAGS_CLEAR | ( | REF, | |
v | |||
) | (DF_REF_FLAGS (REF) &= ~(v)) |
#define DF_REF_FLAGS_IS_SET | ( | REF, | |
v | |||
) | ((DF_REF_FLAGS (REF) & (v)) != 0) |
Referenced by df_live_alloc(), df_refs_add_to_chains(), df_whole_mw_reg_dead_p(), process_bb_node_lives(), and setup_reg_equiv().
#define DF_REF_FLAGS_SET | ( | REF, | |
v | |||
) | (DF_REF_FLAGS (REF) |= (v)) |
Referenced by df_refs_add_to_chains().
#define DF_REF_ID | ( | REF | ) | ((REF)->base.id) |
Referenced by df_chain_dump(), df_rd_bb_local_compute_process_def(), and web_main().
#define DF_REF_INSN | ( | REF | ) | ((REF)->base.insn_info->insn) |
Referenced by alloc_reg_note(), find_call_stack_args(), one_pre_gcse_pass(), and prescan_insns_for_dce().
#define DF_REF_INSN_INFO | ( | REF | ) | ((REF)->base.insn_info) |
Referenced by one_pre_gcse_pass().
#define DF_REF_INSN_UID | ( | REF | ) | (INSN_UID (DF_REF_INSN(REF))) |
Referenced by df_chain_dump(), and df_ref_compress_rec().
#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_ref_compress_rec(), find_call_stack_args(), and prescan_insns_for_dce().
#define DF_REF_IS_REG_MARKED | ( | REF | ) | (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER)) |
Referenced by df_hard_reg_init().
#define DF_REF_LOC | ( | REF | ) |
Referenced by df_note_bb_compute(), and df_word_lr_add_problem().
#define DF_REF_NEXT_REG | ( | REF | ) | ((REF)->base.next_reg) |
Referenced by one_pre_gcse_pass().
#define DF_REF_ORDER | ( | REF | ) | ((REF)->base.ref_order) |
#define DF_REF_PREV_REG | ( | REF | ) | ((REF)->base.prev_reg) |
#define DF_REF_REAL_LOC | ( | REF | ) |
Referenced by dead_debug_global_insert(), dead_debug_insert_temp(), and df_note_bb_compute().
#define DF_REF_REAL_REG | ( | REF | ) |
Macros to access the elements within the ref structure.
Referenced by one_pre_gcse_pass().
#define DF_REF_REG | ( | REF | ) | ((REF)->base.reg) |
Referenced by df_note_bb_compute(), find_call_stack_args(), invalidate_memory(), process_bb_node_lives(), and setup_reg_equiv().
#define DF_REF_REG_DEF_P | ( | REF | ) | (DF_REF_TYPE (REF) == DF_REF_REG_DEF) |
Macros to determine the reference type.
Referenced by df_chain_dump(), and df_refs_add_to_chains().
#define DF_REF_REG_MARK | ( | REF | ) | (DF_REF_FLAGS_SET ((REF),DF_REF_REG_MARKER)) |
#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_REF_REG_MEM_STORE_P | ( | REF | ) | (DF_REF_TYPE (REF) == DF_REF_REG_MEM_STORE) |
#define DF_REF_REG_UNMARK | ( | REF | ) | (DF_REF_FLAGS_CLEAR ((REF),DF_REF_REG_MARKER)) |
Referenced by df_hard_reg_init().
#define DF_REF_REG_USE_P | ( | REF | ) | ((REF) && !DF_REF_REG_DEF_P (REF)) |
#define DF_REF_REGNO | ( | REF | ) | ((REF)->base.regno) |
Referenced by dead_debug_insert_temp(), df_bb_regno_first_def_find(), df_chain_create_bb_process_use(), df_chain_finalize(), df_create_unused_note(), df_free_ref(), df_live_alloc(), df_note_add_problem(), df_set_unused_notes_for_mw(), df_simulate_find_defs(), df_whole_mw_reg_dead_p(), df_word_lr_add_problem(), df_word_lr_free_bb_info(), dump_hash_table(), find_if_case_2(), regstat_get_setjmp_crosses(), setup_reg_equiv(), split_all_insns(), and web_main().
#define DF_REF_TYPE | ( | REF | ) | ((REF)->base.type) |
Referenced by gate_fwprop().
#define DF_REG_DEF_CHAIN | ( | REG | ) | (df->def_regs[(REG)]->reg_chain) |
Referenced by df_mws_verify(), and df_refs_chain_dump().
#define DF_REG_DEF_COUNT | ( | REG | ) | (df->def_regs[(REG)]->n_refs) |
Referenced by get_varargs_alias_set().
#define DF_REG_DEF_GET | ( | REG | ) | (df->def_regs[(REG)]) |
Referenced by df_free_ref(), and df_ref_change_reg_with_loc_1().
#define DF_REG_EQ_USE_CHAIN | ( | REG | ) | (df->eq_use_regs[(REG)]->reg_chain) |
Referenced by df_mws_verify(), and df_refs_chain_dump().
#define DF_REG_EQ_USE_COUNT | ( | REG | ) | (df->eq_use_regs[(REG)]->n_refs) |
#define DF_REG_EQ_USE_GET | ( | REG | ) | (df->eq_use_regs[(REG)]) |
Referenced by df_ref_change_reg_with_loc_1().
#define DF_REG_SIZE | ( | DF | ) | (df->regs_inited) |
Macros to access the register information from scan dataflow record.
Referenced by best_gain_for_invariant().
Referenced by df_mws_verify(), df_refs_chain_dump(), and one_pre_gcse_pass().
Referenced by df_ref_change_reg_with_loc_1().
#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 best_gain_for_invariant().
#define DF_REGNO_LAST_USE | ( | REGNUM | ) | (DF_REG_USE_GET(REGNUM) ? DF_REG_USE_GET (REGNUM) : 0) |
Referenced by best_gain_for_invariant().
#define DF_SCAN 0 |
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.
Referenced by df_get_eh_block_artificial_uses(), df_ref_chain_delete(), and df_scan_add_problem().
#define DF_SCAN_BB_INFO | ( | BB | ) | (df_scan_get_bb_info ((BB)->index)) |
#define DF_USES_BEGIN | ( | ID | ) | (df->use_info.begin[(ID)]) |
#define DF_USES_COUNT | ( | ID | ) | (df->use_info.count[(ID)]) |
#define DF_USES_GET | ( | ID | ) | (df->use_info.refs[(ID)]) |
Referenced by gate_fwprop().
#define DF_USES_SET | ( | ID, | |
VAL | |||
) | (df->use_info.refs[(ID)]=(VAL)) |
#define DF_USES_TABLE_SIZE | ( | ) | (df->use_info.table_size) |
#define DF_WORD_LR 5 /* Subreg tracking lr. */ |
#define df_word_lr (df->problems_by_index[DF_WORD_LR]) |
Referenced by fast_dce(), and gate_ud_dce().
#define DF_WORD_LR_BB_INFO | ( | BB | ) | (df_word_lr_get_bb_info ((BB)->index)) |
#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.
#define DF_WORD_LR_OUT | ( | BB | ) | (&DF_WORD_LR_BB_INFO (BB)->out) |
Referenced by gate_ud_dce().
typedef void(* df_alloc_function)(bitmap) |
Function prototypes added to df_problem instance. Allocate the problem specific data.
typedef void(* df_confluence_function_0)(basic_block) |
Confluence operator for blocks with 0 out (or in) edges.
Confluence operator for blocks with 1 or more out (or in) edges. Return true if BB input data has changed.
Iterative dataflow function.
typedef void(* df_dump_bb_problem_function)(basic_block, FILE *) |
Function to dump top or bottom of basic block results to FILE.
typedef void(* df_dump_insn_problem_function)(const_rtx, FILE *) |
Function to dump before or after an insn to FILE.
typedef void(* df_dump_problem_function)(FILE *) |
Function to dump basic block independent results to FILE.
typedef void(* df_finalizer_function)(bitmap) |
Function to massage the information after the problem solving.
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.
typedef void(* df_free_function)(void) |
Function to free all of the problem specific datastructures.
typedef void(* df_init_function)(bitmap) |
Init the solution specific data.
typedef void(* df_local_compute_function)(bitmap) |
Local compute 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.
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.
typedef bool(* df_transfer_function)(int) |
Transfer function for blocks. Return true if BB output data has changed.
typedef void(* df_verify_solution_end)(void) |
Function to dump top or bottom of basic block results to FILE.
typedef void(* df_verify_solution_start)(void) |
Function to dump top or bottom of basic block results to FILE.
enum df_chain_flags |
enum df_changeable_flags |
DF_LR_RUN_DCE |
Scanning flags. Flag to control the running of dce as a side effect of building LR. |
DF_NO_HARD_REGS | |
DF_EQ_NOTES | |
DF_NO_REGS_EVER_LIVE | |
DF_NO_INSN_RESCAN |
Cause df_insn_rescan df_notes_rescan and df_insn_delete, to return immediately. This is used by passes that know how to update the scanning them selves. |
DF_DEFER_INSN_RESCAN |
Cause df_insn_rescan df_notes_rescan and df_insn_delete, to return after marking the insn for later processing. This allows all rescans to be batched. |
DF_RD_PRUNE_DEAD_DEFS |
Compute the reaching defs problem as "live and reaching defs" (LR&RD). A DEF is reaching and live at insn I if DEF reaches I and REGNO(DEF) is in LR_IN of the basic block containing I. |
DF_VERIFY_SCHEDULED |
enum df_flow_dir |
enum df_ref_class |
enum df_ref_flags |
enum df_ref_order |
The possible ordering of refs within the df_ref_info.
enum df_ref_type |
bool can_move_insns_across | ( | rtx | from, |
rtx | to, | ||
rtx | across_from, | ||
rtx | across_to, | ||
basic_block | merge_bb, | ||
regset | merge_live, | ||
regset | other_branch_live, | ||
rtx * | pmove_upto | ||
) |
Return true if it is safe to move a group of insns, described by the range FROM to TO, backwards across another group of insns, described by ACROSS_FROM to ACROSS_TO. It is assumed that there are no insns between ACROSS_TO and FROM, but they may be in different basic blocks; MERGE_BB is the block from which the insns will be moved. The caller must pass in a regset MERGE_LIVE which specifies the registers live after TO.
This function may be called in one of two cases: either we try to move identical instructions from all successor blocks into their predecessor, or we try to move from only one successor block. If OTHER_BRANCH_LIVE is nonnull, it indicates that we're dealing with the second case. It should contain a set of registers live at the end of ACROSS_TO which must not be clobbered by moving the insns. In that case, we're also more careful about moving memory references and trapping insns.
We return false if it is not safe to move the entire group, but it may still be possible to move a subgroup. PMOVE_UPTO, if nonnull, is set to point at the last moveable insn in such a case.
Find real bounds, ignoring debug insns.
Pure functions can read from memory. Const functions can read from arguments that the ABI has forced onto the stack. Neither sort of read can be volatile.
This is used just to find sets of the stack pointer.
Collect: MERGE_SET = set of registers set in MERGE_BB MERGE_USE = set of registers used in MERGE_BB and live at its top MERGE_LIVE = set of registers live at the point inside the MERGE range that we've reached during scanning TEST_SET = set of registers set between ACROSS_FROM and ACROSS_END. TEST_USE = set of registers used between ACROSS_FROM and ACROSS_END, and live before ACROSS_FROM.
Compute the set of registers set and used in the ACROSS range.
Compute an upper bound for the amount of insns moved, by finding the first insn in MERGE that sets a register in TEST_USE, or uses a register in TEST_SET. We also check for calls, trapping operations, and memory references.
We cannot move memory stores past each other, or move memory reads past stores, at least not without tracking them and calling true_dependence on every pair. If there is no other branch and no memory references or sets in the ACROSS range, we can move memory references freely, even volatile ones. Otherwise, the rules are as follows: volatile memory references and stores can't be moved at all, and any type of memory reference can't be moved if there are volatile accesses or stores in the ACROSS range. That leaves normal reads, which can be moved, as the trapping case is dealt with elsewhere.
Catch sets of the stack pointer.
We're only interested in uses which use a value live at the top, not one previously set in this block.
Now, lower this upper bound by also taking into account that a range of insns moved across ACROSS must not leave a register live at the end that will be clobbered in ACROSS. We need to find a point where TEST_SET & LIVE == 0. Insns in the MERGE range that set registers which are also set in the ACROSS range may still be moved as long as we also move later insns which use the results of the set, and make the register dead again. This is verified by the condition stated above. We only need to test it for registers that are set in the moved region. MERGE_LIVE is provided by the caller and holds live registers after TO.
We're not interested in registers that aren't set in the moved region at all.
For small register class machines, don't lengthen lifetimes of hard registers before reload.
void debug_df_chain | ( | struct df_link * | ) |
void debug_df_defno | ( | unsigned | int | ) |
void debug_df_insn | ( | rtx | ) |
void debug_df_ref | ( | df_ref | ) |
void debug_df_reg | ( | rtx | ) |
void debug_df_regno | ( | unsigned | int | ) |
void debug_df_useno | ( | unsigned | int | ) |
void df_add_problem | ( | struct df_problem * | ) |
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.c.
void df_analyze | ( | void | ) |
Analyze dataflow info for the basic blocks specified by the bitmap BLOCKS, or for the whole CFG if BLOCKS is zero.
These should be the same.
We need to do this before the df_verify_all because this is not kept incrementally up to date.
Make sure that we have pruned any unreachable blocks from these sets.
Skip over the DF_SCAN problem.
Referenced by compute_bb_for_insn(), copyprop_hardreg_forward(), dse_step4(), duplicate_computed_gotos(), mark_artificial_uses(), move_unallocated_pseudos(), and split_live_ranges_for_shrink_wrap().
void df_analyze_problem | ( | struct dataflow * | dflow, |
bitmap | blocks_to_consider, | ||
int * | postorder, | ||
int | n_blocks | ||
) |
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.
(Re)Allocate the datastructures necessary to solve the problem.
Set up the problem and compute the local information.
Solve the equations.
Massage the solution.
Referenced by fast_dce().
void df_bb_delete | ( | int | ) |
void df_bb_refs_record | ( | int | , |
bool | |||
) |
df_ref df_bb_regno_first_def_find | ( | basic_block | , |
unsigned | int | ||
) |
df_ref df_bb_regno_last_def_find | ( | basic_block | , |
unsigned | int | ||
) |
void df_bb_replace | ( | int | , |
basic_block | |||
) |
void df_chain_add_problem | ( | unsigned | int | ) |
Copy the du or ud chain starting at FROM_REF and attach it to TO_REF.
Functions defined in df-problems.c.
void df_chain_dump | ( | struct df_link * | , |
FILE * | |||
) |
void df_chain_unlink | ( | df_ref | ) |
int df_clear_flags | ( | int | ) |
void df_compact_blocks | ( | void | ) |
Called from the rtl_compact_blocks to reorganize the problems basic block info.
Need to reorganize the out_of_date_transfer_functions for the dflow problem.
Now shuffle the block info for the problem.
Copy the bb info from the problem tmps to the proper place in the block_info vector. Null out the copied item. The entry and exit blocks never move.
Shuffle the bits in the basic_block indexed arrays.
Referenced by unlink_block().
void df_compute_regs_ever_live | ( | bool | ) |
void df_dump | ( | FILE * | ) |
void df_dump_bottom | ( | basic_block | , |
FILE * | |||
) |
void df_dump_insn_bottom | ( | const_rtx | , |
FILE * | |||
) |
void df_dump_insn_top | ( | const_rtx | , |
FILE * | |||
) |
void df_dump_region | ( | FILE * | ) |
void df_dump_start | ( | FILE * | ) |
void df_dump_top | ( | basic_block | , |
FILE * | |||
) |
void df_finish_pass | ( | bool | ) |
|
inlinestatic |
Get basic block info. Get the artificial defs for a basic block.
Referenced by invalidate_memory(), and regstat_get_setjmp_crosses().
|
inlinestatic |
Get the artificial uses for a basic block.
Referenced by df_chain_create_bb_process_use(), df_chain_remove_problem(), prescan_insns_for_dce(), and regstat_get_setjmp_crosses().
bool df_get_bb_dirty | ( | basic_block | ) |
|
inlinestatic |
Get the live at in set for BB no matter what problem happens to be defined. This function is used by the register allocators who choose different dataflow problems depending on the optimization level.
Referenced by delete_allocno_from_bucket().
|
inlinestatic |
Get the live at out set for BB no matter what problem happens to be defined. This function is used by the register allocators who choose different dataflow problems depending on the optimization level.
Referenced by delete_allocno_from_bucket(), df_simulate_fixup_sets(), find_call_crossed_cheap_reg(), and regstat_get_setjmp_crosses().
int df_get_n_blocks | ( | enum | df_flow_dir | ) |
int* df_get_postorder | ( | enum | df_flow_dir | ) |
void df_grow_bb_info | ( | struct dataflow * | ) |
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 BASIC_BLOCK, bitmap_ior_into(), df_d::def_info, df, df_get_eh_block_artificial_uses(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_get_regular_block_artificial_uses(), df_record_entry_block_defs(), df_record_exit_block_uses(), DF_REF_ORDER_NO_TABLE, df_set_bb_dirty(), df_d::eh_block_artificial_uses, ENTRY_BLOCK, df_d::entry_block_defs, EXIT_BLOCK, df_d::exit_block_uses, FOR_EACH_BB, df_ref_info::ref_order, df_d::regular_block_artificial_uses, and df_d::use_info.
Referenced by df_get_call_refs().
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.
Referenced by df_ref_change_reg_with_loc_1().
void df_hard_reg_init | ( | void | ) |
Initialize some platform specific structures.
Record which registers will be eliminated. We use this in mark_used_regs.
References DF_REF_IS_REG_MARKED, DF_REF_REG_UNMARK, and gcc_assert.
unsigned int df_hard_reg_used_count | ( | unsigned | int | ) |
bool df_hard_reg_used_p | ( | unsigned | int | ) |
void df_insn_change_bb | ( | rtx | , |
basic_block | |||
) |
|
read |
void df_insn_debug_regno | ( | rtx | , |
FILE * | |||
) |
void df_insn_delete | ( | rtx | ) |
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.
void df_live_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
These will be initialized when df_scan_blocks processes each block.
References DF_REF_CHAIN, df_link::next, NULL, and df_link::ref.
|
staticread |
Referenced by df_live_bb_local_compute(), df_live_reset(), df_live_transfer_function(), and df_live_verify_solution_end().
void df_live_set_all_dirty | ( | void | ) |
Set all of the blocks as dirty. This needs to be done if this problem is added after all of the insns have been scanned.
void df_live_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
Make a copy of the transfer functions and then compute new ones to see if the transfer functions have changed.
If we do not have basic block info, the block must be in the list of dirty blocks or else some one has added a block behind our backs.
Make sure no one created a block without following procedures.
Make sure there are no dirty bits in blocks that have been deleted.
void df_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
These will be initialized when df_scan_blocks processes each block.
|
staticread |
void df_lr_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
Make a copy of the transfer functions and then compute new ones to see if the transfer functions have changed.
If we do not have basic block info, the block must be in the list of dirty blocks or else some one has added a block behind our backs.
Make sure no one created a block without following procedures.
Make sure there are no dirty bits in blocks that have been deleted.
References df_live_problem_data::in, df_live_problem_data::live_bitmaps, and df_live_problem_data::out.
void df_mark_solutions_dirty | ( | void | ) |
Mark the solutions as being out of date.
References bitmap_clear_bit(), basic_block_def::index, df_d::num_problems_defined, dataflow::out_of_date_transfer_functions, and df_d::problems_in_order.
Referenced by connect_dest(), and df_get_bb_info().
void df_maybe_reorganize_def_refs | ( | enum | df_ref_order | ) |
void df_maybe_reorganize_use_refs | ( | enum | df_ref_order | ) |
void df_md_add_problem | ( | void | ) |
Create a new MD instance and add it to the existing instance of DF.
|
staticread |
Referenced by df_md_alloc(), and single_def_use_dom_walker::single_def_use_dom_walker().
void df_md_simulate_artificial_defs_at_top | ( | basic_block | , |
bitmap | |||
) |
void df_md_simulate_one_insn | ( | basic_block | bb, |
rtx | insn, | ||
bitmap | local_md | ||
) |
Add the effect of the defs of INSN to the reaching definitions bitmap LOCAL_MD.
void df_note_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References bitmap_set_bit, DF_REF_FLAGS, and DF_REF_REGNO.
Referenced by compute_bb_for_insn(), dse_step4(), and split_live_ranges_for_shrink_wrap().
void df_notes_rescan | ( | rtx | ) |
void df_print_bb_index | ( | basic_block | bb, |
FILE * | file | ||
) |
void df_print_regset | ( | FILE * | file, |
bitmap | r | ||
) |
void df_print_word_regset | ( | FILE * | file, |
bitmap | r | ||
) |
void df_process_deferred_rescans | ( | void | ) |
Process all of the deferred rescans or deletions.
If someone changed regs_ever_live during this pass, fix up the entry and exit blocks.
void df_rd_add_problem | ( | void | ) |
Create a new RD instance and add it to the existing instance of DF.
|
staticread |
Referenced by df_chain_remove_problem().
void df_rd_simulate_artificial_defs_at_top | ( | basic_block | , |
bitmap | |||
) |
void df_rd_simulate_one_insn | ( | basic_block | bb, |
rtx | insn, | ||
bitmap | local_rd | ||
) |
Add the effect of the defs of INSN to the reaching definitions bitmap LOCAL_RD.
Referenced by df_chain_remove_problem().
void df_recompute_luids | ( | basic_block | ) |
void df_ref_change_reg_with_loc | ( | int | , |
int | , | ||
rtx | |||
) |
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.
You cannot hack artificial refs.
void df_ref_debug | ( | df_ref | , |
FILE * | |||
) |
void df_ref_remove | ( | df_ref | ) |
void df_regno_debug | ( | unsigned | int, |
FILE * | |||
) |
void df_regs_chain_dump | ( | df_ref | , |
FILE * | |||
) |
bool df_regs_ever_live_p | ( | unsigned | int | ) |
void df_remove_problem | ( | struct dataflow * | ) |
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_ref_info::begin, df_ref_info::count, df_d::def_info, df_d::def_regs, df, df_scan, df_d::eq_use_regs, max_reg_num(), df_d::regs_size, df_d::use_info, and df_d::use_regs.
void df_scan_blocks | ( | void | ) |
Rescan all of the block_to_analyze or all of the blocks in the function if df_set_blocks if blocks_to_analyze is NULL;
ENTRY and EXIT blocks have special defs/uses.
Regular blocks
Referenced by duplicate_computed_gotos().
|
staticread |
void df_scan_verify | ( | void | ) |
Return true if df_ref information for all insns in all blocks are correct and complete.
Verification is a 4 step process.
(1) All of the refs are marked by going through the reg chains.
(2) There are various bitmaps whose value may change over the course of the compilation. This step recomputes them to make sure that they have not slipped out of date.
Check artificial_uses bitmaps didn't change.
Verify entry block and exit block. These only verify the bitmaps, the refs are verified in df_bb_verify.
(3) All of the insns in all of the blocks are traversed and the marks are cleared both in the artificial refs attached to the blocks and the real refs inside the insns. It is a failure to clear a mark that has not been set as this means that the ref in the block or insn was not in the reg chain.
(4) See if all reg chains are traversed a second time. This time a check is made that the marks are clear. A set mark would be a from a reg that is not in any insn or basic block.
void df_set_bb_dirty | ( | basic_block | ) |
void df_set_blocks | ( | bitmap | ) |
int df_set_flags | ( | int | ) |
void df_set_regs_ever_live | ( | unsigned | int, |
bool | |||
) |
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 | ||
) |
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_d::num_problems_defined, df_d::problems_in_order, and dataflow::solutions_dirty.
void df_simulate_finalize_backwards | ( | basic_block | , |
bitmap | |||
) |
void df_simulate_initialize_backwards | ( | basic_block | , |
bitmap | |||
) |
void df_simulate_initialize_forwards | ( | basic_block | , |
bitmap | |||
) |
void df_simulate_one_insn_backwards | ( | basic_block | , |
rtx | , | ||
bitmap | |||
) |
void df_simulate_one_insn_forwards | ( | basic_block | , |
rtx | , | ||
bitmap | |||
) |
void df_update_entry_block_defs | ( | void | ) |
Update the defs in the entry block.
Referenced by df_get_exit_block_use_set().
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.
The call insns need to be rescanned because there may be changes in the set of registers clobbered across the call.
References gcc_assert.
void df_update_exit_block_uses | ( | void | ) |
Update the uses in the exit block.
Referenced by df_get_exit_block_use_set().
void df_verify | ( | void | ) |
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.
void df_word_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
These will be initialized when df_scan_blocks processes each block.
References bitmap_bit_p, DF_REF_FLAGS, DF_REF_IN_NOTE, DF_REF_LOC, DF_REF_REGNO, loc_mentioned_in_p(), and XEXP.
|
staticread |
Referenced by df_word_lr_bb_local_compute().
void df_word_lr_simulate_artificial_refs_at_end | ( | basic_block | , |
bitmap | |||
) |
void df_word_lr_simulate_artificial_refs_at_top | ( | basic_block | , |
bitmap | |||
) |
void df_worklist_dataflow | ( | struct dataflow * | dataflow, |
bitmap | blocks_to_consider, | ||
int * | blocks_in_postorder, | ||
int | n_blocks | ||
) |
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.
BBINDEX_TO_POSTORDER maps the bb->index to the reverse postorder.
Initialize the array to an out-of-bound value.
Initialize the considered map.
Initialize the mapping of block index to postorder.
Add all blocks to the worklist.
Initialize the problem.
Solve it.
Referenced by df_lr_confluence_0().
void simulate_backwards_to_point | ( | basic_block | , |
regset | , | ||
rtx | |||
) |
void union_defs | ( | df_ref | use, |
struct web_entry * | def_entry, | ||
unsigned int * | used, | ||
struct web_entry * | use_entry, | ||
bool(*)(struct web_entry *, struct web_entry *) | fun | ||
) |
For each use, all possible defs reaching it must come in the same register, union them. FUN is the function that does the union.
In USED, we keep the DF_REF_ID of the first uninitialized uses of a register, so that all uninitialized uses of the register can be combined into a single web. We actually offset it by 2, because the values 0 and 1 are reserved for use by entry_register.
An artificial use. It links up with nothing.
Union all occurrences of the same register in reg notes. Recognize trivial noop moves and attempt to keep them as noop.
UD chains of uninitialized REGs are empty. Keeping all uses of the same uninitialized REG in a single web is not necessary for correctness, since the uses are undefined, but it's wasteful to allocate one register or slot for each reference. Furthermore, creating new pseudos for uninitialized references in debug insns (see PR 42631) causes -fcompare-debug failures. We record the number of the first uninitialized reference we found, and merge with it any other uninitialized references to the same register.
A READ_WRITE use requires the corresponding def to be in the same register. Find it and union.
References DF_INSN_INFO_DEFS, DF_INSN_INFO_EQ_USES, df_insn_info::insn, and single_set.
struct df_d* df |
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 best_gain_for_invariant(), df_chain_finalize(), df_chain_remove_problem(), df_free_ref(), df_get_eh_block_artificial_uses(), df_grow_insn_info(), df_insn_rescan_debug_internal(), df_lr_confluence_0(), df_lr_init(), df_mw_compare(), df_record_entry_block_defs(), df_ref_chain_delete(), df_ref_change_reg_with_loc_1(), df_reorganize_refs_by_insn_bb(), df_scan_add_problem(), df_scan_free(), print_pred_bbs(), split_live_ranges_for_shrink_wrap(), and unlink_block().
bitmap_obstack df_bitmap_obstack |
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.c.
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_get_eh_block_artificial_uses(), df_insn_rescan_debug_internal(), and df_lr_verify_solution_end().