[fpc-devel] (patch) An attempt to improve assignments/function result reuse

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Dec 7 17:49:57 CET 2007


On 04 Dec 2007, at 11:30, Sergei Gorelkin wrote:

> Currently, when assigning types that need helper routines (records,  
> Windows widestrings and variants), the compiler converts assignment  
> into a helper call immediately. If this is moved from typecheckpass  
> to pass1, certain assignments get the chance to be optimized away.  
> See the patch attached.

Thanks, I've applied your patch. I'm also testing a patch for the  
function result handling (there was another issue: the fact that the  
fake "result" variable is actually implemented as an absolute  
variable referring to the actual function result, causing an extra  
absolute type conversion node to appear around it), which optimizes a  
lot more in general (in the compiler it removes a lot of unnecessary  
shortstring copy operations).


Jonas



More information about the fpc-devel mailing list