[fpc-devel] Peephole issue in 3.2.3

J. Gareth Moreton gareth at moreton-family.com
Sun Jun 2 21:06:32 CEST 2024


I admit I'm not overly sure how to handle Thaddy sometimes:

"They fixed it in the wrong way. It is fixed in a way to solve a single 
- rare - problem by an OP that seems to have more infuence than me and 
the fixer(s) would not listen."

Not sure what problem he's referring to exactly.  Hopefully not my 
aforementioned commit, because I think making sure the flag register is 
properly allocated so the peephole optimizer can make the correct 
informed choices is pretty important!

Kit

On 02/06/2024 11:51, J. Gareth Moreton via fpc-devel wrote:
> I made a post on that topic, as I remember that bug.  It was a 
> peephole optimisation that I introduced, but before anyone tries to 
> lynch me for breaking the compiler, the reason why things broke is 
> because it makes the optimisation on the assumption that the FLAGS 
> register was not in use.  However, another part of the compiler that 
> generated the comparison instructions neglected to mark the FLAGS were 
> in use, so they got scrambled at times.
>
> Thanks for listing the commit Martin!
>
> 6f24c8b4efccea67d092062009f413cc789a052c
>
> This should be cherry-picked into the fixes branch because it fixes a 
> bug that caused bad code to be generated.
>
> Kit
>
> On 02/06/2024 11:17, Martin Frb via fpc-devel wrote:
>> While not sure how 3.2.4 preparation are going, nor what is still 
>> outstanding for merging, I just wanted to quickly check if the 
>> following is know (and hopefully making the list)
>> https://forum.lazarus.freepascal.org/index.php/topic,67448.0.html
>>
>> From what I can tell
>> - present in today's 3.2.3
>> - probably peephole
>>
>> Merely from the commit message, possibly
>> https://gitlab.com/freepascal.org/fpc/source/-/commit/6f24c8b4efccea67d092062009f413cc789a052c 
>>
>> _______________________________________________
>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>


More information about the fpc-devel mailing list