Search Results
7/21/2025, 11:51:33 PM
>>105981813
Consider two cases
f(x) + y
t0 = x
t1 = f(t0)
t2 = y
t3 = t1 + t2
y + f(x)
t0 = y
t1 = x
t2 = f(t1)
t3 = t0 + t2
clearly in the second case t0 isn't free during the evaluation of x or f, so ideally the more expensive half of the expression (in terms of registers) is done first. This is true when there's no caller/callee convention and the only aim is to avoid spilling
Consider two cases
f(x) + y
t0 = x
t1 = f(t0)
t2 = y
t3 = t1 + t2
y + f(x)
t0 = y
t1 = x
t2 = f(t1)
t3 = t0 + t2
clearly in the second case t0 isn't free during the evaluation of x or f, so ideally the more expensive half of the expression (in terms of registers) is done first. This is true when there's no caller/callee convention and the only aim is to avoid spilling
Page 1