diff options
author | Chris Lattner <sabre@nondot.org> | 2006-12-19 21:40:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-12-19 21:40:18 +0000 |
commit | 0e5f499638c8d277b9dc4a4385712177c53b5681 (patch) | |
tree | 807238536efcc3de8e754e1eec574fae52bdd05b /lib/Transforms/Scalar/DCE.cpp | |
parent | 193c88cb56d872a26fc32a43ccf9204c475984f3 (diff) | |
download | llvm-0e5f499638c8d277b9dc4a4385712177c53b5681.tar.gz llvm-0e5f499638c8d277b9dc4a4385712177c53b5681.tar.bz2 llvm-0e5f499638c8d277b9dc4a4385712177c53b5681.tar.xz |
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 3304527d1e..cf1a7fc877 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -16,6 +16,7 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "dce" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Instruction.h" @@ -25,14 +26,13 @@ #include <set> using namespace llvm; -namespace { - Statistic DIEEliminated("die", "Number of insts removed"); - Statistic DCEEliminated("dce", "Number of insts removed"); +STATISTIC(DIEEliminated, "Number of insts removed by DIE pass"); +STATISTIC(DCEEliminated, "Number of insts removed"); +namespace { //===--------------------------------------------------------------------===// // DeadInstElimination pass implementation // - struct DeadInstElimination : public BasicBlockPass { virtual bool runOnBasicBlock(BasicBlock &BB) { bool Changed = false; @@ -58,11 +58,10 @@ FunctionPass *llvm::createDeadInstEliminationPass() { } -//===----------------------------------------------------------------------===// -// DeadCodeElimination pass implementation -// - namespace { + //===--------------------------------------------------------------------===// + // DeadCodeElimination pass implementation + // struct DCE : public FunctionPass { virtual bool runOnFunction(Function &F); |