Implement method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-04-18 06:54:48 +00:00
parent 9afb24bf08
commit 3048bd1d3e

View File

@ -326,6 +326,18 @@ Loop *LoopInfo::removeLoop(iterator I) {
return L; 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);
}
}
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//