Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-22 Thread Jonas Maebe
On 21/06/2020 22:07, Yuriy Sydorov wrote: >> It may also be also broken with FPC's code generator, but simply not get >> detected at compile time. > > Fixed. Thanks! Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-21 Thread Yuriy Sydorov
On 21.06.2020 0:34, Jonas Maebe wrote: On 20/06/2020 20:50, Yuriy Sydorov wrote: On 20.06.2020 16:17, Florian Klämpfl wrote: Am 20.06.20 um 15:04 schrieb Jonas Maebe: On 20/06/2020 14:59, Yuriy Sydorov wrote: Maybe implement this in a clean way by adding a new generic optimization

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
On June 21, 2020 00:34:01 Jonas Maebe wrote: On 20/06/2020 20:50, Yuriy Sydorov wrote: On 20.06.2020 16:17, Florian Klämpfl wrote: Am 20.06.20 um 15:04 schrieb Jonas Maebe: On 20/06/2020 14:59, Yuriy Sydorov wrote: Maybe implement this in a clean way by adding a new generic optimization

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
On June 20, 2020 23:22:13 Florian Klämpfl wrote: Am 20.06.20 um 22:02 schrieb Karoly Balogh (Charlie/SGR): Hi, On Sat, 20 Jun 2020, Yuriy Sydorov wrote: I've added the generic cs_opt_unused_para optimization option. In future, if needed, more fine-grained related options can be introduced.

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Jonas Maebe
On 20/06/2020 20:50, Yuriy Sydorov wrote: > On 20.06.2020 16:17, Florian Klämpfl wrote: >> Am 20.06.20 um 15:04 schrieb Jonas Maebe: >>> On 20/06/2020 14:59, Yuriy Sydorov wrote: Maybe implement this in a clean way by adding a new generic optimization cs_opt_hiddenpara? >>> >>>

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Florian Klämpfl
Am 20.06.20 um 22:02 schrieb Karoly Balogh (Charlie/SGR): Hi, On Sat, 20 Jun 2020, Yuriy Sydorov wrote: I've added the generic cs_opt_unused_para optimization option. In future, if needed, more fine-grained related options can be introduced. So now the parentfp optimization is enabled for

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 20 Jun 2020, Yuriy Sydorov wrote: > I've added the generic cs_opt_unused_para optimization option. > In future, if needed, more fine-grained related options can be introduced. > > So now the parentfp optimization is enabled for -O2 and higher. Yuriy, your changes seem to have broken

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
On 20.06.2020 16:17, Florian Klämpfl wrote: Am 20.06.20 um 15:04 schrieb Jonas Maebe: On 20/06/2020 14:59, Yuriy Sydorov wrote: Maybe implement this in a clean way by adding a new generic optimization cs_opt_hiddenpara? Maybe cs_opt_unusedpara. It doesn't have to be limited to hidden

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Florian Klämpfl
Am 20.06.20 um 15:04 schrieb Jonas Maebe: On 20/06/2020 14:59, Yuriy Sydorov wrote: Maybe implement this in a clean way by adding a new generic optimization cs_opt_hiddenpara? Maybe cs_opt_unusedpara. It doesn't have to be limited to hidden parameters. IMO there is even nothing wrong to

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Jonas Maebe
On 20/06/2020 14:59, Yuriy Sydorov wrote: > Maybe implement this in a clean way by adding a new generic optimization > cs_opt_hiddenpara? Maybe cs_opt_unusedpara. It doesn't have to be limited to hidden parameters. > Enable it for -O2. It may be used in future to optimize unused $self. Yes.

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
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

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Jonas Maebe
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

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
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

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Jonas Maebe
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

Re: [fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-20 Thread Yuriy Sydorov
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.

[fpc-devel] fpc trunk / parentfp for debugger / missing

2020-06-19 Thread Martin
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) This happens if the nested proc does not access data in the outer procedure. So the code indeed