From 1d9e19fb3bb941cdc28e9d4c3063d3e213fd8312 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 18 Mar 2026 11:33:41 +0100 Subject: Refactor: use typedefs and CamelCase for aggregate types Looks nicer --- src/ir_ssa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ir_ssa.c') diff --git a/src/ir_ssa.c b/src/ir_ssa.c index 6598fba..f3fcb5d 100644 --- a/src/ir_ssa.c +++ b/src/ir_ssa.c @@ -1,16 +1,16 @@ #include "ir.h" void -copyopt(struct function *fn) +copyopt(Function *fn) { - struct block *blk = fn->entry; + Block *blk = fn->entry; FREQUIRE(FNUSE); do { for (int i = 0; i < blk->phi.n; ++i) { /* simplify same-arg phi */ int phi = blk->phi.p[i]; - union ref *arg = phitab.p[instrtab[phi].l.i]; + Ref *arg = phitab.p[instrtab[phi].l.i]; for (int j = 1; j < blk->npred; ++j) { if (arg[j].bits != arg->bits) goto Next; } @@ -22,12 +22,12 @@ copyopt(struct function *fn) Next:; } for (int i = 0; i < blk->ins.n; ++i) { - union ref var = mkref(RTMP, blk->ins.p[i]); - struct instr *ins = &instrtab[var.i]; + Ref var = mkref(RTMP, blk->ins.p[i]); + Instr *ins = &instrtab[var.i]; enum irclass k; if (ins->op == Ocopy) { - union ref arg = ins->l; + Ref arg = ins->l; if (arg.t == RTMP) k = insrescls(instrtab[arg.i]); else if (arg.t == RICON) k = cls2siz[ins->cls] == 4 ? KI32 : KI64; else if (arg.t == RXCON) k = isnumcon(arg) ? concls(arg) : KPTR; -- cgit v1.2.3