Make sequence numbers local to instructions (#6043)

* Only allow pp_cmp within a single block

Block order shouldn't matter for codegen and restricting pp_cmp to a
single block will allow making instruction sequence numbers local to a
block.

* Make sequence numbers local to instructions

This allows renumbering to be localized to a single block where previously it
could affect the entire function. Also saves 32bit of overhead per block.
This commit is contained in:
bjorn3
2023-03-17 21:53:21 +01:00
committed by GitHub
parent 90d3eff0f3
commit 2c40c267d4
3 changed files with 48 additions and 154 deletions

View File

@@ -106,7 +106,7 @@ impl DominatorTree {
let a = a.into();
let b = b.into();
self.rpo_cmp_block(layout.pp_block(a), layout.pp_block(b))
.then(layout.pp_cmp(a, b))
.then_with(|| layout.pp_cmp(a, b))
}
/// Returns `true` if `a` dominates `b`.
@@ -578,7 +578,7 @@ impl DominatorTreePreorder {
let a = a.into();
let b = b.into();
self.pre_cmp_block(layout.pp_block(a), layout.pp_block(b))
.then(layout.pp_cmp(a, b))
.then_with(|| layout.pp_cmp(a, b))
}
}