GCC Middle and Back End API Reference
|
#include "insn-attr.h"
#include "regset.h"
#include "basic-block.h"
#include "rtl.h"
#include "ggc.h"
#include "bitmap.h"
#include "sched-int.h"
#include "cfgloop.h"
Go to the source code of this file.
Data Structures | |
struct | expr_history_def_1 |
struct | _expr |
struct | _def |
struct | _bnd |
struct | _fence |
struct | flist_tail_def |
struct | _list_node |
struct | _list_iterator |
struct | idata_def |
struct | vinsn_def |
struct | transformed_insns |
struct | _sel_insn_data |
struct | sel_global_bb_info_def |
struct | sel_region_bb_info_def |
struct | succ_iterator |
struct | succs_info |
Macros | |
#define | _LIST_NEXT(L) ((L)->next) |
#define | _XLIST_X(L) ((L)->u.x) |
#define | _XLIST_NEXT(L) (_LIST_NEXT (L)) |
#define | ILIST_INSN(L) (_XLIST_X (L)) |
#define | ILIST_NEXT(L) (_XLIST_NEXT (L)) |
#define | EXPR_VINSN(EXPR) ((EXPR)->vinsn) |
#define | EXPR_INSN_RTX(EXPR) (VINSN_INSN_RTX (EXPR_VINSN (EXPR))) |
#define | EXPR_PATTERN(EXPR) (VINSN_PATTERN (EXPR_VINSN (EXPR))) |
#define | EXPR_LHS(EXPR) (VINSN_LHS (EXPR_VINSN (EXPR))) |
#define | EXPR_RHS(EXPR) (VINSN_RHS (EXPR_VINSN (EXPR))) |
#define | EXPR_TYPE(EXPR) (VINSN_TYPE (EXPR_VINSN (EXPR))) |
#define | EXPR_SEPARABLE_P(EXPR) (VINSN_SEPARABLE_P (EXPR_VINSN (EXPR))) |
#define | EXPR_SPEC(EXPR) ((EXPR)->spec) |
#define | EXPR_USEFULNESS(EXPR) ((EXPR)->usefulness) |
#define | EXPR_PRIORITY(EXPR) ((EXPR)->priority) |
#define | EXPR_PRIORITY_ADJ(EXPR) ((EXPR)->priority_adj) |
#define | EXPR_SCHED_TIMES(EXPR) ((EXPR)->sched_times) |
#define | EXPR_ORIG_BB_INDEX(EXPR) ((EXPR)->orig_bb_index) |
#define | EXPR_ORIG_SCHED_CYCLE(EXPR) ((EXPR)->orig_sched_cycle) |
#define | EXPR_SPEC_DONE_DS(EXPR) ((EXPR)->spec_done_ds) |
#define | EXPR_SPEC_TO_CHECK_DS(EXPR) ((EXPR)->spec_to_check_ds) |
#define | EXPR_HISTORY_OF_CHANGES(EXPR) ((EXPR)->history_of_changes) |
#define | EXPR_TARGET_AVAILABLE(EXPR) ((EXPR)->target_available) |
#define | EXPR_NEEDS_SPEC_CHECK_P(EXPR) ((EXPR)->needs_spec_check_p) |
#define | EXPR_WAS_SUBSTITUTED(EXPR) ((EXPR)->was_substituted) |
#define | EXPR_WAS_RENAMED(EXPR) ((EXPR)->was_renamed) |
#define | EXPR_CANT_MOVE(EXPR) ((EXPR)->cant_move) |
#define | _AV_SET_EXPR(L) (&(L)->u.expr) |
#define | _AV_SET_NEXT(L) (_LIST_NEXT (L)) |
#define | BND_TO(B) ((B)->to) |
#define | BND_PTR(B) ((B)->ptr) |
#define | BND_AV(B) ((B)->av) |
#define | BND_AV1(B) ((B)->av1) |
#define | BND_DC(B) ((B)->dc) |
#define | BLIST_BND(L) (&(L)->u.bnd) |
#define | BLIST_NEXT(L) (_LIST_NEXT (L)) |
#define | FENCE_INSN(F) ((F)->insn) |
#define | FENCE_STATE(F) ((F)->state) |
#define | FENCE_BNDS(F) ((F)->bnds) |
#define | FENCE_PROCESSED_P(F) ((F)->processed_p) |
#define | FENCE_SCHEDULED_P(F) ((F)->scheduled_p) |
#define | FENCE_ISSUED_INSNS(F) ((F)->cycle_issued_insns) |
#define | FENCE_CYCLE(F) ((F)->cycle) |
#define | FENCE_STARTS_CYCLE_P(F) ((F)->starts_cycle_p) |
#define | FENCE_AFTER_STALL_P(F) ((F)->after_stall_p) |
#define | FENCE_DC(F) ((F)->dc) |
#define | FENCE_TC(F) ((F)->tc) |
#define | FENCE_LAST_SCHEDULED_INSN(F) ((F)->last_scheduled_insn) |
#define | FENCE_ISSUE_MORE(F) ((F)->issue_more) |
#define | FENCE_EXECUTING_INSNS(F) ((F)->executing_insns) |
#define | FENCE_READY_TICKS(F) ((F)->ready_ticks) |
#define | FENCE_READY_TICKS_SIZE(F) ((F)->ready_ticks_size) |
#define | FENCE_SCHED_NEXT(F) ((F)->sched_next) |
#define | FLIST_FENCE(L) (&(L)->u.fence) |
#define | FLIST_NEXT(L) (_LIST_NEXT (L)) |
#define | FLIST_TAIL_HEAD(L) ((L)->head) |
#define | FLIST_TAIL_TAILP(L) ((L)->tailp) |
#define | _FOR_EACH(TYPE, ELEM, I, L) |
#define | _FOR_EACH_1(TYPE, ELEM, I, LP) |
#define | _xlist_remove(LP) (_list_remove (LP)) |
#define | _xlist_clear(LP) (_list_clear (LP)) |
#define | _xlist_iter_remove(IP) (_list_iter_remove (IP)) |
#define | _FOR_EACH_X(X, I, L) _FOR_EACH (x, (X), (I), (L)) |
#define | _FOR_EACH_X_1(X, I, LP) _FOR_EACH_1 (x, (X), (I), (LP)) |
#define | ilist_add(LP, INSN) (_xlist_add ((LP), (INSN))) |
#define | ilist_remove(LP) (_xlist_remove (LP)) |
#define | ilist_clear(LP) (_xlist_clear (LP)) |
#define | ilist_is_in_p(L, INSN) (_xlist_is_in_p ((L), (INSN))) |
#define | ilist_iter_remove(IP) (_xlist_iter_remove (IP)) |
#define | FOR_EACH_INSN(INSN, I, L) _FOR_EACH_X (INSN, I, L) |
#define | FOR_EACH_INSN_1(INSN, I, LP) _FOR_EACH_X_1 (INSN, I, LP) |
#define | FOR_EACH_EXPR(EXPR, I, AV) _FOR_EACH (expr, (EXPR), (I), (AV)) |
#define | FOR_EACH_EXPR_1(EXPR, I, AV) _FOR_EACH_1 (expr, (EXPR), (I), (AV)) |
#define | DEF_LIST_NEXT(L) (_LIST_NEXT (L)) |
#define | DEF_LIST_DEF(L) (&(L)->u.def) |
#define | FOR_EACH_DEF(DEF, I, DEF_LIST) _FOR_EACH (def, (DEF), (I), (DEF_LIST)) |
#define | IDATA_TYPE(ID) ((ID)->type) |
#define | IDATA_LHS(ID) ((ID)->lhs) |
#define | IDATA_RHS(ID) ((ID)->rhs) |
#define | IDATA_REG_SETS(ID) ((ID)->reg_sets) |
#define | IDATA_REG_USES(ID) ((ID)->reg_uses) |
#define | IDATA_REG_CLOBBERS(ID) ((ID)->reg_clobbers) |
#define | VINSN_INSN_RTX(VI) ((VI)->insn_rtx) |
#define | VINSN_PATTERN(VI) (PATTERN (VINSN_INSN_RTX (VI))) |
#define | VINSN_ID(VI) (&((VI)->id)) |
#define | VINSN_HASH(VI) ((VI)->hash) |
#define | VINSN_HASH_RTX(VI) ((VI)->hash_rtx) |
#define | VINSN_TYPE(VI) (IDATA_TYPE (VINSN_ID (VI))) |
#define | VINSN_SEPARABLE_P(VI) (VINSN_TYPE (VI) == SET) |
#define | VINSN_CLONABLE_P(VI) (VINSN_SEPARABLE_P (VI) || VINSN_TYPE (VI) == USE) |
#define | VINSN_UNIQUE_P(VI) (!VINSN_CLONABLE_P (VI)) |
#define | VINSN_LHS(VI) (IDATA_LHS (VINSN_ID (VI))) |
#define | VINSN_RHS(VI) (IDATA_RHS (VINSN_ID (VI))) |
#define | VINSN_REG_SETS(VI) (IDATA_REG_SETS (VINSN_ID (VI))) |
#define | VINSN_REG_USES(VI) (IDATA_REG_USES (VINSN_ID (VI))) |
#define | VINSN_REG_CLOBBERS(VI) (IDATA_REG_CLOBBERS (VINSN_ID (VI))) |
#define | VINSN_COUNT(VI) ((VI)->count) |
#define | VINSN_MAY_TRAP_P(VI) ((VI)->may_trap_p) |
#define | SID(INSN) (&s_i_d[INSN_LUID (INSN)]) |
#define | SID_BY_UID(UID) (&s_i_d[LUID_BY_UID (UID)]) |
#define | INSN_ASM_P(INSN) (SID (INSN)->asm_p) |
#define | INSN_SCHED_NEXT(INSN) (SID (INSN)->sched_next) |
#define | INSN_ANALYZED_DEPS(INSN) (SID (INSN)->analyzed_deps) |
#define | INSN_FOUND_DEPS(INSN) (SID (INSN)->found_deps) |
#define | INSN_DEPS_CONTEXT(INSN) (SID (INSN)->deps_context) |
#define | INSN_ORIGINATORS(INSN) (SID (INSN)->originators) |
#define | INSN_ORIGINATORS_BY_UID(UID) (SID_BY_UID (UID)->originators) |
#define | INSN_TRANSFORMED_INSNS(INSN) (SID (INSN)->transformed_insns) |
#define | INSN_EXPR(INSN) (&SID (INSN)->expr) |
#define | INSN_LIVE(INSN) (SID (INSN)->live) |
#define | INSN_LIVE_VALID_P(INSN) (SID (INSN)->live_valid_p) |
#define | INSN_VINSN(INSN) (EXPR_VINSN (INSN_EXPR (INSN))) |
#define | INSN_TYPE(INSN) (VINSN_TYPE (INSN_VINSN (INSN))) |
#define | INSN_SIMPLEJUMP_P(INSN) (INSN_TYPE (INSN) == PC) |
#define | INSN_LHS(INSN) (VINSN_LHS (INSN_VINSN (INSN))) |
#define | INSN_RHS(INSN) (VINSN_RHS (INSN_VINSN (INSN))) |
#define | INSN_REG_SETS(INSN) (VINSN_REG_SETS (INSN_VINSN (INSN))) |
#define | INSN_REG_CLOBBERS(INSN) (VINSN_REG_CLOBBERS (INSN_VINSN (INSN))) |
#define | INSN_REG_USES(INSN) (VINSN_REG_USES (INSN_VINSN (INSN))) |
#define | INSN_SCHED_TIMES(INSN) (EXPR_SCHED_TIMES (INSN_EXPR (INSN))) |
#define | INSN_SEQNO(INSN) (SID (INSN)->seqno) |
#define | INSN_AFTER_STALL_P(INSN) (SID (INSN)->after_stall_p) |
#define | INSN_SCHED_CYCLE(INSN) (SID (INSN)->sched_cycle) |
#define | INSN_READY_CYCLE(INSN) (SID (INSN)->ready_cycle) |
#define | INSN_SPEC_CHECKED_DS(INSN) (SID (INSN)->spec_checked_ds) |
#define | INSN_WS_LEVEL(INSN) (SID (INSN)->ws_level) |
#define | AV_SET(INSN) (get_av_set (INSN)) |
#define | AV_LEVEL(INSN) (get_av_level (INSN)) |
#define | AV_SET_VALID_P(INSN) (AV_LEVEL (INSN) == global_level) |
#define | INSN_INIT_TODO_LUID (1) |
#define | INSN_INIT_TODO_SSID (2) |
#define | INSN_INIT_TODO_SIMPLEJUMP (4) |
#define | INSN_NOP_P(INSN) (PATTERN (INSN) == nop_pattern) |
#define | INSN_IN_STREAM_P(INSN) (PREV_INSN (INSN) && NEXT_INSN (INSN)) |
#define | IN_CURRENT_FENCE_P(INSN) (flist_lookup (fences, INSN) != NULL) |
#define | MARK_LOOP_FOR_PIPELINING(LOOP) ((LOOP)->aux = (void *)(size_t)(1)) |
#define | LOOP_MARKED_FOR_PIPELINING_P(LOOP) ((size_t)((LOOP)->aux)) |
#define | LOOP_PREHEADER_BLOCKS(LOOP) |
#define | SET_LOOP_PREHEADER_BLOCKS(LOOP, BLOCKS) |
#define | SEL_GLOBAL_BB_INFO(BB) (&sel_global_bb_info[(BB)->index]) |
#define | BB_LV_SET(BB) (SEL_GLOBAL_BB_INFO (BB)->lv_set) |
#define | BB_LV_SET_VALID_P(BB) (SEL_GLOBAL_BB_INFO (BB)->lv_set_valid_p) |
#define | SEL_REGION_BB_INFO(BB) (&sel_region_bb_info[(BB)->index]) |
#define | BB_NOTE_LIST(BB) (SEL_REGION_BB_INFO (BB)->note_list) |
#define | BB_AV_SET(BB) (SEL_REGION_BB_INFO (BB)->av_set) |
#define | BB_AV_LEVEL(BB) (SEL_REGION_BB_INFO (BB)->av_level) |
#define | BB_AV_SET_VALID_P(BB) (BB_AV_LEVEL (BB) == global_level) |
#define | MAX_WS (PARAM_VALUE (PARAM_SELSCHED_MAX_LOOKAHEAD)) |
#define | SUCCS_NORMAL (1) |
#define | SUCCS_BACK (2) |
#define | SUCCS_OUT (4) |
#define | SUCCS_SKIP_TO_LOOP_EXITS (8) |
#define | SUCCS_ALL (SUCCS_NORMAL | SUCCS_BACK | SUCCS_OUT) |
#define | FOR_EACH_SUCC_1(SUCC, ITER, INSN, FLAGS) |
#define | FOR_EACH_SUCC(SUCC, ITER, INSN) FOR_EACH_SUCC_1 (SUCC, ITER, INSN, SUCCS_NORMAL) |
#define | SUCC_ITER_EDGE(ITER) ((ITER)->e1) |
Typedefs | |
typedef void * | tc_t |
typedef struct _list_node * | _list_t |
typedef struct idata_def * | idata_t |
typedef struct vinsn_def * | vinsn_t |
typedef _list_t | _xlist_t |
typedef rtx | insn_t |
typedef _xlist_t | ilist_t |
typedef struct expr_history_def_1 | expr_history_def |
typedef struct _expr | expr_def |
typedef expr_def * | expr_t |
typedef struct _def * | def_t |
typedef _list_t | av_set_t |
typedef struct _bnd * | bnd_t |
typedef _list_t | blist_t |
typedef struct _fence * | fence_t |
typedef _list_t | flist_t |
typedef struct flist_tail_def * | flist_tail_t |
typedef _list_iterator | _xlist_iterator |
typedef _xlist_iterator | ilist_iterator |
typedef _list_iterator | av_set_iterator |
typedef _list_t | def_list_t |
typedef _list_iterator | def_list_iterator |
typedef struct _sel_insn_data | sel_insn_data_def |
typedef sel_insn_data_def * | sel_insn_data_t |
typedef enum deps_where_def | deps_where_t |
typedef sel_global_bb_info_def * | sel_global_bb_info_t |
typedef sel_region_bb_info_def * | sel_region_bb_info_t |
Enumerations | |
enum | local_trans_type { TRANS_SUBSTITUTION, TRANS_SPECULATION } |
enum | deps_where_def { DEPS_IN_INSN, DEPS_IN_LHS, DEPS_IN_RHS, DEPS_IN_NOWHERE } |
#define _AV_SET_EXPR | ( | L | ) | (&(L)->u.expr) |
#define _AV_SET_NEXT | ( | L | ) | (_LIST_NEXT (L)) |
#define _FOR_EACH | ( | TYPE, | |
ELEM, | |||
I, | |||
L | |||
) |
#define _FOR_EACH_1 | ( | TYPE, | |
ELEM, | |||
I, | |||
LP | |||
) |
#define _FOR_EACH_X_1 | ( | X, | |
I, | |||
LP | |||
) | _FOR_EACH_1 (x, (X), (I), (LP)) |
#define _LIST_NEXT | ( | L | ) | ((L)->next) |
#define _xlist_clear | ( | LP | ) | (_list_clear (LP)) |
#define _xlist_iter_remove | ( | IP | ) | (_list_iter_remove (IP)) |
#define _XLIST_NEXT | ( | L | ) | (_LIST_NEXT (L)) |
#define _xlist_remove | ( | LP | ) | (_list_remove (LP)) |
#define _XLIST_X | ( | L | ) | ((L)->u.x) |
Referenced by _list_clear(), and _list_iter_start().
#define AV_LEVEL | ( | INSN | ) | (get_av_level (INSN)) |
#define AV_SET | ( | INSN | ) | (get_av_set (INSN)) |
#define AV_SET_VALID_P | ( | INSN | ) | (AV_LEVEL (INSN) == global_level) |
#define BB_AV_LEVEL | ( | BB | ) | (SEL_REGION_BB_INFO (BB)->av_level) |
#define BB_AV_SET | ( | BB | ) | (SEL_REGION_BB_INFO (BB)->av_set) |
#define BB_AV_SET_VALID_P | ( | BB | ) | (BB_AV_LEVEL (BB) == global_level) |
#define BB_LV_SET | ( | BB | ) | (SEL_GLOBAL_BB_INFO (BB)->lv_set) |
Access macros.
#define BB_LV_SET_VALID_P | ( | BB | ) | (SEL_GLOBAL_BB_INFO (BB)->lv_set_valid_p) |
#define BB_NOTE_LIST | ( | BB | ) | (SEL_REGION_BB_INFO (BB)->note_list) |
Get BB's note_list. A note_list is a list of various notes that was scattered across BB before scheduling, and will be appended at the beginning of BB after scheduling is finished.
#define BLIST_BND | ( | L | ) | (&(L)->u.bnd) |
#define BLIST_NEXT | ( | L | ) | (_LIST_NEXT (L)) |
#define BND_AV | ( | B | ) | ((B)->av) |
#define BND_AV1 | ( | B | ) | ((B)->av1) |
#define BND_DC | ( | B | ) | ((B)->dc) |
#define BND_PTR | ( | B | ) | ((B)->ptr) |
PTR stands not for pointer as you might think, but as a Path To Root of the current instruction group from boundary B.
#define BND_TO | ( | B | ) | ((B)->to) |
#define DEF_LIST_DEF | ( | L | ) | (&(L)->u.def) |
Referenced by _xlist_is_in_p().
#define DEF_LIST_NEXT | ( | L | ) | (_LIST_NEXT (L)) |
#define EXPR_CANT_MOVE | ( | EXPR | ) | ((EXPR)->cant_move) |
#define EXPR_HISTORY_OF_CHANGES | ( | EXPR | ) | ((EXPR)->history_of_changes) |
#define EXPR_INSN_RTX | ( | EXPR | ) | (VINSN_INSN_RTX (EXPR_VINSN (EXPR))) |
#define EXPR_LHS | ( | EXPR | ) | (VINSN_LHS (EXPR_VINSN (EXPR))) |
#define EXPR_NEEDS_SPEC_CHECK_P | ( | EXPR | ) | ((EXPR)->needs_spec_check_p) |
#define EXPR_ORIG_BB_INDEX | ( | EXPR | ) | ((EXPR)->orig_bb_index) |
#define EXPR_ORIG_SCHED_CYCLE | ( | EXPR | ) | ((EXPR)->orig_sched_cycle) |
#define EXPR_PATTERN | ( | EXPR | ) | (VINSN_PATTERN (EXPR_VINSN (EXPR))) |
#define EXPR_PRIORITY | ( | EXPR | ) | ((EXPR)->priority) |
#define EXPR_PRIORITY_ADJ | ( | EXPR | ) | ((EXPR)->priority_adj) |
#define EXPR_RHS | ( | EXPR | ) | (VINSN_RHS (EXPR_VINSN (EXPR))) |
#define EXPR_SCHED_TIMES | ( | EXPR | ) | ((EXPR)->sched_times) |
#define EXPR_SEPARABLE_P | ( | EXPR | ) | (VINSN_SEPARABLE_P (EXPR_VINSN (EXPR))) |
#define EXPR_SPEC | ( | EXPR | ) | ((EXPR)->spec) |
#define EXPR_SPEC_DONE_DS | ( | EXPR | ) | ((EXPR)->spec_done_ds) |
#define EXPR_SPEC_TO_CHECK_DS | ( | EXPR | ) | ((EXPR)->spec_to_check_ds) |
#define EXPR_TARGET_AVAILABLE | ( | EXPR | ) | ((EXPR)->target_available) |
#define EXPR_TYPE | ( | EXPR | ) | (VINSN_TYPE (EXPR_VINSN (EXPR))) |
#define EXPR_USEFULNESS | ( | EXPR | ) | ((EXPR)->usefulness) |
#define EXPR_VINSN | ( | EXPR | ) | ((EXPR)->vinsn) |
#define EXPR_WAS_RENAMED | ( | EXPR | ) | ((EXPR)->was_renamed) |
#define EXPR_WAS_SUBSTITUTED | ( | EXPR | ) | ((EXPR)->was_substituted) |
#define FENCE_AFTER_STALL_P | ( | F | ) | ((F)->after_stall_p) |
#define FENCE_BNDS | ( | F | ) | ((F)->bnds) |
#define FENCE_CYCLE | ( | F | ) | ((F)->cycle) |
#define FENCE_DC | ( | F | ) | ((F)->dc) |
#define FENCE_EXECUTING_INSNS | ( | F | ) | ((F)->executing_insns) |
#define FENCE_INSN | ( | F | ) | ((F)->insn) |
#define FENCE_ISSUE_MORE | ( | F | ) | ((F)->issue_more) |
#define FENCE_ISSUED_INSNS | ( | F | ) | ((F)->cycle_issued_insns) |
#define FENCE_LAST_SCHEDULED_INSN | ( | F | ) | ((F)->last_scheduled_insn) |
#define FENCE_PROCESSED_P | ( | F | ) | ((F)->processed_p) |
#define FENCE_READY_TICKS | ( | F | ) | ((F)->ready_ticks) |
#define FENCE_READY_TICKS_SIZE | ( | F | ) | ((F)->ready_ticks_size) |
#define FENCE_SCHED_NEXT | ( | F | ) | ((F)->sched_next) |
#define FENCE_SCHEDULED_P | ( | F | ) | ((F)->scheduled_p) |
#define FENCE_STARTS_CYCLE_P | ( | F | ) | ((F)->starts_cycle_p) |
#define FENCE_STATE | ( | F | ) | ((F)->state) |
#define FENCE_TC | ( | F | ) | ((F)->tc) |
#define FLIST_FENCE | ( | L | ) | (&(L)->u.fence) |
#define FLIST_NEXT | ( | L | ) | (_LIST_NEXT (L)) |
#define FLIST_TAIL_HEAD | ( | L | ) | ((L)->head) |
#define FLIST_TAIL_TAILP | ( | L | ) | ((L)->tailp) |
#define FOR_EACH_EXPR_1 | ( | EXPR, | |
I, | |||
AV | |||
) | _FOR_EACH_1 (expr, (EXPR), (I), (AV)) |
#define FOR_EACH_INSN | ( | INSN, | |
I, | |||
L | |||
) | _FOR_EACH_X (INSN, I, L) |
#define FOR_EACH_INSN_1 | ( | INSN, | |
I, | |||
LP | |||
) | _FOR_EACH_X_1 (INSN, I, LP) |
#define FOR_EACH_SUCC | ( | SUCC, | |
ITER, | |||
INSN | |||
) | FOR_EACH_SUCC_1 (SUCC, ITER, INSN, SUCCS_NORMAL) |
#define FOR_EACH_SUCC_1 | ( | SUCC, | |
ITER, | |||
INSN, | |||
FLAGS | |||
) |
#define IDATA_LHS | ( | ID | ) | ((ID)->lhs) |
#define IDATA_REG_CLOBBERS | ( | ID | ) | ((ID)->reg_clobbers) |
#define IDATA_REG_SETS | ( | ID | ) | ((ID)->reg_sets) |
#define IDATA_REG_USES | ( | ID | ) | ((ID)->reg_uses) |
#define IDATA_RHS | ( | ID | ) | ((ID)->rhs) |
#define IDATA_TYPE | ( | ID | ) | ((ID)->type) |
#define ilist_add | ( | LP, | |
INSN | |||
) | (_xlist_add ((LP), (INSN))) |
ilist_t functions. Instruction lists are simply RTX lists.
#define ilist_clear | ( | LP | ) | (_xlist_clear (LP)) |
#define ILIST_INSN | ( | L | ) | (_XLIST_X (L)) |
#define ilist_is_in_p | ( | L, | |
INSN | |||
) | (_xlist_is_in_p ((L), (INSN))) |
#define ilist_iter_remove | ( | IP | ) | (_xlist_iter_remove (IP)) |
#define ILIST_NEXT | ( | L | ) | (_XLIST_NEXT (L)) |
#define ilist_remove | ( | LP | ) | (_xlist_remove (LP)) |
#define IN_CURRENT_FENCE_P | ( | INSN | ) | (flist_lookup (fences, INSN) != NULL) |
Return true if INSN is in current fence.
#define INSN_AFTER_STALL_P | ( | INSN | ) | (SID (INSN)->after_stall_p) |
#define INSN_ANALYZED_DEPS | ( | INSN | ) | (SID (INSN)->analyzed_deps) |
#define INSN_ASM_P | ( | INSN | ) | (SID (INSN)->asm_p) |
#define INSN_DEPS_CONTEXT | ( | INSN | ) | (SID (INSN)->deps_context) |
#define INSN_FOUND_DEPS | ( | INSN | ) | (SID (INSN)->found_deps) |
Return true if INSN is linked into instruction stream. NB: It is impossible for INSN to have one field null and the other not null: gcc_assert ((PREV_INSN (INSN) == NULL_RTX) == (NEXT_INSN (INSN) == NULL_RTX)) is valid.
#define INSN_INIT_TODO_LUID (1) |
Provide a separate luid for the insn.
#define INSN_INIT_TODO_SIMPLEJUMP (4) |
Initialize data for simplejump.
#define INSN_INIT_TODO_SSID (2) |
Initialize s_s_i_d.
#define INSN_LHS | ( | INSN | ) | (VINSN_LHS (INSN_VINSN (INSN))) |
#define INSN_LIVE_VALID_P | ( | INSN | ) | (SID (INSN)->live_valid_p) |
#define INSN_NOP_P | ( | INSN | ) | (PATTERN (INSN) == nop_pattern) |
Return true if INSN is a local NOP. The nop is local in the sense that it was emitted by the scheduler as a temporary insn and will soon be deleted. These nops are identified by their pattern.
#define INSN_ORIGINATORS | ( | INSN | ) | (SID (INSN)->originators) |
#define INSN_ORIGINATORS_BY_UID | ( | UID | ) | (SID_BY_UID (UID)->originators) |
#define INSN_READY_CYCLE | ( | INSN | ) | (SID (INSN)->ready_cycle) |
#define INSN_REG_CLOBBERS | ( | INSN | ) | (VINSN_REG_CLOBBERS (INSN_VINSN (INSN))) |
#define INSN_REG_SETS | ( | INSN | ) | (VINSN_REG_SETS (INSN_VINSN (INSN))) |
#define INSN_REG_USES | ( | INSN | ) | (VINSN_REG_USES (INSN_VINSN (INSN))) |
#define INSN_RHS | ( | INSN | ) | (VINSN_RHS (INSN_VINSN (INSN))) |
#define INSN_SCHED_CYCLE | ( | INSN | ) | (SID (INSN)->sched_cycle) |
#define INSN_SCHED_NEXT | ( | INSN | ) | (SID (INSN)->sched_next) |
#define INSN_SCHED_TIMES | ( | INSN | ) | (EXPR_SCHED_TIMES (INSN_EXPR (INSN))) |
#define INSN_SEQNO | ( | INSN | ) | (SID (INSN)->seqno) |
#define INSN_SIMPLEJUMP_P | ( | INSN | ) | (INSN_TYPE (INSN) == PC) |
#define INSN_SPEC_CHECKED_DS | ( | INSN | ) | (SID (INSN)->spec_checked_ds) |
#define INSN_TRANSFORMED_INSNS | ( | INSN | ) | (SID (INSN)->transformed_insns) |
#define INSN_TYPE | ( | INSN | ) | (VINSN_TYPE (INSN_VINSN (INSN))) |
#define INSN_VINSN | ( | INSN | ) | (EXPR_VINSN (INSN_EXPR (INSN))) |
#define INSN_WS_LEVEL | ( | INSN | ) | (SID (INSN)->ws_level) |
#define LOOP_MARKED_FOR_PIPELINING_P | ( | LOOP | ) | ((size_t)((LOOP)->aux)) |
#define LOOP_PREHEADER_BLOCKS | ( | LOOP | ) |
Saved loop preheader to transfer when scheduling the loop.
#define MARK_LOOP_FOR_PIPELINING | ( | LOOP | ) | ((LOOP)->aux = (void *)(size_t)(1)) |
Marks loop as being considered for pipelining.
#define MAX_WS (PARAM_VALUE (PARAM_SELSCHED_MAX_LOOKAHEAD)) |
Software lookahead window size. According to the results in Nakatani and Ebcioglu [1993], window size of 16 is enough to extract most ILP in integer code.
#define SEL_GLOBAL_BB_INFO | ( | BB | ) | (&sel_global_bb_info[(BB)->index]) |
Get data for BB.
#define SEL_REGION_BB_INFO | ( | BB | ) | (&sel_region_bb_info[(BB)->index]) |
Get data for BB.
#define SET_LOOP_PREHEADER_BLOCKS | ( | LOOP, | |
BLOCKS | |||
) |
#define SID | ( | INSN | ) | (&s_i_d[INSN_LUID (INSN)]) |
Accessor macros for s_i_d.
#define SID_BY_UID | ( | UID | ) | (&s_i_d[LUID_BY_UID (UID)]) |
#define SUCC_ITER_EDGE | ( | ITER | ) | ((ITER)->e1) |
Return the current edge along which a successor was built.
#define SUCCS_ALL (SUCCS_NORMAL | SUCCS_BACK | SUCCS_OUT) |
Include all successors.
#define SUCCS_BACK (2) |
Include back-edge successors.
#define SUCCS_NORMAL (1) |
Flags to pass to compute_succs_info and FOR_EACH_SUCC. Any successor will fall into exactly one category. Include normal successors.
Referenced by _succ_iter_cond().
#define SUCCS_OUT (4) |
Include successors that are outside of the current region.
#define SUCCS_SKIP_TO_LOOP_EXITS (8) |
When pipelining of the outer loops is enabled, skip innermost loops to their exits.
#define VINSN_CLONABLE_P | ( | VI | ) | (VINSN_SEPARABLE_P (VI) || VINSN_TYPE (VI) == USE) |
#define VINSN_COUNT | ( | VI | ) | ((VI)->count) |
#define VINSN_HASH | ( | VI | ) | ((VI)->hash) |
#define VINSN_HASH_RTX | ( | VI | ) | ((VI)->hash_rtx) |
#define VINSN_ID | ( | VI | ) | (&((VI)->id)) |
#define VINSN_INSN_RTX | ( | VI | ) | ((VI)->insn_rtx) |
#define VINSN_MAY_TRAP_P | ( | VI | ) | ((VI)->may_trap_p) |
#define VINSN_PATTERN | ( | VI | ) | (PATTERN (VINSN_INSN_RTX (VI))) |
#define VINSN_REG_CLOBBERS | ( | VI | ) | (IDATA_REG_CLOBBERS (VINSN_ID (VI))) |
#define VINSN_REG_SETS | ( | VI | ) | (IDATA_REG_SETS (VINSN_ID (VI))) |
#define VINSN_REG_USES | ( | VI | ) | (IDATA_REG_USES (VINSN_ID (VI))) |
#define VINSN_SEPARABLE_P | ( | VI | ) | (VINSN_TYPE (VI) == SET) |
#define VINSN_TYPE | ( | VI | ) | (IDATA_TYPE (VINSN_ID (VI))) |
#define VINSN_UNIQUE_P | ( | VI | ) | (!VINSN_CLONABLE_P (VI)) |
typedef struct _list_node* _list_t |
List backend.
typedef _list_iterator _xlist_iterator |
typedef _list_iterator av_set_iterator |
Av set iterators.
typedef _list_iterator def_list_iterator |
typedef _list_t def_list_t |
Def list iterators.
typedef enum deps_where_def deps_where_t |
typedef struct expr_history_def_1 expr_history_def |
typedef struct flist_tail_def* flist_tail_t |
typedef _xlist_iterator ilist_iterator |
typedef struct _sel_insn_data sel_insn_data_def |
typedef sel_insn_data_def* sel_insn_data_t |
typedef void* tc_t |
Instruction scheduling pass. This file contains definitions used internally in the scheduler. Copyright (C) 2006-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. For state_t. For reg_note. tc_t is a short for target context. This is a state of the target backend.
enum deps_where_def |
A variable to track which part of rtx we are scanning in sched-deps.c: sched_analyze_insn ().
enum local_trans_type |
|
inlinestatic |
Returns true when E1 is an eligible successor edge, possibly skipping empty blocks. When E2P is not null, the resulting edge is written there. FLAGS are used to specify whether back edges and out-of-region edges should be considered.
Any successor of the block that is outside current region is ineligible, except when we're skipping to loop exits.
Skip empty blocks, but be careful not to leave the region. Save the second edge for later checks.
BLOCK_TO_BB sets topological order of the region here. It is important to use real predecessor here, which is ip->bb, as we may well have e1->src outside current region, when skipping to loop exits.
This is true for the all cases except the last one.
We are advancing forward in the region, as usual.
We are skipping to loop exits here.
This is a back edge. During pipelining we ignore back edges, but only when it leads to the same loop. It can lead to the header of the outer loop, which will also be the preheader of the current loop.
A back edge should be requested explicitly.
|
inlinestatic |
Referenced by _list_clear().
|
inlinestatic |
References _list_remove(), _list_iterator::can_remove_p, gcc_assert, _list_iterator::lp, and _list_iterator::removed_p.
|
inlinestatic |
References _list_add(), and _XLIST_X.
|
inlinestatic |
|
inline |
|
inlinestatic |
Used through _FOR_EACH.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
References _XLIST_X.
|
inlinestatic |
Referenced by _list_alloc().
|
inlinestatic |
|
inlinestatic |
When we're in a middle of a basic block, return the next insn immediately, but only when SUCCS_NORMAL is set.
First, try loop exits, if we have them.
If we have found a successor, then great.
If not, then try the next edge.
Consider bb as a possible loop header.
Get all loop exits recursively.
Move the iterator now, because we won't do succ_iter_next until loop exits will end.
bb is not a loop header, check as usual.
If loop_exits are non null, we have found an inner loop; do one more iteration to fetch an edge from these exits.
Otherwise, we've found an edge in a usual way. Break now.
References gcc_assert, and SUCCS_NORMAL.
|
inlinestatic |
|
inlinestatic |
We need to return a succ_iterator to avoid 'unitialized' warning during bootstrap.
Avoid 'uninitialized' warning.
Avoid 'uninitialized' warning.
|
inlinestatic |
_xlist_t functions.
|
inlinestatic |
References DEF_LIST_DEF.
void add_clean_fence_to_fences | ( | flist_tail_t | , |
insn_t | , | ||
fence_t | |||
) |
void add_dirty_fence_to_fences | ( | flist_tail_t | , |
insn_t | , | ||
fence_t | |||
) |
void advance_deps_context | ( | deps_t | , |
insn_t | |||
) |
Deps context functions.
void alloc_sched_pools | ( | void | ) |
void av_set_clear | ( | av_set_t * | ) |
void av_set_iter_remove | ( | av_set_iterator * | ) |
void av_set_leave_one_nonspec | ( | av_set_t * | ) |
void av_set_split_usefulness | ( | av_set_t | , |
int | , | ||
int | |||
) |
void av_set_substract_cond_branches | ( | av_set_t * | ) |
bool bb_ends_ebb_p | ( | basic_block | ) |
|
inlinestatic |
Return the next block of BB not running into inconsistencies.
void blist_remove | ( | blist_t * | ) |
void clear_expr | ( | expr_t | ) |
void clear_outdated_rtx_info | ( | basic_block | ) |
|
read |
void copy_data_sets | ( | basic_block | , |
basic_block | |||
) |
void def_list_add | ( | def_list_t * | , |
insn_t | , | ||
bool | |||
) |
void exchange_data_sets | ( | basic_block | , |
basic_block | |||
) |
unsigned expr_dest_regno | ( | expr_t | ) |
basic_block fallthru_bb_of_jump | ( | rtx | ) |
int find_in_history_vect | ( | vec< expr_history_def > | , |
rtx | , | ||
vinsn_t | , | ||
bool | |||
) |
void flist_clear | ( | flist_t * | ) |
void flist_tail_init | ( | flist_tail_t | ) |
void free_bb_note_pool | ( | void | ) |
void free_data_for_scheduled_insn | ( | insn_t | ) |
void free_data_sets | ( | basic_block | ) |
void free_lv_sets | ( | void | ) |
void free_nop_and_exit_insns | ( | void | ) |
void free_nop_pool | ( | void | ) |
void free_nop_vinsn | ( | void | ) |
void free_regset_pool | ( | void | ) |
void free_sched_pools | ( | void | ) |
void free_succs_info | ( | struct succs_info * | ) |
Collect all loop exits recursively, skipping empty BBs between them. E.g. if BB is a loop header which has several loop exits, traverse all of them and if any of them turns out to be another loop header (after skipping empty BBs), add its loop exits to the resulting vector as well.
If bb is empty, and we're skipping to loop exits, then consider bb as a possible gate to the inner loop now.
This empty block could only lead outside the region.
And now check whether we should skip over inner loop.
Traverse all loop headers.
Add all loop exits for the current edge into the resulting vector.
Remove the original edge.
Decrease the loop counter so we won't skip anything.
References succ_iterator::current_exit, succ_iterator::ei, ei_next(), and succ_iterator::loop_exits.
int get_av_level | ( | insn_t | ) |
regset get_clear_regset_from_pool | ( | void | ) |
Return exit edges of LOOP, filtering out edges with the same dest bb.
loop_p get_loop_nest_for_rgn | ( | unsigned | int | ) |
regset get_regset_from_pool | ( | void | ) |
Pool functions.
int get_seqno_by_preds | ( | rtx | ) |
Functions that are used in sel-sched.c. List functions.
bool in_current_region_p | ( | basic_block | ) |
void init_fences | ( | insn_t | ) |
Fences functions.
void init_lv_sets | ( | void | ) |
Various initialization functions.
|
inlinestatic |
True when BB is a header of the inner loop.
If successor belongs to another loop.
Could be '=' here because of wrong loop depths.
References succ_iterator::bb, BB_END, succ_iterator::bb_end, BLOCK_FOR_INSN, edge_iterator::container, succ_iterator::current_exit, succ_iterator::current_flags, succ_iterator::e1, succ_iterator::e2, succ_iterator::ei, ei_start, EXIT_BLOCK_PTR, succ_iterator::flags, gcc_assert, edge_iterator::index, INSN_P, succ_iterator::loop_exits, NOTE_INSN_BASIC_BLOCK_P, NULL, and basic_block_def::succs.
void insert_in_history_vect | ( | vec< expr_history_def > * | , |
unsigned | , | ||
enum | local_trans_type, | ||
vinsn_t | , | ||
vinsn_t | , | ||
ds_t | |||
) |
sel_insn_data_def insn_sid | ( | insn_t | ) |
void make_region_from_loop_preheader | ( | vec< basic_block > *& | ) |
expr_t merge_with_other_exprs | ( | av_set_t * | , |
av_set_iterator * | , | ||
expr_t | |||
) |
void move_fence_to_fences | ( | flist_t | , |
flist_tail_t | |||
) |
void purge_empty_blocks | ( | void | ) |
void recompute_vinsn_lhs_rhs | ( | vinsn_t | ) |
void return_regset_to_pool | ( | regset | ) |
void sel_add_loop_preheaders | ( | bb_vec_t * | ) |
|
static |
References succ_iterator::current_exit, and succ_iterator::loop_exits.
bool sel_bb_empty_p | ( | basic_block | ) |
insn_t sel_bb_end | ( | basic_block | ) |
insn_t sel_bb_head | ( | basic_block | ) |
Basic block and CFG functions.
void sel_clear_has_dependence | ( | void | ) |
Dependence analysis functions.
basic_block sel_create_recovery_block | ( | insn_t | ) |
void sel_extend_global_bb_info | ( | void | ) |
void sel_finish_bbs | ( | void | ) |
void sel_finish_global_and_expr | ( | void | ) |
void sel_finish_global_bb_info | ( | void | ) |
void sel_finish_pipelining | ( | void | ) |
void sel_init_bbs | ( | bb_vec_t | ) |
void sel_init_global_and_expr | ( | bb_vec_t | ) |
void sel_init_invalid_data_sets | ( | insn_t | ) |
void sel_init_pipelining | ( | void | ) |
bool sel_is_loop_preheader_p | ( | basic_block | ) |
bool sel_redirect_edge_and_branch | ( | edge | , |
basic_block | |||
) |
void sel_redirect_edge_and_branch_force | ( | edge | , |
basic_block | |||
) |
void sel_register_cfg_hooks | ( | void | ) |
void sel_save_haifa_priorities | ( | void | ) |
void sel_sched_region | ( | int | ) |
void sel_set_sched_flags | ( | void | ) |
void sel_setup_sched_infos | ( | void | ) |
basic_block sel_split_edge | ( | edge | ) |
void sel_unregister_cfg_hooks | ( | void | ) |
int sel_vinsn_cost | ( | vinsn_t | ) |
void set_target_context | ( | tc_t | ) |
void setup_nop_and_exit_insns | ( | void | ) |
void setup_nop_vinsn | ( | void | ) |
int speculate_expr | ( | expr_t | , |
ds_t | |||
) |
bool tidy_control_flow | ( | basic_block | , |
bool | |||
) |
void vinsn_attach | ( | vinsn_t | ) |
void vinsn_detach | ( | vinsn_t | ) |
basic_block after_recovery |
Some needed definitions.
sbitmap bbs_pipelined |
Saves pipelined blocks. Bitmap is indexed by bb->index.
bitmap blocks_to_reschedule |
bool bookkeeping_p |
struct loop* current_loop_nest |
The loop nest being pipelined.
bool enable_moveup_set_path_p |
Various flags.
rtx exit_insn |
An insn that 'contained' in EXIT block.
flist_t fences |
A list of fences currently in the works.
bitmap_head* forced_ebb_heads |
Used in bb_in_ebb_p.
int global_level |
A global level shows whether an insn is valid or not.
int max_insns_to_rename |
rtx nop_pattern |
A NOP pattern used as a placeholder for real insns.
bool pipelining_p |
bool preheader_removed |
vec<sel_insn_data_def> s_i_d |
alloc_pool sched_lists_pool |
list_t functions. All of _*list* functions are used through accessor macros, thus we can't move them in sel-sched-ir.c.
regset sel_all_regs |
vec<sel_global_bb_info_def> sel_global_bb_info |
Per basic block data. This array is indexed by basic block index.
vec<sel_region_bb_info_def> sel_region_bb_info |
Per basic block data. This array is indexed by basic block index.