commit 595ad96a34aaf3d945dc70bab2279e292f3a70b2
parent 8165e327e0dbb8298cfafdba85f0b804a5445b9f
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Tue, 21 Jul 2015 17:21:53 -0400
cosmetics
Diffstat:
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisc/live.c b/lisc/live.c
@@ -3,8 +3,7 @@
static void
bset(Ref r, Blk *b, int *nlv)
{
- if (rtype(r) == RSym)
- if (!BGET(b->in, r.val)) {
+ if (rtype(r) == RSym && !BGET(b->in, r.val)) {
++*nlv;
BSET(b->in, r.val);
BSET(b->gen, r.val);
@@ -29,12 +28,9 @@ filllive(Fn *f)
b->in = (Bits){{0}};
b->out = (Bits){{0}};
b->gen = (Bits){{0}};
- b->nlive = 0;
}
chg = 1;
- if (0)
- Again:
- chg = 0;
+Again:
for (n=f->nblk-1; n>=0; n--) {
b = f->rpo[n];
@@ -45,7 +41,7 @@ filllive(Fn *f)
if (b->s2)
for (z=0; z<BITS; z++)
b->out.t[z] |= b->s2->in.t[z];
- chg |= memcmp(&b->out, &tb, sizeof(Bits)) != 0;
+ chg |= memcmp(&b->out, &tb, sizeof(Bits));
b->in = b->out;
nlv = bcnt(&b->in);
@@ -70,6 +66,8 @@ filllive(Fn *f)
BSET(p->blk[a]->out, p->arg[a].val);
}
}
- if (chg)
+ if (chg) {
+ chg = 0;
goto Again;
+ }
}