This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Chung-Lin Tang <cltang at codesourcery dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Dec 2015 11:11:37 +0100
- Subject: Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT
- Authentication-results: sourceware.org; auth=none
- References: <56531154 dot 9080606 at codesourcery dot com> <87io4flxt8 dot fsf at kepler dot schwinge dot homeip dot net> <87bna7lxg9 dot fsf at kepler dot schwinge dot homeip dot net> <566013F0 dot 1060002 at codesourcery dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Dec 03, 2015 at 06:05:36PM +0800, Chung-Lin Tang wrote:
> > Oh wait, it looks like the C++ front end is not actually using the
> > functions defined in the C/C++-shared gcc/c-family/c-omp.c, but has its
> > own implementations in gcc/cp/semantics.c, without "c_" prefixes? In
> > addition to finish_expr_stmt calls, I see it's also using
> > finish_call_expr instead of build_call_expr_loc/build_call_expr_loc_vec.
> > So I guess we'll want to model this the same way for OpenACC support
> > functions, and then (later) we should clean this up, to move the
> > C-specific code from gcc/c-family/c-omp.c into the C front end? (Jakub?)
>
> I see most OpenACC/OpenMP constructs are represented by special statement codes,
> so they should be a different case. I so far only see the OpenACC wait directive
> being represented as a CALL_EXPR (maybe there are others, haven't exhaustively searched).
No, Thomas is right, just look at
finish_omp_{barrier,flush,taskwait,taskyield,cancel,cancellation_point},
all those are represented as CALL_EXPRs.
Jakub