1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Implement new DeadInstElmination pass

remove old comment

llvm-svn: 1555
This commit is contained in:
Chris Lattner 2002-01-23 05:48:24 +00:00
parent 24eb24166b
commit 71ee02c009

View 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.