aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-03-07 00:18:25 +0000
committerAndrew Trick <atrick@apple.com>2012-03-07 00:18:25 +0000
commit0df7f8821cc3ce26843b4fb63456cb4ccb7e4153 (patch)
treea786c078f3ffef62bbef5795aadde627429ff379 /lib/CodeGen/MachineScheduler.cpp
parent56b94c52c9bf0342106ca7d274b9bb469d5ef619 (diff)
Added -view-misched=dags options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--lib/CodeGen/MachineScheduler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp
index 55b931ff80..5d7dee8e1e 100644
--- a/lib/CodeGen/MachineScheduler.cpp
+++ b/lib/CodeGen/MachineScheduler.cpp
@@ -30,6 +30,13 @@
using namespace llvm;
+#ifndef NDEBUG
+static cl::opt<bool> ViewMISchedDAGs("view-misched-dags", cl::Hidden,
+ cl::desc("Pop up a window to show MISched dags after they are processed"));
+#else
+static bool ViewMISchedDAGs = false;
+#endif // NDEBUG
+
//===----------------------------------------------------------------------===//
// Machine Instruction Scheduling Pass and Registry
//===----------------------------------------------------------------------===//
@@ -205,6 +212,8 @@ void ScheduleTopDownLive::Schedule() {
DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
SUnits[su].dumpAll(this));
+ if (ViewMISchedDAGs) viewGraph();
+
// Release any successors of the special Entry node. It is currently unused,
// but we keep up appearances.
releaseSuccessors(&EntrySU);