The return value temporary is produced by the function call, and so starts being live after the call has returned, and the return value has been recuperated (from the stack or from another register). I think it would make perfect sense to say that its live interval starts right after the call or at the call. This would also be coherent with the way the live intervals of other instruction output temporaries are treated, I believe.
In effect, I think it doesn't matter if the live interval of $t_9 starts at 22. What matters is that all live used registers be spilled before the function call, and that after the call, the function's return value ends up in whichever register is assigned to $t_9.
- Maxime
In trying to add Fixed interval support on the register allocation algorithm, to preserve registers across call sites, I ran into a problem with our current representation.
Given a call instruction like this:
20: ... 22: (9) $t_9 = call $t_8, global, $t_7 continue call_cont 24: ...
I need to be able to express the fact that all registers will be used during a function call. The algorithm given in the paper expresses it by assigning a live range interval [22,23[ for all registers. They call this a fixed interval. This effectively forces all live values in registers to be spilled at a function call site, because their own live range intersect with the fixed interval.
However, given our current notation, I would say that 't_9' starts being live at 22, which intersects with the fixed interval of any of the registers. For the fixed interval to be used correctly, I would need to be able to express the fact that the return value live range starts right after the fixed interval ends, in this case $t_9 = [23,...[. I see it as a decoupling between the function call and the return value.
At this point, I don't know if this could have unintended consequences down the road and I would like your opinion on this.
Erick _______________________________________________ Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list