From 538e3aff7fbc820fe72b3f6a89540c102e2da576 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 27 Sep 2015 20:31:07 -0400 Subject: compute reg interferences in filllive() --- lisc/lisc.h | 1 + lisc/live.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'lisc') diff --git a/lisc/lisc.h b/lisc/lisc.h index 127aa78..2808620 100644 --- 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 index 80bdd75..96472d7 100644 --- 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; tntmp; 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; tntmp; t++) + if (BGET(b->in, t)) + f->tmp[t].intr |= regs; } } if (chg) { -- cgit 1.4.1