MachineScheduler: Add a way to disable the 'ReduceLatency' heuristic
llvm-svn: 251037
This commit is contained in:
parent
78945d0721
commit
61f4d6439c
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue