From 99bf55db5009949fbb5348a6287a03409e7ecb74 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 24 Dec 2025 09:44:30 +0100 Subject: abi0: get rid of manual instruse reordering Vestigial, wasn't enough and we're sorting uses in mem2reg now. --- ir/abi0.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'ir/abi0.c') diff --git a/ir/abi0.c b/ir/abi0.c index bd8e297..85f7003 100644 --- a/ir/abi0.c +++ b/ir/abi0.c @@ -321,7 +321,6 @@ abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi) } for (int i = 0; i < nret; ++i) { struct instr store = {0}; - int iref, iuser; switch (call->abiret[i].ty.cls) { default: assert(0); case KF32: case KI32: store.op = Ostore32; break; @@ -334,17 +333,7 @@ abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi) store.l = insertinstr(blk, ++*curi, addr); } store.r = r[i]; - iuser = insertinstr(blk, ++*curi, store).i; - if (i > 0) iuser = store.l.i; - iref = retmem.i; - if (instrnuse[iref] > 1) { - /* make this the first use of that temp */ - int last = instrnuse[iref] - 1; - struct use tmp = instruse[iref][last]; - assert(tmp.blk == blk && tmp.u == iuser); - memmove(&instruse[iref][last], &instruse[iref][0], (sizeof tmp)*(last)); - instruse[iref][0] = tmp; - } + insertinstr(blk, ++*curi, store); } } } -- cgit v1.2.3