@@ -199,7 +199,7 @@ static InstCount ComputeSLILStaticLowerBound(int64_t regTypeCnt_,
199199 // between the recursive successor list of this instruction and the
200200 // recursive predecessors of the dependent instruction.
201201 auto recSuccBV = inst->GetRcrsvNghbrBitVector (DIR_FRWRD);
202- for (Register *def : inst->GetDefs ()) {
202+ for (opt_sched:: Register *def : inst->GetDefs ()) {
203203 for (const auto &dependentInst : def->GetUseList ()) {
204204 auto recPredBV = const_cast <SchedInstruction *>(dependentInst)
205205 ->GetRcrsvNghbrBitVector (DIR_BKWRD);
@@ -225,14 +225,15 @@ static InstCount ComputeSLILStaticLowerBound(int64_t regTypeCnt_,
225225 // based on the instructions that use more than one register (defined by
226226 // different instructions).
227227 int commonUseLowerBound = closureLowerBound;
228- std::vector<std::pair<const SchedInstruction *, Register *>> usedInsts;
228+ std::vector<std::pair<const SchedInstruction *, opt_sched::Register *>>
229+ usedInsts;
229230 for (int i = 0 ; i < dataDepGraph_->GetInstCnt (); ++i) {
230231 const auto &inst = dataDepGraph_->GetInstByIndx (i);
231232
232233 // Get a list of instructions that define the registers, in array form.
233234 usedInsts.clear ();
234235 llvm::transform (inst->GetUses (), std::back_inserter (usedInsts),
235- [&](Register *reg) {
236+ [&](opt_sched:: Register *reg) {
236237 assert (reg->GetDefList ().size () == 1 &&
237238 " Number of defs for register is not 1!" );
238239 return std::make_pair (*(reg->GetDefList ().begin ()), reg);
@@ -477,7 +478,7 @@ void BBWithSpill::UpdateSpillInfoForSchdul_(SchedInstruction *inst,
477478#endif
478479
479480 // Update Live regs after uses
480- for (Register *use : inst->GetUses ()) {
481+ for (opt_sched:: Register *use : inst->GetUses ()) {
481482 regType = use->GetType ();
482483 regNum = use->GetNum ();
483484 physRegNum = use->GetPhysicalNumber ();
@@ -519,7 +520,7 @@ void BBWithSpill::UpdateSpillInfoForSchdul_(SchedInstruction *inst,
519520 }
520521
521522 // Update Live regs after defs
522- for (Register *def : inst->GetDefs ()) {
523+ for (opt_sched:: Register *def : inst->GetDefs ()) {
523524 regType = def->GetType ();
524525 regNum = def->GetNum ();
525526 physRegNum = def->GetPhysicalNumber ();
@@ -575,7 +576,7 @@ void BBWithSpill::UpdateSpillInfoForSchdul_(SchedInstruction *inst,
575576 sumOfLiveIntervalLengths_[i] += liveRegs_[i].GetOneCnt ();
576577 for (int j = 0 ; j < liveRegs_[i].GetSize (); ++j) {
577578 if (liveRegs_[i].GetBit (j)) {
578- const Register *reg = regFiles_[i].GetReg (j);
579+ const opt_sched:: Register *reg = regFiles_[i].GetReg (j);
579580 if (!reg->IsInInterval (inst) && !reg->IsInPossibleInterval (inst)) {
580581 ++dynamicSlilLowerBound_;
581582 }
@@ -636,7 +637,7 @@ void BBWithSpill::UpdateSpillInfoForUnSchdul_(SchedInstruction *inst) {
636637 for (int i = 0 ; i < regTypeCnt_; ++i) {
637638 for (int j = 0 ; j < liveRegs_[i].GetSize (); ++j) {
638639 if (liveRegs_[i].GetBit (j)) {
639- const Register *reg = regFiles_[i].GetReg (j);
640+ const opt_sched:: Register *reg = regFiles_[i].GetReg (j);
640641 sumOfLiveIntervalLengths_[i]--;
641642 if (!reg->IsInInterval (inst) && !reg->IsInPossibleInterval (inst)) {
642643 --dynamicSlilLowerBound_;
@@ -649,7 +650,7 @@ void BBWithSpill::UpdateSpillInfoForUnSchdul_(SchedInstruction *inst) {
649650 }
650651
651652 // Update Live regs
652- for (Register *def : inst->GetDefs ()) {
653+ for (opt_sched:: Register *def : inst->GetDefs ()) {
653654 regType = def->GetType ();
654655 regNum = def->GetNum ();
655656 physRegNum = def->GetPhysicalNumber ();
@@ -674,7 +675,7 @@ void BBWithSpill::UpdateSpillInfoForUnSchdul_(SchedInstruction *inst) {
674675 // }
675676 }
676677
677- for (Register *use : inst->GetUses ()) {
678+ for (opt_sched:: Register *use : inst->GetUses ()) {
678679 regType = use->GetType ();
679680 regNum = use->GetNum ();
680681 physRegNum = use->GetPhysicalNumber ();
@@ -1091,8 +1092,8 @@ bool BBWithSpill::ChkInstLglty(SchedInstruction *inst) {
10911092 /*
10921093 int16_t regType;
10931094 int defCnt, physRegNum;
1094- Register **defs;
1095- Register *def, *liveDef;
1095+ opt_sched:: Register **defs;
1096+ opt_sched:: Register *def, *liveDef;
10961097
10971098#ifdef IS_DEBUG_CHECK
10981099 Logger::Info("Checking inst %d %s", inst->GetNum(), inst->GetOpCode());
@@ -1111,7 +1112,7 @@ bool BBWithSpill::ChkInstLglty(SchedInstruction *inst) {
11111112 }
11121113
11131114 // Update Live regs
1114- for (Register *def : inst->GetDefs()) {
1115+ for (opt_sched:: Register *def : inst->GetDefs()) {
11151116 regType = def->GetType();
11161117 physRegNum = def->GetPhysicalNumber();
11171118
0 commit comments