[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Apr 1 19:07:40 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.348 -> 1.349
SelectionDAGISel.cpp updated: 1.215 -> 1.216
---
Log message:
Add a new -view-legalize-dags command line option
---
Diffs of the changes: (+13 -3)
LegalizeDAG.cpp | 13 ++++++++++++-
SelectionDAGISel.cpp | 3 +--
2 files changed, 13 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.348 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.349
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.348 Fri Mar 31 12:22:37 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Apr 1 21:07:27 2006
@@ -14,16 +14,25 @@
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
-#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
+#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/CommandLine.h"
#include <iostream>
#include <map>
using namespace llvm;
+#ifndef NDEBUG
+static cl::opt<bool>
+ViewLegalizeDAGs("view-legalize-dags", cl::Hidden,
+ cl::desc("Pop up a window to show dags before legalize"));
+#else
+static const bool ViewLegalizeDAGs = 0;
+#endif
+
//===----------------------------------------------------------------------===//
/// SelectionDAGLegalize - This takes an arbitrary SelectionDAG as input and
/// hacks on it until the target machine can handle it. This involves
@@ -4628,6 +4637,8 @@
// SelectionDAG::Legalize - This is the entry point for the file.
//
void SelectionDAG::Legalize() {
+ if (ViewLegalizeDAGs) viewGraph();
+
/// run - This is the main entry point to this class.
///
SelectionDAGLegalize(*this).LegalizeDAG();
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.215 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.216
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.215 Sat Apr 1 18:24:45 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sat Apr 1 21:07:27 2006
@@ -54,8 +54,7 @@
ViewSchedDAGs("view-sched-dags", cl::Hidden,
cl::desc("Pop up a window to show sched dags as they are processed"));
#else
-static const bool ViewISelDAGs = 0;
-static const bool ViewSchedDAGs = 0;
+static const bool ViewISelDAGs = 0, ViewSchedDAGs = 0;
#endif
// Scheduling heuristics
More information about the llvm-commits
mailing list