From aeac00ed535feacf863f31184b47a9d95820c5fc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Aug 2003 22:12:07 +0000 Subject: [PATCH] Including statistics into an anonymous namespace that gets #included into every file is a bad idea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7489 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/SCCIterator.h | 11 +---------- include/llvm/ADT/SCCIterator.h | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/Support/SCCIterator.h b/include/Support/SCCIterator.h index 4de80f4a849..5fad4ddc47a 100644 --- a/include/Support/SCCIterator.h +++ b/include/Support/SCCIterator.h @@ -16,7 +16,7 @@ #define SUPPORT_TARJANSCCITERATOR_H #include "Support/GraphTraits.h" -#include "Support/Statistic.h" +#include "Support/Debug.h" #include "Support/iterator" #include #include @@ -56,11 +56,6 @@ struct SCC: public std::vector { // 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 TarjanSCC_iterator : public forward_iterator, ptrdiff_t> { @@ -152,10 +147,6 @@ class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> SCCNodeStack.pop(); nodeVisitNumbers[CurrentSCC.back()] = ~0UL; } while (CurrentSCC.back() != visitingN); - - ++NumSCCs; - if (CurrentSCC.size() > MaxSCCSize) MaxSCCSize = CurrentSCC.size(); - return; } } diff --git a/include/llvm/ADT/SCCIterator.h b/include/llvm/ADT/SCCIterator.h index 4de80f4a849..5fad4ddc47a 100644 --- a/include/llvm/ADT/SCCIterator.h +++ b/include/llvm/ADT/SCCIterator.h @@ -16,7 +16,7 @@ #define SUPPORT_TARJANSCCITERATOR_H #include "Support/GraphTraits.h" -#include "Support/Statistic.h" +#include "Support/Debug.h" #include "Support/iterator" #include #include @@ -56,11 +56,6 @@ struct SCC: public std::vector { // 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 TarjanSCC_iterator : public forward_iterator, ptrdiff_t> { @@ -152,10 +147,6 @@ class TarjanSCC_iterator : public forward_iterator, ptrdiff_t> SCCNodeStack.pop(); nodeVisitNumbers[CurrentSCC.back()] = ~0UL; } while (CurrentSCC.back() != visitingN); - - ++NumSCCs; - if (CurrentSCC.size() > MaxSCCSize) MaxSCCSize = CurrentSCC.size(); - return; } } -- 2.34.1