diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-02 03:07:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-02 03:07:27 +0000 |
commit | 5e46a19ec848cd4fc9649bd5170c43d9e657668c (patch) | |
tree | a74c196ca7f41a7ae79fe62768cfe94f27c086ee /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 6258fb2592d97e1c8e58d4fadf6c47ddeb23b455 (diff) |
Add a new -view-legalize-dags command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e689bdc7ad..f3d2fdfce4 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -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 @@ SDOperand SelectionDAGLegalize::PackVectorOp(SDOperand Op, // 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(); |