mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-31 09:32:11 +00:00
No need to use iterator to erase basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b350b76a32
commit
4d29ddfa06
@ -253,7 +253,7 @@ public:
|
||||
changeImmediateDominator(getNode(BB), getNode(NewBB));
|
||||
}
|
||||
|
||||
/// eraseNode - Removes a node from the domiantor tree. Block must not
|
||||
/// eraseNode - Removes a node from the dominator tree. Block must not
|
||||
/// domiante any other blocks. Removes node from its immediate dominator's
|
||||
/// children list. Deletes dominator node associated with basic block BB.
|
||||
void eraseNode(BasicBlock *BB);
|
||||
@ -378,8 +378,10 @@ public:
|
||||
/// removeBlock - Remove basic block BB's frontier.
|
||||
void removeBlock(BasicBlock *BB) {
|
||||
assert(find(BB) != end() && "Block is not in DominanceFrontier!");
|
||||
iterator BBDF = Frontiers.find(BB);
|
||||
Frontiers.erase(BBDF);
|
||||
for (iterator I = begin(), E = end(); I != E; ++I)
|
||||
if (I->second.count(BB))
|
||||
I->second.erase(BB);
|
||||
Frontiers.erase(BB);
|
||||
}
|
||||
|
||||
void addToFrontier(iterator I, BasicBlock *Node) {
|
||||
|
Loading…
Reference in New Issue
Block a user