Add a new "DominatorSet::addDominator" method to allow updates

llvm-svn: 3937
This commit is contained in:
Chris Lattner 2002-09-26 05:42:47 +00:00
parent 08373d1c9c
commit 9ff37c5265
1 changed files with 9 additions and 0 deletions

View File

@ -107,6 +107,15 @@ public:
assert(find(BB) == end() && "Block already in DominatorSet!");
Doms.insert(std::make_pair(BB, Dominators));
}
// addDominator - If a new block is inserted into the CFG, then method may be
// called to notify the blocks it dominates that it is in their set.
//
void addDominator(BasicBlock *BB, BasicBlock *NewDominator) {
iterator I = find(BB);
assert(I != end() && "BB is not in DominatorSet!");
I->second.insert(NewDominator);
}
};