summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-06-01 03:27:56 +0000
committerAndrew Trick <atrick@apple.com>2011-06-01 03:27:56 +0000
commit18c9b37a426464040a95440c519ae925f1708cac (patch)
tree868f458f66dfd0381e557e06b9fbd8f2701cd964 /llvm/lib
parent4ce288e3e41b3d134bafdf684a5063179f47b361 (diff)
downloadbcm5719-llvm-18c9b37a426464040a95440c519ae925f1708cac.tar.gz
bcm5719-llvm-18c9b37a426464040a95440c519ae925f1708cac.zip
Add an issue width check to the postRA scheduler. Patch by Max Kazakov!
For targets with no itinerary (x86) it is a nop by default. For targets with issue width already expressed in the itinerary (ARM) it bypasses a scoreboard check but otherwise does not affect the schedule. It does make the code more consistent and complete and allows new targets to specify their issue width in an arbitrary way. llvm-svn: 132385
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/PostRASchedulerList.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp
index 34c9259d2ab..95c748cba17 100644
--- a/llvm/lib/CodeGen/PostRASchedulerList.cpp
+++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp
@@ -661,6 +661,12 @@ void SchedulePostRATDList::ListScheduleTopDown() {
ScheduleNodeTopDown(FoundSUnit, CurCycle);
HazardRec->EmitInstruction(FoundSUnit);
CycleHasInsts = true;
+ if (HazardRec->atIssueLimit()) {
+ DEBUG(dbgs() << "*** Max instructions per cycle " << CurCycle << '\n');
+ HazardRec->AdvanceCycle();
+ ++CurCycle;
+ CycleHasInsts = false;
+ }
} else {
if (CycleHasInsts) {
DEBUG(dbgs() << "*** Finished cycle " << CurCycle << '\n');
OpenPOWER on IntegriCloud