aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-11 12:14:09 +0200
committerlemon <lsof@mailbox.org>2026-04-11 12:14:09 +0200
commit757b5735f44e9a9454f12612ec00c38d81f5f32c (patch)
treef6470c4704bd1690a6476b2bb2140d10c5f4057c /src/ir.c
parent116a53553bfc3f5c55fb532550b97be8fab4c200 (diff)
backend: run mem2reg after inlining
Diffstat (limited to 'src/ir.c')
-rw-r--r--src/ir.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ir.c b/src/ir.c
index ead9ae4..f34cfaf 100644
--- a/src/ir.c
+++ b/src/ir.c
@@ -680,7 +680,11 @@ irfini(Function *fn)
copyopt(fn);
}
if (ccopt.o >= OPT1) {
- doinline(fn);
+ if (doinline(fn)) {
+ filluses(fn);
+ copyopt(fn);
+ mem2reg(fn);
+ }
freearena(fn->passarena);
filldom(fn);
if (!(fn->prop & FNUSE)) filluses(fn);