summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-04-30 22:10:59 +0000
committerAndrew Trick <atrick@apple.com>2013-04-30 22:10:59 +0000
commitf13fc1b23ad40407d0ee4fd0ee807a40261d639e (patch)
tree47a19f014e0d437591cd4de7018bbb9b9fe17478 /lib
parent13ec4812fc733c37bb3329982bc044d186e0bea2 (diff)
downloadllvm-f13fc1b23ad40407d0ee4fd0ee807a40261d639e.tar.gz
llvm-f13fc1b23ad40407d0ee4fd0ee807a40261d639e.tar.bz2
llvm-f13fc1b23ad40407d0ee4fd0ee807a40261d639e.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineScheduler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp
index 32aedbee94..fff6b2b4c0 100644
--- a/lib/CodeGen/MachineScheduler.cpp
+++ b/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.