[llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h
Nick Lewycky
nicholas at mxc.ca
Mon Sep 11 17:18:42 PDT 2006
Changes in directory llvm/include/llvm/Analysis:
Dominators.h updated: 1.59 -> 1.60
---
Log message:
Add ability to remove nodes from DominatorTree, for when a BasicBlock
is being removed.
---
Diffs of the changes: (+8 -0)
Dominators.h | 8 ++++++++
1 files changed, 8 insertions(+)
Index: llvm/include/llvm/Analysis/Dominators.h
diff -u llvm/include/llvm/Analysis/Dominators.h:1.59 llvm/include/llvm/Analysis/Dominators.h:1.60
--- llvm/include/llvm/Analysis/Dominators.h:1.59 Tue Aug 1 17:24:38 2006
+++ llvm/include/llvm/Analysis/Dominators.h Mon Sep 11 19:18:28 2006
@@ -399,6 +399,14 @@
N->setIDom(NewIDom);
}
+ /// removeNode - Removes a node from the dominator tree. Block must not
+ /// dominate any other blocks. Invalidates any node pointing to removed
+ /// block.
+ void removeNode(BasicBlock *BB) {
+ assert(getNode(BB) && "Removing node that isn't in dominator tree.");
+ Nodes.erase(BB);
+ }
+
/// print - Convert to human readable form
///
virtual void print(std::ostream &OS, const Module* = 0) const;
More information about the llvm-commits
mailing list