From bc7ee22fa65a7fbe84a9ef2ac93490fa88e488fb Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 19 Apr 2023 14:26:17 +0200 Subject: [PATCH] Skip methods only in DEDUP_SKIP phase --- src/mono/mono/mini/aot-compiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 5cb0a2ad1888c..ec9b189f2a26d 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -4317,10 +4317,11 @@ collect_dedup_method (MonoAotCompile *acfg, MonoMethod *method) { // Check if the dedup is enabled, and if the current method can be deduplicated if ((acfg->dedup_phase == DEDUP_SKIP || acfg->dedup_phase == DEDUP_COLLECT) && mono_aot_can_dedup (method)) { + if (acfg->dedup_phase == DEDUP_SKIP) + return TRUE; // Remember for later if (acfg->dedup_phase == DEDUP_COLLECT && !g_hash_table_lookup (dedup_methods, method)) g_hash_table_insert (dedup_methods, method, method); - return TRUE; } return FALSE; }