Recompute the dominator tree on demand.
The legalizer can invalidate the dominator tree, but we don't actually need a dominator tree during legalization, so defer the construction of the domtree. - Add an "invalid" state to the dominator tree along with clear() and is_valid() methods to test it. - Invalidate the dominator tree as part of legalization. - Ensure that a valid dominator tree exists before the passes that need it. Together these features add up to a manual invalidation mechanism for the dominator tree.
This commit is contained in:
@@ -134,7 +134,9 @@ pub fn verify_context(func: &Function,
|
||||
-> Result {
|
||||
let verifier = Verifier::new(func, isa);
|
||||
verifier.cfg_integrity(cfg)?;
|
||||
verifier.domtree_integrity(domtree)?;
|
||||
if domtree.is_valid() {
|
||||
verifier.domtree_integrity(domtree)?;
|
||||
}
|
||||
verifier.run()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user