[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Aug 18 13:12:01 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.2 -> 1.3
---
Log message:
add a new -view-sched-dags option to view dags as they are sent to the scheduler.
---
Diffs of the changes: (+10 -0)
ScheduleDAG.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.2 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.3
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.2 Thu Aug 18 15:07:59 2005
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Aug 18 15:11:49 2005
@@ -17,8 +17,17 @@
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetInstrInfo.h"
+#include "llvm/Support/CommandLine.h"
using namespace llvm;
+#ifndef _NDEBUG
+static cl::opt<bool>
+ViewDAGs("view-sched-dags", cl::Hidden,
+ cl::desc("Pop up a window to show sched dags as they are processed"));
+#else
+static const bool ViewDAGS = 0;
+#endif
+
namespace {
class SimpleSched {
SelectionDAG &DAG;
@@ -112,5 +121,6 @@
/// Pick a safe ordering and emit instructions for each target node in the
/// graph.
void SelectionDAGISel::ScheduleAndEmitDAG(SelectionDAG &SD) {
+ if (ViewDAGs) SD.viewGraph();
SimpleSched(SD, BB).Run();
}
More information about the llvm-commits
mailing list