MachineScheduler: Add a way to disable the 'ReduceLatency' heuristic

llvm-svn: 251037
This commit is contained in:
Matthias Braun 2015-10-22 18:07:31 +00:00
parent 78945d0721
commit 61f4d6439c
2 changed files with 7 additions and 3 deletions

View File

@ -156,8 +156,12 @@ struct MachineSchedPolicy {
bool OnlyTopDown;
bool OnlyBottomUp;
// Disable heuristic that tries to fetch nodes from long dependency chains
// first.
bool DisableLatencyHeuristic;
MachineSchedPolicy(): ShouldTrackPressure(false), OnlyTopDown(false),
OnlyBottomUp(false) {}
OnlyBottomUp(false), DisableLatencyHeuristic(false) {}
};
/// MachineSchedStrategy - Interface to the scheduling algorithm used by

View File

@ -2722,8 +2722,8 @@ void GenericScheduler::tryCandidate(SchedCandidate &Cand,
// Avoid serializing long latency dependence chains.
// For acyclic path limited loops, latency was already checked above.
if (Cand.Policy.ReduceLatency && !Rem.IsAcyclicLatencyLimited
&& tryLatency(TryCand, Cand, Zone)) {
if (!RegionPolicy.DisableLatencyHeuristic && Cand.Policy.ReduceLatency &&
!Rem.IsAcyclicLatencyLimited && tryLatency(TryCand, Cand, Zone)) {
return;
}