[fpc-devel] Does FPC optimize unused parameters ?

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Aug 8 16:37:01 CEST 2012


Martin wrote on Wed, 08 Aug 2012:

> Out of curiosity. Is there an optimization like this
[removing calculation/load of unused parameters]

No.

> (or is it possible?

After the body of the called routine has been parsed, it would be  
possible in theory (with indeed all the caveats the compiler would  
have to take care of such as side effects -- note that these may  
include non-obvious side-effects, such as potential overflow  
exceptions and invalid pointer accesses).


Jonas



More information about the fpc-devel mailing list