diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-23 05:48:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-23 05:48:24 +0000 |
commit | c560f88e915158b78c198fbc982a35cbbdf03644 (patch) | |
tree | 1e6e3e4e305497d16ded023ce70b82cdbfe49aee /lib/Transforms | |
parent | a16c3efb9faba1dadea565b0de89234086498ca2 (diff) | |
download | llvm-c560f88e915158b78c198fbc982a35cbbdf03644.tar.gz llvm-c560f88e915158b78c198fbc982a35cbbdf03644.tar.bz2 llvm-c560f88e915158b78c198fbc982a35cbbdf03644.tar.xz |
Implement new DeadInstElmination pass
remove old comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/DCE.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index 218c0add8b..89cf45aa7e 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -3,7 +3,7 @@ // This file implements dead code elimination and basic block merging. // // Specifically, this: -// * removes definitions with no uses (including unused constants) +// * removes definitions with no uses // * removes basic blocks with no predecessors // * merges a basic block into its predecessor if there is only one and the // predecessor only has one successor. @@ -61,6 +61,10 @@ static inline bool RemoveUnusedDefs(BasicBlock::InstListType &Vals) { return Changed; } +bool DeadInstElimination::runOnBasicBlock(BasicBlock *BB) { + return RemoveUnusedDefs(BB->getInstList()); +} + // RemoveSingularPHIs - This removes PHI nodes from basic blocks that have only // a single predecessor. This means that the PHI node must only have a single // RHS value and can be eliminated. |