summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-18 19:00:21 +0000
committerbviyer <bviyer@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-18 19:00:21 +0000
commit74acc7033622011364c71b05078fa77399065913 (patch)
treeba7d0bcea3d0e1e595579b1bf0fa901020c0989d /gcc/omp-low.c
parent4cca655bbb846bb4395a7e3f5a0631e22881d1dc (diff)
downloadgcc-74acc7033622011364c71b05078fa77399065913.tar.gz
Added support for Cilk Plus SIMD-enabled function for C.
+++ gcc/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * omp-low.c (simd_clone_clauses_extract): Replaced the string + "cilk simd elemental" with "cilk simd function." + * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen): + Removed a carriage-return from a warning string. + +++ gcc/c-family/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-common.c (c_common_attribute_table): Added "cilk simd function" + attribute. + * c-pragma.h (enum pragma_cilk_clause): Remove. + (enum pragma_omp_clause): Added the following fields: + PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK, + PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE, + PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE, + PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE, + PRAGMA_CILK_CLAUSE_UNIFORM. + + +++ gcc/c/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field. + (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens + field in parser is not empty. If not-empty, call the function + c_parser_finish_omp_declare_simd. + (c_parser_cilk_clause_vectorlength): Modified function to be shared + between SIMD-enabled functions and #pragma simd. Added new parameter. + (c_parser_cilk_all_clauses): Modified the usage of the function + c_parser_cilk_clause_vectorlength as mentioned above. + (c_parser_cilk_simd_fn_vector_attrs): New function. + (c_finish_cilk_simd_fn_tokens): Likewise. + (is_cilkplus_vector_p): Likewise. + (c_parser_omp_clause_name): Added checking for "vectorlength," + "nomask," and "mask" strings in clause name. + (c_parser_omp_all_clauses): Added 3 new case statements: + PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and + PRAGMA_CILK_CLAUSE_NOMASK. + (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a + check for vector attribute and if so call the function + c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled, + called the function c_finish_cilk_simd_fn_tokens. + (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in + parser field is non-empty. If so, parse them as you would parse + the omp declare simd pragma. + (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn. + Added a check when step is a parameter and flag it as error. + (CILK_SIMD_FN_CLAUSE_MASK): New #define. + (c_parser_cilk_clause_name): Changed pragma_cilk_clause to + pragma_omp_clause. + +++ gcc/testsuite/ChangeLog +2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * c-c++-common/cilk-plus/SE/ef_test.c: New test. + * c-c++-common/cilk-plus/SE/ef_test2.c: Likewise. + * c-c++-common/cilk-plus/SE/vlength_errors.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error2.c: Likewise. + * c-c++-common/cilk-plus/SE/ef_error3.c: Likewise. + * gcc.dg/cilk-plus/cilk-plus.exp: Added calls for the above tests. + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206095 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 2398a96c0ea..aacee3872b2 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -10688,7 +10688,7 @@ simd_clone_clauses_extract (struct cgraph_node *node, tree clauses,
declare simd". */
bool cilk_clone
= (flag_enable_cilkplus
- && lookup_attribute ("cilk plus elemental",
+ && lookup_attribute ("cilk simd function",
DECL_ATTRIBUTES (node->decl)));
/* Allocate one more than needed just in case this is an in-branch