[fpc-devel] Question on updating FPC packages

Florian Klämpfl florian at freepascal.org
Thu Oct 31 22:13:57 CET 2019


Am 31.10.19 um 20:11 schrieb Marco van de Voort:
> 
> Op 2019-10-30 om 23:02 schreef Florian Klämpfl:
>>
>> Yes. And manually adding inline is only as good as the knowledge of 
>> the user doing so. If somebody implements it right (I did not, I used 
>> the easiest approach and used an existing function to estimate the 
>> complexity of a subroutine). The compiler can just count the number of 
>> the generate instructions or even calculate the length of the 
>> procedure and then decide to keep the node tree for inlining.
> 
> Well, it depends of course of what happens when. Would you really count 
> final instructions or cycles after all optimization and peephole passes ?

This is not really an issue: actually for inlining mainly 
instructions/code length matters and e.g. the arm compiler even does 
this (actually something more complex) as it has to insert the constant 
tables at the right locations into the code because the relative offsets 
are limited.


More information about the fpc-devel mailing list