[fpc-devel] Peephole optimizer tai class change proposals

J. Gareth Moreton gareth at moreton-family.com
Mon Oct 11 10:00:15 CEST 2021

One for Jonas mainly, but also for Florian.  This is a new "extra 
optimisation information" feature that allows the peephole optimizer to 
leave 'notes' and other extra information on individual tai objects for 
later reference.  An initial showcase is to store a link to the 
destination label if it's not available in the lookup table (becuase it 
was created later by a peephole optimisation).


Currently the showcase doesn't appear to show any additional 
optimisations in the x86-64 RTL because the jump optimisation that 
creates a new label is almost never called.

I'll use this feature more extensively in the future, such as for 
storing information on the values of registers or making a note of a 
label that should be removed if possible because it would cause a 
long-term optimisation (something that a peephole optimisation that 
removes the label may not be able to determine because its own 
optimisation is questionable without that information).  See previous 
e-mails in this chain for an example.

Gareth aka. Kit

This email has been checked for viruses by Avast antivirus software.

More information about the fpc-devel mailing list