summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/DCE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/DCE.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/DCE.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp
index 3304527d1eb..cf1a7fc877d 100644
--- a/llvm/lib/Transforms/Scalar/DCE.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud