diff options
author | Jannik Silvanus <jannik.silvanus@amd.com> | 2022-05-20 17:21:15 +0200 |
---|---|---|
committer | Jannik Silvanus <jannik.silvanus@amd.com> | 2022-07-14 09:45:31 +0200 |
commit | e5c4cde451c982c187499ed6b88adf2c5b4da34b (patch) | |
tree | ae0b6fe9048301561922a640ef66cdcfe51093b9 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | cfec2080b7a6ffb023044219630bcb44a1dad14b (diff) | |
download | llvm-e5c4cde451c982c187499ed6b88adf2c5b4da34b.zip llvm-e5c4cde451c982c187499ed6b88adf2c5b4da34b.tar.gz llvm-e5c4cde451c982c187499ed6b88adf2c5b4da34b.tar.bz2 |
[AMDGPU] SIMachineScheduler: Add support for several MachineScheduler features
The SI machine scheduler inherits from ScheduleDAGMI.
This patch adds support for a few features that are implemented
in ScheduleDAGMI (or its base classes) that were missing so far
because their support is implemented in overridden functions.
* Support cl::opt -view-misched-dags
This option allows to open a graphical window of the scheduling DAG.
* Support cl::opt -misched-print-dags
This option allows to print the scheduling DAG in text form.
* After constructing the scheduling DAG, call postprocessDAG()
to apply any registered DAG mutations.
Note that currently there are no mutations defined in AMDGPUTargetMachine.cpp
in case SIScheduler is used.
Still add this to avoid surprises in the future in case mutations are added.
Differential Revision: https://reviews.llvm.org/D128808
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 4e00a21..5f80445 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -93,8 +93,11 @@ cl::opt<bool> VerifyScheduling( cl::opt<bool> ViewMISchedDAGs( "view-misched-dags", cl::Hidden, cl::desc("Pop up a window to show MISched dags after they are processed")); +cl::opt<bool> PrintDAGs("misched-print-dags", cl::Hidden, + cl::desc("Print schedule DAGs")); #else const bool ViewMISchedDAGs = false; +const bool PrintDAGs = false; #endif // NDEBUG } // end namespace llvm @@ -112,10 +115,6 @@ static cl::opt<std::string> SchedOnlyFunc("misched-only-func", cl::Hidden, cl::desc("Only schedule this function")); static cl::opt<unsigned> SchedOnlyBlock("misched-only-block", cl::Hidden, cl::desc("Only schedule this MBB#")); -static cl::opt<bool> PrintDAGs("misched-print-dags", cl::Hidden, - cl::desc("Print schedule DAGs")); -#else -static const bool PrintDAGs = false; #endif // NDEBUG /// Avoid quadratic complexity in unusually large basic blocks by limiting the |