aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir.c6
-rw-r--r--src/ir_ssa.c2
2 files changed, 7 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);
diff --git a/src/ir_ssa.c b/src/ir_ssa.c
index 6e7945b..a1d960f 100644
--- a/src/ir_ssa.c
+++ b/src/ir_ssa.c
@@ -35,6 +35,8 @@ copyopt(Function *fn)
if (ins->cls != k) continue;
replcuses(var, arg);
+ if (arg.t == RTMP)
+ deluse(blk, var.i, arg);
*ins = mkinstr0(Onop,0);
deluses(var.i);
}