[fpc-pascal] why fpc do not use a known return function value
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Feb 3 12:13:35 CET 2015
On 03/02/15 11:33, misu kun wrote:
> i mean even if you initilize c with a const value.
That is irrelevant.
> i enabled {$optimization constprop} but nothing changed !
I misread the original assembler code you posted, due to how you phrased
the subject of your mail. The inline function is actually already
completely evaluated at compile time (you probably compiled with -O3
before) and the compiler does use the statically evaluated function
return value (rather than calling the function).
It's however true that there appear to be a few missing optimizations to
fold the rest of the address calculation, but those are minor.
Jonas
More information about the fpc-pascal
mailing list