diff options
author | Chris Lattner <sabre@nondot.org> | 2006-12-19 22:30:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-12-19 22:30:33 +0000 |
commit | 57ef942306c83d26160fa024313600f894c9c065 (patch) | |
tree | 819fdd4a6902c358c8fb747860c5f1a6aba6ba30 /llvm/lib/Analysis/InstCount.cpp | |
parent | 1fa216f5726f70d0b1e918eaee57000eacce306c (diff) | |
download | bcm5719-llvm-57ef942306c83d26160fa024313600f894c9c065.tar.gz bcm5719-llvm-57ef942306c83d26160fa024313600f894c9c065.zip |
eliminate static ctors from Statistics
llvm-svn: 32697
Diffstat (limited to 'llvm/lib/Analysis/InstCount.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstCount.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/InstCount.cpp b/llvm/lib/Analysis/InstCount.cpp index 04dfbf4cf97..090dcdd5779 100644 --- a/llvm/lib/Analysis/InstCount.cpp +++ b/llvm/lib/Analysis/InstCount.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "instcount" #include "llvm/Analysis/Passes.h" #include "llvm/Pass.h" #include "llvm/Function.h" @@ -20,17 +21,18 @@ #include <ostream> 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 , "Number of instructions (of all types)"); +STATISTIC(TotalBlocks, "Number of basic blocks"); +STATISTIC(TotalFuncs , "Number of non-external functions"); +STATISTIC(TotalMemInst, "Number of memory instructions"); #define HANDLE_INST(N, OPCODE, CLASS) \ - Statistic Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts"); + STATISTIC(Num ## OPCODE ## Inst, "Number of " #OPCODE " insts"); #include "llvm/Instruction.def" + +namespace { class InstCount : public FunctionPass, public InstVisitor<InstCount> { friend class InstVisitor<InstCount>; |