GCC Middle and Back End API Reference
|
#include <sched-int.h>
Data Fields | |
void(* | init_ready_list )(void) |
int(* | can_schedule_ready_p )(rtx) |
int(* | schedule_more_p )(void) |
ds_t(* | new_ready )(rtx, ds_t) |
int(* | rank )(rtx, rtx) |
const char *(* | print_insn )(const_rtx, int) |
int(* | contributes_to_priority )(rtx, rtx) |
bool(* | insn_finishes_block_p )(rtx) |
rtx | prev_head |
rtx | next_tail |
rtx | head |
rtx | tail |
unsigned int | queue_must_finish_empty:1 |
int | sched_max_insns_priority |
void(* | add_remove_insn )(rtx, int) |
void(* | begin_schedule_ready )(rtx insn) |
void(* | begin_move_insn )(rtx insn, rtx last) |
basic_block(* | advance_target_bb )(basic_block, rtx) |
void *(* | save_state )(void) |
void(* | restore_state )(void *) |
unsigned int | flags |
This structure holds some state of the current scheduling pass, and contains some function pointers that abstract out some of the non-generic functionality from functions such as schedule_block or schedule_insn. There is one global variable, current_sched_info, which points to the sched_info structure currently in use.
void(* haifa_sched_info::add_remove_insn)(rtx, int) |
Hooks to support speculative scheduling.
Called to notify frontend that instruction is being added (second parameter == 0) or removed (second parameter == 1).
basic_block(* haifa_sched_info::advance_target_bb)(basic_block, rtx) |
If the second parameter is not NULL, return nonnull value, if the basic block should be advanced. If the second parameter is NULL, return the next basic block in EBB. The first parameter is the current basic block in EBB.
Called to notify the frontend that an instruction INSN is about to be moved to its correct place in the final schedule. This is done for all insns in order of the schedule. LAST indicates the last scheduled instruction.
void(* haifa_sched_info::begin_schedule_ready)(rtx insn) |
Called to notify the frontend that instruction INSN is being scheduled.
Referenced by prune_ready_list().
int(* haifa_sched_info::can_schedule_ready_p)(rtx) |
Called after taking an insn from the ready list. Returns nonzero if this insn can be scheduled, nonzero if we should silently discard it.
Return nonzero if an insn should be included in priority calculations.
Referenced by dep_cost_1().
unsigned int haifa_sched_info::flags |
??? FIXME: should use straight bitfields inside sched_info instead of this flag field.
Referenced by sched_free_deps(), sched_init_bbs(), sd_add_dep(), and sd_copy_back_deps().
rtx haifa_sched_info::head |
Filled in after the schedule is finished; the first and last scheduled insns.
void(* haifa_sched_info::init_ready_list)(void) |
Add all insns that are initially ready to the ready list. Called once before scheduling a set of insns.
bool(* haifa_sched_info::insn_finishes_block_p)(rtx) |
Return true if scheduling insn (passed as the parameter) will trigger finish of scheduling current block.
Called after an insn has all its hard dependencies resolved. Adjusts status of instruction (which is passed through second parameter) to indicate if instruction should be moved to the ready list or the queue, or if it should silently discard it (until next resolved dependence).
rtx haifa_sched_info::next_tail |
Referenced by debug_ebb_dependencies(), and sched_setup_bb_reg_pressure_info().
rtx haifa_sched_info::prev_head |
The boundaries of the set of insns to be scheduled.
Referenced by debug_ebb_dependencies(), and sched_setup_bb_reg_pressure_info().
const char*(* haifa_sched_info::print_insn)(const_rtx, int) |
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.
Referenced by get_ebb_head_tail(), and model_promote_predecessors().
unsigned int haifa_sched_info::queue_must_finish_empty |
If nonzero, enables an additional sanity check in schedule_block.
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.
void(* haifa_sched_info::restore_state)(void *) |
Restore frontend scheduler state from the argument, and free the memory.
void*(* haifa_sched_info::save_state)(void) |
Allocate memory, store the frontend scheduler state in it, and return it.
int haifa_sched_info::sched_max_insns_priority |
Maximum priority that has been assigned to an insn.
Referenced by new_ready().
int(* haifa_sched_info::schedule_more_p)(void) |
Return nonzero if there are more insns that should be scheduled.
rtx haifa_sched_info::tail |