From dd77014acc05c77052934596063aa911e18fdbcb Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Tue, 30 Apr 2013 22:10:59 +0000 Subject: 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. llvm-svn: 180815 --- llvm/lib/CodeGen/MachineScheduler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp') diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 32aedbee946..fff6b2b4c06 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -1990,9 +1990,15 @@ void ConvergingScheduler::tryCandidate(SchedCandidate &Cand, 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. -- cgit v1.2.3