2017-12-01 Jakub Jelinek <jakub@redhat.com>
+ * 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.
+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.
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,
{
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
{
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;
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. */
2017-12-01 Jakub Jelinek <jakub@redhat.com>
+ * 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
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 *);
/* 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. */
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. */
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. */
};
-/* 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. */
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;
/* Vector of function local variables, functions, types and constants. */
vec<tree, va_gc> *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. */
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;
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;
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)
when inlining a call within an OpenMP SIMD-on-SIMT loop. */
vec<tree> *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;
};