[llvm-commits] [llvm] r170449 - /llvm/trunk/lib/CodeGen/MachineScheduler.cpp
Andrew Trick
atrick at apple.com
Tue Dec 18 12:52:50 PST 2012
Author: atrick
Date: Tue Dec 18 14:52:49 2012
New Revision: 170449
URL: http://llvm.org/viewvc/llvm-project?rev=170449&view=rev
Log:
MISched: minor improvement, initialize remaining resources before the first scheduling decision.
Modified:
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=170449&r1=170448&r2=170449&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Tue Dec 18 14:52:49 2012
@@ -1166,6 +1166,16 @@
RemainingCounts[PIdx] += (Factor * PI->Cycles);
}
}
+ for (unsigned PIdx = 0, PEnd = SchedModel->getNumProcResourceKinds();
+ PIdx != PEnd; ++PIdx) {
+ if ((int)(RemainingCounts[PIdx] - RemainingCounts[CritResIdx])
+ >= (int)SchedModel->getLatencyFactor()) {
+ CritResIdx = PIdx;
+ }
+ }
+ MaxRemainingCount = std::max(
+ RemainingMicroOps * SchedModel->getMicroOpFactor(),
+ RemainingCounts[CritResIdx]);
}
void ConvergingScheduler::SchedBoundary::
More information about the llvm-commits
mailing list