GCC Middle and Back End API Reference
|
Data Structures | |
struct | bblst |
struct | candidate |
struct | edgelst |
Typedefs | |
typedef sbitmap | edgeset |
Referenced by compute_block_dependences().
|
static |
Add dependences so that branches are scheduled to run last in their block.
References add_dependence(), bitmap_bit_p(), bitmap_set_bit(), can_throw_internal(), last, prev_nonnote_insn(), reload_completed, sched_insns_conditions_mutex_p(), sd_find_dep_between(), sets_cc0_p(), sets_likely_spilled(), haifa_sched_info::tail, and targetm.
|
static |
|
static |
Return next block in ebb chain. For parameter meaning please refer to sched-int.h: struct sched_info: advance_target_bb.
References basic_block_def::index, basic_block_def::next_bb, and target_bb.
|
static |
True when a bb with index BB_INDEX contained in region RGN.
References current_blocks, rgn_bb_table, and region::rgn_nr_blocks.
Referenced by dump_region_dot().
|
static |
|
static |
Updates counter and other information. Split from can_schedule_ready_p () because when we schedule insn speculatively then insn passed to can_schedule_ready_p () differs from the one passed to begin_schedule_ready ().
References check_live(), nr_inter, nr_spec, sched_n_insns, sched_target_n_insns, set_spec_fed(), target_bb, and update_live().
|
static |
|
static |
Called after taking INSN from the ready list. Returns nonzero if this insn can be scheduled, nonzero if we should silently discard it.
References check_live(), and target_bb.
|
static |
Return 1 if insn can be speculatively moved from block src to trg, otherwise return 0. Called before first insertion of insn to ready-list or before the scheduling.
References check_live_1(), and SET.
Referenced by begin_schedule_ready(), can_schedule_ready_p(), and new_ready().
|
static |
Speculative scheduling functions.
Referenced by check_live(), and check_live_1().
|
static |
Return 0 if x is a set of a register alive in the beginning of one of the split-blocks of src, otherwise return 1.
References bitmap_bit_p(), check_live_1(), df_get_live_in(), bblst::first_member, global_regs, basic_block_def::index, bblst::nr_members, and candidate::split_bbs.
|
static |
Referenced by sched_rgn_compute_dependencies().
|
static |
Compute dependences inside bb. In a multiple blocks region: (1) a bb is analyzed after its predecessors, and (2) the lists in effect at the end of bb (after analyzing for bb) are inherited by bb's successors. Specifically for reg-reg data dependences, the block insns are scanned by sched_analyze () top-to-bottom. Three lists are maintained by sched_analyze (): reg_last[].sets for register DEFs, reg_last[].implicit_sets for implicit hard register DEFs, and reg_last[].uses for register USEs. When analysis is completed for bb, we update for its successors: ; - DEFS[succ] = Union (DEFS [succ], DEFS [bb]) ; - IMPLICIT_DEFS[succ] = Union (IMPLICIT_DEFS [succ], IMPLICIT_DEFS [bb]) ; - USES[succ] = Union (USES [succ], DEFS [bb]) The mechanism for computing mem-mem data dependence is very similar, and the result is interblock dependences in the region.
References add_branch_dependences(), current_nr_blocks, free_deps(), get_ebb_head_tail(), propagate_deps(), sched_analyze(), sel_sched_p(), and targetm.
|
static |
Functions for regions scheduling information.
Compute dominators, probability, and potential-split-edges of bb. Assume that these values were already computed for bb's predecessors.
References bitmap_and(), bitmap_and_compl(), bitmap_ior(), bitmap_ones(), bitmap_set_bit(), combine_probabilities(), current_blocks, ebb_head, basic_block_def::index, prob, edge_def::probability, sched_dump, sched_verbose, edge_def::src, and basic_block_def::succs.
Referenced by sched_rgn_local_init().
INSN is a JUMP_INSN. Store the set of registers that must be considered as used by this jump in USED.
void compute_priorities | ( | void | ) |
Compute insn priority for a current region.
References current_nr_blocks, current_sched_info, get_ebb_head_tail(), no_real_insns_p(), rgn_n_insns, haifa_sched_info::sched_max_insns_priority, and set_priorities().
Referenced by schedule_region(), and sel_compute_priorities().
|
static |
Referenced by init_ready_list().
|
static |
Find the valid candidate-source-blocks for the target block TRG, compute their probability, and check if they are speculative or not. For speculative sources, compute their update-blocks and split-blocks.
References bblst_last, bblst_size, bitmap_bit_p(), bitmap_clear(), bitmap_set_bit(), current_nr_blocks, edge_def::dest, edgelst_last, bblst::first_member, edgelst::first_member, basic_block_def::index, candidate::is_speculative, candidate::is_valid, min_spec_prob, bblst::nr_members, edgelst::nr_members, prob, rgn_nr_edges, sbitmap_alloc(), sbitmap_free(), candidate::split_bbs, split_edges(), edge_def::src, candidate::src_prob, basic_block_def::succs, target_bb, candidate::update_bbs, and visited.
|
static |
References alloc_EXPR_LIST(), and alloc_INSN_LIST().
Referenced by deps_join().
int contributes_to_priority | ( | ) |
NEXT is an instruction that depends on INSN (a backward dependence); return nonzero if we should include this dependence in priority calculations.
void debug_candidate | ( | int | ) |
Referenced by debug_candidates().
DEBUG_FUNCTION void debug_candidate | ( | ) |
Print candidates info, for debugging purposes. Callable from debugger.
References bblst::first_member, basic_block_def::index, bblst::nr_members, sched_dump, candidate::split_bbs, and candidate::update_bbs.
void debug_candidates | ( | int | ) |
DEBUG_FUNCTION void debug_candidates | ( | ) |
Print candidates info, for debugging purposes. Callable from debugger.
References current_nr_blocks, debug_candidate(), and sched_dump.
Print dependencies information for instructions between HEAD and TAIL. ??? This function would probably fit best in haifa-sched.c.
References insn_cost(), recog_memoized(), sched_dump, sched_emulate_haifa_p, sd_lists_size(), and sel_sched_p().
Referenced by debug_ebb_dependencies(), and debug_rgn_dependencies().
DEBUG_FUNCTION void debug_region | ( | ) |
Print the region's basic blocks.
References current_blocks, dump_bb(), rgn_bb_table, and region::rgn_nr_blocks.
DEBUG_FUNCTION void debug_regions | ( | void | ) |
Functions for the construction of regions.
Print the regions, for debugging purposes. Callable from debugger.
References current_blocks, nr_regions, rgn_bb_table, region::rgn_nr_blocks, and sched_dump.
Referenced by sched_rgn_init().
DEBUG_FUNCTION void debug_rgn_dependencies | ( | ) |
Print dependences for debugging starting from FROM_BB. Callable from debugger.
Print dependences for debugging starting from FROM_BB. Callable from debugger.
References current_nr_blocks, debug_dependencies(), get_ebb_head_tail(), and sched_dump.
void deps_join | ( | ) |
Join PRED_DEPS to the SUCC_DEPS.
References deps_reg::clobbers, deps_reg::clobbers_length, concat_INSN_LIST(), concat_insn_mem_list(), deps_reg::implicit_sets, deps_desc::last_function_call, deps_desc::last_function_call_may_noreturn, deps_desc::last_pending_memory_flush, deps_desc::pending_flush_length, deps_desc::pending_jump_insns, deps_desc::pending_read_insns, deps_desc::pending_read_list_length, deps_desc::pending_read_mems, deps_desc::pending_write_insns, deps_desc::pending_write_list_length, deps_desc::pending_write_mems, deps_desc::reg_last, deps_desc::reg_last_in_use, deps_desc::sched_before_next_call, deps_reg::sets, deps_reg::uses, and deps_reg::uses_length.
void dump_region_dot | ( | ) |
Dump region RGN to file F using dot syntax.
References bb_in_region_p(), current_blocks, edge_def::dest, basic_block_def::index, rgn_bb_table, region::rgn_nr_blocks, and basic_block_def::succs.
void dump_region_dot_file | ( | ) |
The same, but first open a file specified by FNAME.
References dump_region_dot().
void extend_regions | ( | void | ) |
Extend internal data structures.
References block_to_bb, containing_rgn, and rgn_bb_table.
Referenced by rgn_add_block(), and sched_rgn_init().
void extend_rgns | ( | ) |
Extend regions. DEGREE - Array of incoming edge count, considering only the edges, that don't have their sources in formed regions yet. IDXP - pointer to the next available index in rgn_bb_table. HEADER - set of all region heads. LOOP_HDR - mapping from block to the containing loop (two blocks can reside within one region if they have the same loop header).
References bitmap_bit_p(), bitmap_set_bit(), edge_def::dest, free(), gather_region_statistics(), basic_block_def::index, nr_regions, order, post_order_compute(), print_region_statistics(), rgn_bb_table, sched_dump, sched_verbose, edge_def::src, and too_large().
Referenced by split_edges().
|
static |
Extract list of edges from a bitmap containing EDGE_TO_BIT bits.
References edgelst_last, edgelst::first_member, and edgelst::nr_members.
|
static |
Referenced by find_conditional_protection(), and is_conditionally_protected().
|
static |
@verbatim On the path from the insn to load_insn_bb, find a conditional
branch depending on insn, that guards the speculative load.
References find_conditional_protection().
|
static |
Wrapper function. If FLAG_SEL_SCHED_PIPELINING is set, then use custom function to form regions. Otherwise just call find_rgns_haifa.
References haifa_find_rgns(), sel_find_rgns(), and sel_sched_p().
Referenced by sched_rgn_init().
|
static |
Referenced by sched_rgn_init().
|
static |
Build a single block region for each basic block in the function. This allows for using the same code for interblock and basic block scheduling.
References find_fallthru_edge(), basic_block_def::index, basic_block_def::next_bb, nr_regions, edge_def::probability, probability_cutoff, profile_info, rgn_bb_table, and basic_block_def::succs.
|
static |
Free the arrays of DFA states at the end of each basic block.
References bb_state_array, and free().
Referenced by sched_rgn_finish().
|
static |
Free dependencies of instructions inside BB.
References get_ebb_head_tail(), no_real_insns_p(), and sched_free_deps().
Referenced by schedule_region().
|
static |
Remove all INSN_LISTs and EXPR_LISTs from the pending lists and add them to the unused_*_list variables, so that they can be reused.
References current_nr_blocks, free_EXPR_LIST_list(), free_INSN_LIST_list(), deps_desc::pending_jump_insns, deps_desc::pending_read_insns, deps_desc::pending_read_mems, deps_desc::pending_write_insns, and deps_desc::pending_write_mems.
Referenced by sched_rgn_compute_dependencies().
void free_rgn_deps | ( | void | ) |
Free all region dependencies saved in INSN_BACK_DEPS and INSN_RESOLVED_BACK_DEPS. The Haifa scheduler does this on the fly when scheduling, so this function is supposed to be called from the selective scheduling only.
References current_nr_blocks, get_ebb_head_tail(), and sched_free_deps().
Referenced by sel_compute_priorities().
|
static |
|
static |
References dbg_cnt().
|
static |
Referenced by extend_rgns().
|
static |
Calculate the histogram that shows the number of regions having the given number of basic blocks, and store it in the RSP array. Return the size of this array.
References nr_regions.
int get_rgn_sched_max_insns_priority | ( | void | ) |
Returns maximum priority that an insn was assigned to.
References rgn_sched_info, and haifa_sched_info::sched_max_insns_priority.
|
static |
Find regions for interblock scheduling. A region for scheduling can be: * A loop-free procedure, or * A reducible inner loop, or * A basic block not contained in any other region. ?!? In theory we could build other regions based on extended basic blocks or reverse extended basic blocks. Is it worth the trouble? Loop blocks that form a region are put into the region's block list in topological order. This procedure stores its results into the following global (ick) variables * rgn_nr * rgn_table * rgn_bb_table * block_to_bb * containing region We use dominator relationships to avoid making regions out of non-reducible loops. This procedure needs to be converted to work on pred/succ lists instead of edge tables. That would simplify it somewhat.
References edge_def::aux, bitmap_bit_p(), bitmap_clear(), bitmap_clear_bit(), bitmap_ior(), bitmap_ones(), bitmap_set_bit(), CDI_DOMINATORS, common_sched_info, count, edge_def::dest, dominated_by_p(), ei_edge(), ei_next(), common_sched_info_def::estimate_number_of_insns, extend_rgns(), free(), basic_block_def::index, memcpy(), nr_regions, basic_block_def::preds, queue, rgn_bb_table, sbitmap_alloc(), sbitmap_free(), single_succ(), single_succ_p(), edge_def::src, stack, basic_block_def::succs, and too_large().
Referenced by find_rgns().
|
static |
Implementations of the sched_info functions for region scheduling.
Add all insns that are initially ready to the ready list READY. Called once before scheduling a set of insns.
References compute_trg_info(), current_nr_blocks, current_sched_info, debug_rgn_dependencies(), get_ebb_head_tail(), _sd_iterator::insn, haifa_sched_info::next_tail, haifa_sched_info::prev_head, sched_n_insns, sched_target_n_insns, sched_verbose, target_bb, target_n_insns, and try_ready().
|
static |
Functions for construction of the control flow graph.
Return 1 if control flow graph should not be constructed, 0 otherwise. We decide not to build the control flow graph if there is possibly more than one entry to the function, if computed branches exist, if we have nonlocal gotos, or if we have an unreachable loop.
References computed_jump_p(), current_function_has_exception_handlers(), dead_or_set_p(), find_reg_note(), _sd_iterator::insn, next_nonnote_insn(), basic_block_def::preds, single_pred(), and single_pred_p().
Referenced by sched_rgn_init().
|
static |
Referenced by is_conditionally_protected(), and is_prisky().
|
static |
Returns 1 if the same insn1 that participates in the computation of load_insn's address is feeding a conditional branch that is guarding on load_insn. This is true if we find two DEF-USE chains: insn1 -> ... -> conditional-branch insn1 -> ... -> load_insn, and if a flow path exists: insn1 -> ... -> conditional-branch -> ... -> load_insn, and if insn1 is on the path region-entry -> ... -> bb_trg -> ... load_insn. Locate insn1 by climbing on INSN_BACK_DEPS from load_insn. Locate the branch by following INSN_FORW_DEPS from insn1.
References find_conditional_protection(), and is_conditionally_protected().
|
static |
Referenced by new_ready().
|
static |
Insn is a candidate to be moved speculatively from bb_src to bb_trg. Return 1 if insn is exception-free (and the motion is valid) and 0 otherwise.
References haifa_classify_insn(), IFREE, IRISKY, is_pfree(), is_prisky(), PFREE_CANDIDATE, PRISKY_CANDIDATE, TRAP_FREE, and TRAP_RISKY.
|
static |
Referenced by is_exception_free().
|
static |
Returns 1 if a clue for "similar load" 'insn2' is found, and hence load_insn can move speculatively from bb_src to bb_trg. All the following must hold: (1) both loads have 1 base register (PFREE_CANDIDATEs). (2) load_insn and load1 have a def-use dependence upon the same insn 'insn1'. (3) either load2 is in bb_trg, or: - there's only one split-block, and - load1 is on the escape path, and From all these we can conclude that the two loads access memory addresses that differ at most by a constant, and hence if moving load_insn would cause an exception, it would have been caused by load2 anyhow.
References bblst::first_member, haifa_classify_insn(), bblst::nr_members, PFREE_CANDIDATE, and candidate::split_bbs.
|
static |
Referenced by is_exception_free().
|
static |
Return 1 if load_insn is prisky (i.e. if load_insn is fed by a load moved speculatively, or if load_insn is protected by a compare on load_insn's address).
References is_conditionally_protected(), and sd_lists_empty_p().
rtl_opt_pass* make_pass_sched | ( | ) |
rtl_opt_pass* make_pass_sched2 | ( | ) |
|
static |
Called after INSN has all its hard dependencies resolved and the speculation of type TS is enough to overcome them all. Return nonzero if it should be moved to the ready list or the queue, or zero if we should silently discard it.
References check_live(), curr_state, sched_deps_info_def::generate_spec_deps, is_exception_free(), spec_info_def::mask, recog_memoized(), sched_deps_info, sched_insn_is_legitimate_for_speculation_p(), set_dep_weak(), spec_info, and target_bb.
|
static |
Referenced by extend_rgns().
|
static |
Print regions statistics. S1 and S2 denote the data before and after calling extend_rgns, respectively.
References sched_dump.
|
static |
Referenced by compute_block_dependences().
|
static |
After computing the dependencies for block BB, propagate the dependencies found in TMP_DEPS to the successors of the block.
References deps_join(), edge_def::dest, basic_block_def::index, deps_desc::pending_jump_insns, deps_desc::pending_read_insns, deps_desc::pending_read_mems, deps_desc::pending_write_insns, deps_desc::pending_write_mems, and basic_block_def::succs.
|
static |
(Re-)initialize the arrays of DFA states at the end of each basic block. SAVED_LAST_BASIC_BLOCK is the previous length of the arrays. It must be zero for the first call to this function, to allocate the arrays for the first time. This function is called once during initialization of the scheduler, and called again to resize the arrays if new basic blocks have been created, for example for speculation recovery code.
References bb_state_array, dfa_state_size, and sel_sched_p().
Referenced by sched_rgn_init(), and schedule_region().
|
static |
Run instruction scheduler.
References maybe_skip_selective_scheduling(), run_selective_scheduling(), and schedule_insns().
|
static |
Run second scheduling pass after reload.
References maybe_skip_selective_scheduling(), run_selective_scheduling(), schedule_ebbs(), and schedule_insns().
|
static |
Referenced by rgn_setup_common_sched_info().
|
static |
BB was added to ebb after AFTER.
References bitmap_set_bit(), current_nr_blocks, ebb_head, extend_regions(), basic_block_def::index, nr_regions, rgn_bb_table, and rgn_make_new_region_out_of_new_block().
|
static |
Functions for speculative scheduling.
|
static |
INSN has been added to/removed from current region.
References rgn_n_insns, target_bb, and target_n_insns.
|
static |
Estimate number of the insns in the BB.
References count, and _sd_iterator::insn.
Referenced by rgn_setup_common_sched_info().
|
static |
Referenced by rgn_setup_common_sched_info().
|
static |
Fix internal data after interblock movement of jump instruction. For parameter meaning please refer to sched-int.h: struct sched_info: fix_recovery_cfg.
References ebb_head, and rgn_bb_table.
|
static |
Return true if scheduling INSN will trigger finish of scheduling current block.
References sched_target_n_insns, target_bb, and target_n_insns.
void rgn_make_new_region_out_of_new_block | ( | ) |
References basic_block_def::index, nr_regions, and rgn_bb_table.
|
static |
|
static |
Return a string that contains the insn uid and optionally anything else necessary to identify this insn in an output. It's valid to use a static buffer for this. The ALIGNED parameter should cause the string to be formatted so that multiple output lines will line up nicely.
References current_nr_blocks, and target_bb.
|
static |
Compare priority of two insns. Return a positive number if the second insn is to be preferred for scheduling, and a negative one if the first is to be preferred. Zero if they are equally good.
References target_bb.
void rgn_setup_common_sched_info | ( | void | ) |
Setup scheduler infos.
References common_sched_info_def::add_block, common_sched_info, common_sched_info_def::estimate_number_of_insns, common_sched_info_def::fix_recovery_cfg, haifa_common_sched_info, memcpy(), rgn_add_block(), rgn_common_sched_info, rgn_estimate_number_of_insns(), rgn_fix_recovery_cfg(), common_sched_info_def::sched_pass_id, and SCHED_RGN_PASS.
Referenced by schedule_insns().
void rgn_setup_region | ( | ) |
Setup global variables like CURRENT_BLOCKS and CURRENT_NR_BLOCK to point to the region RGN.
References current_blocks, current_nr_blocks, and ebb_head.
void rgn_setup_sched_infos | ( | void | ) |
Setup all *_sched_info structures (for the Haifa frontend and for the dependence analysis) in the interblock scheduler.
References current_sched_info, memcpy(), rgn_sched_deps_info, rgn_sched_info, sched_deps_info, and sel_sched_p().
Referenced by schedule_insns(), and sel_region_init().
bool sched_is_disabled_for_current_region_p | ( | void | ) |
Returns true if all the basic blocks of the current region have NOTE_DISABLE_SCHED_OF_BLOCK which means not to schedule that region.
References current_nr_blocks.
Referenced by schedule_region(), and sel_sched_region().
void sched_rgn_compute_dependencies | ( | ) |
Compute instruction dependencies in region RGN.
References bitmap_clear(), compute_block_dependences(), current_nr_blocks, finish_deps_global(), free(), free_pending_lists(), init_deps(), init_deps_global(), sbitmap_alloc(), sbitmap_free(), sched_emulate_haifa_p, sched_max_luid, and sel_sched_p().
void sched_rgn_finish | ( | void | ) |
Free data structures for region scheduling.
References block_to_bb, containing_rgn, ebb_head, free(), free_bb_state_array(), nr_inter, nr_regions, nr_spec, reload_completed, reposition_prologue_and_epilogue_notes(), rgn_bb_table, sched_dump, and sched_verbose.
Referenced by schedule_insns(), and sel_global_finish().
void sched_rgn_init | ( | ) |
Initialize data structures for region scheduling.
References calculate_dominance_info(), CDI_DOMINATORS, debug_regions(), extend_regions(), find_rgns(), find_single_block_region(), free_dominance_info(), is_cfg_nonregular(), min_spec_prob, nr_inter, nr_regions, nr_spec, realloc_bb_state_array(), sched_verbose, and sel_sched_p().
void sched_rgn_local_finish | ( | void | ) |
Free data computed for the finished region.
References current_nr_blocks, sched_rgn_local_free(), and sel_sched_p().
Referenced by schedule_region().
void sched_rgn_local_free | ( | void | ) |
Free data computed for the finished region.
References free(), prob, and sbitmap_vector_free().
Referenced by sched_rgn_local_finish().
void sched_rgn_local_init | ( | ) |
Init region data structures. Returns true if this region should not be scheduled.
References edge_def::aux, bitmap_vector_clear(), compute_dom_prob_ps(), current_nr_blocks, basic_block_def::index, prob, rgn_nr_edges, sbitmap_vector_alloc(), and basic_block_def::succs.
void schedule_insns | ( | void | ) |
The one entry point in this file.
References bitmap_clear(), dbg_cnt(), haifa_sched_finish(), haifa_sched_init(), nr_regions, reload_completed, rgn_setup_common_sched_info(), rgn_setup_sched_infos(), sched_rgn_finish(), sched_rgn_init(), and schedule_region().
|
static |
Return nonzero if there are more insns that should be scheduled.
References sched_target_n_insns, and target_n_insns.
|
static |
Referenced by schedule_insns().
|
static |
Schedule a region. A region is either an inner loop, a loop-free subroutine, or a single basic block. Each bb in the region is scheduled after its flow predecessors.
References compute_priorities(), curr_bb, curr_state, current_nr_blocks, current_sched_info, dbg_cnt(), deps_pools_are_empty_p(), edge_def::dest, dfa_state_size, find_fallthru_edge(), free_block_dependencies(), free_trg_info(), get_ebb_head_tail(), haifa_recovery_bb_ever_added_p, basic_block_def::index, last_bb, memcpy(), haifa_sched_info::next_tail, no_real_insns_p(), haifa_sched_info::prev_head, edge_def::probability, haifa_sched_info::queue_must_finish_empty, realloc_bb_state_array(), remove_notes(), rgn_n_insns, rgn_setup_region(), sched_dump, sched_extend_ready_list(), sched_finish_ready_list(), sched_init_region_reg_pressure_info(), sched_is_disabled_for_current_region_p(), sched_n_insns, sched_pressure, SCHED_PRESSURE_WEIGHTED, sched_rgn_compute_dependencies(), sched_rgn_local_finish(), sched_rgn_local_init(), sched_rgn_n_insns, sched_setup_bb_reg_pressure_info(), sched_verbose, schedule_block(), edge_def::src, basic_block_def::succs, target_bb, and unlink_bb_notes().
|
static |
Turns on the fed_by_spec_load flag for insns fed by load_insn.
Referenced by begin_schedule_ready().
|
static |
Referenced by add_branch_dependences().
|
static |
Determine if PAT sets a TARGET_CLASS_LIKELY_SPILLED_P register.
References note_stores(), and sets_likely_spilled_1().
Referenced by sets_likely_spilled().
|
static |
Target info functions.
Referenced by compute_trg_info().
|
static |
Functions for target info.
Compute in BL the list of split-edges of bb_src relatively to bb_trg. Note that bb_trg dominates bb_src.
References bitmap_and_compl(), bitmap_copy(), extract_edgelst(), sbitmap_alloc(), and sbitmap_free().
|
static |
Referenced by extend_rgns(), and haifa_find_rgns().
|
static |
Update number of blocks and the estimate for number of insns in the region. Return true if the region is "too large" for interblock scheduling (compile time considerations).
References common_sched_info, and common_sched_info_def::estimate_number_of_insns.
|
static |
Update the live registers info after insn was moved speculatively from block src to trg.
References SET, and update_live_1().
Referenced by begin_schedule_ready().
|
static |
Referenced by update_live(), and update_live_1().
|
static |
If x is a set of a register R, mark that R is alive in the beginning of every update-block of src.
References bitmap_set_bit(), bitmap_set_range(), df_get_live_in(), bblst::first_member, global_regs, bblst::nr_members, candidate::update_bbs, and update_live_1().
|
static |
For every bb, a set of its ancestor edges.
|
static |
Data structures for the computation of data dependences in a regions. We keep one `deps' structure for every basic block. Before analyzing the data dependences for a bb, its variables are initialized as a function of the variables of its predecessors. When the analysis for a bb completes, we save the contents to the corresponding bb_deps[bb] variable.
|
static |
Referenced by print_rtl_with_bb().
|
static |
Arrays that hold the DFA state at the end of a basic block, to re-use as the initial state at the start of successor blocks. The BB_STATE array holds the actual DFA state, and BB_STATE_ARRAY[I] is a pointer into BB_STATE for basic block I. FIXME: This should be a vec.
Referenced by free_bb_state_array(), and realloc_bb_state_array().
|
static |
Referenced by compute_trg_info().
|
static |
Referenced by compute_trg_info().
|
static |
A speculative motion requires checking live information on the path from 'source' to 'target'. The split blocks are those to be checked. After a speculative motion, live information should be modified in the 'update' blocks. Lists of split and update blocks for each candidate of the current target are in array bblst_table.
int* block_to_bb = NULL |
Topological order of blocks in the region (if b2 is reachable from b1, block_to_bb[b2] > block_to_bb[b1]). Note: A basic block is always referred to by either block or b, while its topological order name (in the region) is referred to by bb.
Referenced by extend_regions(), and sched_rgn_finish().
|
static |
int* containing_rgn = NULL |
The number of the region containing a block.
Referenced by extend_regions(), and sched_rgn_finish().
int current_blocks |
Referenced by bb_in_region_p(), compute_dom_prob_ps(), debug_region(), debug_regions(), dump_region_dot(), and rgn_setup_region().
int current_nr_blocks |
Blocks of the current region being scheduled.
Referenced by compute_block_dependences(), compute_priorities(), compute_trg_info(), create_block_for_bookkeeping(), current_region_empty_p(), debug_candidates(), debug_rgn_dependencies(), free_pending_lists(), free_rgn_deps(), init_ready_list(), init_seqno(), initiate_bb_reg_pressure_info(), initiate_reg_pressure_info(), rgn_add_block(), rgn_print_insn(), rgn_setup_region(), sched_is_disabled_for_current_region_p(), sched_rgn_compute_dependencies(), sched_rgn_local_finish(), sched_rgn_local_init(), schedule_region(), sel_region_init(), sel_region_target_finish(), sel_sched_region_1(), and simplify_changed_insns().
|
static |
Dominators array: dom[i] contains the sbitmap of dominators of bb i in the region.
Referenced by build_scop_bbs_1(), compute_avail(), compute_merit(), determine_dominators_for_sons(), determine_max_movement(), extract_affine_gmp(), extract_affine_name(), get_bb_type(), get_dominated_by_region(), gsi_prev_dom_bb_nondebug(), insert_aux(), insert_bb(), iterate_fix_dominators(), move_computations_stmt(), nearest_common_dominator_for_set(), prune_bbs_to_update_dominators(), remove_forwarder_block(), and remove_forwarder_block_with_phi().
int* ebb_head = NULL |
ebb_head [i] - is index in rgn_bb_table of the head basic block of i'th ebb. Currently we can get a ebb only through splitting of currently scheduling block, therefore, we don't need ebb_head array for every region, hence, its sufficient to hold it for current one only.
Referenced by compute_dom_prob_ps(), rgn_add_block(), rgn_fix_recovery_cfg(), rgn_setup_region(), and sched_rgn_finish().
|
static |
Referenced by compute_trg_info(), and extract_edgelst().
|
static |
|
static |
A bitmap to note insns that participate in any dependency. Used in add_branch_dependences.
|
static |
The minimum probability of reaching a source block so that it will be considered for speculative scheduling.
Referenced by compute_trg_info(), and sched_rgn_init().
|
static |
Functions for speculative scheduling.
|
static |
nr_inter/spec counts interblock/speculative motion for the function.
Referenced by begin_schedule_ready(), sched_rgn_finish(), and sched_rgn_init().
int nr_regions = 0 |
Number of regions in the procedure.
Referenced by debug_regions(), extend_rgns(), find_single_block_region(), gather_region_statistics(), haifa_find_rgns(), rgn_add_block(), rgn_make_new_region_out_of_new_block(), run_selective_scheduling(), sched_rgn_finish(), sched_rgn_init(), and schedule_insns().
|
static |
Referenced by begin_schedule_ready(), sched_rgn_finish(), and sched_rgn_init().
|
static |
The split edges of a source bb is different for each target bb. In order to compute this efficiently, the 'potential-split edges' are computed for each bb prior to scheduling a region. This is actually the split edges of each bb relative to the region entry. pot_split[bb] is the set of potential split edges of bb.
|
static |
Probability: Prob[i] is an int in [0, REG_BR_PROB_BASE] which is the probability of bb i relative to the region entry.
Referenced by add_case_node(), combine_predictions_for_bb(), combine_predictions_for_insn(), compute_branch_probabilities(), compute_dom_prob_ps(), compute_trg_info(), create_empty_loop_on_edge(), do_jump(), dump_inline_edge_summary(), emit_case_nodes(), estimate_function_body_sizes(), estimate_node_size_and_time(), find_traces_1_round(), force_nonfallthru_and_redirect(), gen_parallel_loop(), gimple_divmod_fixed_value(), gimple_divmod_fixed_value_transform(), gimple_ic(), gimple_mod_pow2(), gimple_mod_pow2_value_transform(), gimple_stringop_fixed_value(), gimple_stringops_transform(), inline_merge_summary(), inv(), mostly_true_jump(), remap_edge_change_prob(), sched_rgn_local_free(), sched_rgn_local_init(), set_zero_probability(), sms_schedule(), tree_transform_and_unroll_loop(), unswitch_loop(), update_bb_profile_for_threading(), and vect_loop_versioning().
int* rgn_bb_table = NULL |
Array of lists of regions' blocks.
Referenced by bb_in_region_p(), debug_region(), debug_regions(), dump_region_dot(), extend_regions(), extend_rgns(), find_single_block_region(), haifa_find_rgns(), rgn_add_block(), rgn_fix_recovery_cfg(), rgn_make_new_region_out_of_new_block(), and sched_rgn_finish().
|
static |
This variable holds common_sched_info hooks and data relevant to the interblock scheduler.
Referenced by rgn_setup_common_sched_info().
|
static |
This holds constant data used for initializing the above structure for the Haifa scheduler.
|
static |
Used in schedule_insns to initialize current_sched_info for scheduling regions (or single basic blocks).
|
static |
Same as above, but for the selective scheduler.
|
static |
Array of size rgn_nr_edges.
|
static |
Referenced by compute_priorities(), rgn_add_remove_insn(), and schedule_region().
|
static |
Number of edges in the region.
Referenced by compute_trg_info(), and sched_rgn_local_init().
|
static |
This holds data for the dependence analysis relevant to the interblock scheduler.
Referenced by rgn_setup_sched_infos().
|
static |
This variable holds the data and hooks needed to the Haifa scheduler backend for the interblock scheduler frontend.
Referenced by get_rgn_sched_max_insns_priority(), and rgn_setup_sched_infos().
region* rgn_table = NULL |
Table of region descriptions.
|
static |
The number of insns from the entire region scheduled so far.
Referenced by begin_schedule_ready(), init_ready_list(), and schedule_region().
|
static |
The number of insns from the current block scheduled so far.
Referenced by begin_schedule_ready(), init_ready_list(), rgn_insn_finishes_block_p(), and schedule_more_p().
int target_bb |
The bb being currently scheduled.
Referenced by advance_target_bb(), begin_schedule_ready(), can_schedule_ready_p(), compute_trg_info(), cond_exec_find_if_block(), fill_insns(), init_ready_list(), make_abnormal_goto_edges(), new_ready(), record_edge_info(), rgn_add_remove_insn(), rgn_insn_finishes_block_p(), rgn_print_insn(), rgn_rank(), schedule_ebb(), schedule_region(), and use_killed_between().
|
static |
The number of insns from the current block to be scheduled in total.
Referenced by init_ready_list(), rgn_add_remove_insn(), rgn_insn_finishes_block_p(), and schedule_more_p().