summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-18 06:54:48 +0000
committerChris Lattner <sabre@nondot.org>2004-04-18 06:54:48 +0000
commite375a4fdc2bb7cb8749b31ac3b9157c0d184c064 (patch)
tree7cdfee1817a737dd409cddebcb5b3bae75cd84e9 /llvm/lib/Analysis/LoopInfo.cpp
parent5f46b7044ce1c63a2bdb6941cca2cf4686303595 (diff)
downloadbcm5719-llvm-e375a4fdc2bb7cb8749b31ac3b9157c0d184c064.tar.gz
bcm5719-llvm-e375a4fdc2bb7cb8749b31ac3b9157c0d184c064.zip
Implement method
llvm-svn: 13036
Diffstat (limited to 'llvm/lib/Analysis/LoopInfo.cpp')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index 38b9c669999..012c3dac736 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -326,6 +326,18 @@ Loop *LoopInfo::removeLoop(iterator I) {
return L;
}
+/// removeBlock - This method completely removes BB from all data structures,
+/// including all of the Loop objects it is nested in and our mapping from
+/// BasicBlocks to loops.
+void LoopInfo::removeBlock(BasicBlock *BB) {
+ std::map<BasicBlock *, Loop*>::iterator I = BBMap.find(BB);
+ if (I != BBMap.end()) {
+ for (Loop *L = I->second; L; L = L->getParentLoop())
+ L->removeBlockFromLoop(BB);
+
+ BBMap.erase(I);
+ }
+}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud