[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 15 20:55:41 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.265 -> 1.266
---
Log message:
add options to view the dags before the first or second pass of dag combine.
---
Diffs of the changes: (+18 -0)
DAGCombiner.cpp | 18 ++++++++++++++++++
1 files changed, 18 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.265 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.266
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.265 Mon Jan 8 17:04:05 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Jan 15 22:55:25 2007
@@ -46,6 +46,20 @@
STATISTIC(PostIndexedNodes, "Number of post-indexed nodes created");
namespace {
+#ifndef NDEBUG
+ static cl::opt<bool>
+ ViewDAGCombine1("view-dag-combine1-dags", cl::Hidden,
+ cl::desc("Pop up a window to show dags before the first "
+ "dag combine pass"));
+ static cl::opt<bool>
+ ViewDAGCombine2("view-dag-combine2-dags", cl::Hidden,
+ cl::desc("Pop up a window to show dags before the second "
+ "dag combine pass"));
+#else
+ static const bool ViewDAGCombine1 = false;
+ static const bool ViewDAGCombine2 = false;
+#endif
+
static cl::opt<bool>
CombinerAA("combiner-alias-analysis", cl::Hidden,
cl::desc("Turn on alias analysis during testing"));
@@ -4512,6 +4526,10 @@
// SelectionDAG::Combine - This is the entry point for the file.
//
void SelectionDAG::Combine(bool RunningAfterLegalize, AliasAnalysis &AA) {
+ if (!RunningAfterLegalize && ViewDAGCombine1)
+ viewGraph();
+ if (RunningAfterLegalize && ViewDAGCombine2)
+ viewGraph();
/// run - This is the main entry point to this class.
///
DAGCombiner(*this, AA).Run(RunningAfterLegalize);
More information about the llvm-commits
mailing list