summary refs log tree commit diff
path: root/lisc/live.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-27 20:31:07 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-27 20:31:07 -0400
commit538e3aff7fbc820fe72b3f6a89540c102e2da576 (patch)
tree44668d19fb16bfda57fbb13bed04a16039334a17 /lisc/live.c
parent2273d22ced916fa06a46e3f4894dbb9c04f0c640 (diff)
downloadroux-538e3aff7fbc820fe72b3f6a89540c102e2da576.tar.gz
compute reg interferences in filllive()
Diffstat (limited to 'lisc/live.c')
-rw-r--r--lisc/live.c9
1 files changed, 8 insertions, 1 deletions
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; 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) {