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.
Unified · Split
| @@ -108,6 +108,7 @@ void · 107 unmodified lines | ||
| 108 | 108 | fillalias(Fn *fn) |
| 109 | 109 | { |
| 110 | 110 | uint n, m; |
| 111 | + int t; | |
| 111 | 112 | int64_t x; |
| 112 | 113 | bits w; |
| 113 | 114 | Blk *b; |
| @@ -116,6 +117,8 @@ fillalias(Fn *fn) · 2 unmodified lines | ||
| 116 | 117 | Con *c; |
| 117 | 118 | Alias *a, a0, a1; |
| 118 | 119 | |
| 120 | + for (t=0; t<fn->ntmp; t++) | |
| 121 | + fn->tmp[t].alias.type = ABot; | |
| 119 | 122 | for (n=0; n<fn->nblk; ++n) { |
| 120 | 123 | b = fn->rpo[n]; |
| 121 | 124 | for (p=b->phi; p; p=p->link) { |