diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:31:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-08 21:31:56 +0000 |
commit | fe3c2e006d632a6058e848d16821cdf772785487 (patch) | |
tree | 70043acf20ed2356bd985e0c9082b63727115b4e /include | |
parent | e802a023d98b06307831cd122e61da86431e8dac (diff) | |
download | external_llvm-fe3c2e006d632a6058e848d16821cdf772785487.zip external_llvm-fe3c2e006d632a6058e848d16821cdf772785487.tar.gz external_llvm-fe3c2e006d632a6058e848d16821cdf772785487.tar.bz2 |
By default PHINode::removeIncomingValue will delete the phi node if the last
incoming value is deleted!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/iPHINode.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/iPHINode.h b/include/llvm/iPHINode.h index 93b6e7c..4e217e9 100644 --- a/include/llvm/iPHINode.h +++ b/include/llvm/iPHINode.h @@ -65,7 +65,14 @@ public: /// removeIncomingValue - Remove an incoming value. This is useful if a /// predecessor basic block is deleted. The value removed is returned. - Value *removeIncomingValue(const BasicBlock *BB); + /// + /// If the last incoming value for a PHI node is removed (and DeletePHIIfEmpty + /// is true), the PHI node is destroyed and any uses of it are replaced with + /// dummy values. The only time there should be zero incoming values to a PHI + /// node is when the block is dead, so this strategy is sound. + /// + Value *removeIncomingValue(const BasicBlock *BB, + bool DeletePHIIfEmpty = true); /// getBasicBlockIndex - Return the first index of the specified basic /// block in the value list for this PHI. Returns -1 if no instance. |