On 03/29/2012 11:42 AM, Laurent Desnogues wrote: > That will indeed probably make the real problem, which is that > this patch increases the size of generated code, less obvious > on small benchmarks that don't put pressure on instruction > cache. But the fact is that generated code is larger and will > have to execute more instructions, so no matter what you do, > this will have an impact on speed.
While this is true, the benefit of using a more standard calling convention on reliability and debug-ability is enormous. Consider the i686 host, where we currently obscond with EBP. While I'm not aware of any current problems with -O0 or spill failures under optimization, it's not inconceivable. Consider sparc-linux host, where we have *no* call-saved global register at all, and (currently) try very hard to use a call- clobbered global register, with occasionally disastrous results. See the patch set I posted recently where I give up on this entirely and make sparc use a TLS variable instead of a hard register at all. This regresses the Sparc host on speed for a progression in reliability. The conversion to explicit env arguments fixes essentially all of the speed regression since we then receive ENV in %o0 instead of having to read from TLS. r~