Message ID | 87siqml462.fsf@schwinge.name |
---|---|
State | New |
Headers | show |
Hi Thomas! On 13.03.2014 15:38, Thomas Schwinge wrote: > Hi Ilmir! > > On Thu, 13 Mar 2014 13:34:54 +0400, Ilmir Usmanov <i.usmanov@samsung.com> wrote: >> Committed as r208533. > Yay! \o/ Thanks! Yay indeed. And thanks a lot for your comments. > > The following change seems the right thing to do -- but why doesn't the > current code trigger a GCC ICE due to a failing subcode check? (At least > I thought you had test cases exercising the respective OpenACC vector > clauses?) Can you please check that? If it's just missing a test case, > feel free to commit that together with my patch. > Unfortunally, I can't check this using a test right now, since OpenACC loop directive is not implemented yet. > > The following cleanup should be fine to check in, or is there a reason > for using OMP_WAIT_EXPR instead of OMP_CLAUSE_WAIT_EXPR? No, there is no reason for using OMP_WAIT_EXPR. Thanks!
On 13.03.2014 16:19, Ilmir Usmanov wrote: > >> >> The following change seems the right thing to do -- but why doesn't the >> current code trigger a GCC ICE due to a failing subcode check? (At least >> I thought you had test cases exercising the respective OpenACC vector >> clauses?) Can you please check that? If it's just missing a test case, >> feel free to commit that together with my patch. >> > Unfortunally, I can't check this using a test right now, since OpenACC > loop directive is not implemented yet. > >> >> The following cleanup should be fine to check in, or is there a reason >> for using OMP_WAIT_EXPR instead of OMP_CLAUSE_WAIT_EXPR? > No, there is no reason for using OMP_WAIT_EXPR. Thanks! > Committed as r208541.
diff --git gcc/tree.h gcc/tree.h index bd70680..5ef2a0a 100644 --- gcc/tree.h +++ gcc/tree.h @@ -1323,7 +1323,7 @@ extern void protected_set_expr_location (tree, location_t); OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_WAIT), 0) #define OMP_CLAUSE_VECTOR_EXPR(NODE) \ OMP_CLAUSE_OPERAND ( \ - OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_VECTOR_LENGTH), 0) + OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_VECTOR), 0) #define OMP_CLAUSE_WORKER_EXPR(NODE) \ OMP_CLAUSE_OPERAND ( \ OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_WORKER), 0) The following cleanup should be fine to check in, or is there a reason for using OMP_WAIT_EXPR instead of OMP_CLAUSE_WAIT_EXPR? commit 7d69bdf8471e512791d4b7e0121efde7725a0cb9 Author: Thomas Schwinge <thomas@codesourcery.com> Date: Thu Mar 13 12:25:14 2014 +0100 Rename OMP_WAIT_EXPR to OMP_CLAUSE_WAIT_EXPR. gcc/ * tree.h (OMP_WAIT_EXPR): Rename to OMP_CLAUSE_WAIT_EXPR. Change all users. diff --git gcc/fortran/trans-openmp.c gcc/fortran/trans-openmp.c index a1abd66..29364f4 100644 --- gcc/fortran/trans-openmp.c +++ gcc/fortran/trans-openmp.c @@ -1191,7 +1191,7 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses, tree wait_var = gfc_convert_expr_to_tree (block, clauses->non_clause_wait_expr); c = build_omp_clause (where.lb->location, OMP_CLAUSE_WAIT); - OMP_WAIT_EXPR (c)= wait_var; + OMP_CLAUSE_WAIT_EXPR (c)= wait_var; omp_clauses = gfc_trans_add_clause (c, omp_clauses); } diff --git gcc/tree.h gcc/tree.h index fbac81b..bd70680 100644 --- gcc/tree.h +++ gcc/tree.h @@ -1318,7 +1318,7 @@ extern void protected_set_expr_location (tree, location_t); #define OMP_CLAUSE_ASYNC_EXPR(NODE) \ OMP_CLAUSE_OPERAND ( \ OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_ASYNC), 0) -#define OMP_WAIT_EXPR(NODE) \ +#define OMP_CLAUSE_WAIT_EXPR(NODE) \ OMP_CLAUSE_OPERAND ( \ OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_WAIT), 0) #define OMP_CLAUSE_VECTOR_EXPR(NODE) \
Hi Ilmir! On Thu, 13 Mar 2014 13:34:54 +0400, Ilmir Usmanov <i.usmanov@samsung.com> wrote: > Committed as r208533. Yay! \o/ Three minor things: Please move the entries from gcc/ChangeLog.gomp to the more specific gcc/[...]/ChangeLog.gomp files. Generally, we need to locate and then put ChangeLog snippets into the most specific ChangeLog file (so, for example, gcc/testsuite/ChangeLog for gcc/testsuite/gfortran.dg/goacc/assumed.f95), and as this is on the gomp-4_0-branch, then use (or create, if not yet present) the ChangeLog.gomp file instead of plain ChangeLog. The following change seems the right thing to do -- but why doesn't the current code trigger a GCC ICE due to a failing subcode check? (At least I thought you had test cases exercising the respective OpenACC vector clauses?) Can you please check that? If it's just missing a test case, feel free to commit that together with my patch. commit ee65334ec81b092111e9b2b34a0ee3ceb933b643 Author: Thomas Schwinge <thomas@codesourcery.com> Date: Thu Mar 13 12:26:47 2014 +0100 Fix OMP_CLAUSE_VECTOR_EXPR subcode check. gcc/ * tree.h (OMP_CLAUSE_VECTOR_EXPR): Check for OMP_CLAUSE_VECTOR instead of OMP_CLAUSE_VECTOR_LENGTH. Grüße, Thomas