Implement new DeadInstElmination pass
authorChris Lattner <sabre@nondot.org>
Wed, 23 Jan 2002 05:48:24 +0000 (05:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 23 Jan 2002 05:48:24 +0000 (05:48 +0000)
remove old comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1555 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/DCE.cpp

index 218c0add8be3790182f560043f61137d0627fc3e..89cf45aa7e603cffaaf270f7b46f44e4f93b3ff7 100644 (file)
@@ -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.