From 165f9c1efbeab73f63a626eaffd0cbd499c2e760 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 19 Feb 2025 16:39:23 +0300 Subject: [PATCH] Always rebuld CFG after MEM2SSA for -O1 pipeline --- ir.h | 4 +--- ir_main.c | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ir.h b/ir.h index 688dccda..60c501d0 100644 --- a/ir.h +++ b/ir.h @@ -960,9 +960,7 @@ IR_ALWAYS_INLINE void *ir_jit_compile(ir_ctx *ctx, int opt_level, size_t *size) || !ir_mem2ssa(ctx)) { return NULL; } - if (opt_level > 1) { - ir_reset_cfg(ctx); - } + ir_reset_cfg(ctx); } if (opt_level > 1) { diff --git a/ir_main.c b/ir_main.c index 454a10bd..fc659c85 100644 --- a/ir_main.c +++ b/ir_main.c @@ -255,9 +255,8 @@ int ir_compile_func(ir_ctx *ctx, int opt_level, uint32_t save_flags, uint32_t du } ir_mem2ssa(ctx); - if (opt_level > 1) { - ir_reset_cfg(ctx); - } + ir_reset_cfg(ctx); + if ((dump & (IR_DUMP_AFTER_MEM2SSA|IR_DUMP_AFTER_ALL)) && !_save(ctx, save_flags, dump, IR_DUMP_AFTER_MEM2SSA, dump_file, func_name)) { return 0;