Fix checker: after moving edge-moves to prior to last branch of block (for simpler semantics for library user), we can no longer check blockparams; but this is fine because they do not exist in post-regalloc code.
This commit is contained in:
@@ -549,18 +549,24 @@ impl<'a, F: Function> Checker<'a, F> {
|
|||||||
self.bb_insts.get_mut(&block).unwrap().push(checkinst);
|
self.bb_insts.get_mut(&block).unwrap().push(checkinst);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instruction itself.
|
// Skip if this is a branch: the blockparams do not
|
||||||
let operands: Vec<_> = self.f.inst_operands(inst).iter().cloned().collect();
|
// exist in post-regalloc code, and the edge-moves
|
||||||
let allocs: Vec<_> = out.inst_allocs(inst).iter().cloned().collect();
|
// have to be inserted before the branch rather than
|
||||||
let clobbers: Vec<_> = self.f.inst_clobbers(inst).iter().cloned().collect();
|
// after.
|
||||||
let checkinst = CheckerInst::Op {
|
if !self.f.is_branch(inst) {
|
||||||
inst,
|
// Instruction itself.
|
||||||
operands,
|
let operands: Vec<_> = self.f.inst_operands(inst).iter().cloned().collect();
|
||||||
allocs,
|
let allocs: Vec<_> = out.inst_allocs(inst).iter().cloned().collect();
|
||||||
clobbers,
|
let clobbers: Vec<_> = self.f.inst_clobbers(inst).iter().cloned().collect();
|
||||||
};
|
let checkinst = CheckerInst::Op {
|
||||||
debug!("checker: adding inst {:?}", checkinst);
|
inst,
|
||||||
self.bb_insts.get_mut(&block).unwrap().push(checkinst);
|
operands,
|
||||||
|
allocs,
|
||||||
|
clobbers,
|
||||||
|
};
|
||||||
|
debug!("checker: adding inst {:?}", checkinst);
|
||||||
|
self.bb_insts.get_mut(&block).unwrap().push(checkinst);
|
||||||
|
}
|
||||||
|
|
||||||
// Any inserted edits after instruction.
|
// Any inserted edits after instruction.
|
||||||
self.handle_edits(block, out, &mut insert_idx, ProgPoint::after(inst));
|
self.handle_edits(block, out, &mut insert_idx, ProgPoint::after(inst));
|
||||||
|
|||||||
Reference in New Issue
Block a user