aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-08-28 20:32:58 +0000
committerDan Gohman <gohman@apple.com>2007-08-28 20:32:58 +0000
commit3e1a7aef17575d9c7058a035449d57e3c7295ed0 (patch)
tree617ea3293c3d0db2315e4d7990a8ac85300a34b6 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentf5a69fe81f8c50e483e2c5ee1a890fc33383fdfb (diff)
Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
scheduling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 92e34bbc48..60a9cd1def 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -54,8 +54,11 @@ ViewISelDAGs("view-isel-dags", cl::Hidden,
static cl::opt<bool>
ViewSchedDAGs("view-sched-dags", cl::Hidden,
cl::desc("Pop up a window to show sched dags as they are processed"));
+static cl::opt<bool>
+ViewSUnitDAGs("view-sunit-dags", cl::Hidden,
+ cl::desc("Pop up a window to show SUnit dags after they are processed"));
#else
-static const bool ViewISelDAGs = 0, ViewSchedDAGs = 0;
+static const bool ViewISelDAGs = 0, ViewSchedDAGs = 0, ViewSUnitDAGs = 0;
#endif
//===---------------------------------------------------------------------===//
@@ -4842,6 +4845,9 @@ void SelectionDAGISel::ScheduleAndEmitDAG(SelectionDAG &DAG) {
ScheduleDAG *SL = Ctor(this, &DAG, BB);
BB = SL->Run();
+
+ if (ViewSUnitDAGs) SL->viewGraph();
+
delete SL;
}