diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-11-13 15:34:03 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-11-13 15:34:03 -0500 |
commit | 8c0574eaa16248260fbd615e7a6ef9fd87119189 (patch) | |
tree | 8f8e39e5d53f4c6a658a08b38bcb6a92bdf8545d /lisc | |
parent | a670758b8735e3e857e013e05da23bf005f3bade (diff) | |
download | roux-8c0574eaa16248260fbd615e7a6ef9fd87119189.tar.gz |
fix buggy phi deletion in copy()
Diffstat (limited to 'lisc')
-rw-r--r-- | lisc/copy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisc/copy.c b/lisc/copy.c index 9367e8d..c04f36a 100644 --- a/lisc/copy.c +++ b/lisc/copy.c @@ -109,13 +109,11 @@ copy(Fn *fn) } } for (b=fn->start; b; b=b->link) { - for (pp=&b->phi; (p=*pp); pp=&p->link) { - Again: + for (pp=&b->phi; (p=*pp);) { r = cp[p->to.val]; if (!req(r, p->to)) { *pp = p->link; - p = *pp; - goto Again; + continue; } for (a=0; a<p->narg; a++) if (rtype(p->arg[a]) == RTmp) { @@ -123,6 +121,7 @@ copy(Fn *fn) assert(!req(r, R)); p->arg[a] = r; } + pp=&p->link; } for (i=b->ins; i!=&b->ins[b->nins]; i++) { r = cp[i->to.val]; |