jasmin
jasmin copied to clipboard
Liveness & copies
Register allocation sees that x
and y
conflict and therefore does not consider allocating them to the same register, hence fails at compiling this program:
param int N = 13;
export fn test(reg u64 out y) {
reg u64 x;
reg u64[N] t;
inline int i;
for i = 0 to N { t[i] = i; }
x = y;
x += y;
[out] = x;
for i = 1 to N { t[0] += t[i]; }
[out] = t[0];
}
This is related to coalescing.