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]

Re: PING: Fwd: Re: [patch] implement Cilk Plus simd loops on trunk


On 11/14/13 11:01, Jakub Jelinek wrote:
On Thu, Nov 14, 2013 at 10:39:02AM -0700, Aldy Hernandez wrote:
On 11/14/13 10:05, Jakub Jelinek wrote:

[Balaji, see below for question.]

On Thu, Nov 14, 2013 at 09:49:41AM -0700, Aldy Hernandez wrote:
+    case OMP_PARALLEL:
+    case OMP_TASK:
+    case OMP_FOR:
+    case OMP_SIMD:
+    case OMP_SECTIONS:
+    case OMP_SINGLE:
+    case OMP_SECTION:
+    case OMP_MASTER:
+    case OMP_ORDERED:
+    case OMP_CRITICAL:
+    case OMP_ATOMIC:
+    case OMP_ATOMIC_READ:
+    case OMP_ATOMIC_CAPTURE_OLD:
+    case OMP_ATOMIC_CAPTURE_NEW:

This is only a subset of OpenMP statements.
You are missing OMP_DISTRIBUTE, OMP_TARGET, OMP_TARGET_DATA, OMP_TEAMS,
OMP_TARGET_UPDATE, OMP_TASKGROUP.
Also, CALL_EXPRs to
           case BUILT_IN_GOMP_BARRIER:
           case BUILT_IN_GOMP_CANCEL:
           case BUILT_IN_GOMP_CANCELLATION_POINT:
           case BUILT_IN_GOMP_TASKYIELD:
           case BUILT_IN_GOMP_TASKWAIT:
are OpenMP statements.  For OpenMP we diagnose this later on, in
check_omp_nesting_restrictions in omp-low.c, wouldn't it be better to
handle it there too?

Woah, indeed.  I removed all of this section in favor of the error
in check_omp_nesting_restriction, and adjusted the testcase error
accordingly.

Well, if you don't change anything in omp-low.c, then it wouldn't diagnose
setjmp call in #pragma simd, but given that also the OpenMP 4.0 spec
requires that #pragma omp simd doesn't contain calls to setjmp or longjmp
(ditto for #pragma omp declare simd functions), then scan_omp_1_stmt
should be changed to also call check_omp_nesting_restrictions for
setjmp/longjmp calls (the GIMPLE_CALL case then in
check_omp_nesting_restrictions can't assume all calls it sees are
BUILT_IN_NORMAL).

Fixed in scan_omp_1_stmt.

Perhaps some bool is_cilkplus = false argument to
cp_parser_omp_clause_reduction would work for me (and for C too).

Ok, I'm at a loss here, what parts of cp_parser_omp_clause_reduction are the user-defined reductions? I'm an OpenMP weenie.

How does this look?

Attachment: curr
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]