commit 538e3aff7fbc820fe72b3f6a89540c102e2da576
parent 2273d22ced916fa06a46e3f4894dbb9c04f0c640
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Sun, 27 Sep 2015 20:31:07 -0400
compute reg interferences in filllive()
Diffstat:
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/lisc/lisc.h b/lisc/lisc.h
@@ -225,6 +225,7 @@ struct Tmp {
uint cost;
short spill;
short wide;
+ ulong intr;
int hint;
int phi;
};
diff --git a/lisc/live.c b/lisc/live.c
@@ -38,8 +38,9 @@ filllive(Fn *f)
{
Blk *b;
Ins *i;
- int z, m, n, chg, nlv;
+ int t, z, m, n, chg, nlv;
Bits u, v;
+ ulong regs;
assert(f->ntmp <= NBit*BITS);
for (b=f->start; b; b=b->link) {
@@ -47,6 +48,8 @@ filllive(Fn *f)
b->out = (Bits){{0}};
b->gen = (Bits){{0}};
}
+ for (t=Tmp0; t<f->ntmp; t++)
+ f->tmp[t].intr = 0;
chg = 1;
Again:
for (n=f->nblk-1; n>=0; n--) {
@@ -87,6 +90,10 @@ Again:
bset(i->arg[1], b, &nlv);
if (nlv > b->nlive)
b->nlive = nlv;
+ if ((regs = b->in.t[0] & (BIT(Tmp0) - 1)))
+ for (t=Tmp0; t<f->ntmp; t++)
+ if (BGET(b->in, t))
+ f->tmp[t].intr |= regs;
}
}
if (chg) {