Patchwork [gomp4] Some libgomp changes

login
register
mail settings
Submitter Jakub Jelinek
Date April 10, 2013, 11:24 a.m.
Message ID <20130410112401.GD16463@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/235371/
State New
Headers show

Comments

Jakub Jelinek - April 10, 2013, 11:24 a.m.
Hi!

I've committed the following set of changes to gomp-4_0-branch after
regtesting.  This adds (so far dummy) exports for the new OpenMP 4.0
library functions, and planned entry points for #pragma omp cancel*,
plus, as discussed with Richard privately also new GOMP_parallel* entry
points, because we need to change them anyway to pass in some flags
(right now just proc_bind clause values).  The API of those also changes,
before we used to emit
GOMP_parallel_start (somefn, &data, num_threads);
somefn (&data);
GOMP_parallel_end ();
but the new API will be just
GOMP_parallel (somefn, &data, num_threads, flags);
and the function will take care of calling somefn also in the initial
thread, not just in the other threads.  The advantage of that is that
we can eventually make a transparent unwind info for that with some
DWARF unwind info proglet, so that e.g. backtraces could be nicer.

No compiler changes for now, those will come up later.

2013-04-10  Jakub Jelinek  <jakub@redhat.com>

	* libgomp.map (omp_get_cancellation, omp_get_cancellation_,
	omp_get_proc_bind, omp_get_proc_bind_, omp_set_default_device,
	omp_set_default_device_, omp_set_default_device_8_,
	omp_get_default_device, omp_get_default_device_,
	omp_get_num_devices, omp_get_num_devices_, omp_get_num_teams,
	omp_get_num_teams_, omp_get_team_num, omp_get_team_num_): Export
	@@OMP_4.0.
	(GOMP_cancel, GOMP_cancellation_point, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime,
	GOMP_parallel_loop_static, GOMP_parallel_sections, GOMP_parallel,
	GOMP_taskgroup_start, GOMP_taskgroup_end): Export @@GOMP_4.0.
	* parallel.c (GOMP_parallel_end): Add ialias.
	(GOMP_parallel, GOMP_cancel, GOMP_cancellation_point): New
	functions.
	* omp.h.in (omp_proc_bind_t): New typedef.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num): New prototypes.
	* env.c (omp_get_cancellation, omp_get_proc_bind,
	omp_set_default_device, omp_get_default_device, omp_get_num_devices,
	omp_get_num_teams, omp_get_team_num): New functions.
	* fortran.c (ULP, STR1, STR2, ialias_redirect): Removed.
	(omp_get_cancellation_, omp_get_proc_bind_, omp_set_default_device_,
	omp_set_default_device_8_, omp_get_default_device_,
	omp_get_num_devices_, omp_get_num_teams_, omp_get_team_num_): New
	functions.
	* libgomp.h (ialias_ulp, ialias_str1, ialias_str2, ialias_redirect,
	ialias_call): Define.
	* libgomp_g.h (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime, GOMP_parallel,
	GOMP_cancel, GOMP_cancellation_point, GOMP_taskgroup_start,
	GOMP_taskgroup_end, GOMP_parallel_sections): New prototypes.
	* task.c (GOMP_taskgroup_start, GOMP_taskgroup_end): New functions.
	* sections.c (GOMP_parallel_sections): New function.
	* loop.c (GOMP_parallel_loop_static, GOMP_parallel_loop_dynamic,
	GOMP_parallel_loop_guided, GOMP_parallel_loop_runtime): New
	functions.
	(GOMP_parallel_end): Add ialias_redirect.
	* omp_lib.f90.in (omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num): New interfaces.
	* omp_lib.h.in (omp_proc_bind_kind, omp_proc_bind_false,
	omp_proc_bind_true, omp_proc_bind_master, omp_proc_bind_close,
	omp_proc_bind_spread): New params.
	(omp_get_cancellation, omp_get_proc_bind, omp_set_default_device,
	omp_get_default_device, omp_get_num_devices, omp_get_num_teams,
	omp_get_team_num): New externals.


	Jakub

Patch

--- libgomp/libgomp.map.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/libgomp.map	2013-04-10 12:06:47.635559156 +0200
@@ -113,6 +113,25 @@  OMP_3.1 {
 	omp_in_final_;
 } OMP_3.0;
 
+OMP_4.0 {
+  global:
+	omp_get_cancellation;
+	omp_get_cancellation_;
+	omp_get_proc_bind;
+	omp_get_proc_bind_;
+	omp_set_default_device;
+	omp_set_default_device_;
+	omp_set_default_device_8_;
+	omp_get_default_device;
+	omp_get_default_device_;
+	omp_get_num_devices;
+	omp_get_num_devices_;
+	omp_get_num_teams;
+	omp_get_num_teams_;
+	omp_get_team_num;
+	omp_get_team_num_;
+} OMP_3.1;
+
 GOMP_1.0 {
   global:
 	GOMP_atomic_end;
@@ -184,3 +203,17 @@  GOMP_3.0 {
   global:
 	GOMP_taskyield;
 } GOMP_2.0;
+
+GOMP_4.0 {
+  global:
+	GOMP_cancel;
+	GOMP_cancellation_point;
+	GOMP_parallel_loop_dynamic;
+	GOMP_parallel_loop_guided;
+	GOMP_parallel_loop_runtime;
+	GOMP_parallel_loop_static;
+	GOMP_parallel_sections;
+	GOMP_parallel;
+	GOMP_taskgroup_start;
+	GOMP_taskgroup_end;
+} GOMP_3.0;
--- libgomp/parallel.c.jj	2013-03-20 10:02:06.000000000 +0100
+++ libgomp/parallel.c	2013-04-05 18:17:54.621194282 +0200
@@ -129,7 +129,28 @@  GOMP_parallel_end (void)
     }
   gomp_team_end ();
 }
+ialias (GOMP_parallel_end)
 
+void
+GOMP_parallel (void (*fn) (void *), void *data, unsigned num_threads, unsigned int flags)
+{
+  (void) flags;
+  num_threads = gomp_resolve_num_threads (num_threads, 0);
+  gomp_team_start (fn, data, num_threads, gomp_new_team (num_threads));
+  fn (data);
+  ialias_call (GOMP_parallel_end) ();
+}
+
+void
+GOMP_cancel (void)
+{
+  /* Nothing so far.  */
+}
+
+void
+GOMP_cancellation_point (void)
+{
+}
 
 /* The public OpenMP API for thread and team related inquiries.  */
 
--- libgomp/omp_lib.h.in.jj	2013-03-20 10:02:06.000000000 +0100
+++ libgomp/omp_lib.h.in	2013-04-10 12:39:42.177221687 +0200
@@ -33,6 +33,18 @@ 
       parameter (omp_sched_dynamic = 2)
       parameter (omp_sched_guided = 3)
       parameter (omp_sched_auto = 4)
+      integer omp_proc_bind_kind
+      parameter (omp_proc_bind_kind = 4)
+      integer (omp_proc_bind_kind) omp_proc_bind_false
+      integer (omp_proc_bind_kind) omp_proc_bind_true
+      integer (omp_proc_bind_kind) omp_proc_bind_master
+      integer (omp_proc_bind_kind) omp_proc_bind_close
+      integer (omp_proc_bind_kind) omp_proc_bind_spread
+      parameter (omp_proc_bind_false = 0)
+      parameter (omp_proc_bind_true = 1)
+      parameter (omp_proc_bind_master = 2)
+      parameter (omp_proc_bind_close = 3)
+      parameter (omp_proc_bind_spread = 4)
       parameter (openmp_version = 201107)
 
       external omp_init_lock, omp_init_nest_lock
@@ -68,3 +80,15 @@ 
 
       external omp_in_final
       logical(4) omp_in_final
+
+      external omp_get_cancelllation
+      logical(4) omp_get_cancelllation
+
+      external omp_get_proc_bind
+      integer(omp_proc_bind_kind) omp_get_proc_bind
+
+      external omp_set_default_device, omp_get_default_device
+      external omp_get_num_devices, omp_get_num_teams
+      external omp_get_team_num
+      integer(4) omp_get_default_device, omp_get_num_devices
+      integer(4) omp_get_num_teams, omp_get_team_num
--- libgomp/omp.h.in.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/omp.h.in	2013-04-10 11:26:49.969400252 +0200
@@ -52,6 +52,15 @@  typedef enum omp_sched_t
   omp_sched_auto = 4
 } omp_sched_t;
 
+typedef enum omp_proc_bind_t
+{
+  omp_proc_bind_false = 0,
+  omp_proc_bind_true = 1,
+  omp_proc_bind_master = 2,
+  omp_proc_bind_close = 3,
+  omp_proc_bind_spread = 4
+} omp_proc_bind_t;
+
 #ifdef __cplusplus
 extern "C" {
 # define __GOMP_NOTHROW throw ()
@@ -88,17 +97,26 @@  extern int omp_test_nest_lock (omp_nest_
 extern double omp_get_wtime (void) __GOMP_NOTHROW;
 extern double omp_get_wtick (void) __GOMP_NOTHROW;
 
-void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW;
-void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW;
-int omp_get_thread_limit (void) __GOMP_NOTHROW;
-void omp_set_max_active_levels (int) __GOMP_NOTHROW;
-int omp_get_max_active_levels (void) __GOMP_NOTHROW;
-int omp_get_level (void) __GOMP_NOTHROW;
-int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW;
-int omp_get_team_size (int) __GOMP_NOTHROW;
-int omp_get_active_level (void) __GOMP_NOTHROW;
-
-int omp_in_final (void) __GOMP_NOTHROW;
+extern void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW;
+extern void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW;
+extern int omp_get_thread_limit (void) __GOMP_NOTHROW;
+extern void omp_set_max_active_levels (int) __GOMP_NOTHROW;
+extern int omp_get_max_active_levels (void) __GOMP_NOTHROW;
+extern int omp_get_level (void) __GOMP_NOTHROW;
+extern int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW;
+extern int omp_get_team_size (int) __GOMP_NOTHROW;
+extern int omp_get_active_level (void) __GOMP_NOTHROW;
+
+extern int omp_in_final (void) __GOMP_NOTHROW;
+
+extern int omp_get_cancellation (void) __GOMP_NOTHROW;
+extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW;
+
+extern void omp_set_default_device (int) __GOMP_NOTHROW;
+extern int omp_get_default_device (void) __GOMP_NOTHROW;
+extern int omp_get_num_devices (void) __GOMP_NOTHROW;
+extern int omp_get_num_teams (void) __GOMP_NOTHROW;
+extern int omp_get_team_num (void) __GOMP_NOTHROW;
 
 #ifdef __cplusplus
 }
--- libgomp/omp_lib.f90.in.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/omp_lib.f90.in	2013-04-10 12:34:26.540054864 +0200
@@ -27,16 +27,22 @@ 
         integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
         integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
         integer, parameter :: omp_sched_kind = 4
+        integer, parameter :: omp_proc_bind_kind = 4
+        integer (omp_sched_kind), parameter :: omp_sched_static = 1
+        integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
+        integer (omp_sched_kind), parameter :: omp_sched_guided = 3
+        integer (omp_sched_kind), parameter :: omp_sched_auto = 4
+        integer (omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
+        integer (omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
+        integer (omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
+        integer (omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
+        integer (omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
       end module
 
       module omp_lib
         use omp_lib_kinds
         implicit none
         integer, parameter :: openmp_version = 201107
-        integer (omp_sched_kind), parameter :: omp_sched_static = 1
-        integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
-        integer (omp_sched_kind), parameter :: omp_sched_guided = 3
-        integer (omp_sched_kind), parameter :: omp_sched_auto = 4
 
         interface
           subroutine omp_init_lock (lock)
@@ -296,4 +302,55 @@ 
           end function omp_in_final
         end interface
 
+        interface
+          function omp_get_cancellation ()
+            use omp_lib_kinds
+            logical (4) :: omp_get_cancellation
+          end function omp_get_cancellation
+        end interface
+
+        interface
+          function omp_get_proc_bind ()
+            use omp_lib_kinds
+            integer (omp_proc_bind_kind) :: omp_get_proc_bind
+          end function omp_get_proc_bind
+        end interface
+
+        interface omp_set_default_device
+          subroutine omp_set_default_device (device_num)
+            integer (4), intent (in) :: device_num
+          end subroutine omp_set_default_device
+          subroutine omp_set_default_device_8 (device_num)
+            integer (8), intent (in) :: device_num
+          end subroutine omp_set_default_device_8
+        end interface
+
+        interface
+          function omp_get_default_device ()
+            use omp_lib_kinds
+            integer (4) :: omp_get_default_device
+          end function omp_get_default_device
+        end interface
+
+        interface
+          function omp_get_num_devices ()
+            use omp_lib_kinds
+            integer (4) :: omp_get_num_devices
+          end function omp_get_num_devices
+        end interface
+
+        interface
+          function omp_get_num_teams ()
+            use omp_lib_kinds
+            integer (4) :: omp_get_num_teams
+          end function omp_get_num_teams
+        end interface
+
+        interface
+          function omp_get_team_num ()
+            use omp_lib_kinds
+            integer (4) :: omp_get_team_num
+          end function omp_get_team_num
+        end interface
+
       end module omp_lib
--- libgomp/env.c.jj	2013-03-20 15:04:55.000000000 +0100
+++ libgomp/env.c	2013-04-05 17:08:01.606435250 +0200
@@ -866,6 +866,48 @@  omp_get_max_active_levels (void)
   return gomp_max_active_levels_var;
 }
 
+int
+omp_get_cancellation (void)
+{
+  return 0;
+}
+
+omp_proc_bind_t
+omp_get_proc_bind (void)
+{
+  return omp_proc_bind_false;
+}
+
+void
+omp_set_default_device (int device_num)
+{
+  (void) device_num;
+}
+
+int
+omp_get_default_device (void)
+{
+  return 0;
+}
+
+int
+omp_get_num_devices (void)
+{
+  return 0;
+}
+
+int
+omp_get_num_teams (void)
+{
+  return 1;
+}
+
+int
+omp_get_team_num (void)
+{
+  return 0;
+}
+
 ialias (omp_set_dynamic)
 ialias (omp_set_nested)
 ialias (omp_set_num_threads)
@@ -877,3 +919,10 @@  ialias (omp_get_max_threads)
 ialias (omp_get_thread_limit)
 ialias (omp_set_max_active_levels)
 ialias (omp_get_max_active_levels)
+ialias (omp_get_cancellation)
+ialias (omp_get_proc_bind)
+ialias (omp_set_default_device)
+ialias (omp_get_default_device)
+ialias (omp_get_num_devices)
+ialias (omp_get_num_teams)
+ialias (omp_get_team_num)
--- libgomp/fortran.c.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/fortran.c	2013-04-10 12:05:38.840960145 +0200
@@ -31,11 +31,6 @@ 
 
 #ifdef HAVE_ATTRIBUTE_ALIAS
 /* Use internal aliases if possible.  */
-# define ULP		STR1(__USER_LABEL_PREFIX__)
-# define STR1(x)	STR2(x)
-# define STR2(x)	#x
-# define ialias_redirect(fn) \
-  extern __typeof (fn) fn __asm__ (ULP "gomp_ialias_" #fn) attribute_hidden;
 # ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
 ialias_redirect (omp_init_lock)
 ialias_redirect (omp_init_nest_lock)
@@ -70,6 +65,13 @@  ialias_redirect (omp_get_ancestor_thread
 ialias_redirect (omp_get_team_size)
 ialias_redirect (omp_get_active_level)
 ialias_redirect (omp_in_final)
+ialias_redirect (omp_get_cancellation)
+ialias_redirect (omp_get_proc_bind)
+ialias_redirect (omp_set_default_device)
+ialias_redirect (omp_get_default_device)
+ialias_redirect (omp_get_num_devices)
+ialias_redirect (omp_get_num_teams)
+ialias_redirect (omp_get_team_num)
 #endif
 
 #ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
@@ -435,3 +437,51 @@  omp_in_final_ (void)
 {
   return omp_in_final ();
 }
+
+int32_t
+omp_get_cancellation_ (void)
+{
+  return omp_get_cancellation ();
+}
+
+int32_t
+omp_get_proc_bind_ (void)
+{
+  return omp_get_proc_bind ();
+}
+
+void
+omp_set_default_device_ (const int32_t *device_num)
+{
+  return omp_set_default_device (*device_num);
+}
+
+void
+omp_set_default_device_8_ (const int64_t *device_num)
+{
+  return omp_set_default_device (TO_INT (*device_num));
+}
+
+int32_t
+omp_get_default_device_ (void)
+{
+  return omp_get_default_device ();
+}
+
+int32_t
+omp_get_num_devices_ (void)
+{
+  return omp_get_num_devices ();
+}
+
+int32_t
+omp_get_num_teams_ (void)
+{
+  return omp_get_num_teams ();
+}
+
+int32_t
+omp_get_team_num_ (void)
+{
+  return omp_get_team_num ();
+}
--- libgomp/libgomp.h.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/libgomp.h	2013-04-05 17:48:33.054191957 +0200
@@ -580,11 +580,19 @@  extern int gomp_test_nest_lock_25 (omp_n
 #endif
 
 #ifdef HAVE_ATTRIBUTE_ALIAS
+# define ialias_ulp	ialias_str1(__USER_LABEL_PREFIX__)
+# define ialias_str1(x)	ialias_str2(x)
+# define ialias_str2(x)	#x
 # define ialias(fn) \
   extern __typeof (fn) gomp_ialias_##fn \
     __attribute__ ((alias (#fn))) attribute_hidden;
+# define ialias_redirect(fn) \
+  extern __typeof (fn) fn __asm__ (ialias_ulp "gomp_ialias_" #fn) attribute_hidden;
+# define ialias_call(fn) gomp_ialias_ ## fn
 #else
 # define ialias(fn)
+# define ialias_redirect(fn)
+# define ialias_call(fn) fn
 #endif
 
 #endif /* LIBGOMP_H */
--- libgomp/libgomp_g.h.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/libgomp_g.h	2013-04-05 18:15:57.183870146 +0200
@@ -76,6 +76,18 @@  extern void GOMP_parallel_loop_guided_st
 					     unsigned, long, long, long, long);
 extern void GOMP_parallel_loop_runtime_start (void (*)(void *), void *,
 					      unsigned, long, long, long);
+extern void GOMP_parallel_loop_static (void (*)(void *), void *,
+				       unsigned, long, long, long, long,
+				       unsigned);
+extern void GOMP_parallel_loop_dynamic (void (*)(void *), void *,
+					unsigned, long, long, long, long,
+					unsigned);
+extern void GOMP_parallel_loop_guided (void (*)(void *), void *,
+				       unsigned, long, long, long, long,
+				       unsigned);
+extern void GOMP_parallel_loop_runtime (void (*)(void *), void *,
+					unsigned, long, long, long,
+					unsigned);
 
 extern void GOMP_loop_end (void);
 extern void GOMP_loop_end_nowait (void);
@@ -157,6 +169,9 @@  extern void GOMP_ordered_end (void);
 
 extern void GOMP_parallel_start (void (*) (void *), void *, unsigned);
 extern void GOMP_parallel_end (void);
+extern void GOMP_parallel (void (*) (void *), void *, unsigned, unsigned);
+extern void GOMP_cancel (void);
+extern void GOMP_cancellation_point (void);
 
 /* task.c */
 
@@ -164,6 +179,8 @@  extern void GOMP_task (void (*) (void *)
 		       long, long, bool, unsigned);
 extern void GOMP_taskwait (void);
 extern void GOMP_taskyield (void);
+extern void GOMP_taskgroup_start (void);
+extern void GOMP_taskgroup_end (void);
 
 /* sections.c */
 
@@ -171,6 +188,8 @@  extern unsigned GOMP_sections_start (uns
 extern unsigned GOMP_sections_next (void);
 extern void GOMP_parallel_sections_start (void (*) (void *), void *,
 					  unsigned, unsigned);
+extern void GOMP_parallel_sections (void (*) (void *), void *,
+				    unsigned, unsigned, unsigned);
 extern void GOMP_sections_end (void);
 extern void GOMP_sections_end_nowait (void);
 
--- libgomp/task.c.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/task.c	2013-04-05 18:17:29.529335472 +0200
@@ -398,6 +398,16 @@  GOMP_taskyield (void)
   /* Nothing at the moment.  */
 }
 
+void
+GOMP_taskgroup_start (void)
+{
+}
+
+void
+GOMP_taskgroup_end (void)
+{
+}
+
 int
 omp_in_final (void)
 {
--- libgomp/sections.c.jj	2013-03-20 10:02:05.000000000 +0100
+++ libgomp/sections.c	2013-04-05 18:23:12.393400796 +0200
@@ -142,6 +142,23 @@  GOMP_parallel_sections_start (void (*fn)
   gomp_team_start (fn, data, num_threads, team);
 }
 
+ialias_redirect (GOMP_parallel_end)
+
+void
+GOMP_parallel_sections (void (*fn) (void *), void *data,
+			unsigned num_threads, unsigned count, unsigned flags)
+{
+  struct gomp_team *team;
+
+  (void) flags;
+  num_threads = gomp_resolve_num_threads (num_threads, count);
+  team = gomp_new_team (num_threads);
+  gomp_sections_init (&team->work_shares[0], count);
+  gomp_team_start (fn, data, num_threads, team);
+  fn (data);
+  GOMP_parallel_end ();
+}
+
 /* The GOMP_section_end* routines are called after the thread is told
    that all sections are complete.  This first version synchronizes
    all threads; the nowait version does not.  */
--- libgomp/loop.c.jj	2013-03-20 10:02:06.000000000 +0100
+++ libgomp/loop.c	2013-04-05 18:27:10.825017884 +0200
@@ -486,6 +486,57 @@  GOMP_parallel_loop_runtime_start (void (
 			    icv->run_sched_var, icv->run_sched_modifier);
 }
 
+ialias_redirect (GOMP_parallel_end)
+
+void
+GOMP_parallel_loop_static (void (*fn) (void *), void *data,
+			   unsigned num_threads, long start, long end,
+			   long incr, long chunk_size, unsigned flags)
+{
+  (void) flags;
+  gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
+			    GFS_STATIC, chunk_size);
+  fn (data);
+  GOMP_parallel_end ();
+}
+
+void
+GOMP_parallel_loop_dynamic (void (*fn) (void *), void *data,
+			    unsigned num_threads, long start, long end,
+			    long incr, long chunk_size, unsigned flags)
+{
+  (void) flags;
+  gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
+			    GFS_DYNAMIC, chunk_size);
+  fn (data);
+  GOMP_parallel_end ();
+}
+
+void
+GOMP_parallel_loop_guided (void (*fn) (void *), void *data,
+			  unsigned num_threads, long start, long end,
+			  long incr, long chunk_size, unsigned flags)
+{
+  (void) flags;
+  gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
+			    GFS_GUIDED, chunk_size);
+  fn (data);
+  GOMP_parallel_end ();
+}
+
+void
+GOMP_parallel_loop_runtime (void (*fn) (void *), void *data,
+			    unsigned num_threads, long start, long end,
+			    long incr, unsigned flags)
+{
+  (void) flags;
+  struct gomp_task_icv *icv = gomp_icv (false);
+  gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
+			    icv->run_sched_var, icv->run_sched_modifier);
+  fn (data);
+  GOMP_parallel_end ();
+}
+
 /* The GOMP_loop_end* routines are called after the thread is told that
    all loop iterations are complete.  This first version synchronizes
    all threads; the nowait version does not.  */