[fpc-devel] Kit's ambitions!

J. Gareth Moreton gareth at moreton-family.com
Wed Jun 13 20:50:07 CEST 2018

I haven't fully uncovered the secrets of 
the compiler yet, but I did notice "pre-
peephole pass" under x86, but I think the 
only functions it touched was one of the 
bit shifts. Does this occur before 
register allocation or was it just 
something that had to be done before Pass 


On Wed 13/06/18 20:29 , Florian Klämpfl 
florian at freepascal.org sent:
> Am 12.06.2018 um 23:27 schrieb J. Gareth 
> > Ideally yes, but this occurs after 
> optimisations where all of the register 
allocations have already been made.
> > Doing the peephole and deep 
optimisations while
> the registers are still in a virtual 
state would be better overall, but 
> > may require a huge overhaul of the 
compiler that
> might be asking for too much trouble.  
There's also the issue that
> some 
> > commands only work with certain 
registers, and
> optimisations have to be careful of that 
> This is not that hard actually. The only 
difference is how register
> allocations are handled. Just look at 
the scheduler 
> pass of arm, it works also before 
register allocation (and afterwards).
> fpc-devel maillist  -  fpc-
devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-

More information about the fpc-devel mailing list