Re: [PATCH] Fix PR78027

2019-02-22 Thread Thomas Schwinge
Hi! On Thu, 8 Dec 2016 15:05:10 -0800, Cesar Philippidis wrote: > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/goacc/pr78027.f90 > @@ -0,0 +1,20 @@ > +! { dg-additional-options "-fopenmp -O2 -fdump-ipa-icf" } > +[...] To address unrelated compiler diagnostics, I've just committed to trunk in

Re: [PATCH] Fix PR78027

2016-12-12 Thread Jeff Law
On 12/12/2016 09:37 AM, Jakub Jelinek wrote: On Mon, Dec 12, 2016 at 09:29:44AM -0700, Jeff Law wrote: 2016-12-08 Cesar Philippidis PR fortran/78027 gcc/ * ipa-icf.c (sem_function::parse): Don't process functions with oacc decl attributes, as they may be OpenACC routines. gc

Re: [PATCH] Fix PR78027

2016-12-12 Thread Jakub Jelinek
On Mon, Dec 12, 2016 at 09:29:44AM -0700, Jeff Law wrote: > >>>2016-12-08 Cesar Philippidis > >>> > >>>PR fortran/78027 > >>> > >>>gcc/ > >>>* ipa-icf.c (sem_function::parse): Don't process functions with > >>>oacc decl attributes, as they may be OpenACC routines. > >>> > >>>

Re: [PATCH] Fix PR78027

2016-12-12 Thread Jeff Law
On 12/09/2016 07:05 AM, Cesar Philippidis wrote: On 12/08/2016 04:37 PM, Jeff Law wrote: On 12/08/2016 04:05 PM, Cesar Philippidis wrote: PR78027 was classified as a fortran bug, but the underlying problem turned out to be more generic. Basically, the IPA-ICF pass usually ignores functions with

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Fri, 9 Dec 2016, Cesar Philippidis wrote: > >> if (cgraph_node::get_create (decl)->offloadable > >> && !lookup_attribute ("omp declare target", > >> DECL_ATTRIBUTES (current_function_decl))) > >>{ > >> const char *target_attr = (is_gimple_omp_offloaded (c

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/09/2016 07:49 AM, Alexander Monakov wrote: > On Fri, 9 Dec 2016, Cesar Philippidis wrote: >>> Normally all offloaded code has either "omp declare target" (most >>> functions) or >>> "omp target entrypoint" (only toplevel offloaded code). This used to >>> include >>> OpenACC functions: they

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Fri, 9 Dec 2016, Cesar Philippidis wrote: > > Normally all offloaded code has either "omp declare target" (most > > functions) or > > "omp target entrypoint" (only toplevel offloaded code). This used to > > include > > OpenACC functions: they would have "oacc fnattrib" _in_ _addition_ to thos

Re: [PATCH] Fix PR78027

2016-12-09 Thread Jakub Jelinek
On Fri, Dec 09, 2016 at 07:37:53AM -0800, Cesar Philippidis wrote: > It was more so to point out that there were cases where OpenACC > offloaded regions may not have omp target attributes. Referring back to > case 2 in the original email: > > 2. Nested offloaded regions inside 'omp declare targe

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/09/2016 06:56 AM, Alexander Monakov wrote: > On Thu, 8 Dec 2016, Jeff Law wrote: >>> PR fortran/78027 >>> >>> gcc/ >>> * ipa-icf.c (sem_function::parse): Don't process functions with >>> oacc decl attributes, as they may be OpenACC routines. >>> >>> gcc/testsuite/ >>>

Re: [PATCH] Fix PR78027

2016-12-09 Thread Alexander Monakov
On Thu, 8 Dec 2016, Jeff Law wrote: > > PR fortran/78027 > > > > gcc/ > > * ipa-icf.c (sem_function::parse): Don't process functions with > > oacc decl attributes, as they may be OpenACC routines. > > > > gcc/testsuite/ > > * c-c++-common/goacc/acc-icf.c: New test. > >

Re: [PATCH] Fix PR78027

2016-12-09 Thread Cesar Philippidis
On 12/08/2016 04:37 PM, Jeff Law wrote: > On 12/08/2016 04:05 PM, Cesar Philippidis wrote: >> PR78027 was classified as a fortran bug, but the underlying problem >> turned out to be more generic. Basically, the IPA-ICF pass usually >> ignores functions with omp decl attributes as candidates for ali

Re: [PATCH] Fix PR78027

2016-12-08 Thread Jeff Law
On 12/08/2016 04:05 PM, Cesar Philippidis wrote: PR78027 was classified as a fortran bug, but the underlying problem turned out to be more generic. Basically, the IPA-ICF pass usually ignores functions with omp decl attributes as candidates for aliasing. Usually that works for OpenACC, because of

Re: [PATCH] Fix PR78027

2016-12-08 Thread Steve Kargl
On Thu, Dec 08, 2016 at 03:05:10PM -0800, Cesar Philippidis wrote: > 2016-12-08 Cesar Philippidis > > PR fortran/78027 > > gcc/ > * ipa-icf.c (sem_function::parse): Don't process functions with > oacc decl attributes, as they may be OpenACC routines. > > gcc/tes

[PATCH] Fix PR78027

2016-12-08 Thread Cesar Philippidis
PR78027 was classified as a fortran bug, but the underlying problem turned out to be more generic. Basically, the IPA-ICF pass usually ignores functions with omp decl attributes as candidates for aliasing. Usually that works for OpenACC, because offloaded functions generated by OpenACC PARALLEL or