From 1883e55ebb8d11a84ad1934f0c375e722ec4c130 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Wed, 23 Oct 2019 10:39:27 +0300 Subject: [PATCH] [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 --- src/mono/mono/mini/interp/transform.c | 2 ++ 1 file changed, 2 insertions(+) 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; } } } -- 2.7.4