diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-12-01 09:20:41 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-12-01 09:20:41 +0100 |
commit | e76c715735e2472429ef7927137a57edc69f98b3 (patch) | |
tree | 165ae147d8776f10fdfe2abc6df4c7b5be2a73ef /gcc/c-family | |
parent | bebadeca367500cf692d550ff0b464ff732ee808 (diff) | |
download | gcc-e76c715735e2472429ef7927137a57edc69f98b3.zip gcc-e76c715735e2472429ef7927137a57edc69f98b3.tar.gz gcc-e76c715735e2472429ef7927137a57edc69f98b3.tar.bz2 |
function.h (struct function): Remove cilk_frame_decl, is_cilk_function and calls_cilk_spawn fields.
* function.h (struct function): Remove cilk_frame_decl,
is_cilk_function and calls_cilk_spawn fields.
* tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
field.
* omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
cilk_elemental field.
* cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
* target.def: Adjust comment.
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
Don't test cilk_elemental.
c-family/
* c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
attribute.
(handle_simd_attribute): Don't check for "cilk simd function"
attribute. Reindent, formatting changes.
cp/
* parser.c (cp_parser_new): Don't clear cilk_simd_fn_info.
(parsing_nsdmi): Adjust comment.
(cp_parser_omp_for_loop_init): Likewise.
* parser.h (struct cp_omp_declare_simd_data): Adjust comment.
(struct cp_parser): Remove cilk_simd_fn_info field.
* cp-tree.h (cilk_valid_spawn): Remove.
From-SVN: r255300
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-family/c-attribs.c | 67 |
2 files changed, 33 insertions, 41 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e26b31f..8b619ad 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2017-12-01 Jakub Jelinek <jakub@redhat.com> + + * c-attribs.c (c_common_attribute_table): Remove "cilk simd function" + attribute. + (handle_simd_attribute): Don't check for "cilk simd function" + attribute. Reindent, formatting changes. + 2017-11-30 Julia Koval <julia.koval@intel.com> * c-common.h (inv_list): Remove. diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index bb75cba..cff5b44 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -343,8 +343,6 @@ const struct attribute_spec c_common_attribute_table[] = handle_returns_nonnull_attribute, false }, { "omp declare simd", 0, -1, true, false, false, handle_omp_declare_simd_attribute, false }, - { "cilk simd function", 0, -1, true, false, false, - handle_omp_declare_simd_attribute, false }, { "simd", 0, 1, true, false, false, handle_simd_attribute, false }, { "omp declare target", 0, 0, true, false, false, @@ -2435,50 +2433,37 @@ handle_simd_attribute (tree *node, tree name, tree args, int, bool *no_add_attrs { if (TREE_CODE (*node) == FUNCTION_DECL) { - if (lookup_attribute ("cilk simd function", - DECL_ATTRIBUTES (*node)) != NULL) - { - error_at (DECL_SOURCE_LOCATION (*node), - "%<__simd__%> attribute cannot be used in the same " - "function marked as a Cilk Plus SIMD-enabled function"); - *no_add_attrs = true; - } - else + tree t = get_identifier ("omp declare simd"); + tree attr = NULL_TREE; + if (args) { - tree t = get_identifier ("omp declare simd"); - tree attr = NULL_TREE; - if (args) + tree id = TREE_VALUE (args); + + if (TREE_CODE (id) != STRING_CST) { - tree id = TREE_VALUE (args); - - if (TREE_CODE (id) != STRING_CST) - { - error ("attribute %qE argument not a string", name); - *no_add_attrs = true; - return NULL_TREE; - } - - if (strcmp (TREE_STRING_POINTER (id), "notinbranch") == 0) - attr = build_omp_clause (DECL_SOURCE_LOCATION (*node), - OMP_CLAUSE_NOTINBRANCH); - else - if (strcmp (TREE_STRING_POINTER (id), "inbranch") == 0) - attr = build_omp_clause (DECL_SOURCE_LOCATION (*node), - OMP_CLAUSE_INBRANCH); - else - { - error ("only %<inbranch%> and %<notinbranch%> flags are " - "allowed for %<__simd__%> attribute"); - *no_add_attrs = true; - return NULL_TREE; - } + error ("attribute %qE argument not a string", name); + *no_add_attrs = true; + return NULL_TREE; } - DECL_ATTRIBUTES (*node) = tree_cons (t, - build_tree_list (NULL_TREE, - attr), - DECL_ATTRIBUTES (*node)); + if (strcmp (TREE_STRING_POINTER (id), "notinbranch") == 0) + attr = build_omp_clause (DECL_SOURCE_LOCATION (*node), + OMP_CLAUSE_NOTINBRANCH); + else if (strcmp (TREE_STRING_POINTER (id), "inbranch") == 0) + attr = build_omp_clause (DECL_SOURCE_LOCATION (*node), + OMP_CLAUSE_INBRANCH); + else + { + error ("only %<inbranch%> and %<notinbranch%> flags are " + "allowed for %<__simd__%> attribute"); + *no_add_attrs = true; + return NULL_TREE; + } } + + DECL_ATTRIBUTES (*node) + = tree_cons (t, build_tree_list (NULL_TREE, attr), + DECL_ATTRIBUTES (*node)); } else { |