summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-12-18 20:52:49 +0000
committerAndrew Trick <atrick@apple.com>2012-12-18 20:52:49 +0000
commitffb6168e8564e2cfcbca38d0a0d42fa1f10e3b57 (patch)
tree684abd80e071120243a188b32fc2167e02fb4250 /llvm/lib
parentf00b75117573f7a989243b7724dc7df7b876aa49 (diff)
downloadbcm5719-llvm-ffb6168e8564e2cfcbca38d0a0d42fa1f10e3b57.tar.gz
bcm5719-llvm-ffb6168e8564e2cfcbca38d0a0d42fa1f10e3b57.zip
MISched: minor improvement, initialize remaining resources before the first scheduling decision.
llvm-svn: 170449
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index c7afa08fcde..d49eda24a70 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -1166,6 +1166,16 @@ init(ScheduleDAGMI *DAG, const TargetSchedModel *SchedModel) {
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::
OpenPOWER on IntegriCloud