diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-27 23:14:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-27 23:14:34 +0000 |
commit | 4f02c74a8ec8f4ca83b823146cb9c987ed79b3f6 (patch) | |
tree | a11072160742514d79e0165df7592ec971c625ac /include/llvm/Transforms/Utils/Local.h | |
parent | a0d4486073f6303fbf33b50ac3fbae4601ea0229 (diff) | |
download | external_llvm-4f02c74a8ec8f4ca83b823146cb9c987ed79b3f6.zip external_llvm-4f02c74a8ec8f4ca83b823146cb9c987ed79b3f6.tar.gz external_llvm-4f02c74a8ec8f4ca83b823146cb9c987ed79b3f6.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Transforms/Utils/Local.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Local.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index 65438aa..3fb0535 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -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... |