diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-20 22:09:12 +0100 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-11-20 22:09:12 +0100 |
commit | a70aa044ded9402ec107920e97aea3cfdc4f5964 (patch) | |
tree | 0c8eeadb3fd3f5c3d6b1044605776f0b63f085d9 | |
parent | 45ab1e5aa339c350e3efbbc9ad7abdfc22e73187 (diff) | |
download | roux-a70aa044ded9402ec107920e97aea3cfdc4f5964.tar.gz |
make multiple calls to fillalias() possible
The asserts (a->type == ABot) made it impossible to run fillalias() multiple times. We now reset the Alias.type field of all temps before starting. Getting rid of the asserts would have been another option.
-rw-r--r-- | alias.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/alias.c b/alias.c index fd11bd2..01d77e8 100644 --- a/alias.c +++ b/alias.c @@ -108,6 +108,7 @@ void fillalias(Fn *fn) { uint n, m; + int t; int64_t x; bits w; Blk *b; @@ -116,6 +117,8 @@ fillalias(Fn *fn) Con *c; Alias *a, a0, a1; + for (t=0; t<fn->ntmp; t++) + fn->tmp[t].alias.type = ABot; for (n=0; n<fn->nblk; ++n) { b = fn->rpo[n]; for (p=b->phi; p; p=p->link) { |