Skip to content

Commit

Permalink
[interp] Retry cprop pass if killing stloc (mono/mono#17491)
Browse files Browse the repository at this point in the history
When replacing a stloc with a pop, we should retry the pass, since it is very likely that we will be able to kill the instruction that pushed that value on the stack.

Commit migrated from mono/mono@4419dc9
  • Loading branch information
BrzVlad authored Oct 23, 2019
1 parent bdd5952 commit 1883e55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -6540,6 +6540,8 @@ interp_local_deadce (TransformData *td, int *local_ref_count)
// We store to a dead stloc, we can replace it with a POP to save local space
ins->opcode = MINT_POP;
mono_interp_stats.added_pop_count++;
// We might to be able to kill both the pop and the instruction pushing the value
needs_cprop = TRUE;
}
}
}
Expand Down

0 comments on commit 1883e55

Please sign in to comment.