mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
Add a policy to enable computing SchedDFSResult.
Summary: Make GenericScheduler compute SchedDFSResult on initialization if the policy is set. This makes it possible to create classes that extend GenericScheduler and rely on the results of SchedDFSResult, e.g. to perform subtree scheduling. NFC unless the policy is set. Subscribers: MatzeB, hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78432
This commit is contained in:
@@ -186,6 +186,9 @@ struct MachineSchedPolicy {
|
||||
// first.
|
||||
bool DisableLatencyHeuristic = false;
|
||||
|
||||
// Compute DFSResult for use in scheduling heuristics.
|
||||
bool ComputeDFSResult = false;
|
||||
|
||||
MachineSchedPolicy() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -2733,6 +2733,9 @@ void GenericScheduler::initialize(ScheduleDAGMI *dag) {
|
||||
SchedModel = DAG->getSchedModel();
|
||||
TRI = DAG->TRI;
|
||||
|
||||
if (RegionPolicy.ComputeDFSResult)
|
||||
DAG->computeDFSResult();
|
||||
|
||||
Rem.init(DAG, SchedModel);
|
||||
Top.init(DAG, SchedModel, &Rem);
|
||||
Bot.init(DAG, SchedModel, &Rem);
|
||||
|
||||
Reference in New Issue
Block a user