Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2024-06

Peephole issue in 3.2.3

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton
to Martin Frb

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 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

Martin Frb wrote 16 lines
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  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

J. Gareth Moreton
to J. Gareth Moreton

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

J. Gareth Moreton wrote 38 lines
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  -  > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel > _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Martin Frb
to J. Gareth Moreton
J. Gareth Moreton wrote 10 lines
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!

Thaddy is talking about another issue, to which he supplied a link. No idea why (or if) he thought they were related.

Reply by email

J. Gareth Moreton
to Martin Frb

Aah, thanks Martin.  I was getting a little worried because some other forum users are implying they're getting scared away from FPC because of the bugs that are popping up.  Of course I'll have to take responsibility for some of them.

Kit

Martin Frb wrote 18 lines
On 02/06/2024 21:06, J. Gareth Moreton via fpc-devel wrote: > 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! Thaddy is talking about another issue, to which he supplied a link. No idea why (or if) he thought they were related. _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email