00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #ifndef hb_sched_INCLUDED
00058 #define hb_sched_INCLUDED
00059
00060 #include "bb_set.h"
00061 #include "cg_vector.h"
00062 #include "ti_res_res.h"
00063 #include "hb.h"
00064 #include "tn_map.h"
00065 #include "targ_isa_bundle.h"
00066 #include "ti_bundle.h"
00067
00068
00069 #define HBS_BEFORE_GRA 0x0001
00070 #define HBS_BEFORE_LRA 0x0002
00071 #define HBS_CRITICAL_PATH 0x0004
00072 #define HBS_DEPTH_FIRST 0x0008
00073 #define HBS_MINIMIZE_REGS 0x0010
00074 #define HBS_FROM_GCM 0x0020
00075 #define HBS_FROM_PRE_GCM_SCHED 0x0040
00076 #define HBS_FROM_POST_GCM_SCHED 0x0080
00077 #define HBS_FROM_CGPREP 0x0100
00078 #define HBS_FROM_PRE_GCM_SCHED_AGAIN 0x0200
00079 #define HBS_FROM_POST_GCM_SCHED_AGAIN 0x0400
00080 #define HBS_FROM_GCM_FROM_BB 0x0800
00081 #define HBS_FROM_GCM_TO_BB 0x1000
00082 #define HBS_MINIMIZE_BUNDLES 0x2000
00083 #ifdef KEY
00084 #define HBS_BALANCE_READY_TYPES 0x4000
00085 #define HBS_BALANCE_UNSCHED_TYPES 0x8000
00086 #define HBS_DROP_UNSCHED_PREFETCHES 0x10000
00087 #endif
00088
00089 #ifdef KEY
00090 typedef UINT32 HBS_TYPE;
00091 #else
00092 typedef UINT16 HBS_TYPE;
00093 #endif
00094
00095
00096 #define OP_VECTOR_element(v,i) ((OP *)VECTOR_element(v,i))
00097
00098
00099
00100
00101
00102 typedef struct OPSCH_struct {
00103 mUINT16 num_succs;
00104 mUINT16 num_preds;
00105 mUINT16 estart;
00106 mUINT16 lstart;
00107 mUINT16 scycle;
00108 mUINT16 dfsnum;
00109 mINT16 regcost;
00110 mUINT16 flags;
00111 #ifdef KEY
00112 mUINT16 depth;
00113 mUINT16 id;
00114 OP *op;
00115
00116
00117
00118 BS *ancestors;
00119 BS *descendants;
00120
00121
00122
00123
00124 struct OPSCH_struct *least_constrained_int;
00125 struct OPSCH_struct *least_constrained_fp;
00126
00127
00128
00129 mINT16 num_blockers;
00130
00131
00132 INT32 one_set_mark;
00133 #endif
00134 } OPSCH;
00135
00136 #ifdef KEY
00137 extern OPSCH **OPSCH_Vec;
00138 extern int OPSCH_Vec_Count;
00139
00140 inline OPSCH *
00141 OPSCHvec(int idx) {
00142 Is_True(idx <= OPSCH_Vec_Count, ("OPSCHvec: illegal OPSCH idx"));
00143 return OPSCH_Vec[idx];
00144 }
00145
00146 #include "opsch_set.h"
00147
00148 #endif
00149
00150 #define OPSCH_num_succs(opsch) ((opsch)->num_succs)
00151 #define OPSCH_num_preds(opsch) ((opsch)->num_preds)
00152 #define OPSCH_estart(opsch) ((opsch)->estart)
00153 #define OPSCH_lstart(opsch) ((opsch)->lstart)
00154 #define OPSCH_scycle(opsch) ((opsch)->scycle)
00155 #define OPSCH_dfsnum(opsch) ((opsch)->dfsnum)
00156 #define OPSCH_regcost(opsch) ((opsch)->regcost)
00157 #define OPSCH_flags(opsch) ((opsch)->flags)
00158
00159 #ifdef KEY
00160 #define OPSCH_depth(opsch) ((opsch)->depth)
00161 #define OPSCH_id(opsch) ((opsch)->id)
00162 #define OPSCH_op(opsch) ((opsch)->op)
00163 #define OPSCH_ancestors(opsch) ((opsch)->ancestors)
00164 #define OPSCH_descendants(opsch) ((opsch)->descendants)
00165 #define OPSCH_least_constrained_int(opsch) ((opsch)->least_constrained_int)
00166 #define OPSCH_least_constrained_fp(opsch) ((opsch)->least_constrained_fp)
00167 #define OPSCH_num_blockers(opsch) ((opsch)->num_blockers)
00168 #define OPSCH_one_set_mark(opsch) ((opsch)->one_set_mark)
00169 #endif
00170
00171
00172
00173
00174
00175
00176 #define OPSCH_SCHEDULED 0x0001
00177
00178
00179 #define OPSCH_VISITED 0x0002
00180
00181
00182
00183 #define OPSCH_ADDIU 0x0004
00184 #define OPSCH_LDST 0x0008
00185
00186
00187 #define OPSCH_DEF_XFER_OPND 0x0010
00188
00189
00190
00191 #define OPSCH_ST 0x0020
00192 #define OPSCH_LD 0x0040
00193
00194 #define OPSCH_ADDIU_LDST_PAIR (OPSCH_ADDIU | OPSCH_LDST)
00195 #define OPSCH_ST_LD_PAIR (OPSCH_ST | OPSCH_LD)
00196
00197 #define OPSCH_scheduled(opsch) (OPSCH_flags(opsch) & OPSCH_SCHEDULED)
00198 #define Set_OPSCH_scheduled(opsch) (OPSCH_flags(opsch) |= OPSCH_SCHEDULED)
00199 #define OPSCH_visited(opsch) (OPSCH_flags(opsch) & OPSCH_VISITED)
00200 #define Set_OPSCH_visited(opsch) (OPSCH_flags(opsch) |= OPSCH_VISITED)
00201 #define Reset_OPSCH_visited(opsch) (OPSCH_flags(opsch) &= ~OPSCH_VISITED)
00202 #define OPSCH_addiu(opsch) (OPSCH_flags(opsch) & OPSCH_ADDIU)
00203 #define Set_OPSCH_addiu(opsch) (OPSCH_flags(opsch) |= OPSCH_ADDIU)
00204 #define OPSCH_ldst(opsch) (OPSCH_flags(opsch) & OPSCH_LDST)
00205 #define Set_OPSCH_ldst(opsch) (OPSCH_flags(opsch) |= OPSCH_LDST)
00206 #define OPSCH_def_xfer_opnd(opsch) (OPSCH_flags(opsch) & OPSCH_DEF_XFER_OPND)
00207 #define Set_OPSCH_def_xfer_opnd(opsch) (OPSCH_flags(opsch) |= OPSCH_DEF_XFER_OPND)
00208 #define OPSCH_st(opsch) (OPSCH_flags(opsch) & OPSCH_ST)
00209 #define Set_OPSCH_st(opsch) (OPSCH_flags(opsch) |= OPSCH_ST)
00210 #define OPSCH_ld(opsch) (OPSCH_flags(opsch) & OPSCH_LD)
00211 #define Set_OPSCH_ld(opsch) (OPSCH_flags(opsch) |= OPSCH_LD)
00212
00213
00214
00215
00216 inline OPSCH*
00217 OP_opsch(OP *op, BB_MAP value_map) {
00218 BB_OP_MAP op_map = (BB_OP_MAP) BB_MAP_Get(value_map, OP_bb(op));
00219 return ((OPSCH *) BB_OP_MAP_Get(op_map, op));
00220 }
00221
00222
00223
00224
00225
00226
00227 typedef union {
00228 void *ptr;
00229 struct {
00230 mINT16 def_count;
00231 mBOOL reg_assigned;
00232 }s;
00233 } REG_ENTRY;
00234
00235 #define REG_ENTRY_ptr(re) (re.ptr)
00236 #define REG_ENTRY_def_count(re) (re.s.def_count)
00237 #define REG_ENTRY_reg_assigned(re) (re.s.reg_assigned)
00238
00239
00240
00241
00242
00243
00244
00245
00246 typedef struct {
00247 mINT16 schedule_length;
00248 mINT16 block_parallelism;
00249 mINT16 num_real_ops;
00250 mINT16 num_align_ops;
00251 mINT8 *local_regcost;
00252 INT8 global_regcost;
00253 INT bb_start_pc;
00254 mUINT16 flags;
00255 } BBSCH;
00256
00257 #define BBSCH_schedule_length(s) ((s)->schedule_length)
00258 #define BBSCH_block_parallelism(s) ((s)->block_parallelism)
00259 #define BBSCH_num_real_ops(s) ((s)->num_real_ops)
00260 #define BBSCH_num_align_ops(s) ((s)->num_align_ops)
00261 #define BBSCH_local_regcost(s) ((s)->local_regcost)
00262 #define BBSCH_global_regcost(s) ((s)->global_regcost)
00263 #define BBSCH_bb_start_pc(s) ((s)->bb_start_pc)
00264 #define BBSCH_flags(s) ((s)->flags)
00265
00266 #define Set_BB_num_align_nops(bbsch, value) ((bbsch)->num_align_ops = (value))
00267 #define Set_BB_local_regcost(bbsch, value) ((bbsch)->local_regcost = (value))
00268 #define Set_BB_global_regcost(bbsch, value) ((bbsch)->global_regcost = (value))
00269 #define Set_BB_num_real_ops(bbsch, value) ((bbsch)->num_real_ops = (value))
00270 #define Set_BB_start_pc(bbsch, value) ((bbsch)->bb_start_pc = (value))
00271 #define Set_BB_flags(bbsch, value) ((bbsch)->flags = (value))
00272
00273 extern BOOL Trace_HB;
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286 class HB_Schedule;
00287
00288 class Priority_Selector {
00289 protected:
00290 BB* _curbb;
00291 std::list<BB*> _curbb_list;
00292 OP *_best_op;
00293 #ifdef KEY
00294 OP* _last_sched_op;
00295 #endif
00296 HB_Schedule *_cur_sched;
00297 MEM_POOL *_pool;
00298 HBS_TYPE _hbs_type;
00299
00300 virtual BOOL Is_OP_Better (OP *cur_op, OP *best_op);
00301 public:
00302
00303 Priority_Selector(std::list<BB*> bblist, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool)
00304 { _curbb_list = bblist; _cur_sched = sched; _hbs_type = type; _pool = pool;
00305 #ifdef KEY
00306 _last_sched_op = NULL;
00307 #endif // KEY
00308 }
00309 Priority_Selector(BB* bb, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool)
00310 { _curbb = bb; _cur_sched = sched; _hbs_type = type; _pool = pool;
00311 #ifdef KEY
00312 _last_sched_op = NULL;
00313 #endif // KEY
00314 }
00315 ~Priority_Selector() {}
00316
00317
00318 void Print (FILE *f, const char* str) const;
00319 void Trace (const char* str) const;
00320
00321
00322 std::list<BB*>& BB_List(void) { return _curbb_list;}
00323
00324
00325 void operator=(const Priority_Selector& p) {
00326 _curbb = p._curbb;
00327 _curbb_list = p._curbb_list;
00328 _best_op = p._best_op;
00329 #ifdef KEY
00330 _last_sched_op = p._last_sched_op;
00331 #endif
00332 }
00333
00334
00335 BOOL operator==(const OP*) const;
00336 BOOL operator!=(const OP*) const;
00337 virtual void* Get_Next_Element(HB_Schedule *sched);
00338
00339
00340 void Add_Element_Sorted(VECTOR vector, void* element, VECTOR_ELEMENT_COMPARE comp_func);
00341 #ifdef KEY
00342 int Sched_OP_With_Preallocated_TN(OP *op);
00343 #endif
00344
00345
00346 OP* Select_OP_For_Delay_Slot(OP*);
00347 void Build_Ready_Vector (BB*, BOOL is_fwd);
00348 void Build_Ready_Vector (std::list<BB*>, BOOL is_fwd);
00349 virtual inline BOOL Is_Fwd_Schedule() { return FALSE; }
00350 };
00351
00352 class List_Based_Bkwd : public Priority_Selector {
00353 public:
00354
00355
00356 List_Based_Bkwd(BB* bb, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool);
00357 List_Based_Bkwd(std::list<BB*> bblist, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool);
00358 ~List_Based_Bkwd() {}
00359
00360
00361 BOOL operator==(const OP*) const;
00362 BOOL operator!=(const OP*) const;
00363 inline BOOL Is_Fwd_Schedule() { return FALSE; }
00364 void* Get_Next_Element(HB_Schedule *cur_sched)
00365 { return Priority_Selector::Get_Next_Element(cur_sched); }
00366
00367
00368 };
00369
00370 class List_Based_Fwd : public Priority_Selector {
00371 protected:
00372 BOOL Is_OP_Better (OP *cur_op, OP *best_op);
00373 public:
00374
00375
00376 List_Based_Fwd(BB* bb, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool);
00377 List_Based_Fwd(std::list<BB*> bblist, HB_Schedule *sched, HBS_TYPE type, MEM_POOL *pool);
00378 ~List_Based_Fwd() {}
00379
00380
00381 BOOL operator==(const OP*) const;
00382 BOOL operator!=(const OP*) const;
00383 inline BOOL Is_Fwd_Schedule() { return TRUE; }
00384 void* Get_Next_Element(HB_Schedule *cur_sched);
00385
00386
00387 };
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399 class Cycle_Selector {
00400 protected:
00401 OP *_cur_op;
00402 INT _etime;
00403 INT _ltime;
00404 INT _cur_time;
00405 public:
00406
00407
00408 Cycle_Selector() {}
00409 ~Cycle_Selector(void) {}
00410
00411 void virtual Init(OP *op, INT etime, INT ltime)
00412 { _cur_op = op; _etime = etime; _ltime = ltime; }
00413
00414
00415
00416
00417 virtual INT Get_Cycle() { return _cur_time; }
00418 virtual INT Next_Cycle() { return -1; }
00419 virtual INT Bound() { return 0; }
00420 };
00421
00422
00423 class Bkwd_Cycle_Sel : public Cycle_Selector {
00424 public:
00425
00426 Bkwd_Cycle_Sel() {}
00427 ~Bkwd_Cycle_Sel() {}
00428
00429 void Init(OP *op, INT etime, INT ltime)
00430 { _cur_op = op; _etime = etime; _ltime = ltime; _cur_time = ltime;}
00431
00432
00433
00434
00435 INT Get_Cycle() { return _cur_time; }
00436 INT Next_Cycle() { return --_cur_time; }
00437 INT Bound() { return 0; }
00438 };
00439
00440 class Fwd_Cycle_Sel : public Cycle_Selector {
00441 public:
00442
00443 Fwd_Cycle_Sel() {}
00444 ~Fwd_Cycle_Sel(void) {}
00445
00446 void Init(OP *op, INT etime, INT ltime)
00447 { _cur_op = op; _etime = etime; _ltime = ltime; _cur_time = etime;}
00448
00449
00450
00451
00452 INT Get_Cycle() { return _cur_time; }
00453 INT Next_Cycle() { return ++_cur_time; }
00454 INT Bound() { return -1; }
00455 };
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467 class HB_Schedule {
00468 friend class Cycle_Selector;
00469 friend class Priority_Selector;
00470 protected:
00471 BB_MAP _hb_map;
00472 private:
00473 HBS_TYPE _hbs_type;
00474 MEM_POOL _hb_pool;
00475 MEM_POOL _hb_map_pool;
00476 BB* _prolog_bb;
00477 BB* _epilog_bb;
00478 VECTOR _ready_vector;
00479 VECTOR _sched_vector;
00480 INT32 _Cur_Regs_Avail[ISA_REGISTER_CLASS_MAX+1];
00481 BB* _prolog_mbb;
00482 BB* _epilog_mbb;
00483 hTN_MAP _regs_map;
00484 TI_RES_RES* _rr_tab;
00485 TI_BUNDLE *_bundle;
00486 INT32 _max_sched;
00487 #ifdef KEY
00488 OPSCH_SET *_scheduled_opschs;
00489 INT32 _ready_count;
00490 INT32 _unsched_count;
00491 INT32 _ready_fp_percentage;
00492 INT32 _unsched_fp_percentage;
00493 INT32 _one_set_counter;
00494 #endif
00495
00496
00497 BOOL Avoid_Processing_HB(std::list<BB*>);
00498 void Invoke_Pre_HBS_Phase (BB*);
00499 void Invoke_Post_HBS_Phase (BB*);
00500 void Invoke_Pre_HBB_Phase (std::list<BB*>);
00501 void Invoke_Post_HBB_Phase (std::list<BB*>);
00502 INT Calculate_Etime (OP*);
00503 INT Calculate_Ltime (OP*);
00504 void Set_Resource_Usage (OP*);
00505
00506
00507
00508 inline BOOL Check_Resource_Usage(OP *op, INT cycle) {
00509 return TI_RES_RES_Resources_Available(_rr_tab, OP_code(op), cycle);
00510 }
00511
00512 void Compute_BBSCH (BB*, BBSCH*);
00513 BOOL Can_Schedule_Op (OP *cur_op, INT cur_time);
00514 void Initialize ();
00515 #ifdef KEY
00516 void Schedule_Block (BB*, BBSCH*, int scheduling_algorithm);
00517 #else
00518 void Schedule_Block (BB*, BBSCH*);
00519 #endif
00520 void Schedule_Blocks (std::list<BB*>&);
00521 void Put_Sched_Vector_Into_BB (BB*, BBSCH*, BOOL);
00522 void Put_Sched_Vector_Into_HB (std::list<BB*>&);
00523 void Add_OP_To_Sched_Vector (OP*, BOOL);
00524 void Adjust_Ldst_Offsets (void);
00525 #ifdef KEY
00526 void Adjust_Ldst_Offsets (BOOL is_fwd);
00527 void Update_Least_Constrained (OPSCH *, BOOL);
00528 void DFS_Update_Least_Constrained (OPSCH *, BOOL);
00529 void Drop_Remaining_Prefetches (BB *);
00530
00531
00532 void Clear_One_Set(void) { _one_set_counter++; }
00533 BOOL One_Set_MemberP(OPSCH *opsch)
00534 { return OPSCH_one_set_mark(opsch) == _one_set_counter; }
00535 void One_Set_Union1(OPSCH *opsch)
00536 { OPSCH_one_set_mark(opsch) = _one_set_counter; }
00537 void One_Set_Difference1(OPSCH *opsch)
00538 { OPSCH_one_set_mark(opsch) = _one_set_counter - 1; }
00539 #endif
00540 void Init_Register_Map (BB*);
00541 void Init_RFlag_Table (std::list<BB*>&, BOOL);
00542 void Update_Regs_For_OP (OP*);
00543
00544 public:
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554 HB_Schedule ();
00555 ~HB_Schedule();
00556
00557
00558 void Set_hbs_type(HBS_TYPE type) { _hbs_type = type; }
00559 void Set_hbs_before_gra(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_BEFORE_GRA); }
00560 void Set_hbs_before_lra(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_BEFORE_LRA); }
00561 void Set_hbs_critical_path(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_CRITICAL_PATH); }
00562 void Set_hbs_depth_first(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_DEPTH_FIRST); }
00563 void Set_hbs_minimize_regs(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_MINIMIZE_REGS); }
00564 void Set_hbs_from_gcm(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_FROM_GCM); }
00565 void Set_hbs_from_pre_gcm_sched(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_FROM_PRE_GCM_SCHED); }
00566 void Set_hbs_from_post_gcm_sched(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_FROM_POST_GCM_SCHED); }
00567 void Set_hbs_minimize_bundles(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_MINIMIZE_BUNDLES); }
00568 #ifdef KEY
00569 void Set_hbs_balance_ready_types(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_BALANCE_READY_TYPES); }
00570 void Set_hbs_balance_unsched_types(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_BALANCE_UNSCHED_TYPES); }
00571 void Set_hbs_drop_unsched_prefetches(void) { _hbs_type = (HBS_TYPE) (_hbs_type | HBS_DROP_UNSCHED_PREFETCHES); }
00572 #endif
00573
00574
00575 HBS_TYPE type(void) const { return _hbs_type; }
00576 BOOL HBS_Before_GRA(void) const { return _hbs_type & HBS_BEFORE_GRA; }
00577 BOOL HBS_Before_LRA(void) const { return _hbs_type & HBS_BEFORE_LRA; }
00578 BOOL HBS_Critical_Path(void) const { return _hbs_type & HBS_CRITICAL_PATH; }
00579 BOOL HBS_Depth_First(void) const { return _hbs_type & HBS_DEPTH_FIRST; }
00580 BOOL HBS_Minimize_Regs(void) const { return _hbs_type & HBS_MINIMIZE_REGS; }
00581 BOOL HBS_Minimize_Bundles(void) const { return _hbs_type & HBS_MINIMIZE_BUNDLES; }
00582 #ifdef KEY
00583 BOOL HBS_Balance_Ready_Types(void) const { return _hbs_type & HBS_BALANCE_READY_TYPES; }
00584 BOOL HBS_Balance_Unsched_Types(void) const { return _hbs_type & HBS_BALANCE_UNSCHED_TYPES; }
00585 BOOL HBS_Drop_Unsched_Prefetches(void) const { return _hbs_type & HBS_DROP_UNSCHED_PREFETCHES; }
00586 #endif
00587 BOOL HBS_From_GCM(void) const { return _hbs_type & HBS_FROM_GCM; }
00588 BOOL HBS_From_CGPREP(void) const { return _hbs_type & HBS_FROM_CGPREP; }
00589 BOOL HBS_From_Pre_GCM_Sched(void) const { return _hbs_type & HBS_FROM_PRE_GCM_SCHED; }
00590 BOOL HBS_From_Post_GCM_Sched(void) const { return _hbs_type & HBS_FROM_POST_GCM_SCHED; }
00591 VECTOR ready_vector(void) { return _ready_vector; }
00592 VECTOR sched_vector(void) { return _sched_vector; }
00593 BB_MAP hb_map(void) { return _hb_map; }
00594 TI_BUNDLE* bundle(void) { return _bundle; }
00595 hTN_MAP regs_map(void) { return _regs_map; }
00596 TI_RES_RES* rr_tab(void) { return _rr_tab; }
00597 #ifdef KEY
00598 void Update_Schedule_Parameters(void);
00599 INT32 Ready_Vector_Fp_Count(void);
00600
00601 INT32 Ready_Count(void) { return _ready_count; }
00602 INT32 Ready_Fp_Percentage(void) { return _ready_fp_percentage; }
00603 INT32 Unsched_Count(void) { return _unsched_count; }
00604 INT32 Unsched_Fp_Percentage(void) { return _unsched_fp_percentage; }
00605 #endif
00606
00607
00608 void Init (BB*, HBS_TYPE, INT32, BBSCH*, mINT8*);
00609 void Init (std::list<BB*>, HBS_TYPE, mINT8*);
00610 INT Find_Schedule_Cycle(OP*, BOOL);
00611 void Estimate_Reg_Cost_For_OP (OP*);
00612 #ifdef KEY
00613 void Schedule_BB (BB*, BBSCH*, int scheduling_algorithm = -1);
00614 #else
00615 void Schedule_BB (BB*, BBSCH*);
00616 #endif
00617 void Schedule_HB (std::list<BB*>);
00618 };
00619
00620
00621
00622
00623 extern INT Memory_OP_Offset_Opndnum (OP *op);
00624 extern INT Memory_OP_Base_Opndnum (OP *op);
00625 extern BOOL Reschedule_BB(BB*);
00626 extern BOOL Can_Schedule_HB(std::list<BB*> hb_blocks);
00627 extern BOOL Is_Ldst_Addiu_Pair (OPSCH*, OPSCH*, OP*, OP*);
00628 extern void Fixup_Ldst_Offset(OP*, INT64, INT64, HBS_TYPE);
00629 extern void Compute_OPSCH(BB *bb, BB_MAP value_map, MEM_POOL *pool,
00630 BOOL compute_bitsets = FALSE, BOOL is_fwd = FALSE);
00631 extern void Compute_OPSCHs(std::list<BB*> bblist, BB_MAP value_map,
00632 MEM_POOL *pool, BOOL compute_bitsets = FALSE,
00633 BOOL is_fwd = FALSE);
00634
00635
00636 extern void Print_BB_For_HB (std::list<BB*> bblist);
00637
00638 #endif