Member predicate BasicBlock::immediatelyDominates
Holds if this basic block immediately dominates basic block bb
.
That is, this basic block is the unique basic block satisfying:
- This basic block strictly dominates
bb
- There exists no other basic block that is strictly dominated by this
basic block and which strictly dominates
bb
.
All basic blocks, except entry basic blocks, have a unique immediate dominator.
Example:
int M(string s) {
if (s == null)
throw new ArgumentNullException(nameof(s));
return s.Length;
}
The basic block starting on line 2 strictly dominates the
basic block on line 4 (all paths from the entry point of M
to return s.Length;
must go through the null check).
predicate immediatelyDominates(BasicBlock bb)