Skip to content

Commit

Permalink
Always rebuld CFG after MEM2SSA for -O1 pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Feb 19, 2025
1 parent 0058a3d commit 165f9c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions ir_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 165f9c1

Please sign in to comment.