machinst: Avoid a full instructions traversal of all the blocks when computing the final block ordering;

This commit is contained in:
Benjamin Bouvier
2020-05-05 18:58:47 +02:00
parent 162fcd3d75
commit 1d90751ba9
3 changed files with 22 additions and 18 deletions

View File

@@ -332,6 +332,7 @@ impl<'func, I: VCodeInst> Lower<'func, I> {
GenerateReturn::Yes
} else {
debug_assert!(last_insn_opcode == Opcode::FallthroughReturn);
self.vcode.set_fallthrough_return_block(*bb);
GenerateReturn::No
};
self.gen_retval_setup(gen_ret);