On 20.06.2020 15:49, Jonas Maebe wrote:
On 20/06/2020 14:31, Yuriy Sydorov wrote:
On 20.06.2020 14:38, Jonas Maebe wrote:
On 20/06/2020 13:15, Yuriy Sydorov wrote:
On 20.06.2020 2:04, Martin wrote:
I just updated to fpc trunk 45658
It seems sometime in the last 3 or 4 month a change was made that
leads to "parentfp" being optimized away.
Even with -O- or -O1 (many users do O1 for debugging)
I've turned off optimization of parentfp when -O- in r45661.
Maybe it can be tied to the -Oostackframe optimisation setting.
Some CPU targets - jvm at least - doesn't support cs_opt_stackframe, but
the parentfp optimization applies for any CPU target.
At first sight, the only thing that needs to be done to "support"
cs_opt_stackframe for the JVM target is to always set
pi_has_stackparameter there.
Yes, but currently it is not supported. :)
The parentfp optimization need to be tied to some generic optimization.
cs_opt_remove_empty_proc looks good for this.
That feels rather unrelated to me.
cs_opt_stackframe also is only vaguely related to the parentfp optimization.
Maybe implement this in a clean way by adding a new generic optimization
cs_opt_hiddenpara?
Enable it for -O2. It may be used in future to optimize unused $self.
Yuriy.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel