diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index d65db91..23e5e4a 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -3969,9 +3969,13 @@ bool PostGenericScheduler::tryCandidate(SchedCandidate &Cand, TryCand, Cand, ResourceDemand)) return TryCand.Reason != NoCand; - // Avoid serializing long latency dependence chains. - if (Cand.Policy.ReduceLatency && tryLatency(TryCand, Cand, Top)) { - return TryCand.Reason != NoCand; + // We only compare a subset of features when comparing nodes between + // Top and Bottom boundary. + if (Cand.AtTop == TryCand.AtTop) { + // Avoid serializing long latency dependence chains. + if (Cand.Policy.ReduceLatency && + tryLatency(TryCand, Cand, Cand.AtTop ? Top : Bot)) + return TryCand.Reason != NoCand; } // Fall through to original instruction order. |