On Tue, Oct 1, 2024 at 12:01 PM Eric Botcazou wrote:
>
> Hi,
>
> the attached Ada testcase compiled with -O -flto exhibits a wrong code issue
> when the 3 optimizations NRV + RSO + inlining are applied to the same call: if
> the LHS of the call is marked write-only before inlining, then it will ke
Hi,
the attached Ada testcase compiled with -O -flto exhibits a wrong code issue
when the 3 optimizations NRV + RSO + inlining are applied to the same call: if
the LHS of the call is marked write-only before inlining, then it will keep
the mark after inlining although it may be read in GIMPLE f
On Wed, Sep 11, 2024 at 12:38 PM Eric Botcazou wrote:
>
> > Hmm, it looks to me that the IPA analysis marking the variable readonly
> > in the first place is wrong - or that NRV may not be applied to such a
> > variable later. Is NRV ever applied to say
> >
> > static const S s = ...;
> >
> > s =
> Hmm, it looks to me that the IPA analysis marking the variable readonly
> in the first place is wrong - or that NRV may not be applied to such a
> variable later. Is NRV ever applied to say
>
> static const S s = ...;
>
> s = foo ();
>
> thus a readonly declared LHS?
But NRV is only an examp
On Wed, Sep 11, 2024 at 10:26 AM Eric Botcazou wrote:
>
> Hi,
>
> the attached Ada testcase compiled with -O -flto exhibits a wrong code issue
> when the 3 optimizations NRV + RSO + inlining are applied to the same call: if
> the LHS of the call is marked write-only before inlining, then it will k
Hi,
the attached Ada testcase compiled with -O -flto exhibits a wrong code issue
when the 3 optimizations NRV + RSO + inlining are applied to the same call: if
the LHS of the call is marked write-only before inlining, then it will keep
the mark after inlining although it may be read in GIMPLE f