regalloc fix: scan blocks bottom-up, not top-down!

This commit is contained in:
Chris Fallin 2022-11-30 18:19:48 -08:00
parent 38591d90a3
commit 1788a42aa1
No known key found for this signature in database
GPG key ID: 31649E4FE65EB465

View file

@ -65,7 +65,7 @@ impl<'a> Context<'a> {
});
point += 1;
for &inst in &self.body.blocks[block].insts {
for &inst in self.body.blocks[block].insts.iter().rev() {
self.handle_inst(&mut live, &mut point, inst, /* root = */ true);
point += 1;
}