mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-18 10:24:45 +00:00
Add a new "DominatorSet::addDominator" method to allow updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -107,6 +107,15 @@ public:
|
|||||||
assert(find(BB) == end() && "Block already in DominatorSet!");
|
assert(find(BB) == end() && "Block already in DominatorSet!");
|
||||||
Doms.insert(std::make_pair(BB, Dominators));
|
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);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user