From 1f4ff634187a9127ab160b2651c9decd80e82435 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 12 Apr 2016 14:40:11 -0400 Subject: subtle bug in liveness! If on of the phis in a block A uses the result of another one when coming from B, we have to be careful! --- live.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live.c b/live.c index 3265b3e..66c84e8 100644 --- a/live.c +++ b/live.c @@ -7,13 +7,13 @@ liveon(BSet *v, Blk *b, Blk *s) uint a; bscopy(v, s->in); - for (p=s->phi; p; p=p->link) { + for (p=s->phi; p; p=p->link) bsclr(v, p->to.val); + for (p=s->phi; p; p=p->link) for (a=0; anarg; a++) if (p->blk[a] == b) if (rtype(p->arg[a]) == RTmp) bsset(v, p->arg[a].val); - } } static int -- cgit 1.4.1