osprey/be/cg/gcm.cxx File Reference

#include <stdint.h>
#include <alloca.h>
#include "defs.h"
#include "config.h"
#include "mempool.h"
#include "tracing.h"
#include "timing.h"
#include "cgir.h"
#include "cg.h"
#include "cg_flags.h"
#include "cgprep.h"
#include "ttype.h"
#include "targ_sim.h"
#include "bb.h"
#include "variants.h"
#include "bitset.h"
#include "bb_set.h"
#include "freq.h"
#include "cgtarget.h"
#include "cxx_memory.h"
#include "whirl2ops.h"
#include "dominate.h"
#include "findloops.h"
#include "cg_vector.h"
#include "hb_sched.h"
#include "reg_live.h"
#include "gcm.h"
#include "glob.h"
#include "cflow.h"
#include "tn_set.h"
#include "cgemit.h"
#include "gtn_universe.h"
#include "gtn_set.h"
#include "gra_live.h"
#include "tn_map.h"
#include "cg_sched_est.h"
#include "cg_loop.h"
#include "pf_cg.h"
#include "targ_proc_properties.h"
#include "tag.h"
#include <utility>
#include <map>

Include dependency graph for gcm.cxx:

Go to the source code of this file.

Defines

#define __STDC_LIMIT_MACROS
#define SPEC_NONE   0x00
#define SPEC_EAGER_PTR   0x01
#define SPEC_EAGER_NULL_PTR   0x02
#define SPEC_CIRC_PTR_ABOVE   0x04
#define SPEC_CSAFE_PTR   0x08
#define SPEC_DSAFE_PTR   0x10
#define SPEC_CDSAFE_PTR   (SPEC_CSAFE_PTR | SPEC_DSAFE_PTR)
#define SPEC_PSAFE_PTR   0x20
#define EAGER_NONE(o)   ((o) & SPEC_NONE)
#define Set_EAGER_NONE(o)   ((o) |= SPEC_NONE)
#define Reset_EAGER_NONE(o)   ((o) &= ~SPEC_NONE)
#define EAGER_PTR_SPEC(o)   ((o) & SPEC_EAGER_PTR)
#define Set_EAGER_PTR_SPEC(o)   ((o) |= SPEC_EAGER_PTR)
#define Reset_EAGER_PTR_SPEC(o)   ((o) &= ~SPEC_EAGER_PTR)
#define EAGER_NULL_PTR_SPEC(o)   ((o) & SPEC_EAGER_NULL_PTR)
#define Set_EAGER_NULL_PTR_SPEC(o)   ((o) |= SPEC_EAGER_NULL_PTR)
#define Reset_EAGER_NULL_PTR_SPEC(o)   ((o) &= ~SPEC_EAGER_NULL_PTR)
#define CIRC_PTR_SPEC(o)   ((o) & SPEC_CIRC_PTR_ABOVE)
#define Set_CIRC_PTR_SPEC(o)   ((o) |= SPEC_CIRC_PTR_ABOVE)
#define Reset_CIRC_PTR_SPEC(o)   ((o) &= ~SPEC_CIRC_PTR_ABOVE)
#define CSAFE_PTR_SPEC(o)   ((o) & SPEC_CSAFE_PTR)
#define Set_CSAFE_PTR_SPEC(o)   ((o) |= SPEC_CSAFE_PTR)
#define Reset_CSAFE_PTR_SPEC(o)   ((o) &= ~SPEC_CSAFE_PTR)
#define DSAFE_PTR_SPEC(o)   ((o) & SPEC_DSAFE_PTR)
#define Set_DSAFE_PTR_SPEC(o)   ((o) |= SPEC_DSAFE_PTR)
#define Reset_DSAFE_PTR_SPEC(o)   ((o) &= ~SPEC_DSAFE_PTR)
#define CDSAFE_PTR_SPEC(o)   ((o) & SPEC_CDSAFE_PTR)
#define Set_CDSAFE_PTR_SPEC(o)   ((o) |= SPEC_CDSAFE_PTR)
#define Reset_CDSAFE_PTR_SPEC(o)   ((o) &= ~SPEC_CDSAFE_PTR)
#define PSAFE_PTR_SPEC(o)   ((o) & SPEC_PSAFE_PTR)
#define Set_PSAFE_PTR_SPEC(o)   ((o) |= SPEC_PSAFE_PTR)
#define Reset_PSAFE_PTR_SPEC(o)   ((o) &= ~SPEC_PSAFE_PTR)
#define BB_cycle_set(bb)   ((BS *)BB_MAP_Get(bb_cycle_set_map, (bb)))
#define Set_BB_cycle_set(bb, bs)   (BB_MAP_Set(bb_cycle_set_map, (bb), (bs)))
#define Large_BB(bb, loop)
#define Null_Ptr_Offset_ok(op)   OP_Offset_Within_Limit(op, -1, 256)

Functions/Subroutines

static INT sort_by_bb_frequency (const void *bb1, const void *bb2)
static INT sort_by_edge_probability (const void *bl1, const void *bl2)
static INT sort_by_bb_live_in (const void *bb1, const void *bb2)
static BOOL Is_BB_Empty (BB *bb)
static void Print_Trace_File (OP *cand_op, BB *src_bb, BB *cand_bb, BOOL success)
static BOOL OP_Is_Expensive (OP *cur_op)
static OPFirst_Inst_Of_BB (BB *bb)
BOOL within_bounds (INT num1, INT num2, INT lower_bound, INT upper_bound)
static BOOL OP_Offset_Within_Limit (OP *mem_op1, OP *mem_op2, INT lower_bound, INT upper_bound)
static BOOL Check_If_Ignore_BB (BB *bb, LOOP_DESCR *loop)
BOOL Similar_Ptr_Offset_ok (OP *cur_op, OP *deref_op)
static BOOL Similar_Ptr_Addrs_Match (OP *pred_op, OP *succ_op)
static BOOL OP_Has_Restrictions (OP *op, BB *source_bb, BB *target_bb, mINT32 motion_type)
BOOL Can_Do_Safe_Predicate_Movement (OP *cur_op, BB *src_bb, BB *tgt_bb, mINT32 motion_type)
static BOOL Eager_Ptr_Deref_Spec (OP *deref_op, BB *dest_bb, BOOL forw)
static BOOL Null_Ptr_Deref_Spec (OP *deref_op, BB *src, BB *dest)
static BOOL Can_Mem_Op_Be_Moved (OP *mem_op, BB *cur_bb, BB *src_bb, BB *dest_bb, mINT32 motion_type)
static BOOL Can_Inst_Be_Moved (OP *op, VECTOR succs_vector, INT succ_num)
static INT16 Find_Vacant_Slots_BB (BB *bb, INT targ_alignment)
static OPFind_OP_For_Delay_Slot (BB *bb)
static BOOL Fill_From_Successor (BB *bb, OP *xfer_op, VECTOR succs_vector, INT succ_num)
void GCM_Fill_Branch_Delay_Slots (void)
static OPFind_Limit_OP (OP *cur_op, BB *cur_bb, BB *src_bb, BB *tgt_bb)
static BOOL Can_OP_Move (OP *cur_op, BB *src_bb, BB *tgt_bb, BB_SET **pred_bbs, void *defs[2], void *uses[2], mINT32 motion_type, mUINT8 *spec_type)
static BOOL GTN_Live_Out_From_BB (BB *cand_bb, TN *use_tn)
static void Update_Live_In_Sets (TN *use_tn, BB *src_bb, BB *tgt_bb, BB_SET **pred_bbs)
static void Update_Live_Use_Counts (BB *cur_bb, OP *cur_op, hTN_MAP *usage_map)
static void Update_GRA_Live_Sets (OP *cand_op, BB *bb, BB *cand_bb, BB_SET **pred_bbs)
static BOOL Is_OP_Move_Better (OP *cur_op, OP *best_op, mINT32 motion_type)
static mINT32 Determine_Motion_Type (LOOP_DESCR *loop, BB *bb, BBSCH *bbsch)
static void Determine_Candidate_Blocks (BB *bb, LOOP_DESCR *loop, mINT32 motion_type, VECTOR *priority_vector, VECTOR *cand_bbvector)
static void Perform_Post_GCM_Steps (BB *bb, BB *cand_bb, OP *cand_op, mINT32 motion_type, mUINT8 spec_type, BB_SET **pred_bbs, LOOP_DESCR *loop, BOOL success)
static void Add_Fail_TNs (OP *cur_op, TN_SET **pfailed_tn_uses, TN_SET **pfailed_tn_defs, TN_SET **pfailed_gtn_uses, TN_SET **pfailed_gtn_defs, REGISTER_SET *failed_reg_uses, REGISTER_SET *failed_reg_defs)
static OPOP_To_Move (BB *bb, BB *tgt_bb, BB_SET **pred_bbs, mINT32 motion_type, mUINT8 *spec_type)
static void Adjust_Qualifying_Predicate (OP *cand_op, BB *src_bb, BB *tgt_bb, mINT32 motion_type, mUINT8 spec_type)
static BOOL Dependent_Between_OPs (OP *op_a, OP *op_b)
static BOOL Append_Op_To_BB (OP *cand_op, BB *cand_bb, BB *src_bb, mINT32 motion_type, mUINT8 spec_type)
static void Adjust_BBSCH (OP *cand_op, BB *cand_bb, BB *bb, BBSCH *new_cand_bbsch, BBSCH *new_bbsch)
static BOOL Is_Schedule_Worse (BB *bb, BB *cand_bb, BBSCH *new_bbsch, BBSCH *new_cand_bbsch, BBSCH *old_bbsch, BBSCH *old_cand_bbsch)
static BBSCHSchedule_BB_For_GCM (BB *bb, HBS_TYPE hb_type, HB_Schedule **Sched)
static void Visit_BB_Preds (BB *bb, BB *head, BB_SET *loop_bbs, INT icycle, INT ncycles)
static INT GCM_For_Loop (LOOP_DESCR *loop, BB_SET *processed_bbs, HBS_TYPE hb_type)
void GCM_Schedule_Region (HBS_TYPE hbs_type)

Variables

BOOL GCM_POST_Spec_Loads = TRUE
BOOL GCM_PRE_Spec_Loads = TRUE
BOOL GCM_Use_Sched_Est = FALSE
BOOL GCM_Forw_Circ_Motion = TRUE
BOOL GCM_POST_Force_Scheduling = FALSE
BOOL CG_Skip_GCM = FALSE
INT32 GCM_From_BB = -1
INT32 GCM_To_BB = -1
INT32 GCM_Result_TN = -1
INT32 loop_id
static float speculation_ratio_wfb = 0.35
static float speculation_ratio_fb = 0.75
static BOOL Trace_GCM = FALSE
static BOOL Trace_GCM_Reg_Usage = FALSE
static BOOL Trace_Fill_Delay_Slots = FALSE
static BOOL GCM_Internal_Flag = TRUE
static BOOL Trace_GCM_Dump_IR = FALSE
static BOOL Trace_GCM_Dump_Preprocess = FALSE
static BOOL Trace_GCM_Merge_BBs = FALSE
static BBGCM_Loop_Prolog
static INT32 mispredict
static INT32 fixed
static INT32 taken
static double times
static BB_MAP bbsch_map
static MEM_POOL loop_descr_pool
static MEM_POOL gcm_loop_pool
static HBS_TYPE cur_hbs_type
static BB_MAP bb_cycle_set_map
static BOOL Run_Cflow_Delay
BOOL Run_Cflow_GCM
GCM_TYPE Cur_Gcm_Type
static BOOL Ignore_TN_Dep
static INT cur_pc = 0


Define Documentation

#define __STDC_LIMIT_MACROS

Definition at line 59 of file gcm.cxx.

#define BB_cycle_set ( bb   )     ((BS *)BB_MAP_Get(bb_cycle_set_map, (bb)))

Definition at line 210 of file gcm.cxx.

Referenced by GCM_For_Loop(), and Visit_BB_Preds().

#define CDSAFE_PTR_SPEC ( o   )     ((o) & SPEC_CDSAFE_PTR)

Definition at line 160 of file gcm.cxx.

#define CIRC_PTR_SPEC ( o   )     ((o) & SPEC_CIRC_PTR_ABOVE)

Definition at line 151 of file gcm.cxx.

#define CSAFE_PTR_SPEC ( o   )     ((o) & SPEC_CSAFE_PTR)

Definition at line 154 of file gcm.cxx.

#define DSAFE_PTR_SPEC ( o   )     ((o) & SPEC_DSAFE_PTR)

Definition at line 157 of file gcm.cxx.

#define EAGER_NONE ( o   )     ((o) & SPEC_NONE)

#define EAGER_NULL_PTR_SPEC ( o   )     ((o) & SPEC_EAGER_NULL_PTR)

Definition at line 148 of file gcm.cxx.

#define EAGER_PTR_SPEC ( o   )     ((o) & SPEC_EAGER_PTR)

Definition at line 145 of file gcm.cxx.

#define Large_BB ( bb,
loop   ) 

Value:

(LOOP_DESCR_nestlevel((loop)) == 0 && \
        BB_length((bb)) >= (Split_BB_Length/2 - 60))

Definition at line 452 of file gcm.cxx.

Referenced by Check_If_Ignore_BB(), and GCM_For_Loop().

#define Null_Ptr_Offset_ok ( op   )     OP_Offset_Within_Limit(op, -1, 256)

Definition at line 554 of file gcm.cxx.

#define PSAFE_PTR_SPEC ( o   )     ((o) & SPEC_PSAFE_PTR)

Definition at line 163 of file gcm.cxx.

Referenced by Adjust_Qualifying_Predicate(), and Perform_Post_GCM_Steps().

#define Reset_CDSAFE_PTR_SPEC ( o   )     ((o) &= ~SPEC_CDSAFE_PTR)

Definition at line 162 of file gcm.cxx.

#define Reset_CIRC_PTR_SPEC ( o   )     ((o) &= ~SPEC_CIRC_PTR_ABOVE)

Definition at line 153 of file gcm.cxx.

#define Reset_CSAFE_PTR_SPEC ( o   )     ((o) &= ~SPEC_CSAFE_PTR)

Definition at line 156 of file gcm.cxx.

#define Reset_DSAFE_PTR_SPEC ( o   )     ((o) &= ~SPEC_DSAFE_PTR)

Definition at line 159 of file gcm.cxx.

#define Reset_EAGER_NONE ( o   )     ((o) &= ~SPEC_NONE)

Definition at line 144 of file gcm.cxx.

#define Reset_EAGER_NULL_PTR_SPEC ( o   )     ((o) &= ~SPEC_EAGER_NULL_PTR)

Definition at line 150 of file gcm.cxx.

#define Reset_EAGER_PTR_SPEC ( o   )     ((o) &= ~SPEC_EAGER_PTR)

Definition at line 147 of file gcm.cxx.

#define Reset_PSAFE_PTR_SPEC ( o   )     ((o) &= ~SPEC_PSAFE_PTR)

Definition at line 165 of file gcm.cxx.

#define Set_BB_cycle_set ( bb,
bs   )     (BB_MAP_Set(bb_cycle_set_map, (bb), (bs)))

Definition at line 211 of file gcm.cxx.

Referenced by Visit_BB_Preds().

#define Set_CDSAFE_PTR_SPEC ( o   )     ((o) |= SPEC_CDSAFE_PTR)

Definition at line 161 of file gcm.cxx.

#define Set_CIRC_PTR_SPEC ( o   )     ((o) |= SPEC_CIRC_PTR_ABOVE)

Definition at line 152 of file gcm.cxx.

#define Set_CSAFE_PTR_SPEC ( o   )     ((o) |= SPEC_CSAFE_PTR)

Definition at line 155 of file gcm.cxx.

Referenced by Can_OP_Move().

#define Set_DSAFE_PTR_SPEC ( o   )     ((o) |= SPEC_DSAFE_PTR)

Definition at line 158 of file gcm.cxx.

#define Set_EAGER_NONE ( o   )     ((o) |= SPEC_NONE)

Definition at line 143 of file gcm.cxx.

#define Set_EAGER_NULL_PTR_SPEC ( o   )     ((o) |= SPEC_EAGER_NULL_PTR)

Definition at line 149 of file gcm.cxx.

Referenced by Can_OP_Move().

#define Set_EAGER_PTR_SPEC ( o   )     ((o) |= SPEC_EAGER_PTR)

Definition at line 146 of file gcm.cxx.

Referenced by Can_OP_Move().

#define Set_PSAFE_PTR_SPEC ( o   )     ((o) |= SPEC_PSAFE_PTR)

Definition at line 164 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_CDSAFE_PTR   (SPEC_CSAFE_PTR | SPEC_DSAFE_PTR)

Definition at line 139 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_CIRC_PTR_ABOVE   0x04

Definition at line 136 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_CSAFE_PTR   0x08

Definition at line 137 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_DSAFE_PTR   0x10

Definition at line 138 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_EAGER_NULL_PTR   0x02

Definition at line 135 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_EAGER_PTR   0x01

Definition at line 134 of file gcm.cxx.

Referenced by Can_OP_Move().

#define SPEC_NONE   0x00

#define SPEC_PSAFE_PTR   0x20

Definition at line 140 of file gcm.cxx.

Referenced by Can_OP_Move().


Function Documentation

static void Add_Fail_TNs ( OP cur_op,
TN_SET **  pfailed_tn_uses,
TN_SET **  pfailed_tn_defs,
TN_SET **  pfailed_gtn_uses,
TN_SET **  pfailed_gtn_defs,
REGISTER_SET failed_reg_uses,
REGISTER_SET failed_reg_defs 
) [static]

static void Adjust_BBSCH ( OP cand_op,
BB cand_bb,
BB bb,
BBSCH new_cand_bbsch,
BBSCH new_bbsch 
) [static]

static void Adjust_Qualifying_Predicate ( OP cand_op,
BB src_bb,
BB tgt_bb,
mINT32  motion_type,
mUINT8  spec_type 
) [static]

static BOOL Append_Op_To_BB ( OP cand_op,
BB cand_bb,
BB src_bb,
mINT32  motion_type,
mUINT8  spec_type 
) [static]

BOOL Can_Do_Safe_Predicate_Movement ( OP cur_op,
BB src_bb,
BB tgt_bb,
mINT32  motion_type 
)

static BOOL Can_Inst_Be_Moved ( OP op,
VECTOR  succs_vector,
INT  succ_num 
) [static]

static BOOL Can_Mem_Op_Be_Moved ( OP mem_op,
BB cur_bb,
BB src_bb,
BB dest_bb,
mINT32  motion_type 
) [static]

static BOOL Can_OP_Move ( OP cur_op,
BB src_bb,
BB tgt_bb,
BB_SET **  pred_bbs,
void defs[2],
void uses[2],
mINT32  motion_type,
mUINT8 spec_type 
) [static]

Definition at line 1848 of file gcm.cxx.

References ASM_OP_clobber_set, ASM_OP_opnd_memory, ASM_OP_result_memory, BB_dom_set, BB_first_op, BB_id, BB_last_op, BB_live_def, BB_live_in, BB_pdom_set, BBLIST_item, BOOL, BS_MemberP(), Build_Dedicated_TN(), Can_Do_Safe_Predicate_Movement(), Can_Mem_Op_Be_Moved(), CG_DEP_Can_OP_Move_Across_Call(), CG_Skip_GCM, CGTARG_Can_Be_Speculative(), CGTARG_Is_OP_Barrier(), cl(), Eager_Ptr_Deref_Spec(), FALSE, Find_Limit_OP(), FOR_ALL_BB_SUCCS, FOR_ALL_ISA_REGISTER_CLASS(), FOR_ALL_REGISTER_SET_members, GCM_CIRC_ABOVE, GCM_DUP_ABOVE, GCM_Eager_Null_Ptr_Deref, GCM_Eager_Ptr_Deref, GCM_EQUIV_FWD, GCM_Pointer_Spec, GCM_Predicated_Loads, GCM_Result_TN, GCM_SPEC_ABOVE, GCM_SPEC_BELOW, GCM_Speculative_Loads, GCM_To_BB, GTN_UNIVERSE_size, i, Ignore_TN_Dep, INT, Is_Target_Itanium, Last_TN, MEM_local_pool, Motion_Is_CIRC_ABOVE, mUINT32, NULL, Null_Ptr_Deref_Spec(), OP_Asm_Map, OP_br, OP_call, OP_code, OP_dummy, OP_Is_Expensive(), OP_load, OP_MAP_Get(), OP_memory, OP_next, OP_opnd, OP_opnds, OP_prev, OP_result, OP_results, REG_LIVE_Into_BB(), REGISTER_SET_Union(), REGISTER_SET_Union1(), REGISTER_UNDEFINED, REGSET_CLEAR(), REGSET_INTERSECT(), result, Set_CSAFE_PTR_SPEC, Set_EAGER_NULL_PTR_SPEC, Set_EAGER_PTR_SPEC, Set_PSAFE_PTR_SPEC, SPEC_CDSAFE_PTR, SPEC_CIRC_PTR_ABOVE, SPEC_CSAFE_PTR, SPEC_DSAFE_PTR, SPEC_EAGER_NULL_PTR, SPEC_EAGER_PTR, SPEC_NONE, SPEC_PSAFE_PTR, TN_is_constant, TN_is_dedicated, TN_is_global_reg, TN_number, TN_register, TN_register_class, TRUE, and Use_Page_Zero.

Referenced by OP_To_Move(), and Perform_Global_Schedule().

static BOOL Check_If_Ignore_BB ( BB bb,
LOOP_DESCR loop 
) [static]

static BOOL Dependent_Between_OPs ( OP op_a,
OP op_b 
) [static]

Definition at line 3698 of file gcm.cxx.

References FALSE, i, OP_opnd, OP_opnds, OP_result, OP_results, TN_is_constant, TN_number, and TRUE.

Referenced by Append_Op_To_BB().

static void Determine_Candidate_Blocks ( BB bb,
LOOP_DESCR loop,
mINT32  motion_type,
VECTOR priority_vector,
VECTOR cand_bbvector 
) [static]

static mINT32 Determine_Motion_Type ( LOOP_DESCR loop,
BB bb,
BBSCH bbsch 
) [static]

static BOOL Eager_Ptr_Deref_Spec ( OP deref_op,
BB dest_bb,
BOOL  forw 
) [static]

static BOOL Fill_From_Successor ( BB bb,
OP xfer_op,
VECTOR  succs_vector,
INT  succ_num 
) [static]

static OP* Find_Limit_OP ( OP cur_op,
BB cur_bb,
BB src_bb,
BB tgt_bb 
) [static]

Definition at line 1755 of file gcm.cxx.

References BB_copy_xfer_op(), BB_last_op, BB_xfer_op(), Cur_Gcm_Type, GCM_BEFORE_GRA, NULL, and OP_prev.

Referenced by Can_OP_Move().

static OP* Find_OP_For_Delay_Slot ( BB bb  )  [static]

Definition at line 1506 of file gcm.cxx.

References First_Inst_Of_BB().

Referenced by Fill_From_Successor().

static INT16 Find_Vacant_Slots_BB ( BB bb,
INT  targ_alignment 
) [static]

static OP* First_Inst_Of_BB ( BB bb  )  [static]

Definition at line 395 of file gcm.cxx.

References BB_preds, BB_succs, BBLIST_item, BBlist_Len(), FOR_ALL_BB_OPs_FWD, NULL, and OP_dummy.

Referenced by Find_OP_For_Delay_Slot().

void GCM_Fill_Branch_Delay_Slots ( void   ) 

static INT GCM_For_Loop ( LOOP_DESCR loop,
BB_SET *  processed_bbs,
HBS_TYPE  hb_type 
) [static]

Definition at line 4289 of file gcm.cxx.

References Adjust_BBSCH(), Align_Instructions, Append_Op_To_BB(), BB_ALIGNED, BB_cycle_set, BB_exit, BB_freq, BB_id, BB_in_preds(), BB_Insert_Op_After(), BB_last_op, BB_length, BB_MAP_Create, BB_preds_len(), BB_Prepend_Op(), BB_Remove_Op(), BB_rid, BB_scheduled, BB_scheduled_hbs, BB_succs_len(), BBLIST_item, BBSCH_flags, BBSCH_schedule_length, BCOPY, bcopy(), BOOL, BS_EqualP(), bzero(), CG_Skip_GCM, CGTARG_Text_Alignment(), Check_If_Ignore_BB(), count, Cur_Gcm_Type, DBar, Determine_Candidate_Blocks(), Determine_Motion_Type(), fail, FALSE, find(), Find_Vacant_Slots_BB(), FmtAssert, FOR_ALL_BB_OPs, FOR_ALL_BB_PREDS, FOR_ALL_BB_SUCCS, fprintf(), GCM_Dead_Code_Elimination(), GCM_From_BB, GCM_Internal_Flag, GCM_MINIMIZE_REGS, GCM_NONE, GCM_Test, GCM_To_BB, Get_OP_Tag(), HBS_BEFORE_GRA, HBS_BEFORE_LRA, HBS_FROM_GCM_FROM_BB, HBS_FROM_GCM_TO_BB, HBS_FROM_POST_GCM_SCHED, HBS_FROM_POST_GCM_SCHED_AGAIN, HBS_FROM_PRE_GCM_SCHED, HBS_FROM_PRE_GCM_SCHED_AGAIN, i, Ignore_TN_Dep, INST_BYTES, INT, INT16, Is_BB_Empty(), Is_Schedule_Worse(), Is_True, L_Free, L_Save, Large_BB, Last_TN, LOOP_DESCR_bbset, LOOP_DESCR_loophead, LOOP_DESCR_nestlevel, loop_id, MEM_local_pool, mINT32, Motion_Is_CIRC_ABOVE, Motion_Is_DUP_ABOVE, Motion_Is_DUP_BELOW, Motion_Is_EQUIV_BKWD, Motion_Is_EQUIV_FWD, Motion_Is_SPEC_ABOVE, Motion_Is_SPEC_BELOW, mUINT8, NULL, OP_has_tag, OP_load, OP_noop, OP_opnd, OP_PREDICATE_OPND, OP_prev, OP_To_Move(), Perform_Post_GCM_Steps(), pos(), Print_BB_No_Srclines(), Print_OP_No_SrcLine(), Print_Trace_File(), PU_BB_Count, Reset_BB_SCHEDULE, Reset_BB_scheduled, Reset_OP_has_tag, Reset_OP_moved, Reset_OP_visited, RID_level, RL_CGSCHED, Run_Cflow_GCM, Schedule_BB_For_GCM(), Set_BB_flags, Set_BB_SCHEDULE, Set_OP_moved, Set_OP_opnd, Set_OP_Tag(), Set_OP_visited, SORT_BY_BB_FREQ, sort_by_bb_frequency(), SORT_BY_BB_PARALLELISM, SORT_BY_REG_USAGE, Split_BB_Length, TFile, Trace_GCM, Trace_GCM_Dump_IR, TRUE, TYPE_MEM_POOL_ALLOC, VECTOR_Add_Element(), VECTOR_count, VECTOR_element, VECTOR_Init(), VECTOR_size, VECTOR_Sort(), and Visit_BB_Preds().

Referenced by GCM_Schedule_Region().

void GCM_Schedule_Region ( HBS_TYPE  hbs_type  ) 

Definition at line 5252 of file gcm.cxx.

References BB_call, BB_entry, BB_first_op, BB_MAP_Create, BB_MAP_Delete(), BB_MAP_Get(), BB_MAP_Set(), BB_Mark_Unreachable_Blocks(), BB_next, BB_rid, BB_scheduled, BB_scheduled_hbs, BB_unreachable, BOOL, BZERO, Calculate_Dominators(), CG_opt_level, CGTARG_Compute_Branch_Parameters(), Check_for_Dump(), Check_If_Should_Align_BB(), Cur_Gcm_Type, cur_hbs_type, cur_pc, Cur_PU_Name, FALSE, fixed, fprintf(), Free_Dominators_Memory(), GCM_AFTER_GRA, GCM_BEFORE_GRA, GCM_For_Loop(), GCM_Min_Reg_Usage, GCM_MINIMIZE_REGS, GCM_POST_Enable_Scheduling, GCM_PRE_Enable_Scheduling, GCM_TRACE_DUMP_IR, GCM_TRACE_MERGE_BBS, GCM_TRACE_NORMAL, GCM_TRACE_PREPROCESS, Get_Trace(), HBS_BEFORE_GRA, HBS_BEFORE_LRA, HBS_FROM_GCM, Ignore_TN_Dep, INST_BYTES, INT, INT16, L_Free, L_Save, LOOP_DESCR_bbset, LOOP_DESCR_Detect_Loops(), LOOP_DESCR_flags, LOOP_DESCR_loophead, LOOP_DESCR_loopinfo, LOOP_DESCR_nestlevel, LOOP_DESCR_next, LOOP_DESCR_num_exits, loop_id, loop_list, LOOP_Redundant_Copy_Elimination(), LOOP_DESCR::mem_pool, MEM_POOL_Delete(), MEM_POOL_Initialize, MEM_POOL_Pop, MEM_POOL_Push, mispredict, NULL, OP_next, OP_Real_Ops(), Perform_Loop_Invariant_Code_Motion(), PU_BB_Count, REG_LIVE_Analyze_Region(), REG_LIVE_Finish(), REGION_First_BB, RID_level, RL_CGSCHED, Run_Cflow_GCM, Set_BB_ALIGNED, Set_BB_num_align_nops, Set_BB_num_real_ops, Set_BB_SCHEDULE, Set_BB_start_pc, Set_Call_Loop, Set_Error_Phase(), Set_Exit_Loop, Set_Inner_Loop, Set_Multibb_Loop, Start_Timer(), Stop_Timer(), T_GCM_CU, taken, TFile, times, TP_GCM, Trace_GCM, Trace_GCM_Dump_IR, Trace_GCM_Dump_Preprocess, Trace_GCM_Merge_BBs, TRUE, TYPE_L_ALLOC, and TYPE_MEM_POOL_ALLOC.

Referenced by IGLS_Schedule_Region().

static BOOL GTN_Live_Out_From_BB ( BB cand_bb,
TN use_tn 
) [static]

Definition at line 2319 of file gcm.cxx.

References BB_live_in, BBLIST_item, FALSE, FOR_ALL_BB_SUCCS, TN_is_global_reg, and TRUE.

Referenced by Update_GRA_Live_Sets().

static BOOL Is_BB_Empty ( BB bb  )  [static]

Definition at line 351 of file gcm.cxx.

References BB_first_op, FALSE, NULL, OP_next, OP_Real_Ops(), and TRUE.

static BOOL Is_OP_Move_Better ( OP cur_op,
OP best_op,
mINT32  motion_type 
) [static]

static BOOL Is_Schedule_Worse ( BB bb,
BB cand_bb,
BBSCH new_bbsch,
BBSCH new_cand_bbsch,
BBSCH old_bbsch,
BBSCH old_cand_bbsch 
) [static]

static BOOL Null_Ptr_Deref_Spec ( OP deref_op,
BB src,
BB dest 
) [static]

static BOOL OP_Has_Restrictions ( OP op,
BB source_bb,
BB target_bb,
mINT32  motion_type 
) [static]

static BOOL OP_Is_Expensive ( OP cur_op  )  [static]

Definition at line 384 of file gcm.cxx.

References CGTARG_Is_Long_Latency(), and OP_code.

Referenced by Can_OP_Move().

static BOOL OP_Offset_Within_Limit ( OP mem_op1,
OP mem_op2,
INT  lower_bound,
INT  upper_bound 
) [static]

Definition at line 424 of file gcm.cxx.

References FALSE, INT, NULL, OP_code, OP_opnd, TN_has_value, TN_value, and within_bounds().

Referenced by Similar_Ptr_Offset_ok().

static OP* OP_To_Move ( BB bb,
BB tgt_bb,
BB_SET **  pred_bbs,
mINT32  motion_type,
mUINT8 spec_type 
) [static]

static void Perform_Post_GCM_Steps ( BB bb,
BB cand_bb,
OP cand_op,
mINT32  motion_type,
mUINT8  spec_type,
BB_SET **  pred_bbs,
LOOP_DESCR loop,
BOOL  success 
) [static]

static void Print_Trace_File ( OP cand_op,
BB src_bb,
BB cand_bb,
BOOL  success 
) [static]

Definition at line 365 of file gcm.cxx.

References BB_id, fprintf(), Ignore_TN_Dep, Print_OP_No_SrcLine(), str, and TFile.

Referenced by GCM_For_Loop(), and Perform_Post_GCM_Steps().

static BBSCH* Schedule_BB_For_GCM ( BB bb,
HBS_TYPE  hb_type,
HB_Schedule **  Sched 
) [static]

static BOOL Similar_Ptr_Addrs_Match ( OP pred_op,
OP succ_op 
) [static]

BOOL Similar_Ptr_Offset_ok ( OP cur_op,
OP deref_op 
) [inline]

static INT sort_by_bb_frequency ( const void bb1,
const void bb2 
) [static]

Definition at line 291 of file gcm.cxx.

References A, B, BB_freq, and BB_id.

Referenced by GCM_For_Loop().

static INT sort_by_bb_live_in ( const void bb1,
const void bb2 
) [static]

Definition at line 331 of file gcm.cxx.

References BB_freq, BB_live_in, UINT8, and x.

static INT sort_by_edge_probability ( const void bl1,
const void bl2 
) [static]

Definition at line 318 of file gcm.cxx.

References BBLIST_prob.

Referenced by GCM_Fill_Branch_Delay_Slots().

static void Update_GRA_Live_Sets ( OP cand_op,
BB bb,
BB cand_bb,
BB_SET **  pred_bbs 
) [static]

static void Update_Live_In_Sets ( TN use_tn,
BB src_bb,
BB tgt_bb,
BB_SET **  pred_bbs 
) [static]

static void Update_Live_Use_Counts ( BB cur_bb,
OP cur_op,
hTN_MAP usage_map 
) [static]

static void Visit_BB_Preds ( BB bb,
BB head,
BB_SET *  loop_bbs,
INT  icycle,
INT  ncycles 
) [static]

BOOL within_bounds ( INT  num1,
INT  num2,
INT  lower_bound,
INT  upper_bound 
) [inline]

Definition at line 414 of file gcm.cxx.

Referenced by OP_Offset_Within_Limit().


Variable Documentation

Definition at line 208 of file gcm.cxx.

BB_MAP bbsch_map [static]

Definition at line 189 of file gcm.cxx.

BOOL CG_Skip_GCM = FALSE

Definition at line 123 of file gcm.cxx.

Referenced by Can_OP_Move(), and GCM_For_Loop().

Definition at line 197 of file gcm.cxx.

Referenced by GCM_Schedule_Region(), and OP_Has_Restrictions().

INT cur_pc = 0 [static]

Definition at line 221 of file gcm.cxx.

Referenced by Fixup_Long_Branches(), GCM_Schedule_Region(), and Recompute_Label_Offset().

INT32 fixed [static]

Definition at line 121 of file gcm.cxx.

Referenced by Determine_Motion_Type().

Definition at line 124 of file gcm.cxx.

Referenced by GCM_For_Loop().

BOOL GCM_Internal_Flag = TRUE [static]

Definition at line 179 of file gcm.cxx.

Referenced by GCM_For_Loop(), and Is_Schedule_Worse().

Definition at line 195 of file gcm.cxx.

BB* GCM_Loop_Prolog [static]

Definition at line 183 of file gcm.cxx.

Definition at line 122 of file gcm.cxx.

Referenced by Check_If_Ignore_BB().

Definition at line 114 of file gcm.cxx.

Referenced by Can_Mem_Op_Be_Moved().

Definition at line 115 of file gcm.cxx.

Referenced by Can_Mem_Op_Be_Moved().

Definition at line 126 of file gcm.cxx.

Referenced by Can_OP_Move().

Definition at line 125 of file gcm.cxx.

Referenced by Can_OP_Move(), and GCM_For_Loop().

Definition at line 119 of file gcm.cxx.

Referenced by Schedule_BB_For_GCM().

BOOL Ignore_TN_Dep [static]

Definition at line 192 of file gcm.cxx.

Referenced by Perform_Loop_Invariant_Code_Motion(), and Perform_Loop_Optimizations().

INT32 mispredict [static]

Definition at line 186 of file gcm.cxx.

Referenced by Calculate_Path_Priorities(), GCM_Schedule_Region(), and Is_Schedule_Worse().

Definition at line 215 of file gcm.cxx.

Referenced by Fill_From_Successor(), and GCM_Fill_Branch_Delay_Slots().

float speculation_ratio_fb = 0.75 [static]

Definition at line 172 of file gcm.cxx.

Referenced by Determine_Candidate_Blocks().

float speculation_ratio_wfb = 0.35 [static]

Definition at line 171 of file gcm.cxx.

Referenced by Determine_Candidate_Blocks().

INT32 taken [static]

double times [static]

Definition at line 187 of file gcm.cxx.

BOOL Trace_Fill_Delay_Slots = FALSE [static]

Definition at line 178 of file gcm.cxx.

Referenced by Fill_From_Successor(), and GCM_Fill_Branch_Delay_Slots().

BOOL Trace_GCM = FALSE [static]

BOOL Trace_GCM_Dump_IR = FALSE [static]

Definition at line 180 of file gcm.cxx.

Referenced by GCM_For_Loop(), and GCM_Schedule_Region().

BOOL Trace_GCM_Dump_Preprocess = FALSE [static]

Definition at line 181 of file gcm.cxx.

Referenced by GCM_Schedule_Region().

BOOL Trace_GCM_Merge_BBs = FALSE [static]

Definition at line 182 of file gcm.cxx.

Referenced by GCM_Schedule_Region().

BOOL Trace_GCM_Reg_Usage = FALSE [static]

Definition at line 177 of file gcm.cxx.

Referenced by Is_Schedule_Worse().


Generated on Wed Apr 8 14:26:04 2009 for Open64 by  doxygen 1.5.6