Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jan Hubicka via Gcc-patches
> On Wed, Apr 20, 2022 at 01:47:43PM +0200, Martin Jambor wrote: > > Hi, > > > > On Wed, Apr 20 2022, Jan Hubicka via Gcc-patches wrote: > > >> On Wed, 20 Apr 2022, Jakub Jelinek wrote: > > > > [...] > > > > >> > > > >> >if ((flag_openacc || flag_openmp) > > >> >&&

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 20, 2022 at 01:47:43PM +0200, Martin Jambor wrote: > Hi, > > On Wed, Apr 20 2022, Jan Hubicka via Gcc-patches wrote: > >> On Wed, 20 Apr 2022, Jakub Jelinek wrote: > > [...] > > >> > > >> >if ((flag_openacc || flag_openmp) > >> >&& lookup_attribute ("omp declare

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Martin Jambor
Hi, On Wed, Apr 20 2022, Jan Hubicka via Gcc-patches wrote: >> On Wed, 20 Apr 2022, Jakub Jelinek wrote: [...] >> > >> >if ((flag_openacc || flag_openmp) >> >&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl))) >> > --- gcc/cgraphclones.cc.jj 2022-01-18

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jan Hubicka via Gcc-patches
> > The cgraph.cc change was what I actually needed for the fix, the > cgraphclones.cc was only because I've noticed that it constructs a new > node (so is initialized to whatever random flag_semantic_interposition is > right now) and initializing it to what it is cloned from made more sense.

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 20, 2022 at 11:06:12AM +0200, Jan Hubicka wrote: > > On Wed, Apr 20, 2022 at 10:45:53AM +0200, Jan Hubicka wrote: > > > So this change should be unnecessary unless there are nodes that are > > > missing finalization stage. It also is not good enough since frontends > > > may change

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jan Hubicka via Gcc-patches
> On Wed, Apr 20, 2022 at 10:45:53AM +0200, Jan Hubicka wrote: > > So this change should be unnecessary unless there are nodes that are > > missing finalization stage. It also is not good enough since frontends > > may change opt_for_fn between node creation and finalization of > > compilation

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 20, 2022 at 10:45:53AM +0200, Jan Hubicka wrote: > So this change should be unnecessary unless there are nodes that are > missing finalization stage. It also is not good enough since frontends > may change opt_for_fn between node creation and finalization of > compilation unit (so

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Jan Hubicka via Gcc-patches
> On Wed, 20 Apr 2022, Jakub Jelinek wrote: > > > Hi! > > > > cgraph_node has a semantic_interposition flag which should mirror > > opt_for_fn (decl, flag_semantic_interposition). But it actually is > > initialized not from that, but from flag_semantic_interposition in the > > explicit

Re: [PATCH] cgraph: Fix up semantic_interposition handling [PR105306]

2022-04-20 Thread Richard Biener via Gcc-patches
On Wed, 20 Apr 2022, Jakub Jelinek wrote: > Hi! > > cgraph_node has a semantic_interposition flag which should mirror > opt_for_fn (decl, flag_semantic_interposition). But it actually is > initialized not from that, but from flag_semantic_interposition in the > explicit symtab_node