Hello Aldy, I have moved a couple prototypes from c-tree.h to c-family/c-common.h. This way I can use the same function for the C++ implementation. Here is a patch.
Thanks, Balaji V. Iyer. > -----Original Message----- > From: Aldy Hernandez [mailto:al...@redhat.com] > Sent: Monday, May 13, 2013 8:17 PM > To: gcc-patches; Jakub Jelinek > Cc: Iyer, Balaji V > Subject: [gomp4/cilkplus] C parsing for Cilk Plus <#pragma simd> > > Hi Jakub. Hi folks. > > Attached is a patch against the gomp4 branch implementing Cilk's <#pragma > simd> construct with the gomp4 infrastructure. I emit OMP_SIMD as previously > mentioned, and let omp-low.c do the rest. > > The reason for this, is that Cilk Plus and OMP4 behave pretty much the same > way, so there's no need to implement differing trees. If in the future they > diverge too much, I guess we could add different tree family opcodes for Cilk > Plus and gimplify them to a common representation. For now, they're pretty > much identical. > > I am working on a private branch in aldyh/cilk-in-gomp, but I thought I'd post > what I've done so far, since it's pretty much complete, and Balaji is about to > start the C++ parsing bits based on this work. > > Let me know if you see anything obviously wrong, or would like things in any > way different. > > Aldy
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 78ace77..c96c6f1 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -521,6 +521,11 @@ struct GTY(()) c_language_function { #define building_stmt_list_p() (stmt_list_stack && !stmt_list_stack->is_empty()) +/* In c-cilkplus.c */ +extern tree c_finish_cilk_simd_loop (location_t, tree, tree, tree, tree, + tree, tree); +extern tree c_finish_cilk_clauses (tree); + /* Language-specific hooks. */ /* If non-NULL, this function is called after a precompile header file diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 84471db..356bd6c 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -647,10 +647,6 @@ extern tree c_build_va_arg (location_t, tree, tree); extern tree c_finish_transaction (location_t, tree, int); extern bool c_tree_equal (tree, tree); -/* In c-cilkplus.c */ -extern tree c_finish_cilk_simd_loop (location_t, tree, tree, tree, tree, - tree, tree); -extern tree c_finish_cilk_clauses (tree); /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */