Fuzzbugfix: actually do need eager liveness computation; must uphold invariant that all earlier-in-postorder blocks have full livein sets.

This commit is contained in:
Chris Fallin
2021-05-06 23:29:59 -07:00
parent 2ff02b50a3
commit 2ba518517d
4 changed files with 26 additions and 17 deletions

View File

@@ -779,11 +779,25 @@ pub enum InstPosition {
}
/// A program point: a single point before or after a given instruction.
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ProgPoint {
bits: u32,
}
impl std::fmt::Debug for ProgPoint {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(
f,
"progpoint{}{}",
self.inst().index(),
match self.pos() {
InstPosition::Before => "-pre",
InstPosition::After => "-post",
}
)
}
}
impl ProgPoint {
pub fn new(inst: Inst, pos: InstPosition) -> Self {
let bits = ((inst.0 as u32) << 1) | (pos as u8 as u32);