diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-12 03:41:21 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-12 03:41:21 +0000 |
| commit | e05a461f1df38931aa446bf325447614f2c1d4bb (patch) | |
| tree | e912759d121aaead8a6b5940a80f71613d580ae7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
| parent | 732daa5b9d27782666b69f8cca998d8732a33e74 (diff) | |
| download | bcm5719-llvm-e05a461f1df38931aa446bf325447614f2c1d4bb.tar.gz bcm5719-llvm-e05a461f1df38931aa446bf325447614f2c1d4bb.zip | |
Add an option to view the selection dags as they are generated.
llvm-svn: 19498
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 9ccf87cfd84..ae6b08cfb6d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -28,11 +28,20 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include <map> #include <iostream> using namespace llvm; +#ifndef _NDEBUG +static cl::opt<bool> +ViewDAGs("view-isel-dags", cl::Hidden, + cl::desc("Pop up a window to show isel dags as they are selected")); +#else +static const bool ViewDAGS = 0; +#endif + namespace llvm { //===--------------------------------------------------------------------===// /// FunctionLoweringInfo - This contains information that is global to a @@ -890,6 +899,8 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB, MachineFunction &MF, // the code to the MachineBasicBlock. InstructionSelectBasicBlock(DAG); + if (ViewDAGs) DAG.viewGraph(); + DEBUG(std::cerr << "Selected machine code:\n"); DEBUG(BB->dump()); |

