revert 152356: verify misched changes using -misched=shuffle.
authorAndrew Trick <atrick@apple.com>
Fri, 9 Mar 2012 03:46:39 +0000 (03:46 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 9 Mar 2012 03:46:39 +0000 (03:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152373 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineScheduler.cpp

index f8921922ed7527a101acc66f0d4c564c803b45ac..6090ffe27bbf1aad88a52e15b9d8b3abd4e35c13 100644 (file)
@@ -144,13 +144,13 @@ bool MachineScheduler::runOnMachineFunction(MachineFunction &mf) {
     // Break the block into scheduling regions [I, RegionEnd), and schedule each
     // region as soon as it is discovered.
     unsigned RemainingCount = MBB->size();
-    for(MachineBasicBlock::iterator RegionEnd = MBB->end(),
-          RegionStart = MBB->begin(); RegionEnd != RegionStart;) {
+    for(MachineBasicBlock::iterator RegionEnd = MBB->end();
+        RegionEnd != MBB->begin();) {
       Scheduler->startBlock(MBB);
       // The next region starts above the previous region. Look backward in the
       // instruction stream until we find the nearest boundary.
       MachineBasicBlock::iterator I = RegionEnd;
-      for(;I != RegionStart; --I, --RemainingCount) {
+      for(;I != MBB->begin(); --I, --RemainingCount) {
         if (TII->isSchedulingBoundary(llvm::prior(I), MBB, *MF))
           break;
       }