diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-23 18:06:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-23 18:06:35 +0000 |
commit | f629309f74cf1a64aa7fd1cd5784fd7db9a8f59e (patch) | |
tree | baf1f59f5f0ba41f4bd1711c4155bbe328e6d041 /lib/Transforms/Scalar/DCE.cpp | |
parent | af41a12370010325eb163b734d5757a7f0296e67 (diff) |
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 1f5def63e4..bfc41b14bc 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -26,8 +26,6 @@ static Statistic<> DCEEliminated("dce\t\t- Number of insts removed"); namespace { struct DeadInstElimination : public BasicBlockPass { - const char *getPassName() const { return "Dead Instruction Elimination"; } - virtual bool runOnBasicBlock(BasicBlock &BB) { bool Changed = false; for (BasicBlock::iterator DI = BB.begin(); DI != BB.end(); ) @@ -43,6 +41,8 @@ namespace { AU.preservesCFG(); } }; + + RegisterPass<DeadInstElimination> X("die", "Dead Instruction Elimination"); } Pass *createDeadInstEliminationPass() { @@ -57,14 +57,14 @@ Pass *createDeadInstEliminationPass() { namespace { struct DCE : public FunctionPass { - const char *getPassName() const { return "Dead Code Elimination"; } - virtual bool runOnFunction(Function &F); virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.preservesCFG(); } }; + + RegisterPass<DCE> Y("dce", "Dead Code Elimination"); } bool DCE::runOnFunction(Function &F) { |