From: Vlad Brezae Date: Wed, 23 Oct 2019 07:39:27 +0000 (+0300) Subject: [interp] Retry cprop pass if killing stloc (mono/mono#17491) X-Git-Tag: submit/tizen/20210909.063632~10331^2~5^2~306 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1883e55ebb8d11a84ad1934f0c375e722ec4c130;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [interp] Retry cprop pass if killing stloc (mono/mono#17491) 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 https://github.com/mono/mono/commit/4419dc919f01c6d97ecd1662929adc6e7e642e83 --- diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index be56f84..48f18c9 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -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; } } }