summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2022-03-30 23:19:08 +0100
committerAndrew Stubbs <ams@codesourcery.com>2022-03-30 23:33:58 +0100
commitfe9d2322f3b204ff4a1c517ca14a3b8c81cf943a (patch)
tree9c06b72039132fd9983929a02cd80b0c2e529023
parent87900a2d64bd8590c2760132e6b45bdc3ee185d0 (diff)
openmp: BUILT_IN_GOMP_ENABLE_PINNED_MODE
Rework the GOMP_enable_pinned_mode call so that it works on powerpc where the old way gave a local call. gcc/ChangeLog: * omp-builtins.def (BUILT_IN_GOMP_ENABLE_PINNED_MODE): New. * omp-low.c (omp_enable_pinned_mode): Use BUILT_IN_GOMP_ENABLE_PINNED_MODE.
-rw-r--r--gcc/ChangeLog.omp6
-rw-r--r--gcc/omp-builtins.def3
-rw-r--r--gcc/omp-low.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index d44c3b5df7b..6dba8671428 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,9 @@
+2022-03-30 Andrew Stubbs <ams@codesourcery.com>
+
+ * omp-builtins.def (BUILT_IN_GOMP_ENABLE_PINNED_MODE): New.
+ * omp-low.c (omp_enable_pinned_mode): Use
+ BUILT_IN_GOMP_ENABLE_PINNED_MODE.
+
2022-03-11 Andrew Stubbs <ams@codesourcery.com>
Backport of the patch posted at
diff --git a/gcc/omp-builtins.def b/gcc/omp-builtins.def
index c591d79fa07..e442b0b5c94 100644
--- a/gcc/omp-builtins.def
+++ b/gcc/omp-builtins.def
@@ -468,3 +468,6 @@ DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ERROR, "GOMP_error",
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_EVALUATE_TARGET_DEVICE, "GOMP_evaluate_target_device",
BT_FN_BOOL_INT_CONST_PTR_CONST_PTR_CONST_PTR,
ATTR_NOTHROW_LEAF_LIST)
+DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ENABLE_PINNED_MODE,
+ "GOMP_enable_pinned_mode",
+ BT_FN_VOID, ATTR_NOTHROW_LIST)
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index f7ecfb52c73..4e8ab9e4ca0 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -15432,9 +15432,7 @@ omp_enable_pinned_mode ()
push_struct_function (decl);
init_tree_ssa (cfun);
- tree callname = get_identifier ("GOMP_enable_pinned_mode");
- tree calldecl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL, callname,
- voidfntype);
+ tree calldecl = builtin_decl_explicit (BUILT_IN_GOMP_ENABLE_PINNED_MODE);
gcall *call = gimple_build_call (calldecl, 0);
gimple_seq seq = NULL;