[fpc-devel] Register allocation question

Florian Klämpfl florian at freepascal.org
Sat Apr 9 21:10:01 CEST 2011


Am 09.04.2011 21:04, schrieb Sergei Gorelkin:
> 09.04.2011 22:26, Sergei Gorelkin пишет:
>> 09.04.2011 22:13, Jonas Maebe пишет:
>>>
>>> Simply changing the register order in the array to trgcpu.create in
>>> Tcgx86_64.init_register_allocators should do it.
>>>
>> Hmm, that was the first thing I tried, but it doesnt't seem to make
>> any difference :(
>>
> No, it works, I simply looked at the wrong place. As usual :-/
> 
> The right place to look is the function not calling other functions, not
> just any function simple enough.
> Attached are assembler listings of system.indexqword() compiled for
> win64 with -O2, with and without the change. Note the prolog and epilog
> (almost) gone.
> 
> This is of course a very quick test, and I'll run the testsuite to check
> more thoroughly.
> If no issues pop up, it is ok to commit?

Problem is, this might hurt non leaf functions. Maybe the register
allocators can be initialized differently for leave and non-leave functions?



More information about the fpc-devel mailing list