In -debug mode, dump SelectionDAGs both before and after the
authorDan Gohman <gohman@apple.com>
Mon, 8 Oct 2007 15:12:17 +0000 (15:12 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 8 Oct 2007 15:12:17 +0000 (15:12 +0000)
optimization passes.

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

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index ad4907dca019ee74bdf2299e8f09f8cd49229085..5f321654d8614b0d1733f109f70781132abe6641 100644 (file)
@@ -4624,10 +4624,13 @@ void SelectionDAGISel::BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB,
 }
 
 void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) {
+  DOUT << "Lowered selection DAG:\n";
+  DEBUG(DAG.dump());
+
   // Run the DAG combiner in pre-legalize mode.
   DAG.Combine(false, *AA);
   
-  DOUT << "Lowered selection DAG:\n";
+  DOUT << "Optimized lowered selection DAG:\n";
   DEBUG(DAG.dump());
   
   // Second step, hack on the DAG until it only uses operations and types that
@@ -4640,6 +4643,9 @@ void SelectionDAGISel::CodeGenAndEmitDAG(SelectionDAG &DAG) {
   // Run the DAG combiner in post-legalize mode.
   DAG.Combine(true, *AA);
   
+  DOUT << "Optimized legalized selection DAG:\n";
+  DEBUG(DAG.dump());
+
   if (ViewISelDAGs) DAG.viewGraph();
 
   // Third, instruction select all of the operations to machine code, adding the