[ was: Re: [gomp4, committed] Revert "Add IFN_GOACC_DATA_END_WITH_ARG" ]
On 06/11/15 13:03, Tom de Vries wrote:
Now that we've got -foffload-alias, we're no longer concerned about GOACC builtins being alias analysis optimization barriers, so the IFN_GOACC_DATA_END_WITH_ARG patch has become obsolete.
Likewse, DEF_GOACC_BUILTIN_FNSPEC has become obsolete. This patch removes DEF_GOACC_BUILTIN_FNSPEC and associated code. Committed to gomp-4_0-branch. Thanks, - Tom
Remove DEF_GOACC_BUILTIN_FNSPEC 2015-11-06 Tom de Vries <t...@codesourcery.com> * builtins.def (DEF_GOACC_BUILTIN_FNSPEC): Remove #undef and #define. * omp-builtins.def: Remove DEF_GOACC_BUILTIN_FNSPEC. * f95-lang.c (gfc_init_builtin_functions): Remove. (DEF_GOACC_BUILTIN_FNSPEC): Remove #undef and #define. --- gcc/builtins.def | 7 ------- gcc/fortran/f95-lang.c | 32 -------------------------------- gcc/omp-builtins.def | 24 ++++++++++-------------- 3 files changed, 10 insertions(+), 53 deletions(-) diff --git a/gcc/builtins.def b/gcc/builtins.def index d60b037..886b45c 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -174,13 +174,6 @@ along with GCC; see the file COPYING3. If not see false, true, true, ATTRS, false, \ (flag_openacc \ || flag_offload_abi != OFFLOAD_ABI_UNSET)) -/* Like DEF_GOACC_BUILTIN, but with an fn spec attribute. - KLUDGE: The ATTRS field needs to be a combination of ATTRS2 and FNSPEC. - In this file, we use the ATTRS field, and in gcc/fortran/f95-lang.c, we use - ATTRS2 and FNSPEC instead. */ -#undef DEF_GOACC_BUILTIN_FNSPEC -#define DEF_GOACC_BUILTIN_FNSPEC(ENUM, NAME, TYPE, ATTRS, ATTRS2, FNSPEC) \ - DEF_GOACC_BUILTIN(ENUM, NAME, TYPE, ATTRS) #undef DEF_GOACC_BUILTIN_COMPILER #define DEF_GOACC_BUILTIN_COMPILER(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 56a30ca..a63ebb3 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -563,27 +563,6 @@ gfc_define_builtin (const char *name, tree type, enum built_in_function code, set_builtin_decl (code, decl, true); } -/* Like gfc_define_builtin, but with fn spec attribute FNSPEC. */ - -static void ATTRIBUTE_UNUSED -gfc_define_builtin_with_spec (const char *name, tree fntype, - enum built_in_function code, - const char *library_name, int attr, - const char *fnspec) -{ - if (fnspec) - { - /* Code copied from build_library_function_decl_1. */ - tree attr_args = build_tree_list (NULL_TREE, - build_string (strlen (fnspec), fnspec)); - tree attrs = tree_cons (get_identifier ("fn spec"), - attr_args, TYPE_ATTRIBUTES (fntype)); - fntype = build_type_attribute_variant (fntype, attrs); - } - - gfc_define_builtin (name, fntype, code, library_name, attr); -} - #define DO_DEFINE_MATH_BUILTIN(code, name, argtype, tbase) \ gfc_define_builtin ("__builtin_" name "l", tbase##longdouble[argtype], \ BUILT_IN_ ## code ## L, name "l", \ @@ -1236,12 +1215,6 @@ gfc_init_builtin_functions (void) #define DEF_GOACC_BUILTIN(code, name, type, attr) \ gfc_define_builtin ("__builtin_" name, builtin_types[type], \ code, name, attr); -/* Like DEF_GOACC_BUILTIN, but with an fn spec attribute. - KLUDGE: See gcc/builtins.def DEF_GOACC_BUILTIN_FNSPEC comment. */ -#undef DEF_GOACC_BUILTIN_FNSPEC -#define DEF_GOACC_BUILTIN_FNSPEC(code, name, type, attr, attr2, fnspec) \ - gfc_define_builtin_with_spec ("__builtin_" name, builtin_types[type], \ - code, name, attr2, fnspec); #undef DEF_GOACC_BUILTIN_COMPILER #define DEF_GOACC_BUILTIN_COMPILER(code, name, type, attr) \ gfc_define_builtin (name, builtin_types[type], code, name, attr); @@ -1249,7 +1222,6 @@ gfc_init_builtin_functions (void) #define DEF_GOMP_BUILTIN(code, name, type, attr) /* ignore */ #include "../omp-builtins.def" #undef DEF_GOACC_BUILTIN -#undef DEF_GOACC_BUILTIN_FNSPEC #undef DEF_GOACC_BUILTIN_COMPILER #undef DEF_GOMP_BUILTIN } @@ -1258,9 +1230,6 @@ gfc_init_builtin_functions (void) { #undef DEF_GOACC_BUILTIN #define DEF_GOACC_BUILTIN(code, name, type, attr) /* ignore */ -#undef DEF_GOACC_BUILTIN_FNSPEC -#define DEF_GOACC_BUILTIN_FNSPEC(code, name, type, attr, attr2, fnspec) \ - /* Ignore. */ #undef DEF_GOACC_BUILTIN_COMPILER #define DEF_GOACC_BUILTIN_COMPILER(code, name, type, attr) /* ignore */ #undef DEF_GOMP_BUILTIN @@ -1269,7 +1238,6 @@ gfc_init_builtin_functions (void) code, name, attr); #include "../omp-builtins.def" #undef DEF_GOACC_BUILTIN -#undef DEF_GOACC_BUILTIN_FNSPEC #undef DEF_GOACC_BUILTIN_COMPILER #undef DEF_GOMP_BUILTIN } diff --git a/gcc/omp-builtins.def b/gcc/omp-builtins.def index 6908f94..1504a48 100644 --- a/gcc/omp-builtins.def +++ b/gcc/omp-builtins.def @@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see /* Before including this file, you should define a macro: DEF_GOACC_BUILTIN (ENUM, NAME, TYPE, ATTRS) - DEF_GOACC_BUILTIN_FNSPEC (ENUM, NAME, TYPE, ATTRS, ATTRS2, FNSPEC) DEF_GOACC_BUILTIN_COMPILER (ENUM, NAME, TYPE, ATTRS) DEF_GOMP_BUILTIN (ENUM, NAME, TYPE, ATTRS) @@ -32,24 +31,21 @@ along with GCC; see the file COPYING3. If not see DEF_GOACC_BUILTIN (BUILT_IN_ACC_GET_DEVICE_TYPE, "acc_get_device_type", BT_FN_INT, ATTR_NOTHROW_LIST) -DEF_GOACC_BUILTIN_FNSPEC (BUILT_IN_GOACC_DATA_START, "GOACC_data_start", - BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, - ATTR_FNSPEC_DOT_DOT_DOT_r_r_r_NOTHROW_LIST, - ATTR_NOTHROW_LIST, "...rrr") +DEF_GOACC_BUILTIN (BUILT_IN_GOACC_DATA_START, "GOACC_data_start", + BT_FN_VOID_INT_SIZE_PTR_PTR_PTR, + ATTR_NOTHROW_LIST) DEF_GOACC_BUILTIN (BUILT_IN_GOACC_DATA_END, "GOACC_data_end", BT_FN_VOID, ATTR_NOTHROW_LIST) -DEF_GOACC_BUILTIN_FNSPEC (BUILT_IN_GOACC_ENTER_EXIT_DATA, - "GOACC_enter_exit_data", - BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR, - ATTR_FNSPEC_DOT_DOT_DOT_r_r_r_NOTHROW_LIST, - ATTR_NOTHROW_LIST, "...rrr") +DEF_GOACC_BUILTIN (BUILT_IN_GOACC_ENTER_EXIT_DATA, + "GOACC_enter_exit_data", + BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR, + ATTR_NOTHROW_LIST) DEF_GOACC_BUILTIN (BUILT_IN_GOACC_PARALLEL, "GOACC_parallel_keyed", BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR, ATTR_NOTHROW_LIST) -DEF_GOACC_BUILTIN_FNSPEC (BUILT_IN_GOACC_UPDATE, "GOACC_update", - BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR, - ATTR_FNSPEC_DOT_DOT_DOT_r_r_r_NOTHROW_LIST, - ATTR_NOTHROW_LIST, "...rrr") +DEF_GOACC_BUILTIN (BUILT_IN_GOACC_UPDATE, "GOACC_update", + BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR, + ATTR_NOTHROW_LIST) DEF_GOACC_BUILTIN (BUILT_IN_GOACC_WAIT, "GOACC_wait", BT_FN_VOID_INT_INT_VAR, ATTR_NOTHROW_LIST) -- 1.9.1