mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 06:06:19 +00:00
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
This commit is contained in:
parent
589a4cc0f3
commit
aeac00ed53
@ -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 @@ struct SCC: public std::vector<typename GT::NodeType*> {
|
||||
// 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 @@ class TarjanSCC_iterator : public forward_iterator<SCC<GraphT, GT>, ptrdiff_t>
|
||||
SCCNodeStack.pop();
|
||||
nodeVisitNumbers[CurrentSCC.back()] = ~0UL;
|
||||
} while (CurrentSCC.back() != visitingN);
|
||||
|
||||
++NumSCCs;
|
||||
if (CurrentSCC.size() > MaxSCCSize) MaxSCCSize = CurrentSCC.size();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -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 @@ struct SCC: public std::vector<typename GT::NodeType*> {
|
||||
// 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 @@ class TarjanSCC_iterator : public forward_iterator<SCC<GraphT, GT>, ptrdiff_t>
|
||||
SCCNodeStack.pop();
|
||||
nodeVisitNumbers[CurrentSCC.back()] = ~0UL;
|
||||
} while (CurrentSCC.back() != visitingN);
|
||||
|
||||
++NumSCCs;
|
||||
if (CurrentSCC.size() > MaxSCCSize) MaxSCCSize = CurrentSCC.size();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user