keep track of max depth stats
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 22 Apr 2005 13:35:18 +0000 (13:35 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 22 Apr 2005 13:35:18 +0000 (13:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21446 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Alpha/AlphaISelPattern.cpp

index 4b9d7af4aec039d6d5edc8a2c0f99c13ddb04934..186daed496956949253ae888d0c671eea6e61f53 100644 (file)
@@ -383,6 +383,7 @@ class ISel : public SelectionDAGISel {
   int count_ins;
   int count_outs;
   bool has_sym;
+  int max_depth;
 
 public:
   ISel(TargetMachine &TM) : SelectionDAGISel(AlphaLowering), AlphaLowering(TM)
@@ -394,17 +395,20 @@ public:
     DEBUG(BB->dump());
     count_ins = 0;
     count_outs = 0;
+    max_depth = 0;
     has_sym = false;
 
     // Codegen the basic block.
     ISelDAG = &DAG;
+    max_depth = DAG.getRoot().getNodeDepth();
     Select(DAG.getRoot());
 
     if(has_sym)
       ++count_ins;
     if(EnableAlphaCount)
-      std::cerr << "COUNT: " << BB->getParent()->getFunction ()->getName() << " "
-                << BB->getNumber() << " "
+      std::cerr << "COUNT: " << BB->getParent()->getFunction ()->getName() << " " 
+                << BB->getNumber() << " " 
+                << max_depth << " "
                 << count_ins << " "
                 << count_outs << "\n";