Detemplatize the Statistic class. The only type it is instantiated with
authorChris Lattner <sabre@nondot.org>
Wed, 6 Dec 2006 17:46:33 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 6 Dec 2006 17:46:33 +0000 (17:46 +0000)
is 'unsigned'.

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

97 files changed:
include/llvm/ADT/Statistic.h
lib/Analysis/DataStructure/BottomUpClosure.cpp
lib/Analysis/DataStructure/CallTargets.cpp
lib/Analysis/DataStructure/CompleteBottomUp.cpp
lib/Analysis/DataStructure/DataStructure.cpp
lib/Analysis/DataStructure/DataStructureOpt.cpp
lib/Analysis/DataStructure/DataStructureStats.cpp
lib/Analysis/DataStructure/EquivClassGraphs.cpp
lib/Analysis/DataStructure/Printer.cpp
lib/Analysis/DataStructure/TopDownClosure.cpp
lib/Analysis/IPA/Andersens.cpp
lib/Analysis/IPA/GlobalsModRef.cpp
lib/Analysis/InstCount.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Bytecode/Writer/Writer.cpp
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/PHIElimination.cpp
lib/CodeGen/RegAllocLinearScan.cpp
lib/CodeGen/RegAllocLocal.cpp
lib/CodeGen/RegAllocSimple.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
lib/CodeGen/TwoAddressInstructionPass.cpp
lib/CodeGen/VirtRegMap.cpp
lib/ExecutionEngine/ExecutionEngine.cpp
lib/ExecutionEngine/Interpreter/Execution.cpp
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/Support/Statistic.cpp
lib/Support/Timer.cpp
lib/Target/ARM/ARMAsmPrinter.cpp
lib/Target/Alpha/AlphaAsmPrinter.cpp
lib/Target/Alpha/AlphaCodeEmitter.cpp
lib/Target/Alpha/AlphaLLRP.cpp
lib/Target/IA64/IA64AsmPrinter.cpp
lib/Target/IA64/IA64Bundling.cpp
lib/Target/IA64/IA64ISelDAGToDAG.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PPCBranchSelector.cpp
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
lib/Target/Sparc/DelaySlotFiller.cpp
lib/Target/Sparc/FPMover.cpp
lib/Target/Sparc/SparcAsmPrinter.cpp
lib/Target/X86/X86AsmPrinter.cpp
lib/Target/X86/X86AsmPrinter.h
lib/Target/X86/X86CodeEmitter.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Transforms/Hello/Hello.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/ConstantMerge.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/DeadTypeElimination.cpp
lib/Transforms/IPO/FunctionResolution.cpp
lib/Transforms/IPO/GlobalDCE.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/IPConstantPropagation.cpp
lib/Transforms/IPO/IndMemRemoval.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/IPO/Internalize.cpp
lib/Transforms/IPO/LoopExtractor.cpp
lib/Transforms/IPO/LowerSetJmp.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/IPO/RaiseAllocations.cpp
lib/Transforms/IPO/SimplifyLibCalls.cpp
lib/Transforms/Instrumentation/RSProfiling.cpp
lib/Transforms/LevelRaise.cpp
lib/Transforms/Scalar/ADCE.cpp
lib/Transforms/Scalar/BasicBlockPlacement.cpp
lib/Transforms/Scalar/CondPropagate.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/CorrelatedExprs.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/DeadStoreElimination.cpp
lib/Transforms/Scalar/GCSE.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/Transforms/Scalar/LoopUnroll.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/PredicateSimplifier.cpp
lib/Transforms/Scalar/Reassociate.cpp
lib/Transforms/Scalar/Reg2Mem.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
lib/Transforms/Scalar/SimplifyCFG.cpp
lib/Transforms/Scalar/TailDuplication.cpp
lib/Transforms/Scalar/TailRecursionElimination.cpp
lib/Transforms/Utils/BreakCriticalEdges.cpp
lib/Transforms/Utils/LCSSA.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/LowerInvoke.cpp
lib/Transforms/Utils/LowerSelect.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp

index 99160da10637dd141a4ddad03e75fa3a3fa70e9c..332a57d1214a9c4e1d249c49b8d54284d88b9766 100644 (file)
@@ -8,17 +8,19 @@
 //===----------------------------------------------------------------------===//
 //
 // This file defines the 'Statistic' class, which is designed to be an easy way
-// to expose various success metrics from passes.  These statistics are printed
-// at the end of a run, when the -stats command line option is enabled on the
-// command line.
+// to expose various metrics from passes.  These statistics are printed at the
+// end of a run (from llvm_shutdown), when the -stats command line option is
+// passed on the command line.
 //
 // This is useful for reporting information like the number of instructions
 // simplified, optimized or removed by various transformations, like this:
 //
-// static Statistic<> NumInstsKilled("gcse", "Number of instructions killed");
+// static Statistic NumInstsKilled("gcse", "Number of instructions killed");
 //
 // Later, in the code: ++NumInstsKilled;
 //
+// NOTE: Statistics *must* be declared as global variables.
+//
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_ADT_STATISTIC_H
@@ -29,7 +31,7 @@
 
 namespace llvm {
 
-// StatisticBase - Nontemplated base class for Statistic<> class...
+// StatisticBase - Nontemplated base class for Statistic class...
 class StatisticBase {
   const char *Name;
   const char *Desc;
@@ -55,39 +57,36 @@ protected:
 };
 
 // Statistic Class - templated on the data type we are monitoring...
-template <typename DataType=unsigned>
 class Statistic : private StatisticBase {
-  DataType Value;
+  unsigned Value;
 
   virtual void printValue(std::ostream &o) const { o << Value; }
-  virtual bool hasSomeData() const { return Value != DataType(); }
+  virtual bool hasSomeData() const { return Value != 0; }
 public:
   // Normal constructor, default initialize data item...
   Statistic(const char *name, const char *desc)
-    : StatisticBase(name, desc), Value(DataType()) {}
+    : StatisticBase(name, desc), Value(0) {}
 
   // Constructor to provide an initial value...
-  Statistic(const DataType &Val, const char *name, const char *desc)
+  Statistic(const unsigned &Val, const char *name, const char *desc)
     : StatisticBase(name, desc), Value(Val) {}
 
   // Print information when destroyed, iff command line option is specified
   ~Statistic() { destroy(); }
 
   // Allow use of this class as the value itself...
-  operator DataType() const { return Value; }
-  const Statistic &operator=(DataType Val) { Value = Val; return *this; }
+  operator unsigned() const { return Value; }
+  const Statistic &operator=(unsigned Val) { Value = Val; return *this; }
   const Statistic &operator++() { ++Value; return *this; }
-  DataType operator++(int) { return Value++; }
+  unsigned operator++(int) { return Value++; }
   const Statistic &operator--() { --Value; return *this; }
-  DataType operator--(int) { return Value--; }
-  const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
-  const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
-  const Statistic &operator*=(const DataType &V) { Value *= V; return *this; }
-  const Statistic &operator/=(const DataType &V) { Value /= V; return *this; }
+  unsigned operator--(int) { return Value--; }
+  const Statistic &operator+=(const unsigned &V) { Value += V; return *this; }
+  const Statistic &operator-=(const unsigned &V) { Value -= V; return *this; }
+  const Statistic &operator*=(const unsigned &V) { Value *= V; return *this; }
+  const Statistic &operator/=(const unsigned &V) { Value /= V; return *this; }
 };
 
-EXTERN_TEMPLATE_INSTANTIATION(class Statistic<unsigned>);
-
 } // End llvm namespace
 
 #endif
index 19b3ec1533ef1e95cd6b9a3f622659afac80200e..f5ca5fd6f584cd9a3d26d55746aab11ca87a3933 100644 (file)
@@ -26,9 +26,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
-  Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined");
-  Statistic<> NumCallEdges("budatastructures", "Number of 'actual' call edges");
+  Statistic MaxSCC("budatastructure", "Maximum SCC Size in Call Graph");
+  Statistic NumBUInlines("budatastructures", "Number of graphs inlined");
+  Statistic NumCallEdges("budatastructures", "Number of 'actual' call edges");
 
   cl::opt<bool>
   AddGlobals("budatastructures-annotate-calls", cl::Hidden,
index 5850749c6fdc678609d5f8c29ca3d517cdaa55b2..5ed445741802216b0f734a3f79fe9cb5e844e0e9 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> DirCall("calltarget", "Number of direct calls");
-  Statistic<> IndCall("calltarget", "Number of indirect calls");
-  Statistic<> CompleteInd("calltarget", "Number of complete indirect calls");
-  Statistic<> CompleteEmpty("calltarget", "Number of complete empty calls");
+  Statistic DirCall("calltarget", "Number of direct calls");
+  Statistic IndCall("calltarget", "Number of indirect calls");
+  Statistic CompleteInd("calltarget", "Number of complete indirect calls");
+  Statistic CompleteEmpty("calltarget", "Number of complete empty calls");
 
   RegisterPass<CallTargetFinder> X("calltarget","Find Call Targets (uses DSA)");
 }
index aea113d97dde6f97430992fd69468c96146f1388..af33e0d74171a77a89ea368313f76d752f90c09b 100644 (file)
@@ -26,7 +26,7 @@ using namespace llvm;
 namespace {
   RegisterPass<CompleteBUDataStructures>
   X("cbudatastructure", "'Complete' Bottom-up Data Structure Analysis");
-  Statistic<> NumCBUInlines("cbudatastructures", "Number of graphs inlined");
+  Statistic NumCBUInlines("cbudatastructures", "Number of graphs inlined");
 }
 
 
index 6eee541aeb578b92c024ca686741981c2061ffe7..80237c4f0bfd1b33134b918d8d5a6aa900f0939f 100644 (file)
@@ -34,12 +34,12 @@ using namespace llvm;
 #define COLLAPSE_ARRAYS_AGGRESSIVELY 0
 
 namespace {
-  Statistic<> NumFolds          ("dsa", "Number of nodes completely folded");
-  Statistic<> NumCallNodesMerged("dsa", "Number of call nodes merged");
-  Statistic<> NumNodeAllocated  ("dsa", "Number of nodes allocated");
-  Statistic<> NumDNE            ("dsa", "Number of nodes removed by reachability");
-  Statistic<> NumTrivialDNE     ("dsa", "Number of nodes trivially removed");
-  Statistic<> NumTrivialGlobalDNE("dsa", "Number of globals trivially removed");
+  Statistic NumFolds          ("dsa", "Number of nodes completely folded");
+  Statistic NumCallNodesMerged("dsa", "Number of call nodes merged");
+  Statistic NumNodeAllocated  ("dsa", "Number of nodes allocated");
+  Statistic NumDNE            ("dsa", "Number of nodes removed by reachability");
+  Statistic NumTrivialDNE     ("dsa", "Number of nodes trivially removed");
+  Statistic NumTrivialGlobalDNE("dsa", "Number of globals trivially removed");
   static cl::opt<unsigned>
   DSAFieldLimit("dsa-field-limit", cl::Hidden,
                 cl::desc("Number of fields to track before collapsing a node"),
index 56748832ab53ebcd4a4fadaccbc75535882c127c..85da1763ac213a9b7040804034a3e363b0d272db 100644 (file)
@@ -22,9 +22,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumGlobalsConstanted("ds-opt", "Number of globals marked constant");
-  Statistic<>
+  Statistic
   NumGlobalsIsolated("ds-opt", "Number of globals with references dropped");
 
   class DSOpt : public ModulePass {
index 469ab2e719ea6c202142ba69dcb7091319937d53..f7fbe3b33cdfdd1f75d2a6c2a416c407a2b8af8e 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> TotalNumCallees("totalcallees",
+  Statistic TotalNumCallees("totalcallees",
                 "Total number of callee functions at all indirect call sites");
-  Statistic<> NumIndirectCalls("numindirect",
+  Statistic NumIndirectCalls("numindirect",
                 "Total number of indirect call sites in the program");
-  Statistic<> NumPoolNodes("numpools",
+  Statistic NumPoolNodes("numpools",
                   "Number of allocation nodes that could be pool allocated");
 
   // Typed/Untyped memory accesses: If DSA can infer that the types the loads
   // and stores are accessing are correct (ie, the node has not been collapsed),
   // increment the appropriate counter.
-  Statistic<> NumTypedMemAccesses("numtypedmemaccesses",
+  Statistic NumTypedMemAccesses("numtypedmemaccesses",
                                 "Number of loads/stores which are fully typed");
-  Statistic<> NumUntypedMemAccesses("numuntypedmemaccesses",
+  Statistic NumUntypedMemAccesses("numuntypedmemaccesses",
                                 "Number of loads/stores which are untyped");
 
   class DSGraphStats : public FunctionPass, public InstVisitor<DSGraphStats> {
index 38aaf0b93c0a8e61663771cb13bb7559d13af315..49c93ffc4f4664b1d2160771df67eba87c2f9df7 100644 (file)
@@ -31,9 +31,9 @@ using namespace llvm;
 namespace {
   RegisterPass<EquivClassGraphs> X("eqdatastructure",
                     "Equivalence-class Bottom-up Data Structure Analysis");
-  Statistic<> NumEquivBUInlines("equivdatastructures",
+  Statistic NumEquivBUInlines("equivdatastructures",
                                 "Number of graphs inlined");
-  Statistic<> NumFoldGraphInlines("Inline equiv-class graphs bottom up",
+  Statistic NumFoldGraphInlines("Inline equiv-class graphs bottom up",
                                   "Number of graphs inlined");
 }
 
index af358bfbb33ab4f3d96525954f7a429ce4007cc2..2e86bda54862f440be7bdcf467a7410435ded5b2 100644 (file)
@@ -33,8 +33,8 @@ using namespace llvm;
 namespace {
   cl::opt<bool> OnlyPrintMain("only-print-main-ds", cl::ReallyHidden);
   cl::opt<bool> DontPrintAnything("dont-print-ds", cl::ReallyHidden);
-  Statistic<> MaxGraphSize   ("dsa", "Maximum graph size");
-  Statistic<> NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)");
+  Statistic MaxGraphSize   ("dsa", "Maximum graph size");
+  Statistic NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)");
 }
 
 void DSNode::dump() const { print(llvm_cerr, 0); }
index 57a8924ae4775605e2e2ffa737f344a8ec584647..71bf271a6ebd6839d557fe161062eea94f0d8aba 100644 (file)
@@ -34,7 +34,7 @@ namespace {
   RegisterPass<TDDataStructures>   // Register the pass
   Y("tddatastructure", "Top-down Data Structure Analysis");
 
-  Statistic<> NumTDInlines("tddatastructures", "Number of graphs inlined");
+  Statistic NumTDInlines("tddatastructures", "Number of graphs inlined");
 }
 
 void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N,
index 54e2944b958834367792642556c20809feecc9e5..288750304161a7ffe06480779489be66dc611acc 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumIters("anders-aa", "Number of iterations to reach convergence");
-  Statistic<>
+  Statistic
   NumConstraints("anders-aa", "Number of constraints");
-  Statistic<>
+  Statistic
   NumNodes("anders-aa", "Number of nodes");
-  Statistic<>
+  Statistic
   NumEscapingFunctions("anders-aa", "Number of internal functions that escape");
-  Statistic<>
+  Statistic
   NumIndirectCallees("anders-aa", "Number of indirect callees found");
 
   class Andersens : public ModulePass, public AliasAnalysis,
index 59cf66f6c3279e72cfacc2a81ef60ecc32dea577..7ae5e5be3509ba13ad23452323bcfa819e13b6c5 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumNonAddrTakenGlobalVars("globalsmodref-aa",
                             "Number of global vars without address taken");
-  Statistic<>
+  Statistic
   NumNonAddrTakenFunctions("globalsmodref-aa",
                            "Number of functions without address taken");
-  Statistic<>
+  Statistic
   NumNoMemFunctions("globalsmodref-aa",
                     "Number of functions that do not access memory");
-  Statistic<>
+  Statistic
   NumReadMemFunctions("globalsmodref-aa",
                       "Number of functions that only read memory");
-  Statistic<>
+  Statistic
   NumIndirectGlobalVars("globalsmodref-aa",
                         "Number of indirect global objects");
   
index 80f8bd88180bf46b0b178d57278beec68c01d22a..38f0bbaa9a756ab226294e662fdae057508c37da 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> TotalInsts ("instcount", "Number of instructions (of all types)");
-  Statistic<> TotalBlocks("instcount", "Number of basic blocks");
-  Statistic<> TotalFuncs ("instcount", "Number of non-external functions");
-  Statistic<> TotalMemInst("instcount", "Number of memory instructions");
+  Statistic TotalInsts ("instcount", "Number of instructions (of all types)");
+  Statistic TotalBlocks("instcount", "Number of basic blocks");
+  Statistic TotalFuncs ("instcount", "Number of non-external functions");
+  Statistic TotalMemInst("instcount", "Number of memory instructions");
 
 #define HANDLE_INST(N, OPCODE, CLASS) \
-    Statistic<> Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts");
+    Statistic Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts");
 
 #include "llvm/Instruction.def"
 
index 6e6d302324fde80c270b76fe95eb58bfeac0dd7b..ba903e01406cb139f8dda60e62f15919ca13e392 100644 (file)
@@ -85,20 +85,20 @@ namespace {
   RegisterPass<ScalarEvolution>
   R("scalar-evolution", "Scalar Evolution Analysis");
 
-  Statistic<>
+  Statistic
   NumBruteForceEvaluations("scalar-evolution",
                            "Number of brute force evaluations needed to "
                            "calculate high-order polynomial exit values");
-  Statistic<>
+  Statistic
   NumArrayLenItCounts("scalar-evolution",
                       "Number of trip counts computed with array length");
-  Statistic<>
+  Statistic
   NumTripCountsComputed("scalar-evolution",
                         "Number of loops with predictable loop counts");
-  Statistic<>
+  Statistic
   NumTripCountsNotComputed("scalar-evolution",
                            "Number of loops without predictable loop counts");
-  Statistic<>
+  Statistic
   NumBruteForceTripCountsComputed("scalar-evolution",
                         "Number of loops with trip counts computed by force");
 
index b8f57f7f72f8f0e986000cae2cfbcbcd6f5e9334..37c6321e33c785218244a9556cb083abf032f343 100644 (file)
@@ -45,7 +45,7 @@ const unsigned BCVersionNum = 7;
 
 static RegisterPass<WriteBytecodePass> X("emitbytecode", "Bytecode Writer");
 
-static Statistic<>
+static Statistic
 BytesWritten("bytecodewriter", "Number of bytecode bytes written");
 
 //===----------------------------------------------------------------------===//
index 8ded3cdc64d4633245a067f4a699d16f7e1848e3..0dfa4928f99e5f906a4176df9b26cc00aac4447d 100644 (file)
@@ -30,9 +30,9 @@
 #include <algorithm>
 using namespace llvm;
 
-static Statistic<> NumDeadBlocks("branchfold", "Number of dead blocks removed");
-static Statistic<> NumBranchOpts("branchfold", "Number of branches optimized");
-static Statistic<> NumTailMerge ("branchfold", "Number of block tails merged");
+static Statistic NumDeadBlocks("branchfold", "Number of dead blocks removed");
+static Statistic NumBranchOpts("branchfold", "Number of branches optimized");
+static Statistic NumTailMerge ("branchfold", "Number of block tails merged");
 static cl::opt<bool> EnableTailMerge("enable-tail-merge", cl::Hidden);
 
 namespace {
index 9248662e39026ea636b7ad48c946ac0acd960ba9..3bdbe855c376163e905c941f2c325ef6e2f14933 100644 (file)
@@ -39,19 +39,19 @@ using namespace llvm;
 namespace {
   RegisterPass<LiveIntervals> X("liveintervals", "Live Interval Analysis");
 
-  static Statistic<> numIntervals
+  static Statistic numIntervals
   ("liveintervals", "Number of original intervals");
 
-  static Statistic<> numIntervalsAfter
+  static Statistic numIntervalsAfter
   ("liveintervals", "Number of intervals after coalescing");
 
-  static Statistic<> numJoins
+  static Statistic numJoins
   ("liveintervals", "Number of interval joins performed");
 
-  static Statistic<> numPeep
+  static Statistic numPeep
   ("liveintervals", "Number of identity moves eliminated after coalescing");
 
-  static Statistic<> numFolded
+  static Statistic numFolded
   ("liveintervals", "Number of loads/stores folded into instructions");
 
   static cl::opt<bool>
index c107d1a317f48c3f1f87056d5d48dbefb27da924..fec54eac373905680914ea8be53257a1efada4c9 100644 (file)
@@ -29,8 +29,8 @@
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumAtomic("phielim", "Number of atomic phis lowered");
-  static Statistic<> NumSimple("phielim", "Number of simple phis lowered");
+  static Statistic NumAtomic("phielim", "Number of atomic phis lowered");
+  static Statistic NumSimple("phielim", "Number of simple phis lowered");
   
   struct VISIBILITY_HIDDEN PNE : public MachineFunctionPass {
     bool runOnMachineFunction(MachineFunction &Fn) {
index 170febcc50be7183d28fc088695791bb7459fc7d..1977a5489de8f199910f9378adeeba3925ced08a 100644 (file)
@@ -37,9 +37,9 @@ using namespace llvm;
 
 namespace {
 
-  static Statistic<> NumIters
+  static Statistic NumIters
   ("regalloc", "Number of iterations performed");
-  static Statistic<> NumBacktracks
+  static Statistic NumBacktracks
   ("regalloc", "Number of times we had to backtrack");
 
   static RegisterRegAlloc
index 6090b4db13e94e56c3696d62f72a96a857de263d..8d10ff703b0107bf9c178b470ea51e8c2ec82daf 100644 (file)
@@ -33,9 +33,9 @@
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumStores("ra-local", "Number of stores added");
-  static Statistic<> NumLoads ("ra-local", "Number of loads added");
-  static Statistic<> NumFolded("ra-local", "Number of loads/stores folded "
+  static Statistic NumStores("ra-local", "Number of stores added");
+  static Statistic NumLoads ("ra-local", "Number of loads added");
+  static Statistic NumFolded("ra-local", "Number of loads/stores folded "
                               "into instructions");
 
   static RegisterRegAlloc
index f08b039b82e8dc1e47461769831e042dc667172b..262f8c240e136d9d71510b575bc41a27c24f4146 100644 (file)
@@ -31,8 +31,8 @@
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumStores("ra-simple", "Number of stores added");
-  static Statistic<> NumLoads ("ra-simple", "Number of loads added");
+  static Statistic NumStores("ra-simple", "Number of stores added");
+  static Statistic NumLoads ("ra-simple", "Number of loads added");
 
   static RegisterRegAlloc
     simpleRegAlloc("simple", "  simple register allocator",
index 99de15c9363a7dcb7e05be0578fbae542088ae1e..2f8ad80e5c6d1e8b38280ef3da6fb1c59b15dc25 100644 (file)
 using namespace llvm;
 
 namespace {
-  static Statistic<> NodesCombined ("dagcombiner", 
+  static Statistic NodesCombined ("dagcombiner", 
                                    "Number of dag nodes combined");
             
-  static Statistic<> PreIndexedNodes ("pre_indexed_ops", 
+  static Statistic PreIndexedNodes ("pre_indexed_ops", 
                                       "Number of pre-indexed nodes created");
-  static Statistic<> PostIndexedNodes ("post_indexed_ops", 
+  static Statistic PostIndexedNodes ("post_indexed_ops", 
                                        "Number of post-indexed nodes created");
             
   static cl::opt<bool>
index da8b1cddb8c3c586e4aa8a30ac900e9c48706840..2d08cbabb5dfecaa7170da392b6d29c15b480458 100644 (file)
@@ -36,8 +36,8 @@
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumNoops ("scheduler", "Number of noops inserted");
-  static Statistic<> NumStalls("scheduler", "Number of pipeline stalls");
+  static Statistic NumNoops ("scheduler", "Number of noops inserted");
+  static Statistic NumStalls("scheduler", "Number of pipeline stalls");
 }
 
 static RegisterScheduler
index 335a7e499cf80ba722e4c35d6669805c1a6c3e6e..932542dd21d7bcd28c24669e7b005d82a860f45e 100644 (file)
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumTwoAddressInstrs("twoaddressinstruction",
+  static Statistic NumTwoAddressInstrs("twoaddressinstruction",
                                   "Number of two-address instructions");
-  static Statistic<> NumCommuted("twoaddressinstruction",
+  static Statistic NumCommuted("twoaddressinstruction",
                           "Number of instructions commuted to coalesce");
-  static Statistic<> NumConvertedTo3Addr("twoaddressinstruction",
+  static Statistic NumConvertedTo3Addr("twoaddressinstruction",
                                 "Number of instructions promoted to 3-address");
 
   struct VISIBILITY_HIDDEN TwoAddressInstructionPass
index a79585609a8d73b26de13e339a580515358d1f96..359294d18e484d26b626b24cad83864c56074c81 100644 (file)
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumSpills("spiller", "Number of register spills");
-  static Statistic<> NumStores("spiller", "Number of stores added");
-  static Statistic<> NumLoads ("spiller", "Number of loads added");
-  static Statistic<> NumReused("spiller", "Number of values reused");
-  static Statistic<> NumDSE   ("spiller", "Number of dead stores elided");
-  static Statistic<> NumDCE   ("spiller", "Number of copies elided");
+  static Statistic NumSpills("spiller", "Number of register spills");
+  static Statistic NumStores("spiller", "Number of stores added");
+  static Statistic NumLoads ("spiller", "Number of loads added");
+  static Statistic NumReused("spiller", "Number of values reused");
+  static Statistic NumDSE   ("spiller", "Number of dead stores elided");
+  static Statistic NumDCE   ("spiller", "Number of copies elided");
 
   enum SpillerName { simple, local };
 
index 8447acf0e530dda0a308c3932a18447fd24f640e..ff312f08a184d25e3399e986a015488499d841a3 100644 (file)
@@ -27,8 +27,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized");
-  Statistic<> NumGlobals  ("lli", "Number of global vars initialized");
+  Statistic NumInitBytes("lli", "Number of bytes of global vars initialized");
+  Statistic NumGlobals  ("lli", "Number of global vars initialized");
 }
 
 ExecutionEngine::EECtorFn ExecutionEngine::JITCtor = 0;
index fd5fb6f0bd39e741b0b440792f0d7009993a58c1..964435d3802705355556b244175cd241cc9a7703 100644 (file)
@@ -24,7 +24,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumDynamicInsts("lli", "Number of dynamic instructions executed");
+  Statistic NumDynamicInsts("lli", "Number of dynamic instructions executed");
 
   Interpreter *TheEE = 0;
 }
index e9b630b1b73b5628f33b7dfa97fe59aa249db4d1..02113473a599ed1952d32d7073f5d99d52daf2ab 100644 (file)
@@ -34,8 +34,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBytes("jit", "Number of bytes of machine code compiled");
-  Statistic<> NumRelos("jit", "Number of relocations applied");
+  Statistic NumBytes("jit", "Number of bytes of machine code compiled");
+  Statistic NumRelos("jit", "Number of relocations applied");
   JIT *TheJIT = 0;
 }
 
index 56bbfe9d7a92f56e7a415a63d2bf51fa7f6b3ea8..cd516626361550919e636a7fe24216d529ffa4b6 100644 (file)
@@ -15,7 +15,7 @@
 // This is useful for reporting information like the number of instructions
 // simplified, optimized or removed by various transformations, like this:
 //
-// static Statistic<> NumInstEliminated("GCSE - Number of instructions killed");
+// static Statistic NumInstEliminated("GCSE - Number of instructions killed");
 //
 // Later, in the code: ++NumInstEliminated;
 //
@@ -33,8 +33,6 @@ namespace llvm { extern std::ostream *GetLibSupportInfoOutputFile(); }
 
 unsigned StatisticBase::NumStats = 0;
 
-TEMPLATE_INSTANTIATION(class Statistic<unsigned>);
-
 // -stats - Command line option to cause transformations to emit stats about
 // what they did.
 //
index 0c4f18f6307e325aee53b3a6ec55a0a49528b20e..a39f169cb7bed35d547d40de9b806473a44700cc 100644 (file)
@@ -27,7 +27,7 @@ namespace llvm { extern std::ostream *GetLibSupportInfoOutputFile(); }
 
 // getLibSupportInfoOutputFilename - This ugly hack is brought to you courtesy
 // of constructor/destructor ordering being unspecified by C++.  Basically the
-// problem is that a Statistic<> object gets destroyed, which ends up calling
+// problem is that a Statistic object gets destroyed, which ends up calling
 // 'GetLibSupportInfoOutputFile()' (below), which calls this function.
 // LibSupportInfoOutputFilename used to be a global variable, but sometimes it
 // would get destroyed before the Statistic, causing havoc to ensue.  We "fix"
index 5eadee20db169143026899c8db88cf63fefa5b57..617933c6bb273f3fa0411227b1bc584e099b81b4 100644 (file)
@@ -35,7 +35,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+  Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
 
   static const char *ARMCondCodeToString(ARMCC::CondCodes CC) {
     switch (CC) {
index 821d4324560b221b7fa0e9828f56a7ee079702c0..a9ba19845db17740fff6b664a402dd01b8bf98d0 100644 (file)
@@ -27,7 +27,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+  Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
   
   struct VISIBILITY_HIDDEN AlphaAsmPrinter : public AsmPrinter {
 
index 15de348ee4e31124fbb98056a86f9d45ef8a8727..884215e79309d9d594082ba95b94d4d54c1e165e 100644 (file)
@@ -27,7 +27,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumEmitted("alpha-emitter", "Number of machine instructions emitted");
 }
 
index eb4867d668958f871a3bca5ec2ad91af37eb5c73..06d217b77bb90ee71e15fbf6aa669750db7c6ca8 100644 (file)
@@ -23,8 +23,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> nopintro("alpha-nops", "Number of nops inserted");
-  Statistic<> nopalign("alpha-nops-align", 
+  Statistic nopintro("alpha-nops", "Number of nops inserted");
+  Statistic nopalign("alpha-nops-align", 
                       "Number of nops inserted for alignment");
 
   cl::opt<bool>
index edad61e23c4c74a3bb91d8e03f235e62f8667fa4..b2f0f530975167bcfc73f3e24038f3e42bb5946a 100644 (file)
@@ -30,7 +30,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+  Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
   
   struct IA64AsmPrinter : public AsmPrinter {
     std::set<std::string> ExternalFunctionNames, ExternalObjectNames;
index 808e7138a9c17c6dcc8900048fdbc971f17cc876..0c4ae82529b72de22263abe2795eaa68c760f790 100644 (file)
@@ -33,7 +33,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> StopBitsAdded("ia64-codegen", "Number of stop bits added");
+  Statistic StopBitsAdded("ia64-codegen", "Number of stop bits added");
 
   struct IA64BundlingPass : public MachineFunctionPass {
     /// Target machine description which we query for reg. names, data
index 78a051b52f1ff871ec1cd1e11de195ced0e4a6d5..3f2669d52e00f663855879545306da470f1c407e 100644 (file)
@@ -33,8 +33,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> FusedFP ("ia64-codegen", "Number of fused fp operations");
-  Statistic<> FrameOff("ia64-codegen", "Number of frame idx offsets collapsed");
+  Statistic FusedFP ("ia64-codegen", "Number of fused fp operations");
+  Statistic FrameOff("ia64-codegen", "Number of frame idx offsets collapsed");
     
   //===--------------------------------------------------------------------===//
   /// IA64DAGToDAGISel - IA64 specific code to select IA64 machine
index abbcc5725556d6b0bd0ca1f713913927de5c2367..65145e5a3b60f38fab081469c465e8da680f5908 100644 (file)
@@ -46,7 +46,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+  Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
 
   struct VISIBILITY_HIDDEN PPCAsmPrinter : public AsmPrinter {
     std::set<std::string> FnStubs, GVStubs;
index edd2857921b4b4e261393ba5c7ba6a2f7db2c8d7..7a8b094bfff3f8e507ebb63d1fd31af437650a51 100644 (file)
@@ -27,7 +27,7 @@
 #include "llvm/Support/MathExtras.h"
 using namespace llvm;
 
-static Statistic<> NumExpanded("ppc-branch-select",
+static Statistic NumExpanded("ppc-branch-select",
                                "Num branches expanded to long format");
 
 namespace {
index 083bb2a1b0152a7d44399fd5fbd3b12daff01bbd..1a3508e5ad6a0da712c49b3aafdc69edbb6b3314 100644 (file)
@@ -36,7 +36,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> FrameOff("ppc-codegen", "Number of frame idx offsets collapsed");
+  Statistic FrameOff("ppc-codegen", "Number of frame idx offsets collapsed");
     
   //===--------------------------------------------------------------------===//
   /// PPCDAGToDAGISel - PPC specific code to select PPC machine
index 715a373b937571467f3ad61b2749271a731174bc..768b79b9fb101aa2bc4fcc717ae8c969c2a40374 100644 (file)
@@ -20,7 +20,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> FilledSlots("delayslotfiller", "Num. of delay slots filled");
+  Statistic FilledSlots("delayslotfiller", "Num. of delay slots filled");
 
   struct Filler : public MachineFunctionPass {
     /// Target machine description which we query for reg. names, data
index 991e29d8a9e1c2672539d3c4ba4e18d2650f7da4..2b24d991f04b2f64b78b52b7dc398d7fddcad759 100644 (file)
@@ -23,8 +23,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumFpDs("fpmover", "Number of instructions translated");
-  Statistic<> NoopFpDs("fpmover", "Number of noop instructions removed");
+  Statistic NumFpDs("fpmover", "Number of instructions translated");
+  Statistic NoopFpDs("fpmover", "Number of noop instructions removed");
 
   struct FPMover : public MachineFunctionPass {
     /// Target machine description which we query for reg. names, data
index 0b4fec9fc09ff2aa1292ac19ccb87a68864d13cd..034c8f6967c6e1856a43d56dfc05b79a714cbad7 100644 (file)
@@ -34,7 +34,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+  Statistic EmittedInsts("asm-printer", "Number of machine instrs printed");
 
   struct VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
     SparcAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
index 722697527c3c681f458bc3d33d0fe6e7068d89d1..85a1cb642485537737cab324fdb42b98ef0dfbba 100644 (file)
@@ -30,7 +30,7 @@
 
 using namespace llvm;
 
-Statistic<> llvm::EmittedInsts("asm-printer",
+Statistic llvm::EmittedInsts("asm-printer",
                                "Number of machine instrs printed");
 
 static X86FunctionInfo calculateFunctionInfo(const Function *F,
index 8dad733bb288288ff45cb106684e63ebdcaa5fb6..da7c053eef587dfe64672afbc9ba9f706fc1cc22 100755 (executable)
@@ -28,7 +28,7 @@
 
 namespace llvm {
 
-extern Statistic<> EmittedInsts;
+extern Statistic EmittedInsts;
 
 // FIXME: Move this to CodeGen/AsmPrinter.h
 namespace PICStyle {
index fce507514d71f1e287213b9f18341cf23d8066e4..dbbd66f491b8ab29e97b3f50a984f4ff3acf5e59 100644 (file)
@@ -29,7 +29,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumEmitted("x86-emitter", "Number of machine instructions emitted");
 }
 
index 1d665a423d1601aa322e1b583cab413db006ae16..75321273a036afa7232b5dfc2d8b3105c9fc4b2b 100644 (file)
@@ -49,8 +49,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumFXCH("x86-codegen", "Number of fxch instructions inserted");
-  Statistic<> NumFP  ("x86-codegen", "Number of floating point instructions");
+  Statistic NumFXCH("x86-codegen", "Number of fxch instructions inserted");
+  Statistic NumFP  ("x86-codegen", "Number of floating point instructions");
 
   struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
     virtual bool runOnMachineFunction(MachineFunction &MF);
index 6d0f54933da8fd5efa7ecea7f95d44f973747c69..4f84327fdd912e8b25ae078ca2ea2b4834d41a93 100644 (file)
@@ -76,10 +76,10 @@ namespace {
 }
 
 namespace {
-  Statistic<>
+  Statistic
   NumFPKill("x86-codegen", "Number of FP_REG_KILL instructions added");
 
-  Statistic<>
+  Statistic
   NumLoadMoved("x86-codegen", "Number of loads moved below TokenFactor");
 
   //===--------------------------------------------------------------------===//
index a91360f962d35e60479cc7a0093f16aa56301be9..8324cbb6cb784ddb9ce3c0b6b88cc605353aa3c7 100644 (file)
@@ -21,7 +21,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> HelloCounter("hellocount",
+  Statistic HelloCounter("hellocount",
       "Counts number of functions greeted");
   // Hello - The first implementation, without getAnalysisUsage.
   struct Hello : public FunctionPass {
index e9841697a784cb0861048a147feb34c16589e138..2a06310065b1468bba319be85b6c410e4c335a10 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumArgumentsPromoted("argpromotion",
+  Statistic NumArgumentsPromoted("argpromotion",
                                    "Number of pointer arguments promoted");
-  Statistic<> NumAggregatesPromoted("argpromotion",
+  Statistic NumAggregatesPromoted("argpromotion",
                                     "Number of aggregate arguments promoted");
-  Statistic<> NumArgumentsDead("argpromotion",
+  Statistic NumArgumentsDead("argpromotion",
                                "Number of dead pointer args eliminated");
 
   /// ArgPromotion - The 'by reference' to 'by value' argument promotion pass.
index aca42fe23be3b1a56ce169a9a771dde4b9a5eaa5..7ba7b32a7e30cf546138e508c8164292f98d87a9 100644 (file)
@@ -24,7 +24,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumMerged("constmerge", "Number of global constants merged");
+  Statistic NumMerged("constmerge", "Number of global constants merged");
 
   struct ConstantMerge : public ModulePass {
     // run - For this pass, process all of the globals in the module,
index 77ac8737b0872985fafc4b24bbd4370f1188677e..d3326ac71f8d3f9389cd53416e11748ade20b77b 100644 (file)
@@ -33,9 +33,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumArgumentsEliminated("deadargelim",
+  Statistic NumArgumentsEliminated("deadargelim",
                                      "Number of unread args removed");
-  Statistic<> NumRetValsEliminated("deadargelim",
+  Statistic NumRetValsEliminated("deadargelim",
                                    "Number of unused return values removed");
 
   /// DAE - The dead argument elimination pass.
index 57e5fa310970a64dbadf2851d223b7b4105649bb..e30e0ed38c4c92da69d89526ffdba1624cb6f6d3 100644 (file)
@@ -37,7 +37,7 @@ namespace {
     }
   };
   RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
-  Statistic<>
+  Statistic
   NumKilled("deadtypeelim", "Number of unused typenames removed from symtab");
 }
 
index a514b92b5ff5d5a8c2a754d5f54b76c7f37b4f9a..de3fe5ba87997f4da361d2783eb7ebab3797eb64 100644 (file)
@@ -33,8 +33,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>NumResolved("funcresolve", "Number of varargs functions resolved");
-  Statistic<> NumGlobals("funcresolve", "Number of global variables resolved");
+  Statistic NumResolved("funcresolve", "Number of varargs functions resolved");
+  Statistic NumGlobals("funcresolve", "Number of global variables resolved");
 
   struct FunctionResolvingPass : public ModulePass {
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
index 07296cfa5e456ec56694ac3bba35839994730278..ac23760bf20183def828d0abcf9a6d2199e42b13 100644 (file)
@@ -24,8 +24,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumFunctions("globaldce","Number of functions removed");
-  Statistic<> NumVariables("globaldce","Number of global variables removed");
+  Statistic NumFunctions("globaldce","Number of functions removed");
+  Statistic NumVariables("globaldce","Number of global variables removed");
 
   struct GlobalDCE : public ModulePass {
     // run - Do the GlobalDCE pass on the specified module, optionally updating
index af3bf6a887cba5360b6af21e2549398583bb7902..a0dc9373d6648d7f1892381435900e89f614527b 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumMarked   ("globalopt", "Number of globals marked constant");
-  Statistic<> NumSRA      ("globalopt", "Number of aggregate globals broken "
+  Statistic NumMarked   ("globalopt", "Number of globals marked constant");
+  Statistic NumSRA      ("globalopt", "Number of aggregate globals broken "
                            "into scalars");
-  Statistic<> NumHeapSRA  ("globalopt", "Number of heap objects SRA'd");
-  Statistic<> NumSubstitute("globalopt",
+  Statistic NumHeapSRA  ("globalopt", "Number of heap objects SRA'd");
+  Statistic NumSubstitute("globalopt",
                         "Number of globals with initializers stored into them");
-  Statistic<> NumDeleted  ("globalopt", "Number of globals deleted");
-  Statistic<> NumFnDeleted("globalopt", "Number of functions deleted");
-  Statistic<> NumGlobUses ("globalopt", "Number of global uses devirtualized");
-  Statistic<> NumLocalized("globalopt", "Number of globals localized");
-  Statistic<> NumShrunkToBool("globalopt",
+  Statistic NumDeleted  ("globalopt", "Number of globals deleted");
+  Statistic NumFnDeleted("globalopt", "Number of functions deleted");
+  Statistic NumGlobUses ("globalopt", "Number of global uses devirtualized");
+  Statistic NumLocalized("globalopt", "Number of globals localized");
+  Statistic NumShrunkToBool("globalopt",
                               "Number of global vars shrunk to booleans");
-  Statistic<> NumFastCallFns("globalopt",
+  Statistic NumFastCallFns("globalopt",
                              "Number of functions converted to fastcc");
-  Statistic<> NumCtorsEvaluated("globalopt","Number of static ctors evaluated");
+  Statistic NumCtorsEvaluated("globalopt","Number of static ctors evaluated");
 
   struct GlobalOpt : public ModulePass {
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
index 4713fb6aea3950db236e262931d574ae3164db31..3f673ae85ead6ae313dc1f5c8aa8ce32432162a4 100644 (file)
@@ -25,9 +25,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumArgumentsProped("ipconstprop",
+  Statistic NumArgumentsProped("ipconstprop",
                                  "Number of args turned into constants");
-  Statistic<> NumReturnValProped("ipconstprop",
+  Statistic NumReturnValProped("ipconstprop",
                               "Number of return values turned into constants");
 
   /// IPCP - The interprocedural constant propagation pass
index 0779a5414f5805a1d3ad86e3b8dd732598efdfc8..9d3c147a1f6b795a210277aaf4da33113ef645f3 100644 (file)
@@ -28,8 +28,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBounceSites("indmemrem", "Number of sites modified");
-  Statistic<> NumBounce  ("indmemrem", "Number of bounce functions created");
+  Statistic NumBounceSites("indmemrem", "Number of sites modified");
+  Statistic NumBounce  ("indmemrem", "Number of bounce functions created");
 
   class IndMemRemPass : public ModulePass {
 
index ea43dc21da356f11f2fdf668c001e9c386a41372..bd5fb98416d3399d9025c5e0228e9947297da6cc 100644 (file)
@@ -26,8 +26,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumInlined("inline", "Number of functions inlined");
-  Statistic<> NumDeleted("inline",
+  Statistic NumInlined("inline", "Number of functions inlined");
+  Statistic NumDeleted("inline",
                        "Number of functions deleted because all callers found");
   cl::opt<unsigned>             // FIXME: 200 is VERY conservative
   InlineLimit("inline-threshold", cl::Hidden, cl::init(200),
index c19e2f2b99cfe136c2136cd1eb75cfcf63549942..3e7dcc67ae97030587cc537934116be510605dda 100644 (file)
@@ -24,8 +24,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumFunctions("internalize", "Number of functions internalized");
-  Statistic<> NumGlobals  ("internalize", "Number of global vars internalized");
+  Statistic NumFunctions("internalize", "Number of functions internalized");
+  Statistic NumGlobals  ("internalize", "Number of global vars internalized");
 
   // APIFile - A file which contains a list of symbols that should not be marked
   // external.
index a4ce585ef9a7a8f8a4c32be568400a0090d05bb5..f77f9f32576fb2034a63ee2895d7181543fdc2cf 100644 (file)
@@ -26,7 +26,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumExtracted("loop-extract", "Number of loops extracted");
+  Statistic NumExtracted("loop-extract", "Number of loops extracted");
 
   // FIXME: This is not a function pass, but the PassManager doesn't allow
   // Module passes to require FunctionPasses, so we can't get loop info if we're
index 3aac39209143467963a79cfec2fc51b6d12e5544..0417a5cc2749c373447675df231c85d27a35438b 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> LongJmpsTransformed("lowersetjmp",
+  Statistic LongJmpsTransformed("lowersetjmp",
                                   "Number of longjmps transformed");
-  Statistic<> SetJmpsTransformed("lowersetjmp",
+  Statistic SetJmpsTransformed("lowersetjmp",
                                  "Number of setjmps transformed");
-  Statistic<> CallsTransformed("lowersetjmp",
+  Statistic CallsTransformed("lowersetjmp",
                                "Number of calls invokified");
-  Statistic<> InvokesTransformed("lowersetjmp",
+  Statistic InvokesTransformed("lowersetjmp",
                                  "Number of invokes modified");
 
   //===--------------------------------------------------------------------===//
index 8ba0ac04023af894dd185d2394c2844bc5d0976a..1dec7d70470d5ae68e7658698faeb9def69715eb 100644 (file)
@@ -28,8 +28,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumRemoved("prune-eh", "Number of invokes removed");
-  Statistic<> NumUnreach("prune-eh", "Number of noreturn calls optimized");
+  Statistic NumRemoved("prune-eh", "Number of invokes removed");
+  Statistic NumUnreach("prune-eh", "Number of noreturn calls optimized");
 
   struct PruneEH : public CallGraphSCCPass {
     /// DoesNotUnwind - This set contains all of the functions which we have
index 584a2e98b098357d22858b49be97590df04b9766..77a9a3d57ea9c40969870d5b67f1936d68728883 100644 (file)
@@ -23,7 +23,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumRaised("raiseallocs", "Number of allocations raised");
+  Statistic NumRaised("raiseallocs", "Number of allocations raised");
 
   // RaiseAllocations - Turn %malloc and %free calls into the appropriate
   // instruction.
index fb22a2f1394035bd58112819eb6670e653ad7a94..f989d1dd162f34a1b7148460ab481537ffb36c81 100644 (file)
@@ -35,7 +35,7 @@ namespace {
 
 /// This statistic keeps track of the total number of library calls that have
 /// been simplified regardless of which call it is.
-Statistic<> SimplifiedLibCalls("simplify-libcalls",
+Statistic SimplifiedLibCalls("simplify-libcalls",
   "Number of library calls simplified");
 
 // Forward declarations
@@ -68,7 +68,7 @@ class LibCallOptimization {
   LibCallOptimization **Prev, *Next;
   const char *FunctionName; ///< Name of the library call we optimize
 #ifndef NDEBUG
-  Statistic<> occurrences; ///< debug statistic (-debug-only=simplify-libcalls)
+  Statistic occurrences; ///< debug statistic (-debug-only=simplify-libcalls)
 #endif
 public:
   /// The \p fname argument must be the name of the library function being
index 4c6f264b3bb88f1f0d4b9ce43a895792e0bc681c..c14915c9a53456978af78d7d20ff1ba593cc72ad 100644 (file)
@@ -52,7 +52,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBackEdges("bedge", "Number of BackEdges");
+  Statistic NumBackEdges("bedge", "Number of BackEdges");
 
   enum RandomMeth {
     GBV, GBVO, HOSTCC
index c8635e181fe53d6522616138f21a62aeb3b1a8ca..56622693a25ee02108570c6c56cfd626ae6f0842 100644 (file)
@@ -34,22 +34,22 @@ static cl::opt<std::string>
 StartInst("raise-start-inst", cl::Hidden, cl::value_desc("inst name"),
        cl::desc("Start raise pass at the instruction with the specified name"));
 
-static Statistic<>
+static Statistic
 NumLoadStorePeepholes("raise", "Number of load/store peepholes");
 
-static Statistic<>
+static Statistic
 NumGEPInstFormed("raise", "Number of other getelementptr's formed");
 
-static Statistic<>
+static Statistic
 NumExprTreesConv("raise", "Number of expression trees converted");
 
-static Statistic<>
+static Statistic
 NumCastOfCast("raise", "Number of cast-of-self removed");
 
-static Statistic<>
+static Statistic
 NumDCEorCP("raise", "Number of insts DCEd or constprop'd");
 
-static Statistic<>
+static Statistic
 NumVarargCallChanges("raise", "Number of vararg call peepholes");
 
 #define PRINT_PEEPHOLE(ID, NUM, I)            \
index 76a09f80e48984d9f9f94c5b31c2e8710230667c..536b61f10808f9b7b59dff02e929723e1e8df5fd 100644 (file)
@@ -30,9 +30,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBlockRemoved("adce", "Number of basic blocks removed");
-  Statistic<> NumInstRemoved ("adce", "Number of instructions removed");
-  Statistic<> NumCallRemoved ("adce", "Number of calls and invokes removed");
+  Statistic NumBlockRemoved("adce", "Number of basic blocks removed");
+  Statistic NumInstRemoved ("adce", "Number of instructions removed");
+  Statistic NumCallRemoved ("adce", "Number of calls and invokes removed");
 
 //===----------------------------------------------------------------------===//
 // ADCE Class
index 492fba2bb438b5d20934b99bf8b9dbcf94260e4e..135d6b31d37c5669ff30723e3ad2b813e07fa6e0 100644 (file)
@@ -36,7 +36,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumMoved("block-placement", "Number of basic blocks moved");
+  Statistic NumMoved("block-placement", "Number of basic blocks moved");
 
   struct BlockPlacement : public FunctionPass {
     virtual bool runOnFunction(Function &F);
index 39f699aafe4074f7945157f4b2b71d6ad664f838..4e076145f7621623ec9aed13e42877c2f194a289 100644 (file)
@@ -26,9 +26,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumBrThread("condprop", "Number of CFG edges threaded through branches");
-  Statistic<>
+  Statistic
   NumSwThread("condprop", "Number of CFG edges threaded through switches");
 
   struct CondProp : public FunctionPass {
index 8f3baf913c03da29faff0961d5f2bea2a8592988..54ccccce7c116b7377bf2e09824a2d9f8a718696 100644 (file)
@@ -29,7 +29,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumInstKilled("constprop", "Number of instructions killed");
+  Statistic NumInstKilled("constprop", "Number of instructions killed");
 
   struct ConstantPropagation : public FunctionPass {
     bool runOnFunction(Function &F);
index 347700792abe859674001ff17c93b3d529568ff3..9024f1caf9a1163b3cf923df04f65baee900e98a 100644 (file)
@@ -46,9 +46,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumSetCCRemoved("cee", "Number of setcc instruction eliminated");
-  Statistic<> NumOperandsCann("cee", "Number of operands canonicalized");
-  Statistic<> BranchRevectors("cee", "Number of branches revectored");
+  Statistic NumSetCCRemoved("cee", "Number of setcc instruction eliminated");
+  Statistic NumOperandsCann("cee", "Number of operands canonicalized");
+  Statistic BranchRevectors("cee", "Number of branches revectored");
 
   class ValueInfo;
   class Relation {
index a4a1104e92428ca5d877e4f9dd8d596a9a1e3932..3304527d1eb3ae02ccd0285b69eacf4cf98316cf 100644 (file)
@@ -26,8 +26,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> DIEEliminated("die", "Number of insts removed");
-  Statistic<> DCEEliminated("dce", "Number of insts removed");
+  Statistic DIEEliminated("die", "Number of insts removed");
+  Statistic DCEEliminated("dce", "Number of insts removed");
 
   //===--------------------------------------------------------------------===//
   // DeadInstElimination pass implementation
index 6684b21f99a0df1f7c4d8c9693deee3bf7d5e3cc..8057ebdc7273d10b99dc6b2172d89fc7ffa79e23 100644 (file)
@@ -28,8 +28,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumStores("dse", "Number of stores deleted");
-  Statistic<> NumOther ("dse", "Number of other instrs removed");
+  Statistic NumStores("dse", "Number of stores deleted");
+  Statistic NumOther ("dse", "Number of other instrs removed");
 
   struct DSE : public FunctionPass {
 
index 7dbdf0ab96a6016e0d5f26670f1617d93bd2589e..a6d57ce26b8aee6f3df041a380e87e92d67da337 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumInstRemoved("gcse", "Number of instructions removed");
-  Statistic<> NumLoadRemoved("gcse", "Number of loads removed");
-  Statistic<> NumCallRemoved("gcse", "Number of calls removed");
-  Statistic<> NumNonInsts   ("gcse", "Number of instructions removed due "
+  Statistic NumInstRemoved("gcse", "Number of instructions removed");
+  Statistic NumLoadRemoved("gcse", "Number of loads removed");
+  Statistic NumCallRemoved("gcse", "Number of calls removed");
+  Statistic NumNonInsts   ("gcse", "Number of instructions removed due "
                              "to non-instruction values");
-  Statistic<> NumArgsRepl   ("gcse", "Number of function arguments replaced "
+  Statistic NumArgsRepl   ("gcse", "Number of function arguments replaced "
                              "with constant values");
 
   struct GCSE : public FunctionPass {
index cd674ae4b6039f4307ff82023acde11cd4b843ed..e17faa1d37cf3cb40c8ce33831cbef757dadd936 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumRemoved ("indvars", "Number of aux indvars removed");
-  Statistic<> NumPointer ("indvars", "Number of pointer indvars promoted");
-  Statistic<> NumInserted("indvars", "Number of canonical indvars added");
-  Statistic<> NumReplaced("indvars", "Number of exit values replaced");
-  Statistic<> NumLFTR    ("indvars", "Number of loop exit tests replaced");
+  Statistic NumRemoved ("indvars", "Number of aux indvars removed");
+  Statistic NumPointer ("indvars", "Number of pointer indvars promoted");
+  Statistic NumInserted("indvars", "Number of canonical indvars added");
+  Statistic NumReplaced("indvars", "Number of exit values replaced");
+  Statistic NumLFTR    ("indvars", "Number of loop exit tests replaced");
 
   class IndVarSimplify : public FunctionPass {
     LoopInfo        *LI;
index b12c6b58414a6e849c925dc5ed2caf4978df2dda..de11c52d496ae27094d95ee0c23f43dfde5abf2a 100644 (file)
@@ -56,11 +56,11 @@ using namespace llvm;
 using namespace llvm::PatternMatch;
 
 namespace {
-  Statistic<> NumCombined ("instcombine", "Number of insts combined");
-  Statistic<> NumConstProp("instcombine", "Number of constant folds");
-  Statistic<> NumDeadInst ("instcombine", "Number of dead inst eliminated");
-  Statistic<> NumDeadStore("instcombine", "Number of dead stores eliminated");
-  Statistic<> NumSunkInst ("instcombine", "Number of instructions sunk");
+  Statistic NumCombined ("instcombine", "Number of insts combined");
+  Statistic NumConstProp("instcombine", "Number of constant folds");
+  Statistic NumDeadInst ("instcombine", "Number of dead inst eliminated");
+  Statistic NumDeadStore("instcombine", "Number of dead stores eliminated");
+  Statistic NumSunkInst ("instcombine", "Number of instructions sunk");
 
   class VISIBILITY_HIDDEN InstCombiner
     : public FunctionPass,
index 5816e5c700a522d9d5e7d94ec99295dbd26dd0fb..4783388f3dc42a31710cbffe236464212db968c0 100644 (file)
@@ -54,11 +54,11 @@ namespace {
   DisablePromotion("disable-licm-promotion", cl::Hidden,
                    cl::desc("Disable memory promotion in LICM pass"));
 
-  Statistic<> NumSunk("licm", "Number of instructions sunk out of loop");
-  Statistic<> NumHoisted("licm", "Number of instructions hoisted out of loop");
-  Statistic<> NumMovedLoads("licm", "Number of load insts hoisted or sunk");
-  Statistic<> NumMovedCalls("licm", "Number of call insts hoisted or sunk");
-  Statistic<> NumPromoted("licm",
+  Statistic NumSunk("licm", "Number of instructions sunk out of loop");
+  Statistic NumHoisted("licm", "Number of instructions hoisted out of loop");
+  Statistic NumMovedLoads("licm", "Number of load insts hoisted or sunk");
+  Statistic NumMovedCalls("licm", "Number of call insts hoisted or sunk");
+  Statistic NumPromoted("licm",
                           "Number of memory locations promoted to registers");
 
   struct LICM : public FunctionPass {
index f6551ee076f11a3aa0f2c26b38838e606a7f40af..a262cf79fb52e963f40709c982f539faa38cc381 100644 (file)
@@ -38,9 +38,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumReduced ("loop-reduce", "Number of GEPs strength reduced");
-  Statistic<> NumInserted("loop-reduce", "Number of PHIs inserted");
-  Statistic<> NumVariable("loop-reduce","Number of PHIs with variable strides");
+  Statistic NumReduced ("loop-reduce", "Number of GEPs strength reduced");
+  Statistic NumInserted("loop-reduce", "Number of PHIs inserted");
+  Statistic NumVariable("loop-reduce","Number of PHIs with variable strides");
 
   /// IVStrideUse - Keep track of one use of a strided induction variable, where
   /// the stride is stored externally.  The Offset member keeps track of the 
index 9d14891e49f0d7b1e79aa691be7cf0e1e1422d42..45a48994174b3c1f15976ee80447ea24c4002d96 100644 (file)
@@ -37,7 +37,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumUnrolled("loop-unroll", "Number of loops completely unrolled");
+  Statistic NumUnrolled("loop-unroll", "Number of loops completely unrolled");
 
   cl::opt<unsigned>
   UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden,
index 8b2f6cfc5eb8be1a580c3eff67ec18cb90714002..3079ce92b55ca05413726caff6d0b016a9a0f8c6 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBranches("loop-unswitch", "Number of branches unswitched");
-  Statistic<> NumSwitches("loop-unswitch", "Number of switches unswitched");
-  Statistic<> NumSelects ("loop-unswitch", "Number of selects unswitched");
-  Statistic<> NumTrivial ("loop-unswitch",
+  Statistic NumBranches("loop-unswitch", "Number of branches unswitched");
+  Statistic NumSwitches("loop-unswitch", "Number of switches unswitched");
+  Statistic NumSelects ("loop-unswitch", "Number of selects unswitched");
+  Statistic NumTrivial ("loop-unswitch",
                           "Number of unswitches that are trivial");
-  Statistic<> NumSimplify("loop-unswitch", 
+  Statistic NumSimplify("loop-unswitch", 
                           "Number of simplifications of unswitched code");
   cl::opt<unsigned>
   Threshold("loop-unswitch-threshold", cl::desc("Max loop size to unswitch"),
index 7d0a40456f538b8efe6e9e325e67df5a86b3932a..55e8579444c6be053c431775d0732174bb8f1734 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumVarsReplaced("predsimplify", "Number of argument substitutions");
-  Statistic<>
+  Statistic
   NumInstruction("predsimplify", "Number of instructions removed");
-  Statistic<>
+  Statistic
   NumSimple("predsimplify", "Number of simple replacements");
 
   /// The InequalityGraph stores the relationships between values.
index b0637ba3e5a2eba1e94c48f590eb89d6f33936be..09f274818b4eeacbeafa21b9869c0d42c2dc4856 100644 (file)
 using namespace llvm;
 
 namespace {
-  Statistic<> NumLinear ("reassociate","Number of insts linearized");
-  Statistic<> NumChanged("reassociate","Number of insts reassociated");
-  Statistic<> NumSwapped("reassociate","Number of insts with operands swapped");
-  Statistic<> NumAnnihil("reassociate","Number of expr tree annihilated");
-  Statistic<> NumFactor ("reassociate","Number of multiplies factored");
+  Statistic NumLinear ("reassociate","Number of insts linearized");
+  Statistic NumChanged("reassociate","Number of insts reassociated");
+  Statistic NumSwapped("reassociate","Number of insts with operands swapped");
+  Statistic NumAnnihil("reassociate","Number of expr tree annihilated");
+  Statistic NumFactor ("reassociate","Number of multiplies factored");
 
   struct ValueEntry {
     unsigned Rank;
index 10d05ee7013b201095aff417b52b90c3fb7d6e0a..d43e5b33abc8befa9dad57aa57b67c5f5f2b5934 100644 (file)
@@ -30,7 +30,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumDemoted("reg2mem", "Number of registers demoted");
+  Statistic NumDemoted("reg2mem", "Number of registers demoted");
   
   struct RegToMem : public FunctionPass {
 
index cf91b57689a2f737edcc67a6ac8871044079ad35..a5f7db8f6e8789720d37a68ce650b9df3ea1ff88 100644 (file)
@@ -1080,8 +1080,8 @@ bool SCCPSolver::ResolveBranchesIn(Function &F) {
 
 
 namespace {
-  Statistic<> NumInstRemoved("sccp", "Number of instructions removed");
-  Statistic<> NumDeadBlocks ("sccp", "Number of basic blocks unreachable");
+  Statistic NumInstRemoved("sccp", "Number of instructions removed");
+  Statistic NumDeadBlocks ("sccp", "Number of basic blocks unreachable");
 
   //===--------------------------------------------------------------------===//
   //
@@ -1191,11 +1191,11 @@ bool SCCP::runOnFunction(Function &F) {
 }
 
 namespace {
-  Statistic<> IPNumInstRemoved("ipsccp", "Number of instructions removed");
-  Statistic<> IPNumDeadBlocks ("ipsccp", "Number of basic blocks unreachable");
-  Statistic<> IPNumArgsElimed ("ipsccp",
+  Statistic IPNumInstRemoved("ipsccp", "Number of instructions removed");
+  Statistic IPNumDeadBlocks ("ipsccp", "Number of basic blocks unreachable");
+  Statistic IPNumArgsElimed ("ipsccp",
                                "Number of arguments constant propagated");
-  Statistic<> IPNumGlobalConst("ipsccp",
+  Statistic IPNumGlobalConst("ipsccp",
                                "Number of globals found to be constant");
 
   //===--------------------------------------------------------------------===//
index b62df632151c819afa1811da5edde1401522e41c..959b192077ed363c8a90fb392d30f611484c733b 100644 (file)
@@ -37,9 +37,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up");
-  Statistic<> NumPromoted("scalarrepl", "Number of allocas promoted");
-  Statistic<> NumConverted("scalarrepl",
+  Statistic NumReplaced("scalarrepl", "Number of allocas broken up");
+  Statistic NumPromoted("scalarrepl", "Number of allocas promoted");
+  Statistic NumConverted("scalarrepl",
                            "Number of aggregates converted to scalar");
 
   struct VISIBILITY_HIDDEN SROA : public FunctionPass {
index 6b42f1c35ad8a8f3f0d945d8471457ca4b341def..0da53a3aab203f78c318b3bdbe881e1d704c6a31 100644 (file)
@@ -30,7 +30,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumSimpl("cfgsimplify", "Number of blocks simplified");
+  Statistic NumSimpl("cfgsimplify", "Number of blocks simplified");
 
   struct CFGSimplifyPass : public FunctionPass {
     virtual bool runOnFunction(Function &F);
index 9e9827377d85be46ed2fc098dc06947a0132f210..6708418a678093e100f6bed202f1fef145449bcf 100644 (file)
@@ -37,9 +37,9 @@ namespace {
   cl::opt<unsigned>
   Threshold("taildup-threshold", cl::desc("Max block size to tail duplicate"),
             cl::init(6), cl::Hidden);
-  Statistic<> NumEliminated("tailduplicate",
+  Statistic NumEliminated("tailduplicate",
                             "Number of unconditional branches eliminated");
-  Statistic<> NumPHINodes("tailduplicate", "Number of phi nodes inserted");
+  Statistic NumPHINodes("tailduplicate", "Number of phi nodes inserted");
 
   class TailDup : public FunctionPass {
     bool runOnFunction(Function &F);
index e732392f40072743b41ab0f27554b0fecbcca3bf..aca54306692f3e2569be3ba83410af1ba125f7c9 100644 (file)
@@ -61,8 +61,8 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumEliminated("tailcallelim", "Number of tail calls removed");
-  Statistic<> NumAccumAdded("tailcallelim","Number of accumulators introduced");
+  Statistic NumEliminated("tailcallelim", "Number of tail calls removed");
+  Statistic NumAccumAdded("tailcallelim","Number of accumulators introduced");
 
   struct TailCallElim : public FunctionPass {
     virtual bool runOnFunction(Function &F);
index 58f0347bf9f2341aa6e3349cab35caa5c61aa07f..668d19dff7a2ec886658b86542a3c356b68bf13f 100644 (file)
@@ -30,7 +30,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumBroken("break-crit-edges", "Number of blocks inserted");
+  Statistic NumBroken("break-crit-edges", "Number of blocks inserted");
 
   struct VISIBILITY_HIDDEN BreakCriticalEdges : public FunctionPass {
     virtual bool runOnFunction(Function &F);
index ca7aff97f3a6c7b96b01d6691c51fcc6a6981f29..fe9890316fdcda7ecf7c78b06914ee93f5740f48 100644 (file)
@@ -43,7 +43,7 @@
 using namespace llvm;
 
 namespace {
-  static Statistic<> NumLCSSA("lcssa",
+  static Statistic NumLCSSA("lcssa",
                               "Number of live out of a loop variables");
   
   struct LCSSA : public FunctionPass {
index 19293f47fb054df39c8f844f4f6447c11dd02fbb..7796022e892a77072d420232aaf73d9e9147920b 100644 (file)
@@ -49,9 +49,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<>
+  Statistic
   NumInserted("loopsimplify", "Number of pre-header or exit blocks inserted");
-  Statistic<>
+  Statistic
   NumNested("loopsimplify", "Number of nested loops split out");
 
   struct VISIBILITY_HIDDEN LoopSimplify : public FunctionPass {
index b7e4040145d9345431e9c19ec86c69f4680e75d3..75a4c704c91e144436a4df60bcada384973be09a 100644 (file)
@@ -25,7 +25,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumLowered("lowerallocs", "Number of allocations lowered");
+  Statistic NumLowered("lowerallocs", "Number of allocations lowered");
 
   /// LowerAllocations - Turn malloc and free instructions into %malloc and
   /// %free calls.
index 507fb86f568168e8808d1e3bda904bb57e94e36b..dfeb8349f4aa2f9a7b286547a55932361ce88e50 100644 (file)
@@ -50,9 +50,9 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumInvokes("lowerinvoke", "Number of invokes replaced");
-  Statistic<> NumUnwinds("lowerinvoke", "Number of unwinds replaced");
-  Statistic<> NumSpilled("lowerinvoke",
+  Statistic NumInvokes("lowerinvoke", "Number of invokes replaced");
+  Statistic NumUnwinds("lowerinvoke", "Number of unwinds replaced");
+  Statistic NumSpilled("lowerinvoke",
                          "Number of registers live across unwind edges");
   cl::opt<bool> ExpensiveEHSupport("enable-correct-eh-support",
  cl::desc("Make the -lowerinvoke pass insert expensive, but correct, EH code"));
index 6859813b4768de16148fdf601b479bc6ede093a3..5efdd9bc197913a9335be6813e6c5a88c57ce1a2 100644 (file)
@@ -28,7 +28,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumLowered("lowerselect","Number of select instructions lowered");
+  Statistic NumLowered("lowerselect","Number of select instructions lowered");
 
   /// LowerSelect - Turn select instructions into conditional branches.
   ///
index 401f61724eeac9d7fb6a47793a1343e1600e0d5a..4ad12b9c25643a9d4c822ff185a2bc8f8635f16f 100644 (file)
@@ -26,7 +26,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumLowered("lowerswitch", "Number of SwitchInst's replaced");
+  Statistic NumLowered("lowerswitch", "Number of SwitchInst's replaced");
 
   /// LowerSwitch Pass - Replace all SwitchInst instructions with chained branch
   /// instructions.  Note that this cannot be a BasicBlock pass because it
index f4ab50f08da45f0ae5ce4e7d65aa84a89da913e7..e0f79dd36c0959151cea522fa94e505fe18e63fb 100644 (file)
@@ -24,7 +24,7 @@
 using namespace llvm;
 
 namespace {
-  Statistic<> NumPromoted("mem2reg", "Number of alloca's promoted");
+  Statistic NumPromoted("mem2reg", "Number of alloca's promoted");
 
   struct VISIBILITY_HIDDEN PromotePass : public FunctionPass {
     // runOnFunction - To run this pass, first we calculate the alloca