aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/DCE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r--lib/Transforms/Scalar/DCE.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp
index 539dd22..a63fcb6 100644
--- a/lib/Transforms/Scalar/DCE.cpp
+++ b/lib/Transforms/Scalar/DCE.cpp
@@ -52,11 +52,12 @@ namespace {
AU.setPreservesCFG();
}
};
-
- char DeadInstElimination::ID = 0;
- RegisterPass<DeadInstElimination> X("die", "Dead Instruction Elimination");
}
+char DeadInstElimination::ID = 0;
+static RegisterPass<DeadInstElimination>
+X("die", "Dead Instruction Elimination");
+
Pass *llvm::createDeadInstEliminationPass() {
return new DeadInstElimination();
}
@@ -76,11 +77,11 @@ namespace {
AU.setPreservesCFG();
}
};
-
- char DCE::ID = 0;
- RegisterPass<DCE> Y("dce", "Dead Code Elimination");
}
+char DCE::ID = 0;
+static RegisterPass<DCE> Y("dce", "Dead Code Elimination");
+
bool DCE::runOnFunction(Function &F) {
// Start out with all of the instructions in the worklist...
std::vector<Instruction*> WorkList;