aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir_ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir_ssa.c')
-rw-r--r--src/ir_ssa.c12
1 files changed, 6 insertions, 6 deletions
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;