Avoid invalidating the CFG in MirPatch.
As a part of this change, we adjust MirPatch to not needlessly create unnecessary resume blocks.
This commit is contained in:
parent
e4417cf020
commit
efa5eaa5d1
45 changed files with 32 additions and 209 deletions
|
@ -83,9 +83,9 @@ impl RemoveNoopLandingPads {
|
|||
fn remove_nop_landing_pads(&self, body: &mut Body<'_>) {
|
||||
debug!("body: {:#?}", body);
|
||||
|
||||
// make sure there's a single resume block
|
||||
// make sure there's a resume block
|
||||
let resume_block = {
|
||||
let patch = MirPatch::new(body);
|
||||
let mut patch = MirPatch::new(body);
|
||||
let resume_block = patch.resume_block();
|
||||
patch.apply(body);
|
||||
resume_block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue