diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-16 04:55:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-16 04:55:25 +0000 |
commit | 938ab02256289a688b1d4f992349f35d44afe4a0 (patch) | |
tree | c6eef23c4afa89aeab4d818bd2f96a074ffeeb3f | |
parent | e47b029ac0681e198cb17eec0fd23fbcd4bdd756 (diff) |
add options to view the dags before the first or second pass of dag combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33249 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 76a60f0f47..96bf9cd437 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -46,6 +46,20 @@ STATISTIC(PreIndexedNodes , "Number of pre-indexed nodes created"); 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 @@ SDOperand DAGCombiner::FindBetterChain(SDNode *N, SDOperand OldChain) { // 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); |