summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar
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 /lib/Transforms/Scalar
parent2b4e98cb20c9391399b2601a793b6ea689da3cee (diff)
downloadllvm-ac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da.tar.gz
llvm-ac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da.tar.bz2
llvm-ac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da.tar.xz
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
Diffstat (limited to 'lib/Transforms/Scalar')
-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
22 files changed, 66 insertions, 66 deletions
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);