diff options
author | Matthias Braun <matze@braunis.de> | 2018-09-19 20:50:49 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2018-09-19 20:50:49 +0000 |
commit | 3136e4203920322143dd7b8f423fb8776dcb506b (patch) | |
tree | 30d8b6436df50137f9e0998986a822abc84d2f79 /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | a4d75ead9eb1afb14ea14d8efd9f498b6c5be076 (diff) | |
download | bcm5719-llvm-3136e4203920322143dd7b8f423fb8776dcb506b.tar.gz bcm5719-llvm-3136e4203920322143dd7b8f423fb8776dcb506b.zip |
MachineScheduler: Add -misched-print-dags flag
Add a flag to dump the schedule DAG to the debug stream. This will be
used in upcoming commits to test schedule DAG mutations such as macro
fusion.
llvm-svn: 342589
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index da01f6f5bbe..d60f17ad07f 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -100,8 +100,11 @@ 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 bool ViewMISchedDAGs = false; +static const bool ViewMISchedDAGs = false; +static const bool PrintDAGs = false; #endif // NDEBUG /// Avoid quadratic complexity in unusually large basic blocks by limiting the @@ -765,6 +768,7 @@ void ScheduleDAGMI::schedule() { findRootsAndBiasEdges(TopRoots, BotRoots); LLVM_DEBUG(dump()); + if (PrintDAGs) dump(); if (ViewMISchedDAGs) viewGraph(); // Initialize the strategy before modifying the DAG. @@ -1218,6 +1222,7 @@ void ScheduleDAGMILive::schedule() { SchedImpl->initialize(this); LLVM_DEBUG(dump()); + if (PrintDAGs) dump(); if (ViewMISchedDAGs) viewGraph(); // Initialize ready queues now that the DAG and priority data are finalized. |