Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only split SSA versions to dominance frontiers
When we need to insert additional guards while translating dispatch programs or stacking up guards ahead of a call, we perform an SSA version split, since gurad instructions write a new version (so the facts can be placed on the new version only). When looking for reads to update, it would walk the CFG successors. However, this is incorrect. Consider: A / \ B C \ / D If we insert a guard in C, then we cannot depend on the property it enforced in D (since we might never execute C on the way to it). By contrast, a guard in A could update reads safely in all of B, C, and D. We want to update reads only in the set of basic blocks where, if they are executed, then we *must* have been in the one where the guard split takes place before them. Handily, this is the definition of dominance, so we switch from updating successors to updating children.
- Loading branch information