diff options
author | Mark Lacey <mark.lacey@apple.com> | 2020-03-30 12:52:14 -0700 |
---|---|---|
committer | Mark Lacey <mark.lacey@apple.com> | 2020-04-22 16:36:11 -0700 |
commit | 328bb446ddd2c03e4da3e9aa0473fa2f1c52d34e (patch) | |
tree | d85cb239a397587a78f1a273d00558f151f62f6a /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | aca335955c0dfe5dc783bf21e1d883c1aae33abc (diff) | |
download | llvm-328bb446ddd2c03e4da3e9aa0473fa2f1c52d34e.zip llvm-328bb446ddd2c03e4da3e9aa0473fa2f1c52d34e.tar.gz llvm-328bb446ddd2c03e4da3e9aa0473fa2f1c52d34e.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 5cfc019..55b0075 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -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); |