GCC Middle and Back End API Reference
sel-sched-ir.h File 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"
Include dependency graph for sel-sched-ir.h:
This graph shows which files directly or indirectly include this file:

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_defidata_t
typedef struct vinsn_defvinsn_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_defexpr_t
typedef struct _defdef_t
typedef _list_t av_set_t
typedef struct _bndbnd_t
typedef _list_t blist_t
typedef struct _fencefence_t
typedef _list_t flist_t
typedef struct flist_tail_defflist_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_defsel_insn_data_t
typedef enum deps_where_def deps_where_t
typedef sel_global_bb_info_defsel_global_bb_info_t
typedef sel_region_bb_info_defsel_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 }

Functions

static _list_t _list_alloc ()
static void _list_add ()
static void _list_remove_nofree ()
static void _list_remove ()
static void _list_clear ()
static void _list_iter_start ()
static void _list_iter_next ()
static void _list_iter_remove ()
static void _list_iter_remove_nofree ()
static void _xlist_add ()
static bool _xlist_is_in_p ()
static bool _list_iter_cond_x ()
bool _list_iter_cond_expr ()
static bool _list_iter_cond_def ()
sel_insn_data_def insn_sid (insn_t)
av_set_t get_av_set (insn_t)
int get_av_level (insn_t)
void sel_extend_global_bb_info (void)
void sel_finish_global_bb_info (void)
insn_t sel_bb_head (basic_block)
insn_t sel_bb_end (basic_block)
bool sel_bb_empty_p (basic_block)
bool in_current_region_p (basic_block)
static bool inner_loop_header_p ()
static vec< edgeget_loop_exit_edges_unique_dests ()
static bool sel_bb_empty_or_nop_p ()
static vec< edgeget_all_loop_exits ()
static succ_iterator _succ_iter_start ()
static bool _succ_iter_cond (succ_iterator *ip, rtx *succp, rtx insn, bool check(edge, succ_iterator *))
static void _succ_iter_next ()
static bool _eligible_successor_edge_p ()
static basic_block bb_next_bb ()
ilist_t ilist_copy (ilist_t)
ilist_t ilist_invert (ilist_t)
void blist_add (blist_t *, insn_t, ilist_t, deps_t)
void blist_remove (blist_t *)
void flist_tail_init (flist_tail_t)
fence_t flist_lookup (flist_t, insn_t)
void flist_clear (flist_t *)
void def_list_add (def_list_t *, insn_t, bool)
tc_t create_target_context (bool)
void set_target_context (tc_t)
void reset_target_context (tc_t, bool)
void advance_deps_context (deps_t, insn_t)
void init_fences (insn_t)
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 move_fence_to_fences (flist_t, flist_tail_t)
regset get_regset_from_pool (void)
regset get_clear_regset_from_pool (void)
void return_regset_to_pool (regset)
void free_regset_pool (void)
insn_t get_nop_from_pool (insn_t)
void return_nop_to_pool (insn_t, bool)
void free_nop_pool (void)
bool vinsn_separable_p (vinsn_t)
bool vinsn_cond_branch_p (vinsn_t)
void recompute_vinsn_lhs_rhs (vinsn_t)
int sel_vinsn_cost (vinsn_t)
insn_t sel_gen_insn_from_rtx_after (rtx, expr_t, int, insn_t)
insn_t sel_gen_recovery_insn_from_rtx_after (rtx, expr_t, int, insn_t)
insn_t sel_gen_insn_from_expr_after (expr_t, vinsn_t, int, insn_t)
insn_t sel_move_insn (expr_t, int, insn_t)
void vinsn_attach (vinsn_t)
void vinsn_detach (vinsn_t)
vinsn_t vinsn_copy (vinsn_t, bool)
bool vinsn_equal_p (vinsn_t, vinsn_t)
void copy_expr (expr_t, expr_t)
void copy_expr_onside (expr_t, expr_t)
void merge_expr_data (expr_t, expr_t, insn_t)
void merge_expr (expr_t, expr_t, insn_t)
void clear_expr (expr_t)
unsigned expr_dest_regno (expr_t)
rtx expr_dest_reg (expr_t)
int find_in_history_vect (vec< expr_history_def >, rtx, vinsn_t, bool)
void insert_in_history_vect (vec< expr_history_def > *, unsigned, enum local_trans_type, vinsn_t, vinsn_t, ds_t)
void mark_unavailable_targets (av_set_t, av_set_t, regset)
int speculate_expr (expr_t, ds_t)
void av_set_add (av_set_t *, expr_t)
void av_set_iter_remove (av_set_iterator *)
expr_t av_set_lookup (av_set_t, vinsn_t)
expr_t merge_with_other_exprs (av_set_t *, av_set_iterator *, expr_t)
bool av_set_is_in_p (av_set_t, vinsn_t)
av_set_t av_set_copy (av_set_t)
void av_set_union_and_clear (av_set_t *, av_set_t *, insn_t)
void av_set_union_and_live (av_set_t *, av_set_t *, regset, regset, insn_t)
void av_set_clear (av_set_t *)
void av_set_leave_one_nonspec (av_set_t *)
expr_t av_set_element (av_set_t, int)
void av_set_substract_cond_branches (av_set_t *)
void av_set_split_usefulness (av_set_t, int, int)
void av_set_code_motion_filter (av_set_t *, av_set_t)
void sel_save_haifa_priorities (void)
void sel_init_global_and_expr (bb_vec_t)
void sel_finish_global_and_expr (void)
regset compute_live (insn_t)
bool register_unavailable_p (regset, rtx)
void sel_clear_has_dependence (void)
ds_t has_dependence_p (expr_t, insn_t, ds_t **)
int tick_check_p (expr_t, deps_t, fence_t)
bool lhs_of_insn_equals_to_dest_p (insn_t, rtx)
bool insn_eligible_for_subst_p (insn_t)
void get_dest_and_mode (rtx, rtx *, enum machine_mode *)
bool bookkeeping_can_be_created_if_moved_through_p (insn_t)
bool sel_remove_insn (insn_t, bool, bool)
bool bb_header_p (insn_t)
void sel_init_invalid_data_sets (insn_t)
bool insn_at_boundary_p (insn_t)
bool sel_bb_head_p (insn_t)
bool sel_bb_end_p (insn_t)
basic_block fallthru_bb_of_jump (rtx)
void sel_init_bbs (bb_vec_t)
void sel_finish_bbs (void)
struct succs_infocompute_succs_info (insn_t, short)
void free_succs_info (struct succs_info *)
bool sel_insn_has_single_succ_p (insn_t, int)
bool sel_num_cfg_preds_gt_1 (insn_t)
int get_seqno_by_preds (rtx)
bool bb_ends_ebb_p (basic_block)
bool in_same_ebb_p (insn_t, insn_t)
bool tidy_control_flow (basic_block, bool)
void free_bb_note_pool (void)
void purge_empty_blocks (void)
basic_block sel_split_edge (edge)
basic_block sel_create_recovery_block (insn_t)
bool sel_redirect_edge_and_branch (edge, basic_block)
void sel_redirect_edge_and_branch_force (edge, basic_block)
void sel_init_pipelining (void)
void sel_finish_pipelining (void)
void sel_sched_region (int)
loop_p get_loop_nest_for_rgn (unsigned int)
bool considered_for_pipelining_p (struct loop *)
void make_region_from_loop_preheader (vec< basic_block > *&)
void sel_add_loop_preheaders (bb_vec_t *)
bool sel_is_loop_preheader_p (basic_block)
void clear_outdated_rtx_info (basic_block)
void free_data_sets (basic_block)
void exchange_data_sets (basic_block, basic_block)
void copy_data_sets (basic_block, basic_block)
void sel_register_cfg_hooks (void)
void sel_unregister_cfg_hooks (void)
rtx create_insn_rtx_from_pattern (rtx, rtx)
vinsn_t create_vinsn_from_insn_rtx (rtx, bool)
rtx create_copy_of_insn_rtx (rtx)
void change_vinsn_in_expr (expr_t, vinsn_t)
void init_lv_sets (void)
void free_lv_sets (void)
void setup_nop_and_exit_insns (void)
void free_nop_and_exit_insns (void)
void free_data_for_scheduled_insn (insn_t)
void setup_nop_vinsn (void)
void free_nop_vinsn (void)
void sel_set_sched_flags (void)
void sel_setup_sched_infos (void)
void alloc_sched_pools (void)
void free_sched_pools (void)

Variables

alloc_pool sched_lists_pool
vec< sel_insn_data_defs_i_d
int global_level
flist_t fences
rtx nop_pattern
rtx exit_insn
bitmap blocks_to_reschedule
vec< sel_global_bb_info_defsel_global_bb_info
vec< sel_region_bb_info_defsel_region_bb_info
bitmap_headforced_ebb_heads
struct loopcurrent_loop_nest
sbitmap bbs_pipelined
bool enable_moveup_set_path_p
bool pipelining_p
bool bookkeeping_p
int max_insns_to_rename
bool preheader_removed
regset sel_all_regs
basic_block after_recovery

Macro Definition Documentation

#define _AV_SET_EXPR (   L)    (&(L)->u.expr)
#define _AV_SET_NEXT (   L)    (_LIST_NEXT (L))
#define _FOR_EACH (   TYPE,
  ELEM,
  I,
 
)
Value:
for (_list_iter_start (&(I), &(L), false); \
_list_iter_cond_##TYPE (*(I).lp, &(ELEM)); \
_list_iter_next (&(I)))

General macros to traverse a list. FOR_EACH_* interfaces are implemented using these.

#define _FOR_EACH_1 (   TYPE,
  ELEM,
  I,
  LP 
)
Value:
for (_list_iter_start (&(I), (LP), true); \
_list_iter_cond_##TYPE (*(I).lp, &(ELEM)); \
_list_iter_next (&(I)))
#define _FOR_EACH_X (   X,
  I,
 
)    _FOR_EACH (x, (X), (I), (L))
#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_DEF (   DEF,
  I,
  DEF_LIST 
)    _FOR_EACH (def, (DEF), (I), (DEF_LIST))
#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 FOR_EACH_INSN (   INSN,
  I,
 
)    _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 
)
Value:
for ((ITER) = _succ_iter_start (&(SUCC), (INSN), (FLAGS)); \
_succ_iter_cond (&(ITER), &(SUCC), (INSN), _eligible_successor_edge_p); \
_succ_iter_next (&(ITER)))
#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_EXPR (   INSN)    (&SID (INSN)->expr)
#define INSN_FOUND_DEPS (   INSN)    (SID (INSN)->found_deps)
#define INSN_IN_STREAM_P (   INSN)    (PREV_INSN (INSN) && NEXT_INSN (INSN))

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 (   INSN)    (SID (INSN)->live)
#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)
Value:
((size_t)((LOOP)->aux) == 1 \
? NULL \
: ((vec<basic_block> *) (LOOP)->aux))

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 
)
Value:
((LOOP)->aux \
= (BLOCKS != NULL \
? BLOCKS \
: (LOOP)->aux))
#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_LHS (   VI)    (IDATA_LHS (VINSN_ID (VI)))
#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_RHS (   VI)    (IDATA_RHS (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 Documentation

typedef struct _list_node* _list_t

List backend.

typedef _list_t _xlist_t

RTX list. This type is the backend for ilist.

Av set iterators.

typedef _list_t av_set_t

Availability sets are sets of expressions we're scheduling.

typedef _list_t blist_t

List of boundaries.

typedef struct _bnd* bnd_t

Def list iterators.

typedef struct _def* def_t
typedef struct _expr expr_def
typedef expr_def* expr_t
typedef struct _fence* fence_t
typedef _list_t flist_t

List of fences.

typedef struct flist_tail_def* flist_tail_t
typedef struct idata_def* idata_t
typedef _xlist_t ilist_t

List of insns.

typedef rtx insn_t

Instruction.

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.

typedef struct vinsn_def* vinsn_t

Enumeration Type Documentation

A variable to track which part of rtx we are scanning in sched-deps.c: sched_analyze_insn ().

Enumerator:
DEPS_IN_INSN 
DEPS_IN_LHS 
DEPS_IN_RHS 
DEPS_IN_NOWHERE 

This lists possible transformations that done locally, i.e. in moveup_expr.

Enumerator:
TRANS_SUBSTITUTION 
TRANS_SPECULATION 

Function Documentation

static bool _eligible_successor_edge_p ( )
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.   
static void _list_add ( )
inlinestatic

Referenced by _list_clear().

static void _list_clear ( )
inlinestatic

References _list_add(), and _XLIST_X.

static bool _list_iter_cond_def ( )
inlinestatic
bool _list_iter_cond_expr ( )
inline
static bool _list_iter_cond_x ( )
inlinestatic

Used through _FOR_EACH.

static void _list_iter_next ( )
inlinestatic
static void _list_iter_remove ( )
inlinestatic
static void _list_iter_remove_nofree ( )
inlinestatic
static void _list_iter_start ( )
inlinestatic

References _XLIST_X.

static void _list_remove ( )
inlinestatic

Referenced by _list_alloc().

static void _list_remove_nofree ( )
inlinestatic
static bool _succ_iter_cond ( succ_iterator ip,
rtx succp,
rtx  insn,
bool   checkedge, succ_iterator * 
)
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.

static void _succ_iter_next ( )
inlinestatic
static succ_iterator _succ_iter_start ( )
inlinestatic

We need to return a succ_iterator to avoid 'unitialized' warning during bootstrap.

Avoid 'uninitialized' warning.

     Avoid 'uninitialized' warning.   
static void _xlist_add ( )
inlinestatic

_xlist_t functions.

static bool _xlist_is_in_p ( )
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_add ( av_set_t ,
expr_t   
)

Av set functions.

void av_set_clear ( av_set_t )
void av_set_code_motion_filter ( av_set_t ,
av_set_t   
)
av_set_t av_set_copy ( av_set_t  )
expr_t av_set_element ( av_set_t  ,
int   
)
bool av_set_is_in_p ( av_set_t  ,
vinsn_t   
)
void av_set_iter_remove ( av_set_iterator )
void av_set_leave_one_nonspec ( av_set_t )
expr_t av_set_lookup ( av_set_t  ,
vinsn_t   
)
void av_set_split_usefulness ( av_set_t  ,
int  ,
int   
)
void av_set_substract_cond_branches ( av_set_t )
void av_set_union_and_clear ( av_set_t ,
av_set_t ,
insn_t   
)
void av_set_union_and_live ( av_set_t ,
av_set_t ,
regset  ,
regset  ,
insn_t   
)
bool bb_ends_ebb_p ( basic_block  )
bool bb_header_p ( insn_t  )
static basic_block bb_next_bb ( )
inlinestatic

Return the next block of BB not running into inconsistencies.

void blist_add ( blist_t ,
insn_t  ,
ilist_t  ,
deps_t   
)
void blist_remove ( blist_t )
bool bookkeeping_can_be_created_if_moved_through_p ( insn_t  )
void change_vinsn_in_expr ( expr_t  ,
vinsn_t   
)
void clear_expr ( expr_t  )
void clear_outdated_rtx_info ( basic_block  )
regset compute_live ( insn_t  )
struct succs_info* compute_succs_info ( insn_t  ,
short   
)
read
bool considered_for_pipelining_p ( struct loop )
void copy_data_sets ( basic_block  ,
basic_block   
)
void copy_expr ( expr_t  ,
expr_t   
)

EXPR functions.

void copy_expr_onside ( expr_t  ,
expr_t   
)
rtx create_copy_of_insn_rtx ( rtx  )
rtx create_insn_rtx_from_pattern ( rtx  ,
rtx   
)

Expression transformation routines.

tc_t create_target_context ( bool  )

Target context functions.

vinsn_t create_vinsn_from_insn_rtx ( rtx  ,
bool   
)
void def_list_add ( def_list_t ,
insn_t  ,
bool   
)
void exchange_data_sets ( basic_block  ,
basic_block   
)
rtx expr_dest_reg ( expr_t  )
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 )
fence_t flist_lookup ( flist_t  ,
insn_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 )
static vec<edge> get_all_loop_exits ( )
inlinestatic

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  )
av_set_t get_av_set ( insn_t  )
regset get_clear_regset_from_pool ( void  )
void get_dest_and_mode ( rtx  ,
rtx ,
enum machine_mode *   
)
static vec<edge> get_loop_exit_edges_unique_dests ( )
inlinestatic

Return exit edges of LOOP, filtering out edges with the same dest bb.

loop_p get_loop_nest_for_rgn ( unsigned  int)
insn_t get_nop_from_pool ( insn_t  )
regset get_regset_from_pool ( void  )

Pool functions.

int get_seqno_by_preds ( rtx  )
ds_t has_dependence_p ( expr_t  ,
insn_t  ,
ds_t **   
)
ilist_t ilist_copy ( ilist_t  )

Functions that are used in sel-sched.c. List functions.

ilist_t ilist_invert ( ilist_t  )
bool in_current_region_p ( basic_block  )
bool in_same_ebb_p ( insn_t  ,
insn_t   
)
void init_fences ( insn_t  )

Fences functions.

void init_lv_sets ( void  )

Various initialization functions.

static bool inner_loop_header_p ( )
inlinestatic
void insert_in_history_vect ( vec< expr_history_def > *  ,
unsigned  ,
enum  local_trans_type,
vinsn_t  ,
vinsn_t  ,
ds_t   
)
bool insn_at_boundary_p ( insn_t  )
bool insn_eligible_for_subst_p ( insn_t  )
sel_insn_data_def insn_sid ( insn_t  )
bool lhs_of_insn_equals_to_dest_p ( insn_t  ,
rtx   
)

Functions to work with insns.

void make_region_from_loop_preheader ( vec< basic_block > *&  )
void mark_unavailable_targets ( av_set_t  ,
av_set_t  ,
regset   
)
void merge_expr ( expr_t  ,
expr_t  ,
insn_t   
)
void merge_expr_data ( expr_t  ,
expr_t  ,
insn_t   
)
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  )
bool register_unavailable_p ( regset  ,
rtx   
)
void reset_target_context ( tc_t  ,
bool   
)
void return_nop_to_pool ( insn_t  ,
bool   
)
void return_regset_to_pool ( regset  )
void sel_add_loop_preheaders ( bb_vec_t *  )
static bool sel_bb_empty_or_nop_p ( )
static
bool sel_bb_empty_p ( basic_block  )
insn_t sel_bb_end ( basic_block  )
bool sel_bb_end_p ( insn_t  )
insn_t sel_bb_head ( basic_block  )

Basic block and CFG functions.

bool sel_bb_head_p ( insn_t  )
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  )
insn_t sel_gen_insn_from_expr_after ( expr_t  ,
vinsn_t  ,
int  ,
insn_t   
)
insn_t sel_gen_insn_from_rtx_after ( rtx  ,
expr_t  ,
int  ,
insn_t   
)
insn_t sel_gen_recovery_insn_from_rtx_after ( rtx  ,
expr_t  ,
int  ,
insn_t   
)
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_insn_has_single_succ_p ( insn_t  ,
int   
)
bool sel_is_loop_preheader_p ( basic_block  )
insn_t sel_move_insn ( expr_t  ,
int  ,
insn_t   
)
bool sel_num_cfg_preds_gt_1 ( insn_t  )
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  )
bool sel_remove_insn ( insn_t  ,
bool  ,
bool   
)
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   
)
int tick_check_p ( expr_t  ,
deps_t  ,
fence_t   
)
bool tidy_control_flow ( basic_block  ,
bool   
)
void vinsn_attach ( vinsn_t  )
bool vinsn_cond_branch_p ( vinsn_t  )
vinsn_t vinsn_copy ( vinsn_t  ,
bool   
)
void vinsn_detach ( vinsn_t  )
bool vinsn_equal_p ( vinsn_t  ,
vinsn_t   
)
bool vinsn_separable_p ( vinsn_t  )

Vinsns functions.


Variable Documentation

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
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.