This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4.1] Handle new form of #pragma omp declare target
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ilya Verbin <iverbin at gmail dot com>, James Norris <jnorris at codesourcery dot com>
- Date: Mon, 23 Nov 2015 12:40:59 +0100
- Subject: Re: [gomp4.1] Handle new form of #pragma omp declare target
- Authentication-results: sourceware.org; auth=none
- References: <20150717130559 dot GI1780 at tucnak dot redhat dot com> <8737vxrlyr dot fsf at kepler dot schwinge dot homeip dot net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 23, 2015 at 12:31:24PM +0100, Thomas Schwinge wrote:
> Hi Jakub!
>
> On Fri, 17 Jul 2015 15:05:59 +0200, Jakub Jelinek <jakub@redhat.com> wrote:
> > [...] "omp declare target link" [...]
>
> > This patch only marks them with the new attribute, [...]
>
> > --- gcc/c/c-parser.c.jj 2015-07-16 18:09:25.000000000 +0200
> > +++ gcc/c/c-parser.c 2015-07-17 14:11:08.553694975 +0200
>
> > static void
> > c_parser_omp_declare_target (c_parser *parser)
> > {
> > [...]
> > + for (tree c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
> > + {
> > + tree t = OMP_CLAUSE_DECL (c), id;
> > + tree at1 = lookup_attribute ("omp declare target", DECL_ATTRIBUTES (t));
> > + tree at2 = lookup_attribute ("omp declare target link",
> > + DECL_ATTRIBUTES (t));
> > + if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_LINK)
> > + {
> > + id = get_identifier ("omp declare target link");
> > + std::swap (at1, at2);
> > + }
> > + else
> > + id = get_identifier ("omp declare target");
>
> Is it intentional that you didn't add "omp declare target link" to
> gcc/c-family/c-common.c:c_common_attribute_table, next to the existing
> "omp declare target"?
No. But the link attribute support is still unfinished, Ilya is working on
the support.
Jakub