]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openmp: BUILT_IN_GOMP_ENABLE_PINNED_MODE
authorAndrew Stubbs <ams@codesourcery.com>
Wed, 30 Mar 2022 22:19:08 +0000 (23:19 +0100)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 30 Mar 2022 22:33:58 +0000 (23:33 +0100)
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.

gcc/ChangeLog.omp
gcc/omp-builtins.def
gcc/omp-low.c

index d44c3b5df7beba284415941d5d3ee012ef626cee..6dba86714285e91c52168fb17069cdb5607f98b9 100644 (file)
@@ -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
index c591d79fa076d4ea90d90c1807481c01292d953c..e442b0b5c94e3ab4c4d60150b9289b5ca3e36d23 100644 (file)
@@ -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)
index f7ecfb52c73d1449f34feb813af4be7f78434670..4e8ab9e4ca09240aeca214131f9e354b2c029972 100644 (file)
@@ -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;