[llvm-commits] CVS: llvm/include/Support/TarjanSCCIterator.h

Chris Lattner lattner at cs.uiuc.edu
Fri Aug 1 17:13:00 PDT 2003


Changes in directory llvm/include/Support:

TarjanSCCIterator.h updated: 1.8 -> 1.9

---
Log message:

Including statistics into an anonymous namespace that gets #included into 
every file is a bad idea.


---
Diffs of the changes:

Index: llvm/include/Support/TarjanSCCIterator.h
diff -u llvm/include/Support/TarjanSCCIterator.h:1.8 llvm/include/Support/TarjanSCCIterator.h:1.9
--- llvm/include/Support/TarjanSCCIterator.h:1.8	Mon Jun 30 16:58:23 2003
+++ llvm/include/Support/TarjanSCCIterator.h	Fri Aug  1 17:12:07 2003
@@ -16,7 +16,7 @@
 #define SUPPORT_TARJANSCCITERATOR_H
 
 #include "Support/GraphTraits.h"
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
 #include "Support/iterator"
 #include <vector>
 #include <stack>
@@ -56,11 +56,6 @@
 // reverse topological order of the SCC DAG.
 //--------------------------------------------------------------------------
 
-namespace {
-  Statistic<> NumSCCs("NumSCCs", "Number of Strongly Connected Components");
-  Statistic<> MaxSCCSize("MaxSCCSize", "Size of largest Strongly Connected Component");
-}
-
 template<class GraphT, class GT = GraphTraits<GraphT> >
 class TarjanSCC_iterator : public forward_iterator<SCC<GraphT, GT>, ptrdiff_t>
 {
@@ -152,10 +147,6 @@
               SCCNodeStack.pop();
               nodeVisitNumbers[CurrentSCC.back()] = ~0UL; 
             } while (CurrentSCC.back() != visitingN);
-
-            ++NumSCCs;
-            if (CurrentSCC.size() > MaxSCCSize) MaxSCCSize = CurrentSCC.size();
-            
             return;
           }
       }





More information about the llvm-commits mailing list