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 | ccbd4e4643b7b0293974bc85375ee34465506725 (patch) | |
| tree | 2ad85383dc0b96145120cc4efe87c295d35fc2f6 /llvm/lib/Transforms | |
| parent | 447fd865999b4c18ac4d511bf1af294cae5ac7e3 (diff) | |
| download | bcm5719-llvm-ccbd4e4643b7b0293974bc85375ee34465506725.tar.gz bcm5719-llvm-ccbd4e4643b7b0293974bc85375ee34465506725.zip | |
Implement new DeadInstElmination pass
remove old comment
llvm-svn: 1555
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/DCE.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/Scalar/DCE.cpp b/llvm/lib/Transforms/Scalar/DCE.cpp index 218c0add8be..89cf45aa7e6 100644 --- a/llvm/lib/Transforms/Scalar/DCE.cpp +++ b/llvm/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. | 

