Hello Sieghard.

There is some info there:


From fpc wiki 3.0.0 about New Feature DFA optimization:
https://wiki.freepascal.org/FPC_New_Features_3.0.0


Dead store elimination

Overview: The compiler can now, to a limited extent, remove stores to local 
variables and parameters if these values are not used before they are 
overwritten.
Notes: The use of this optimization requires that data flow analysis (-Oodfa) 
is enabled.
It can help in particular with cleaning up instructions that have become 
useless due to constant propagation.
More information: -Oodfa is still a work in progress.


________________________________
De : Sieghard via mseide-msegui-talk <mseide-msegui-talk@lists.sourceforge.net>
Envoyé : vendredi 14 juillet 2023 21:41
À : mseide-msegui-talk@lists.sourceforge.net 
<mseide-msegui-talk@lists.sourceforge.net>
Cc : Sieghard <s_c_...@arcor.de>
Objet : Re: [MSEide-MSEgui-talk] Release MSEgui 5.8.2.

Hello Fred,

you wrote on Fri, 14 Jul 2023 14:59:09 +0000:

> So, using -O3 -OoNODFA gives a mseide without problems.
> Even more, -O4 -OoNODFA is ok too!
>
> Conclusion: msegui can use all the optimizations, appart DFA (does
> anybody knows what does that DFA optimization?).

The two documentation files "prog.pdf" and "user.pdf" of fpc both agree
that it should mean "Data Flow Analysis". But there's no hint at what that
might effect beyond that statement. It might mean a mechanism that tracks
the use of variable data and tries to avoid multiple evaluations or
unneeded memory transfers or something similar. And seemingly guesses
wrongly sometimes...
No, wait, there IS some more information. In "prog.pdf" (Programmer’s Guide
for Free Pascal, Version 3.2.0, February 2020, p. 132) they say:

"• Level 2 (-O2) enables the assembler data flow analyzer, which allows
   the common subexpression elimination procedure to remove unnecessary
   reloads of registers with values they already contain."

So that's about what I suspected, but on the level of registers rather than
variables.
(Sorry, I don't seem to have any fpc 3.3.1 documentaion installed by now.)

--
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------




_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to