Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Richard Biener via Gcc-patches
On Mon, Aug 23, 2021 at 2:02 PM Jan Hubicka wrote: > > Hi, > > > > Why does it "punish" -fno-ipa-pta? It merely "punishes" modref of > > no longer claiming that we do not alter the instruction stream pointed > > to by a->foo, sth that shouldn't be very common. > > For example > struct a { > voi

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Jan Hubicka
Hi, > > Why does it "punish" -fno-ipa-pta? It merely "punishes" modref of > no longer claiming that we do not alter the instruction stream pointed > to by a->foo, sth that shouldn't be very common. For example struct a { void (*foo)(); void *bar; } fn(struct a *a) { a->foo(); } With Mari

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Richard Biener via Gcc-patches
On Sun, Aug 22, 2021 at 7:32 PM Jan Hubicka wrote: > > > Thanks for looking into this bug - it is interesting that ipa-pta > > requires !EAF_NOCLOBBER when function is called... > > > > I have some work done on teaching ipa-modref (and other propagation > > passes) to use ipa-devirt info when the

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Jan Hubicka
> Hello. > > Thanks for working on that. But have really run the test-cases as the newly > added test still aborts as it used to before you installed this patch? Eh, sorry, I had earlier version of patch that did if (gimple_call_fn (use_stmt) == name) lattice[index].merge (

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Christophe Lyon via Gcc-patches
On Sun, Aug 22, 2021 at 11:47 PM H.J. Lu via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > On Sun, Aug 22, 2021 at 10:32 AM Jan Hubicka wrote: > > > > > Thanks for looking into this bug - it is interesting that ipa-pta > > > requires !EAF_NOCLOBBER when function is called... > > > > > > I have

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-23 Thread Martin Liška
On 8/22/21 19:32, Jan Hubicka wrote: Thanks for looking into this bug - it is interesting that ipa-pta requires !EAF_NOCLOBBER when function is called... I have some work done on teaching ipa-modref (and other propagation passes) to use ipa-devirt info when the full set of callees is known. This

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-22 Thread H.J. Lu via Gcc-patches
On Sun, Aug 22, 2021 at 10:32 AM Jan Hubicka wrote: > > > Thanks for looking into this bug - it is interesting that ipa-pta > > requires !EAF_NOCLOBBER when function is called... > > > > I have some work done on teaching ipa-modref (and other propagation > > passes) to use ipa-devirt info when the

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-22 Thread Jan Hubicka
> Thanks for looking into this bug - it is interesting that ipa-pta > requires !EAF_NOCLOBBER when function is called... > > I have some work done on teaching ipa-modref (and other propagation > passes) to use ipa-devirt info when the full set of callees is known. > This goes oposite way. > > You

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-22 Thread Jan Hubicka
> Hello. > > As showed in the PR, returning (EAF_NOCLOBBER | EAF_NOESCAPE) for an argument > that is a function pointer is problematic. Doing such a function call is a > clobber. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Ma

Re: [PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-21 Thread Martin Jambor
Hi, On Fri, Aug 20 2021, Martin Liška wrote: > Hello. > > As showed in the PR, returning (EAF_NOCLOBBER | EAF_NOESCAPE) for an argument > that is a function pointer is problematic. Doing such a function call is a > clobber. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests

[PATCH] IPA: MODREF should skip EAF_* flags for indirect calls

2021-08-20 Thread Martin Liška
Hello. As showed in the PR, returning (EAF_NOCLOBBER | EAF_NOESCAPE) for an argument that is a function pointer is problematic. Doing such a function call is a clobber. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR 1019