Enhance RecursivelyDeleteTriviallyDeadInstructions to optionally

return a list of deleted instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-11-27 23:14:34 +00:00
parent a0d4486073
commit 4f02c74a8e
2 changed files with 21 additions and 9 deletions

View File

@ -24,7 +24,7 @@ class PHINode;
class AllocaInst;
class ConstantExpr;
class TargetData;
//===----------------------------------------------------------------------===//
// Local constant propagation.
//
@ -49,7 +49,11 @@ bool isInstructionTriviallyDead(Instruction *I);
/// RecursivelyDeleteTriviallyDeadInstructions - If the specified value is a
/// trivially dead instruction, delete it. If that makes any of its operands
/// trivially dead, delete them too, recursively.
void RecursivelyDeleteTriviallyDeadInstructions(Value *V);
///
/// If DeadInst is specified, the vector is filled with the instructions that
/// are actually deleted.
void RecursivelyDeleteTriviallyDeadInstructions(Value *V,
SmallVectorImpl<Instruction*> *DeadInst = 0);
//===----------------------------------------------------------------------===//
// Control Flow Graph Restructuring...