[llvm-commits] [llvm] r156573 - /llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Andrew Trick atrick at apple.com
Thu May 10 14:06:14 PDT 2012


Author: atrick
Date: Thu May 10 16:06:14 2012
New Revision: 156573

URL: http://llvm.org/viewvc/llvm-project?rev=156573&view=rev
Log:
misched: Release only unscheduled nodes into ReadyQ.

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=156573&r1=156572&r2=156573&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu May 10 16:06:14 2012
@@ -643,6 +643,10 @@
 
   bool empty() const { return Queue.empty(); }
 
+  iterator begin() { return Queue.begin(); }
+
+  iterator end() { return Queue.end(); }
+
   iterator find(SUnit *SU) {
     return std::find(Queue.begin(), Queue.end(), SU);
   }
@@ -705,10 +709,12 @@
   }
 
   virtual void releaseTopNode(SUnit *SU) {
-    TopQueue.push(SU);
+    if (!SU->isScheduled)
+      TopQueue.push(SU);
   }
   virtual void releaseBottomNode(SUnit *SU) {
-    BotQueue.push(SU);
+    if (!SU->isScheduled)
+      BotQueue.push(SU);
   }
 };
 } // namespace





More information about the llvm-commits mailing list