GCC Middle and Back End API Reference
|
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 |
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 |
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.
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.
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 |
enum df_flow_dir |
enum df_ref_class |
enum df_ref_flags |
enum df_ref_order |
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.
References bitmap_and_compl_into(), bitmap_and_into(), bitmap_copy(), bitmap_intersect_p(), df_simulate_defs(), df_simulate_find_defs(), df_simulate_find_uses(), df_simulate_initialize_backwards(), df_simulate_one_insn_backwards(), df_simulate_uses(), find_memory(), find_memory_stores(), for_each_rtx(), global_regs, may_trap_or_fault_p(), may_trap_p(), note_stores(), reg_obstack, reload_completed, sets_cc0_p(), targetm, and volatile_insn_p().
Referenced by dead_or_predicable(), and try_head_merge_bb().
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 * | ) |
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.
References df_d::analyze_subset, bitmap_and_into(), bitmap_bit_p(), bitmap_set_bit(), df_d::blocks_to_analyze, df_d::changeable_flags, df_analyze_problem(), df_compute_regs_ever_live(), DF_FORWARD, df_process_deferred_rescans(), df_prune_to_subcfg(), df_set_clean_cfg(), df_verify(), DF_VERIFY_SCHEDULED, df_problem::dir, dump_file, free(), inverted_post_order_compute(), df_d::n_blocks, df_d::n_blocks_inverted, df_d::num_problems_defined, post_order_compute(), df_d::postorder, df_d::postorder_inverted, dataflow::problem, df_d::problems_in_order, and dataflow::solutions_dirty.
Referenced by branch_target_load_optimize(), build_single_def_use_links(), copyprop_hardreg_forward(), cse_main(), do_reload(), execute_compare_elim_after_reload(), execute_rtl_cprop(), execute_rtl_hoist(), execute_rtl_pre(), execute_rtl_store_motion(), find_and_remove_re(), find_defs(), find_moveable_pseudos(), if_convert(), init_dce(), initialize_uninitialized_regs(), ira(), ira_build(), iv_analysis_loop_init(), move_loop_invariants(), one_cprop_pass(), optimize_mode_switching(), partition_hot_cold_basic_blocks(), peephole2_optimize(), reg_to_stack(), regmove_optimize(), regrename_optimize(), reorder_loops(), reorg_loops(), rest_of_handle_auto_inc_dec(), rest_of_handle_combine(), rest_of_handle_dse(), rest_of_handle_stack_adjustments(), rest_of_pass_free_cfg(), sched_init(), thread_prologue_and_epilogue_insns(), try_optimize_cfg(), and web_main().
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.
References df_problem::alloc_fun, dataflow::computed, df_problem::dataflow_fun, df_problem::finalize_fun, df_problem::local_compute_fun, dataflow::problem, timevar_pop(), timevar_push(), df_problem::tv_id, df_problem::verify_end_fun, and df_problem::verify_start_fun.
Referenced by df_analyze(), and 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.
References df_chain_create(), df_link::next, and df_link::ref.
void df_chain_dump | ( | struct df_link * | , |
FILE * | |||
) |
void df_chain_unlink | ( | df_ref | ) |
void df_check_cfg_clean | ( | void | ) |
This function compares the saved version of the cfg with the current cfg and aborts if the two are identical. The function silently returns if the cfg has been marked as dirty or the two are the same.
References df_compute_cfg_image(), free(), and saved_cfg.
int df_clear_flags | ( | int | ) |
void df_compact_blocks | ( | void | ) |
Called from the rtl_compact_blocks to reorganize the problems basic block info.
References bitmap_bit_p(), bitmap_clear(), bitmap_copy(), bitmap_set_bit(), dataflow::block_info, df_problem::block_info_elt_size, df_d::blocks_to_analyze, df_grow_bb_info(), df_set_bb_info(), df_set_clean_cfg(), free(), df_problem::free_bb_fun, basic_block_def::index, memcpy(), memset(), df_d::num_problems_defined, dataflow::out_of_date_transfer_functions, dataflow::problem, and df_d::problems_in_order.
Referenced by compact_blocks().
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.
References df_scan_bb_info::artificial_defs, and df_scan_get_bb_info().
Referenced by cse_extended_basic_block(), df_bb_verify(), df_chain_bb_dump(), df_chain_remove_problem(), df_live_bb_local_compute(), df_lr_bb_local_compute(), df_md_bb_local_compute(), df_md_simulate_artificial_defs_at_top(), df_note_bb_compute(), df_rd_bb_local_compute(), df_rd_simulate_artificial_defs_at_top(), df_reorganize_refs_by_insn_bb(), df_reorganize_refs_by_reg_by_insn(), df_simulate_finalize_backwards(), df_simulate_initialize_backwards(), df_simulate_initialize_forwards(), df_word_lr_bb_local_compute(), init_rename_info(), regstat_bb_compute_calls_crossed(), regstat_bb_compute_ri(), and single_def_use_enter_block().
|
inlinestatic |
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_bb_dump(), df_chain_create_bb(), df_chain_remove_problem(), df_lr_bb_local_compute(), df_note_bb_compute(), df_reorganize_refs_by_insn_bb(), df_reorganize_refs_by_reg_by_insn(), df_simulate_finalize_backwards(), df_simulate_initialize_backwards(), df_word_lr_bb_local_compute(), mark_artificial_uses(), regstat_bb_compute_calls_crossed(), regstat_bb_compute_ri(), and single_def_use_enter_block().
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 add_ranges_and_copies(), allocate_initial_values(), calculate_bb_reg_pressure(), check_live_1(), compute_defs_uses_and_gen(), create_bb_allocnos(), create_loop_allocnos(), cse_extended_basic_block(), dead_or_predicable(), df_md_local_compute(), df_md_transfer_function(), discover_loop(), discover_loops(), ebb_compute_jump_reg_dependencies(), find_comparisons_in_bb(), find_moveable_pseudos(), generate_edge_moves(), get_live_on_other_edges(), inherit_in_ebb(), init_rename_info(), initiate_bb_reg_pressure_info(), ira_loop_edge_freq(), lra_coalesce(), lra_inheritance(), model_start_schedule(), move_insn_for_shrink_wrap(), next_block_for_reg(), optimize_mode_switching(), process_bb_lives(), reg_dead_at_p(), regrename_analyze(), reload(), reload_combine(), remove_inheritance_pseudos(), scan_loop(), spill_pseudos(), thread_prologue_and_epilogue_insns(), update_ebb_live_info(), and update_live_1().
|
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 add_ranges_and_copies(), allocate_initial_values(), build_insn_chain(), calculate_bb_reg_pressure(), compute_defs_uses_and_gen(), copyprop_hardreg_forward(), create_loop_allocnos(), cse_extended_basic_block(), dead_or_predicable(), df_md_transfer_function(), df_note_bb_compute(), find_comparisons_in_bb(), find_moveable_pseudos(), generate_edge_moves(), inherit_in_ebb(), ira_loop_edge_freq(), lra_coalesce(), lra_inheritance(), move_insn_for_shrink_wrap(), optimize_mode_switching(), process_bb_lives(), process_bb_node_lives(), regno_clobbered_at_setjmp(), regrename_analyze(), regstat_bb_compute_calls_crossed(), regstat_bb_compute_ri(), remove_inheritance_pseudos(), simulate_backwards_to_point(), spill_pseudos(), and update_ebb_live_info().
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 df, get_max_uid(), df_d::insns, df_d::insns_size, and memset().
Referenced by df_insn_create_insn_record(), df_live_local_compute(), df_live_verify_transfer_functions(), df_recompute_luids(), and df_scan_alloc().
void df_grow_reg_info | ( | void | ) |
First, grow the reg_info information. If the current size is less than the number of pseudos, grow to 25% more than the number of pseudos. Second, assure that all of the slots up to max_reg_num have been filled with reg_info structures.
References df_ref_info::begin, df_ref_info::count, df_d::def_info, df_d::def_regs, df, df_d::eq_use_regs, max_reg_num(), memset(), pool_alloc(), df_scan_problem_data::reg_pool, df_d::regs_inited, df_d::regs_size, df_d::use_info, and df_d::use_regs.
Referenced by df_insn_delete(), df_insn_rescan(), df_notes_rescan(), df_ref_change_reg_with_loc(), df_ref_create(), df_scan_alloc(), and regstat_init_n_sets_and_refs().
void df_hard_reg_init | ( | void | ) |
Initialize some platform specific structures.
References elim_reg_set.
Referenced by rest_of_handle_df_initialize().
unsigned int df_hard_reg_used_count | ( | unsigned | int | ) |
bool df_hard_reg_used_p | ( | unsigned | int | ) |
void df_insn_change_bb | ( | rtx | , |
basic_block | |||
) |
|
read |
void df_insn_debug | ( | rtx | , |
bool | , | ||
FILE * | |||
) |
void df_insn_debug_regno | ( | rtx | , |
FILE * | |||
) |
void df_insn_delete | ( | rtx | ) |
bool df_insn_rescan | ( | 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.
References bitmap_clear(), bitmap_copy(), df_d::changeable_flags, df, df_bitmap_obstack, df_clear_flags(), DF_DEFER_INSN_RESCAN, df_insn_info_delete(), df_insn_rescan(), DF_NO_INSN_RESCAN, df_set_flags(), df_insn_info::insn, df_d::insns_to_delete, df_d::insns_to_notes_rescan, and df_d::insns_to_rescan.
bool df_insn_rescan_debug_internal | ( | rtx | ) |
void df_live_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References df_add_problem(), and df_bitmap_obstack.
Referenced by do_reload(), if_convert(), initialize_uninitialized_regs(), reorg_loops(), and rest_of_handle_df_initialize().
|
staticread |
void df_live_set_all_dirty | ( | void | ) |
Set all of the blocks as dirty. This needs to be done if this problem is added after all of the insns have been scanned.
References bitmap_set_bit(), and basic_block_def::index.
Referenced by do_reload(), if_convert(), initialize_uninitialized_regs(), and reorg_loops().
void df_live_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
References all_blocks, bitmap_bit_p(), bitmap_clear(), bitmap_copy(), bitmap_default_obstack, bitmap_equal_p(), bitmap_intersect_compl_p(), bitmap_set_bit(), df, df_grow_insn_info(), df_live_bb_local_compute(), df_live_get_bb_info(), df_scan_get_bb_info(), df_live_bb_info::gen, basic_block_def::index, and df_live_bb_info::kill.
Referenced by df_finish_pass(), and df_verify().
void df_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References df_add_problem(), and df_bitmap_obstack.
Referenced by rest_of_handle_df_initialize().
|
staticread |
Referenced by df_live_finalize(), df_live_init(), df_live_transfer_function(), df_lr_bb_local_compute(), df_lr_bottom_dump(), df_lr_confluence_0(), df_lr_confluence_n(), df_lr_init(), df_lr_local_compute(), df_lr_reset(), df_lr_top_dump(), df_lr_transfer_function(), df_lr_verify_transfer_functions(), df_rd_transfer_function(), and single_def_use_enter_block().
void df_lr_verify_transfer_functions | ( | void | ) |
Verify that all of the lr related info is consistent and correct.
References all_blocks, bitmap_bit_p(), bitmap_clear(), bitmap_copy(), bitmap_default_obstack, bitmap_equal_p(), bitmap_intersect_compl_p(), bitmap_set_bit(), df_lr_bb_info::def, df, df_lr_bb_local_compute(), df_lr_get_bb_info(), df_scan_get_bb_info(), basic_block_def::index, and df_lr_bb_info::use.
Referenced by df_finish_pass(), and df_verify().
void df_mark_solutions_dirty | ( | void | ) |
Mark the solutions as being out of date.
References df_d::num_problems_defined, df_d::problems_in_order, and dataflow::solutions_dirty.
Referenced by connect_dest(), connect_src(), df_bb_delete(), df_finish_pass(), df_set_bb_dirty(), df_set_blocks(), disconnect_dest(), disconnect_src(), force_nonfallthru_and_redirect(), and move_block_after_check().
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.
References df_add_problem().
Referenced by build_single_def_use_links().
|
staticread |
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.
References bitmap_clear_bit(), bitmap_set_bit(), df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, and DF_REF_PARTIAL.
void df_note_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References df_add_problem().
Referenced by build_single_def_use_links(), cse_main(), ira(), iv_analysis_loop_init(), peephole2_optimize(), reg_to_stack(), regmove_optimize(), regrename_optimize(), rest_of_handle_auto_inc_dec(), rest_of_handle_combine(), rest_of_handle_dse(), rest_of_handle_stack_adjustments(), rest_of_pass_free_cfg(), and sched_init().
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.
References bitmap_clear(), bitmap_copy(), df_d::changeable_flags, df, df_bitmap_obstack, df_clear_flags(), DF_DEFER_INSN_RESCAN, df_insn_info_delete(), df_insn_rescan(), DF_NO_INSN_RESCAN, df_notes_rescan(), df_set_flags(), df_update_entry_exit_and_calls(), dump_file, df_insn_info::insn, df_d::insns_to_delete, df_d::insns_to_notes_rescan, df_d::insns_to_rescan, and df_d::redo_entry_and_exit.
Referenced by df_analyze(), df_finish_pass(), find_defs(), and iv_analysis_loop_init().
void df_rd_add_problem | ( | void | ) |
Create a new RD instance and add it to the existing instance of DF.
References df_add_problem().
Referenced by sched_init().
|
staticread |
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.
References bitmap_clear_range(), bitmap_set_bit(), df_d::changeable_flags, df, DF_NO_HARD_REGS, DF_REF_CONDITIONAL, DF_REF_MAY_CLOBBER, DF_REF_MUST_CLOBBER, and DF_REF_PARTIAL.
Referenced by df_chain_create_bb().
bool df_read_modify_subreg_p | ( | rtx | ) |
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.
References df_grow_reg_info(), DF_REF_BASE, df_ref_create_structure(), and DF_REF_REGULAR.
void df_ref_debug | ( | df_ref | , |
FILE * | |||
) |
void df_ref_remove | ( | df_ref | ) |
void df_refs_chain_dump | ( | df_ref * | , |
bool | , | ||
FILE * | |||
) |
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_add_problem().
Referenced by rest_of_handle_df_initialize().
void df_scan_alloc | ( | bitmap | ) |
Functions defined in df-scan.c.
void df_scan_blocks | ( | void | ) |
Rescan all of the block_to_analyze or all of the blocks in the function if df_set_blocks if blocks_to_analyze is NULL;
References bitmap_ior_into(), df_d::def_info, df, df_bb_refs_record(), df_get_eh_block_artificial_uses(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_get_regular_block_artificial_uses(), df_record_entry_block_defs(), df_record_exit_block_uses(), DF_REF_ORDER_NO_TABLE, df_set_bb_dirty(), df_d::eh_block_artificial_uses, df_d::entry_block_defs, df_d::exit_block_uses, basic_block_def::index, df_ref_info::ref_order, df_d::regular_block_artificial_uses, and df_d::use_info.
Referenced by do_reload(), partition_hot_cold_basic_blocks(), and rest_of_handle_df_initialize().
|
staticread |
Referenced by df_bb_verify(), df_get_artificial_defs(), df_get_artificial_uses(), df_live_verify_transfer_functions(), df_lr_verify_transfer_functions(), df_ref_remove(), df_refs_add_to_chains(), df_scan_alloc(), df_scan_free_bb_info(), df_scan_free_internal(), df_scan_start_block(), df_update_entry_block_defs(), and df_update_exit_block_uses().
void df_scan_verify | ( | void | ) |
Return true if df_ref information for all insns in all blocks are correct and complete.
References bitmap_clear(), bitmap_equal_p(), bitmap_ior_into(), df, df_bb_verify(), df_bitmap_obstack, df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_get_eh_block_artificial_uses(), df_get_regular_block_artificial_uses(), df_reg_chain_mark(), df_reg_chain_verify_unmarked(), df_d::eh_block_artificial_uses, and df_d::regular_block_artificial_uses.
Referenced by df_verify().
void df_set_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_problem::con_fun_0, df_problem::con_fun_n, df_worklist_dataflow(), df_problem::dir, df_problem::init_fun, memset(), dataflow::problem, df_problem::trans_fun, user_dflow, and user_problem.
Referenced by dse_step4().
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.
References df_scan_bb_info::artificial_defs, bitmap_clear(), bitmap_copy(), bitmap_equal_p(), changed, df, df_bitmap_obstack, df_get_entry_block_def_set(), df_record_entry_block_defs(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_get_bb_info(), df_set_bb_dirty(), df_d::entry_block_defs, refs, and df_scan_problem_data::reg_bitmaps.
Referenced by df_update_entry_exit_and_calls().
void df_update_entry_exit_and_calls | ( | void | ) |
Recompute the parts of scanning that are based on regs_ever_live because something changed in that array.
References df_insn_rescan(), df_update_entry_block_defs(), and df_update_exit_block_uses().
Referenced by df_compute_regs_ever_live(), df_process_deferred_rescans(), and thread_prologue_and_epilogue_insns().
void df_update_exit_block_uses | ( | void | ) |
Update the uses in the exit block.
References df_scan_bb_info::artificial_uses, bitmap_clear(), bitmap_copy(), bitmap_equal_p(), changed, df, df_bitmap_obstack, df_get_exit_block_use_set(), df_record_exit_block_uses(), df_ref_chain_delete(), df_ref_chain_delete_du_chain(), df_scan_get_bb_info(), df_set_bb_dirty(), df_d::exit_block_uses, refs, and df_scan_problem_data::reg_bitmaps.
Referenced by df_update_entry_exit_and_calls(), and notice_stack_pointer_modification().
void df_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.
References df_live_verify_transfer_functions(), df_lr_verify_transfer_functions(), and df_scan_verify().
Referenced by df_analyze().
void df_word_lr_add_problem | ( | void | ) |
Create a new DATAFLOW instance and add it to an existing instance of DF. The returned structure is what is used to get at the solution.
References df_add_problem(), and df_bitmap_obstack.
Referenced by run_word_dce().
|
staticread |
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.
References bitmap_clear(), bitmap_set_bit(), DF_NONE, df_worklist_dataflow_doublequeue(), df_problem::dir, free(), df_problem::init_fun, dataflow::problem, sbitmap_alloc(), and sbitmap_free().
Referenced by df_lr_finalize(), and df_simple_dataflow().
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.
References DF_REF_READ_WRITE, df_insn_info::insn, df_link::next, and df_link::ref.
Referenced by web_main().
Referenced by entry_register(), and unionfind_union().
Referenced by web_main().
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 compact_blocks(), create_task_copyfn(), decompose_multiword_subregs(), df_add_refs_to_table(), df_bb_refs_collect(), df_bb_refs_record(), 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_compute_regs_ever_live(), df_count_refs(), df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_get_call_refs(), 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_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_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_regs_ever_live(), df_simulate_fixup_sets(), df_update_entry_block_defs(), df_update_exit_block_uses(), df_word_lr_local_compute(), dump_reg_info(), fast_dce(), find_invariants_to_move(), ira(), latch_dominating_def(), notice_stack_pointer_modification(), print_rtl_with_bb(), reginfo_init(), remove_edge_and_dominated_blocks(), remove_reg_equal_equiv_notes_for_regno(), and rtl_dump_bb().
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_chain_add_problem(), df_entry_block_bitmap_verify(), df_exit_block_bitmap_verify(), df_insn_rescan_all(), df_live_add_problem(), df_lr_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_update_entry_block_defs(), df_update_exit_block_uses(), df_word_lr_add_problem(), regstat_compute_calls_crossed(), and regstat_compute_ri().