qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 1f4ff634187a9127ab160b2651c9decd80e82435
parent 4cee19ea9f989dc4b54bea3e657ec239929bf4d8
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Tue, 12 Apr 2016 14:40:11 -0400

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!

Diffstat:
Mlive.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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; a<p->narg; a++) if (p->blk[a] == b) if (rtype(p->arg[a]) == RTmp) bsset(v, p->arg[a].val); - } } static int