[llvm-commits] CVS: llvm/include/llvm/iPHINode.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Oct 8 16:33:01 PDT 2002
Changes in directory llvm/include/llvm:
iPHINode.h updated: 1.5 -> 1.6
---
Log message:
By default PHINode::removeIncomingValue will delete the phi node if the last
incoming value is deleted!
---
Diffs of the changes:
Index: llvm/include/llvm/iPHINode.h
diff -u llvm/include/llvm/iPHINode.h:1.5 llvm/include/llvm/iPHINode.h:1.6
--- llvm/include/llvm/iPHINode.h:1.5 Mon Sep 16 11:06:12 2002
+++ llvm/include/llvm/iPHINode.h Tue Oct 8 16:31:56 2002
@@ -65,7 +65,14 @@
/// 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.
More information about the llvm-commits
mailing list