diff options
| author | Quentin Carbonneaux <[email protected]> | 2019-02-18 13:47:33 +0100 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2019-02-18 13:56:03 +0100 |
| commit | cde5f95591b6f38df235ac16ee7ee979ec19bd09 (patch) | |
| tree | 84443f9ab1c20761b59c833e66a804144ae62235 /alias.c | |
| parent | d9b0d77cf20cb8340bc4a77b66aa8cb56c75b496 (diff) | |
mark phi arguments as escaping
Thanks to Michael Forney for spotting this
oversight and providing the test case.
Note: because esc() leaves ABot unchanged,
the assertion "a->type == ABot" on line 122
remains valid.
Diffstat (limited to 'alias.c')
| -rw-r--r-- | alias.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -106,7 +106,7 @@ esc(Ref r, Fn *fn) void fillalias(Fn *fn) { - uint n; + uint n, m; Blk *b; Phi *p; Ins *i; @@ -115,6 +115,8 @@ fillalias(Fn *fn) for (n=0; n<fn->nblk; ++n) { b = fn->rpo[n]; for (p=b->phi; p; p=p->link) { + for (m=0; m<p->narg; m++) + esc(p->arg[m], fn); assert(rtype(p->to) == RTmp); a = &fn->tmp[p->to.val].alias; assert(a->type == ABot); |
