llvm.org GIT mirror llvm / 5601e30
use range-based for loops; NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241076 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 4 years ago
1 changed file(s) with 5 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
828828
829829 // Filter and process dependencies, computing the earliest issue cycle.
830830 unsigned Cycle = 0;
831 for (unsigned i = 0, e = Deps.size(); i != e; ++i) {
832 const DataDep &Dep = Deps[i];
831 for (const DataDep &Dep : Deps) {
833832 const TraceBlockInfo&DepTBI =
834833 BlockInfo[Dep.DefMI->getParent()->getNumber()];
835834 // Ignore dependencies from outside the current trace.
10871086 MTM.SchedModel, MTM.TII, MTM.TRI);
10881087
10891088 // Update the required height of any virtual registers read by MI.
1090 for (unsigned i = 0, e = Deps.size(); i != e; ++i)
1091 if (pushDepHeight(Deps[i], MI, Cycle, Heights, MTM.SchedModel, MTM.TII))
1092 addLiveIns(Deps[i].DefMI, Deps[i].DefOp, Stack);
1089 for (const DataDep &Dep : Deps)
1090 if (pushDepHeight(Dep, MI, Cycle, Heights, MTM.SchedModel, MTM.TII))
1091 addLiveIns(Dep.DefMI, Dep.DefOp, Stack);
10931092
10941093 InstrCycles &MICycles = Cycles[MI];
10951094 MICycles.Height = Cycle;
11051104 // Update virtual live-in heights. They were added by addLiveIns() with a 0
11061105 // height because the final height isn't known until now.
11071106 DEBUG(dbgs() << "BB#" << MBB->getNumber() << " Live-ins:");
1108 for (unsigned i = 0, e = TBI.LiveIns.size(); i != e; ++i) {
1109 LiveInReg &LIR = TBI.LiveIns[i];
1107 for (LiveInReg &LIR : TBI.LiveIns) {
11101108 const MachineInstr *DefMI = MTM.MRI->getVRegDef(LIR.Reg);
11111109 LIR.Height = Heights.lookup(DefMI);
11121110 DEBUG(dbgs() << ' ' << PrintReg(LIR.Reg) << '@' << LIR.Height);