From: Jakub Jelinek Date: Fri, 1 Dec 2017 08:20:41 +0000 (+0100) Subject: function.h (struct function): Remove cilk_frame_decl, is_cilk_function and calls_cilk... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e76c715735e2472429ef7927137a57edc69f98b3;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21a7cf6a396..09fd188aecf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 2017-12-01 Jakub Jelinek + * 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. + PR tree-optimization/83233 * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use bswap_stat name for the struct. diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e26b31f6179..8b619adaada 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2017-12-01 Jakub Jelinek + + * 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 * c-common.h (inv_list): Remove. diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index bb75cba4c39..cff5b44e26a 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 % and % 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 % and % 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 { diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 1c952eb5094..4d74fb9f9b6 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -823,9 +823,6 @@ struct GTY(()) cgraph_simd_clone { otherwise false. */ unsigned int inbranch : 1; - /* True if this is a Cilk Plus variant. */ - unsigned int cilk_elemental : 1; - /* Doubly linked list of SIMD clones. */ cgraph_node *prev_clone, *next_clone; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9f9db38c4b8..57c09c43ec9 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -49290,12 +49290,7 @@ ix86_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, return 0; } - if (clonei->cilk_elemental) - { - /* Parse here processor clause. If not present, default to 'b'. */ - clonei->vecsize_mangle = 'b'; - } - else if (!TREE_PUBLIC (node->decl)) + if (!TREE_PUBLIC (node->decl)) { /* If the function isn't exported, we can pick up just one ISA for the clones. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 31b69bf7255..71f6f3a3ca3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ 2017-12-01 Jakub Jelinek + * 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. + PR c/79153 * cp-gimplify.c (genericize_switch_stmt): Emit LABEL_EXPR for the break label into SWITCH_BODY instead of after it and set diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4780df4dbf6..e77241f3d97 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -7402,9 +7402,6 @@ extern vec cx_error_context (void); extern tree fold_sizeof_expr (tree); extern void clear_cv_and_fold_caches (void); -/* In c-family/cilk.c */ -extern bool cilk_valid_spawn (tree); - /* In cp-ubsan.c */ extern void cp_ubsan_maybe_instrument_member_call (tree); extern void cp_ubsan_instrument_member_accesses (tree *); diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 707c6f55605..b469d1c1760 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3915,7 +3915,6 @@ cp_parser_new (void) /* Special parsing data structures. */ parser->omp_declare_simd = NULL; - parser->cilk_simd_fn_info = NULL; parser->oacc_routine = NULL; /* Not declaring an implicit function template. */ @@ -20675,8 +20674,7 @@ parsing_nsdmi (void) Returns the type indicated by the type-id. In addition to this, parse any queued up #pragma omp declare simd - clauses, Cilk Plus SIMD-enabled functions' vector attributes, and - #pragma acc routine clauses. + clauses, and #pragma acc routine clauses. QUALS is either a bitmask of cv_qualifiers or -1 for a non-member function. */ @@ -34536,8 +34534,7 @@ cp_parser_omp_for_incr (cp_parser *parser, tree decl) return build2 (MODIFY_EXPR, TREE_TYPE (decl), decl, rhs); } -/* Parse the initialization statement of either an OpenMP for loop or - a Cilk Plus for loop. +/* Parse the initialization statement of an OpenMP for loop. Return true if the resulting construct should have an OMP_CLAUSE_PRIVATE added to it. */ diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h index 872842a6565..ec97a7d3426 100644 --- a/gcc/cp/parser.h +++ b/gcc/cp/parser.h @@ -199,8 +199,7 @@ struct GTY (()) cp_parser_context { }; -/* Helper data structure for parsing #pragma omp declare simd, and Cilk Plus - SIMD-enabled functions' vector attribute. */ +/* Helper data structure for parsing #pragma omp declare simd. */ struct cp_omp_declare_simd_data { bool error_seen; /* Set if error has been reported. */ bool fndecl_seen; /* Set if one fn decl/definition has been seen already. */ @@ -369,10 +368,6 @@ struct GTY(()) cp_parser { helper data structure. */ cp_omp_declare_simd_data * GTY((skip)) omp_declare_simd; - /* When parsing Cilk Plus SIMD-enabled functions' vector attributes, - this is a pointer to a helper data structure. */ - cp_omp_declare_simd_data * GTY((skip)) cilk_simd_fn_info; - /* When parsing #pragma acc routine, this is a pointer to a helper data structure. */ cp_oacc_routine_data * GTY((skip)) oacc_routine; diff --git a/gcc/function.h b/gcc/function.h index 32c9893cd59..971ab667e1a 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -262,9 +262,6 @@ struct GTY(()) function { /* Vector of function local variables, functions, types and constants. */ vec *local_decls; - /* In a Cilk function, the VAR_DECL for the frame descriptor. */ - tree cilk_frame_decl; - /* For md files. */ /* tm.h can use this to store whatever it likes. */ @@ -323,12 +320,6 @@ struct GTY(()) function { either as a subroutine or builtin. */ unsigned int calls_alloca : 1; - /* This will indicate whether a function is a cilk function */ - unsigned int is_cilk_function : 1; - - /* Nonzero if this is a Cilk function that spawns. */ - unsigned int calls_cilk_spawn : 1; - /* Nonzero if function being compiled receives nonlocal gotos from nested functions. */ unsigned int has_nonlocal_label : 1; diff --git a/gcc/omp-simd-clone.c b/gcc/omp-simd-clone.c index 432c77d124f..f6a7a270d49 100644 --- a/gcc/omp-simd-clone.c +++ b/gcc/omp-simd-clone.c @@ -116,7 +116,6 @@ simd_clone_clauses_extract (struct cgraph_node *node, tree clauses, clone which will require a mask argument. */ struct cgraph_simd_clone *clone_info = simd_clone_struct_alloc (n + 1); clone_info->nargs = n; - clone_info->cilk_elemental = false; if (!clauses) goto out; diff --git a/gcc/target.def b/gcc/target.def index 81aedee80d9..b9b45991000 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -1637,7 +1637,7 @@ void, (rtx_insn *insn, int max_pri, int *fusion_pri, int *pri), NULL) HOOK_VECTOR_END (sched) -/* Functions relating to OpenMP and Cilk Plus SIMD clones. */ +/* Functions relating to OpenMP SIMD and __attribute__((simd)) clones. */ #undef HOOK_PREFIX #define HOOK_PREFIX "TARGET_SIMD_CLONE_" HOOK_VECTOR (TARGET_SIMD_CLONE, simd_clone) diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index ffb8333a7dd..257a6101ad6 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -149,10 +149,6 @@ struct copy_body_data when inlining a call within an OpenMP SIMD-on-SIMT loop. */ vec *dst_simt_vars; - /* Cilk keywords currently need to replace some variables that - ordinary nested functions do not. */ - bool remap_var_for_cilk; - /* Do not create new declarations when within type remapping. */ bool prevent_decl_creation_for_types; };