diff options
| author | 2025-12-24 09:44:30 +0100 | |
|---|---|---|
| committer | 2025-12-24 09:44:30 +0100 | |
| commit | 99bf55db5009949fbb5348a6287a03409e7ecb74 (patch) | |
| tree | 8ac18686bbafc51e4cd018037f689f4173cc277e /ir | |
| parent | efb31c9f7d34f42c4b37e4a05510e244af727234 (diff) | |
abi0: get rid of manual instruse reordering
Vestigial, wasn't enough and we're sorting uses in mem2reg now.
Diffstat (limited to 'ir')
| -rw-r--r-- | ir/abi0.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -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); } } } |