[llvm] r180815 - MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.

Andrew Trick atrick at apple.com
Tue Apr 30 15:10:59 PDT 2013


Author: atrick
Date: Tue Apr 30 17:10:59 2013
New Revision: 180815

URL: http://llvm.org/viewvc/llvm-project?rev=180815&view=rev
Log:
MI Sched: revert a minor heuristic that snuck in with -misched-vcopy.

I'll fix the heuristic in a general way in a follow-up commit.

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=180815&r1=180814&r2=180815&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Tue Apr 30 17:10:59 2013
@@ -1990,9 +1990,15 @@ void ConvergingScheduler::tryCandidate(S
     return;
 
   // Weak edges are for clustering and other constraints.
+  //
+  // Deferring TryCand here does not change Cand's reason. This is good in the
+  // sense that a bad candidate shouldn't affect a previous candidate's
+  // goodness, but bad in that it is assymetric and depends on queue order.
+  CandReason OrigReason = Cand.Reason;
   if (tryLess(getWeakLeft(TryCand.SU, Zone.isTop()),
               getWeakLeft(Cand.SU, Zone.isTop()),
               TryCand, Cand, Weak)) {
+    Cand.Reason = OrigReason;
     return;
   }
   // Avoid critical resource consumption and balance the schedule.





More information about the llvm-commits mailing list