This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Cesar! Thank you for the update! On 05.10.2014 02:32, Cesar Philippidis wrote:
On 10/03/2014 07:34 AM, Cesar Philippidis wrote:On 09/24/2014 12:18 AM, Ilmir Usmanov wrote:Hi Cesar! Thank you for the patch! On 24.09.2014 02:29, Cesar Philippidis wrote:This patch adds support for the async clause in the wait directive in fortran. It should be pretty straight forward. The fortran FE already supports the wait directive, but the async clause was introduced to the wait directive in OpenACC 2.0 and that was missing in gomp-4_0-branch.Sorry for the delay. I encountered some problems with the runtime in our internal branch, and that slowed things down a bit. Anyway, you are correct, I broke the optional argument to wait in the previous patch. This new patch addresses that and it also make the wait construct conform with OpenACC 2.0. Specifically, !$acc wait (1, 2) async (3) should behave as ex[ected. If you look at gfc_trans_oacc_wait_directive, you'll note that a call to GOACC_wait is emitted for the wait directive. Since I had to add a runtime library stub for that builtin function, I decided to go ahead an include the c front end bits. Is this patch OK for gomp-4_0-branch? Julian is working on working on a more complete implementation of the runtime. The runtime stub that I included is only temporary.I noticed that I forgot to include the changes to gimplify.c in that patch. This new patch includes those changes. Cesar
As usual, I'll mostly focus on fortran part, since I don't know CFE and ME well enough.
Nevertheless, is there a reason to differ C from Fortran in behavior of matching int-expr-list? I mean, in C you support only integer literals as parameter of wait, but in Fortran you also cover parameters.
Anyway, Fortran part.
As you probably know, in Fortran one can define a function after whole program. So, since you are resolving wait-list during match, you don't cover this case. But async clause works fine.gfc_match_oacc_wait (void) + if (!gfc_resolve_expr (el->expr) + || el->expr->ts.type != BT_INTEGER || el->expr->rank != 0 + || el->expr->expr_type != EXPR_CONSTANT) + {+ gfc_error ("WAIT clause at %L requires a scalar INTEGER expression",+ &el->expr->where);
By the way, the same difference between wait and async presents in CFE. Otherwise, Fortran part looks good for me. -- Ilmir.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |