commit a70aa044ded9402ec107920e97aea3cfdc4f5964
parent 45ab1e5aa339c350e3efbbc9ad7abdfc22e73187
Author: Quentin Carbonneaux <quentin@c9x.me>
Date: Sun, 20 Nov 2022 22:09:12 +0100
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.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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) {