summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-09-09 22:28:08 +0000
committerAndrew Trick <atrick@apple.com>2013-09-09 22:28:08 +0000
commite1f7bf2c02be1c2331304df4473522c87c5c485d (patch)
tree775e561027f904764c6c94232e446b0d03ead6db /llvm/lib/CodeGen
parent97c22c3c92dfa319de85a121de96d04ed3924736 (diff)
downloadbcm5719-llvm-e1f7bf2c02be1c2331304df4473522c87c5c485d.tar.gz
bcm5719-llvm-e1f7bf2c02be1c2331304df4473522c87c5c485d.zip
mi-sched: smooth out the cyclicpath heuristic.
Arnold's idea. I generally try to avoid stateful heuristics because it can make debugging harder. However, we need a way to prevent the latency priority from dominating, and it somewhat makes sense to schedule aggressively for latency only within an issue group. Swift in particular likes this, and it doesn't hurt anyone else: | Benchmarks/MiBench/consumer-lame | 10.39% | | Benchmarks/Misc/himenobmtxpa | 9.63% | llvm-svn: 190360
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index f79b39140c0..ef916174267 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2492,7 +2492,10 @@ void ConvergingScheduler::tryCandidate(SchedCandidate &Cand,
return;
// For loops that are acyclic path limited, aggressively schedule for latency.
- if (Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, Zone))
+ // This can result in very long dependence chains scheduled in sequence, so
+ // once every cycle (when CurrMOps == 0), switch to normal heuristics.
+ if (Rem.IsAcyclicLatencyLimited && !Zone.CurrMOps
+ && tryLatency(TryCand, Cand, Zone))
return;
// Keep clustered nodes together to encourage downstream peephole
OpenPOWER on IntegriCloud