[fpc-devel] Double-checking an optimisation
J. Gareth Moreton
gareth at moreton-family.com
Sun Jan 9 01:37:13 CET 2022
So a merge request of mine was just approved that allows the peephole
optimizer access to more registers when it needs one for temporary
storage. It allows it to make an optimisation on x86_64-win64 that
wasn't possible before due to the lack of available volatile registers.
In packages\numlib\src\dsl.pas - before:
%ebx is a non-volatile register, but the current subroutine preserves it
and it's not currently in use, so the peephole optimizer can borrow it
for a few instructions.
I need to double-check though... is this actually a good optimisation
for speed? It removes a jump and a label, which might permit other
long-range optimisations, but it's 3 instructions that are in a
Gareth aka. Kit
This email has been checked for viruses by Avast antivirus software.
More information about the fpc-devel