Make -view-isel-dags show the dag before instruction selecting, in case
authorChris Lattner <sabre@nondot.org>
Wed, 24 Aug 2005 00:34:29 +0000 (00:34 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 24 Aug 2005 00:34:29 +0000 (00:34 +0000)
the target isel crashes due to unimplemented features like calls :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22997 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index d3221c2e75936a81f264d1ce9d056a277d4b2e4b..227d34e1c47dab1d394ddb02f8b35758ec775fec 100644 (file)
@@ -1228,12 +1228,12 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB, MachineFunction &MF,
   DEBUG(std::cerr << "Legalized selection DAG:\n");
   DEBUG(DAG.dump());
 
+  if (ViewDAGs) DAG.viewGraph();
+
   // Third, instruction select all of the operations to machine code, adding the
   // code to the MachineBasicBlock.
   InstructionSelectBasicBlock(DAG);
 
-  if (ViewDAGs) DAG.viewGraph();
-
   DEBUG(std::cerr << "Selected machine code:\n");
   DEBUG(BB->dump());