aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-06 17:46:33 +0000
committerChris Lattner <sabre@nondot.org>2006-12-06 17:46:33 +0000
commitac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da (patch)
treecba006a0f0e329a969ce29b7d10ba0dc244f4f90
parent2b4e98cb20c9391399b2601a793b6ea689da3cee (diff)
Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/Statistic.h39
-rw-r--r--lib/Analysis/DataStructure/BottomUpClosure.cpp6
-rw-r--r--lib/Analysis/DataStructure/CallTargets.cpp8
-rw-r--r--lib/Analysis/DataStructure/CompleteBottomUp.cpp2
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp12
-rw-r--r--lib/Analysis/DataStructure/DataStructureOpt.cpp4
-rw-r--r--lib/Analysis/DataStructure/DataStructureStats.cpp10
-rw-r--r--lib/Analysis/DataStructure/EquivClassGraphs.cpp4
-rw-r--r--lib/Analysis/DataStructure/Printer.cpp4
-rw-r--r--lib/Analysis/DataStructure/TopDownClosure.cpp2
-rw-r--r--lib/Analysis/IPA/Andersens.cpp10
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp10
-rw-r--r--lib/Analysis/InstCount.cpp10
-rw-r--r--lib/Analysis/ScalarEvolution.cpp10
-rw-r--r--lib/Bytecode/Writer/Writer.cpp2
-rw-r--r--lib/CodeGen/BranchFolding.cpp6
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp10
-rw-r--r--lib/CodeGen/PHIElimination.cpp4
-rw-r--r--lib/CodeGen/RegAllocLinearScan.cpp4
-rw-r--r--lib/CodeGen/RegAllocLocal.cpp6
-rw-r--r--lib/CodeGen/RegAllocSimple.cpp4
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp4
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp6
-rw-r--r--lib/CodeGen/VirtRegMap.cpp12
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp4
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp2
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp4
-rw-r--r--lib/Support/Statistic.cpp4
-rw-r--r--lib/Support/Timer.cpp2
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp2
-rw-r--r--lib/Target/Alpha/AlphaAsmPrinter.cpp2
-rw-r--r--lib/Target/Alpha/AlphaCodeEmitter.cpp2
-rw-r--r--lib/Target/Alpha/AlphaLLRP.cpp4
-rw-r--r--lib/Target/IA64/IA64AsmPrinter.cpp2
-rw-r--r--lib/Target/IA64/IA64Bundling.cpp2
-rw-r--r--lib/Target/IA64/IA64ISelDAGToDAG.cpp4
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp2
-rw-r--r--lib/Target/PowerPC/PPCBranchSelector.cpp2
-rw-r--r--lib/Target/PowerPC/PPCISelDAGToDAG.cpp2
-rw-r--r--lib/Target/Sparc/DelaySlotFiller.cpp2
-rw-r--r--lib/Target/Sparc/FPMover.cpp4
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp2
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp2
-rwxr-xr-xlib/Target/X86/X86AsmPrinter.h2
-rw-r--r--lib/Target/X86/X86CodeEmitter.cpp2
-rw-r--r--lib/Target/X86/X86FloatingPoint.cpp4
-rw-r--r--lib/Target/X86/X86ISelDAGToDAG.cpp4
-rw-r--r--lib/Transforms/Hello/Hello.cpp2
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp6
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp2
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp4
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp2
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp4
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp4
-rw-r--r--lib/Transforms/IPO/GlobalOpt.cpp22
-rw-r--r--lib/Transforms/IPO/IPConstantPropagation.cpp4
-rw-r--r--lib/Transforms/IPO/IndMemRemoval.cpp4
-rw-r--r--lib/Transforms/IPO/Inliner.cpp4
-rw-r--r--lib/Transforms/IPO/Internalize.cpp4
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp2
-rw-r--r--lib/Transforms/IPO/LowerSetJmp.cpp8
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp4
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp2
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp4
-rw-r--r--lib/Transforms/Instrumentation/RSProfiling.cpp2
-rw-r--r--lib/Transforms/LevelRaise.cpp12
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp6
-rw-r--r--lib/Transforms/Scalar/BasicBlockPlacement.cpp2
-rw-r--r--lib/Transforms/Scalar/CondPropagate.cpp4
-rw-r--r--lib/Transforms/Scalar/ConstantProp.cpp2
-rw-r--r--lib/Transforms/Scalar/CorrelatedExprs.cpp6
-rw-r--r--lib/Transforms/Scalar/DCE.cpp4
-rw-r--r--lib/Transforms/Scalar/DeadStoreElimination.cpp4
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp10
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp10
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp10
-rw-r--r--lib/Transforms/Scalar/LICM.cpp10
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp6
-rw-r--r--lib/Transforms/Scalar/LoopUnroll.cpp2
-rw-r--r--lib/Transforms/Scalar/LoopUnswitch.cpp10
-rw-r--r--lib/Transforms/Scalar/PredicateSimplifier.cpp6
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp10
-rw-r--r--lib/Transforms/Scalar/Reg2Mem.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp12
-rw-r--r--lib/Transforms/Scalar/ScalarReplAggregates.cpp6
-rw-r--r--lib/Transforms/Scalar/SimplifyCFG.cpp2
-rw-r--r--lib/Transforms/Scalar/TailDuplication.cpp4
-rw-r--r--lib/Transforms/Scalar/TailRecursionElimination.cpp4
-rw-r--r--lib/Transforms/Utils/BreakCriticalEdges.cpp2
-rw-r--r--lib/Transforms/Utils/LCSSA.cpp2
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp4
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp2
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp6
-rw-r--r--lib/Transforms/Utils/LowerSelect.cpp2
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp2
-rw-r--r--lib/Transforms/Utils/Mem2Reg.cpp2
97 files changed, 252 insertions, 255 deletions
diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h
index 99160da106..332a57d121 100644
--- a/include/llvm/ADT/Statistic.h
+++ b/include/llvm/ADT/Statistic.h
@@ -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
diff --git a/lib/Analysis/DataStructure/BottomUpClosure.cpp b/lib/Analysis/DataStructure/BottomUpClosure.cpp
index 19b3ec1533..f5ca5fd6f5 100644
--- a/lib/Analysis/DataStructure/BottomUpClosure.cpp
+++ b/lib/Analysis/DataStructure/BottomUpClosure.cpp
@@ -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,
diff --git a/lib/Analysis/DataStructure/CallTargets.cpp b/lib/Analysis/DataStructure/CallTargets.cpp
index 5850749c6f..5ed4457418 100644
--- a/lib/Analysis/DataStructure/CallTargets.cpp
+++ b/lib/Analysis/DataStructure/CallTargets.cpp
@@ -29,10 +29,10 @@
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)");
}
diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
index aea113d97d..af33e0d741 100644
--- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp
+++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
@@ -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");
}
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 6eee541aeb..80237c4f0b 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -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"),
diff --git a/lib/Analysis/DataStructure/DataStructureOpt.cpp b/lib/Analysis/DataStructure/DataStructureOpt.cpp
index 56748832ab..85da1763ac 100644
--- a/lib/Analysis/DataStructure/DataStructureOpt.cpp
+++ b/lib/Analysis/DataStructure/DataStructureOpt.cpp
@@ -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 {
diff --git a/lib/Analysis/DataStructure/DataStructureStats.cpp b/lib/Analysis/DataStructure/DataStructureStats.cpp
index 469ab2e719..f7fbe3b33c 100644
--- a/lib/Analysis/DataStructure/DataStructureStats.cpp
+++ b/lib/Analysis/DataStructure/DataStructureStats.cpp
@@ -23,19 +23,19 @@
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> {
diff --git a/lib/Analysis/DataStructure/EquivClassGraphs.cpp b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
index 38aaf0b93c..49c93ffc4f 100644
--- a/lib/Analysis/DataStructure/EquivClassGraphs.cpp
+++ b/lib/Analysis/DataStructure/EquivClassGraphs.cpp
@@ -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");
}
diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp
index af358bfbb3..2e86bda548 100644
--- a/lib/Analysis/DataStructure/Printer.cpp
+++ b/lib/Analysis/DataStructure/Printer.cpp
@@ -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); }
diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp
index 57a8924ae4..71bf271a6e 100644
--- a/lib/Analysis/DataStructure/TopDownClosure.cpp
+++ b/lib/Analysis/DataStructure/TopDownClosure.cpp
@@ -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,
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index 54e2944b95..2887503041 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -65,15 +65,15 @@
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,
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index 59cf66f6c3..7ae5e5be35 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -30,19 +30,19 @@
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");
diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp
index 80f8bd8818..38f0bbaa9a 100644
--- a/lib/Analysis/InstCount.cpp
+++ b/lib/Analysis/InstCount.cpp
@@ -21,13 +21,13 @@
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"
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 6e6d302324..ba903e0140 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -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");
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index b8f57f7f72..37c6321e33 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -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");
//===----------------------------------------------------------------------===//
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp
index 8ded3cdc64..0dfa4928f9 100644
--- a/lib/CodeGen/BranchFolding.cpp
+++ b/lib/CodeGen/BranchFolding.cpp
@@ -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 {
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 9248662e39..3bdbe855c3 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -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>
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index c107d1a317..fec54eac37 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -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) {
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp
index 170febcc50..1977a5489d 100644
--- a/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/lib/CodeGen/RegAllocLinearScan.cpp
@@ -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
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp
index 6090b4db13..8d10ff703b 100644
--- a/lib/CodeGen/RegAllocLocal.cpp
+++ b/lib/CodeGen/RegAllocLocal.cpp
@@ -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
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp
index f08b039b82..262f8c240e 100644
--- a/lib/CodeGen/RegAllocSimple.cpp
+++ b/lib/CodeGen/RegAllocSimple.cpp
@@ -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",
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 99de15c936..2f8ad80e5c 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -43,12 +43,12 @@
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>
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
index da8b1cddb8..2d08cbabb5 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
@@ -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
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index 335a7e499c..932542dd21 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -45,11 +45,11 @@
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
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index a79585609a..359294d18e 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -33,12 +33,12 @@
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 };
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 8447acf0e5..ff312f08a1 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -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;
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index fd5fb6f0bd..964435d380 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -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;
}
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index e9b630b1b7..02113473a5 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -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;
}
diff --git a/lib/Support/Statistic.cpp b/lib/Support/Statistic.cpp
index 56bbfe9d7a..cd51662636 100644
--- a/lib/Support/Statistic.cpp
+++ b/lib/Support/Statistic.cpp
@@ -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.
//
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp
index 0c4f18f630..a39f169cb7 100644
--- a/lib/Support/Timer.cpp
+++ b/lib/Support/Timer.cpp
@@ -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"
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 5eadee20db..617933c6bb 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -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) {
diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp
index 821d432456..a9ba19845d 100644
--- a/lib/Target/Alpha/AlphaAsmPrinter.cpp
+++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp
@@ -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 {
diff --git a/lib/Target/Alpha/AlphaCodeEmitter.cpp b/lib/Target/Alpha/AlphaCodeEmitter.cpp
index 15de348ee4..884215e793 100644
--- a/lib/Target/Alpha/AlphaCodeEmitter.cpp
+++ b/lib/Target/Alpha/AlphaCodeEmitter.cpp
@@ -27,7 +27,7 @@
using namespace llvm;
namespace {
- Statistic<>
+ Statistic
NumEmitted("alpha-emitter", "Number of machine instructions emitted");
}
diff --git a/lib/Target/Alpha/AlphaLLRP.cpp b/lib/Target/Alpha/AlphaLLRP.cpp
index eb4867d668..06d217b77b 100644
--- a/lib/Target/Alpha/AlphaLLRP.cpp
+++ b/lib/Target/Alpha/AlphaLLRP.cpp
@@ -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>
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index edad61e23c..b2f0f53097 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -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;
diff --git a/lib/Target/IA64/IA64Bundling.cpp b/lib/Target/IA64/IA64Bundling.cpp
index 808e7138a9..0c4ae82529 100644
--- a/lib/Target/IA64/IA64Bundling.cpp
+++ b/lib/Target/IA64/IA64Bundling.cpp
@@ -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
diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
index 78a051b52f..3f2669d52e 100644
--- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp
+++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp
@@ -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
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index abbcc57255..65145e5a3b 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -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;
diff --git a/lib/Target/PowerPC/PPCBranchSelector.cpp b/lib/Target/PowerPC/PPCBranchSelector.cpp
index edd2857921..7a8b094bff 100644
--- a/lib/Target/PowerPC/PPCBranchSelector.cpp
+++ b/lib/Target/PowerPC/PPCBranchSelector.cpp
@@ -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 {
diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
index 083bb2a1b0..1a3508e5ad 100644
--- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
+++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
@@ -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
diff --git a/lib/Target/Sparc/DelaySlotFiller.cpp b/lib/Target/Sparc/DelaySlotFiller.cpp
index 715a373b93..768b79b9fb 100644
--- a/lib/Target/Sparc/DelaySlotFiller.cpp
+++ b/lib/Target/Sparc/DelaySlotFiller.cpp
@@ -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
diff --git a/lib/Target/Sparc/FPMover.cpp b/lib/Target/Sparc/FPMover.cpp
index 991e29d8a9..2b24d991f0 100644
--- a/lib/Target/Sparc/FPMover.cpp
+++ b/lib/Target/Sparc/FPMover.cpp
@@ -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
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index 0b4fec9fc0..034c8f6967 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -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)
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 722697527c..85a1cb6424 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -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,
diff --git a/lib/Target/X86/X86AsmPrinter.h b/lib/Target/X86/X86AsmPrinter.h
index 8dad733bb2..da7c053eef 100755
--- a/lib/Target/X86/X86AsmPrinter.h
+++ b/lib/Target/X86/X86AsmPrinter.h
@@ -28,7 +28,7 @@
namespace llvm {
-extern Statistic<> EmittedInsts;
+extern Statistic EmittedInsts;
// FIXME: Move this to CodeGen/AsmPrinter.h
namespace PICStyle {
diff --git a/lib/Target/X86/X86CodeEmitter.cpp b/lib/Target/X86/X86CodeEmitter.cpp
index fce507514d..dbbd66f491 100644
--- a/lib/Target/X86/X86CodeEmitter.cpp
+++ b/lib/Target/X86/X86CodeEmitter.cpp
@@ -29,7 +29,7 @@
using namespace llvm;
namespace {
- Statistic<>
+ Statistic
NumEmitted("x86-emitter", "Number of machine instructions emitted");
}
diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp
index 1d665a423d..75321273a0 100644
--- a/lib/Target/X86/X86FloatingPoint.cpp
+++ b/lib/Target/X86/X86FloatingPoint.cpp
@@ -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);
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp
index 6d0f54933d..4f84327fdd 100644
--- a/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -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");
//===--------------------------------------------------------------------===//
diff --git a/lib/Transforms/Hello/Hello.cpp b/lib/Transforms/Hello/Hello.cpp
index a91360f962..8324cbb6cb 100644
--- a/lib/Transforms/Hello/Hello.cpp
+++ b/lib/Transforms/Hello/Hello.cpp
@@ -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 {
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index e9841697a7..2a06310065 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -48,11 +48,11 @@
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.
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index aca42fe23b..7ba7b32a7e 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -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,
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 77ac8737b0..d3326ac71f 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -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.
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp
index 57e5fa3109..e30e0ed38c 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -37,7 +37,7 @@ namespace {
}
};
RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
- Statistic<>
+ Statistic
NumKilled("deadtypeelim", "Number of unused typenames removed from symtab");
}
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp
index a514b92b5f..de3fe5ba87 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -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 {
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index 07296cfa5e..ac23760bf2 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -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
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index af3bf6a887..a0dc9373d6 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -32,21 +32,21 @@
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 {
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp
index 4713fb6aea..3f673ae85e 100644
--- a/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -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
diff --git a/lib/Transforms/IPO/IndMemRemoval.cpp b/lib/Transforms/IPO/IndMemRemoval.cpp
index 0779a5414f..9d3c147a1f 100644
--- a/lib/Transforms/IPO/IndMemRemoval.cpp
+++ b/lib/Transforms/IPO/IndMemRemoval.cpp
@@ -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 {
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index ea43dc21da..bd5fb98416 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -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),
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index c19e2f2b99..3e7dcc67ae 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -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.
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index a4ce585ef9..f77f9f3257 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -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
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp
index 3aac392091..0417a5cc27 100644
--- a/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -50,13 +50,13 @@
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");
//===--------------------------------------------------------------------===//
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 8ba0ac0402..1dec7d7047 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -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
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index 584a2e98b0..77a9a3d57e 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -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.
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index fb22a2f139..f989d1dd16 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -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
diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp
index 4c6f264b3b..c14915c9a5 100644
--- a/lib/Transforms/Instrumentation/RSProfiling.cpp
+++ b/lib/Transforms/Instrumentation/RSProfiling.cpp
@@ -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
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index c8635e181f..56622693a2 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/lib/Transforms/LevelRaise.cpp
@@ -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) \
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 76a09f80e4..536b61f108 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -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
diff --git a/lib/Transforms/Scalar/BasicBlockPlacement.cpp b/lib/Transforms/Scalar/BasicBlockPlacement.cpp
index 492fba2bb4..135d6b31d3 100644
--- a/lib/Transforms/Scalar/BasicBlockPlacement.cpp
+++ b/lib/Transforms/Scalar/BasicBlockPlacement.cpp
@@ -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);
diff --git a/lib/Transforms/Scalar/CondPropagate.cpp b/lib/Transforms/Scalar/CondPropagate.cpp
index 39f699aafe..4e076145f7 100644
--- a/lib/Transforms/Scalar/CondPropagate.cpp
+++ b/lib/Transforms/Scalar/CondPropagate.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/ConstantProp.cpp b/lib/Transforms/Scalar/ConstantProp.cpp
index 8f3baf913c..54ccccce7c 100644
--- a/lib/Transforms/Scalar/ConstantProp.cpp
+++ b/lib/Transforms/Scalar/ConstantProp.cpp
@@ -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);
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp
index 347700792a..9024f1caf9 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index a4a1104e92..3304527d1e 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -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
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 6684b21f99..8057ebdc72 100644
--- a/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index 7dbdf0ab96..a6d57ce26b 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -28,12 +28,12 @@
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 {
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index cd674ae4b6..e17faa1d37 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -52,11 +52,11 @@
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;
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index b12c6b5841..de11c52d49 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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,
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 5816e5c700..4783388f3d 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index f6551ee076..a262cf79fb 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -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
diff --git a/lib/Transforms/Scalar/LoopUnroll.cpp b/lib/Transforms/Scalar/LoopUnroll.cpp
index 9d14891e49..45a4899417 100644
--- a/lib/Transforms/Scalar/LoopUnroll.cpp
+++ b/lib/Transforms/Scalar/LoopUnroll.cpp
@@ -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,
diff --git a/lib/Transforms/Scalar/LoopUnswitch.cpp b/lib/Transforms/Scalar/LoopUnswitch.cpp
index 8b2f6cfc5e..3079ce92b5 100644
--- a/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -44,12 +44,12 @@
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"),
diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp
index 7d0a40456f..55e8579444 100644
--- a/lib/Transforms/Scalar/PredicateSimplifier.cpp
+++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp
@@ -93,11 +93,11 @@
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.
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index b0637ba3e5..09f274818b 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -37,11 +37,11 @@
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;
diff --git a/lib/Transforms/Scalar/Reg2Mem.cpp b/lib/Transforms/Scalar/Reg2Mem.cpp
index 10d05ee701..d43e5b33ab 100644
--- a/lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/lib/Transforms/Scalar/Reg2Mem.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index cf91b57689..a5f7db8f6e 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -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");
//===--------------------------------------------------------------------===//
diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index b62df63215..959b192077 100644
--- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -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 {
diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp
index 6b42f1c35a..0da53a3aab 100644
--- a/lib/Transforms/Scalar/SimplifyCFG.cpp
+++ b/lib/Transforms/Scalar/SimplifyCFG.cpp
@@ -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);
diff --git a/lib/Transforms/Scalar/TailDuplication.cpp b/lib/Transforms/Scalar/TailDuplication.cpp
index 9e9827377d..6708418a67 100644
--- a/lib/Transforms/Scalar/TailDuplication.cpp
+++ b/lib/Transforms/Scalar/TailDuplication.cpp
@@ -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);
diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp
index e732392f40..aca5430669 100644
--- a/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -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);
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp
index 58f0347bf9..668d19dff7 100644
--- a/lib/Transforms/Utils/BreakCriticalEdges.cpp
+++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp
@@ -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);
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp
index ca7aff97f3..fe9890316f 100644
--- a/lib/Transforms/Utils/LCSSA.cpp
+++ b/lib/Transforms/Utils/LCSSA.cpp
@@ -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 {
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 19293f47fb..7796022e89 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -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 {
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index b7e4040145..75a4c704c9 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -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.
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 507fb86f56..dfeb8349f4 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -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"));
diff --git a/lib/Transforms/Utils/LowerSelect.cpp b/lib/Transforms/Utils/LowerSelect.cpp
index 6859813b47..5efdd9bc19 100644
--- a/lib/Transforms/Utils/LowerSelect.cpp
+++ b/lib/Transforms/Utils/LowerSelect.cpp
@@ -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.
///
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index 401f61724e..4ad12b9c25 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -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
diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp
index f4ab50f08d..e0f79dd36c 100644
--- a/lib/Transforms/Utils/Mem2Reg.cpp
+++ b/lib/Transforms/Utils/Mem2Reg.cpp
@@ -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