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