@@ -692,6 +692,8 @@ DEF_FUNCTION_TYPE_2 (BT_FN_INT_CONST_FEXCEPT_T_PTR_INT, BT_INT,
BT_CONST_FEXCEPT_T_PTR, BT_INT)
DEF_FUNCTION_TYPE_2 (BT_FN_PTR_CONST_PTR_UINT8, BT_PTR, BT_CONST_PTR, BT_UINT8)
DEF_FUNCTION_TYPE_2 (BT_FN_PTR_CONST_PTR_INT, BT_PTR, BT_CONST_PTR, BT_INT)
+DEF_FUNCTION_TYPE_2 (BT_FN_VOID_ULONGLONG_ULONGLONG,
+ BT_VOID, BT_ULONGLONG, BT_ULONGLONG)
DEF_POINTER_TYPE (BT_PTR_FN_VOID_PTR_PTR, BT_FN_VOID_PTR_PTR)
@@ -945,8 +947,6 @@ DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
BT_BOOL, BT_UINT, BT_PTR_ULONGLONG, BT_ULONGLONG,
BT_PTR_ULONGLONG, BT_PTR_ULONGLONG)
-DEF_FUNCTION_TYPE_5 (BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
- BT_VOID, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG)
DEF_FUNCTION_TYPE_6 (BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VALIST_ARG,
BT_INT, BT_STRING, BT_SIZE, BT_INT, BT_SIZE,
@@ -123,6 +123,8 @@ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_PTRMODE,
BT_VOID, BT_PTR, BT_PTRMODE)
DEF_FUNCTION_TYPE_2 (BT_FN_VOID_CONST_PTR_SIZE, BT_VOID, BT_CONST_PTR, BT_SIZE)
DEF_FUNCTION_TYPE_2 (BT_FN_PTR_CONST_PTR_INT, BT_PTR, BT_CONST_PTR, BT_INT)
+DEF_FUNCTION_TYPE_2 (BT_FN_VOID_ULONGLONG_ULONGLONG,
+ BT_VOID, BT_ULONGLONG, BT_ULONGLONG)
DEF_POINTER_TYPE (BT_PTR_FN_VOID_PTR_PTR, BT_FN_VOID_PTR_PTR)
@@ -198,8 +200,6 @@ DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
BT_BOOL, BT_UINT, BT_PTR_ULONGLONG, BT_ULONGLONG,
BT_PTR_ULONGLONG, BT_PTR_ULONGLONG)
-DEF_FUNCTION_TYPE_5 (BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
- BT_VOID, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG)
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_BOOL, BT_LONG, BT_LONG, BT_LONG, BT_LONG,
@@ -527,7 +527,7 @@ DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_WORKSHARING_END,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_WORKSHARING_DISPATCH,
"GOMP_loop_static_worksharing_dispatch",
- BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
+ BT_FN_VOID_ULONGLONG_ULONGLONG,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING,
"GOMP_distribute_static_worksharing",
@@ -542,5 +542,5 @@ DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING_END,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING_DISPATCH,
"GOMP_distribute_static_worksharing_dispatch",
- BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
+ BT_FN_VOID_ULONGLONG_ULONGLONG,
ATTR_NOTHROW_LEAF_LIST)
@@ -5602,13 +5602,9 @@ expand_omp_for_static_nochunk (struct omp_region *region,
default:
gcc_unreachable ();
}
- tree n_ull = fold_convert (long_long_unsigned_type_node, n);
- tree n1_ull = fold_convert (long_long_unsigned_type_node, n1);
- tree step_ull = fold_convert (long_long_unsigned_type_node, step);
- tree chunk_size_ull = build_int_cst (long_long_unsigned_type_node, 0);
- tree v_ull = fold_convert (long_long_unsigned_type_node, fd->loop.v);
- tree call = build_call_expr (decl, 5, n_ull, n1_ull, step_ull,
- chunk_size_ull, v_ull);
+ tree s0_ull = fold_convert (long_long_unsigned_type_node, s0);
+ tree q_ull = fold_convert (long_long_unsigned_type_node, q);
+ tree call = build_call_expr (decl, 2, s0_ull, q_ull);
force_gimple_operand_gsi (&gsi, call, true, NULL_TREE, true,
GSI_SAME_STMT);
}
@@ -6448,14 +6444,10 @@ expand_omp_for_static_chunk (struct omp_region *region,
default:
gcc_unreachable ();
}
- tree n_ull = fold_convert (long_long_unsigned_type_node, n);
- tree n1_ull = fold_convert (long_long_unsigned_type_node, n1);
- tree step_ull = fold_convert (long_long_unsigned_type_node, step);
- tree chunk_size_ull
- = fold_convert (long_long_unsigned_type_node, chunk_size);
- tree v_ull = fold_convert (long_long_unsigned_type_node, fd->loop.v);
- tree call = build_call_expr (decl, 5, n_ull, n1_ull, step_ull,
- chunk_size_ull, v_ull);
+ tree s0_ull = fold_convert (long_long_unsigned_type_node, s0);
+ tree iterations = fold_build2 (MINUS_EXPR, itype, e0, s0);
+ iterations = fold_convert (long_long_unsigned_type_node, iterations);
+ tree call = build_call_expr (decl, 2, s0_ull, iterations);
force_gimple_operand_gsi (&gsi, call, true, NULL_TREE, true,
GSI_SAME_STMT);
}
@@ -8,13 +8,11 @@
/* { dg-final { scan-tree-dump-not "GOMP_loop_static_worksharing \\(" "ompexp" } } */
/* { dg-final { scan-tree-dump-times "GOMP_loop_static_worksharing_start \\(\[^\\)\]" 2 "ompexp" } } */
-/* { dg-final { scan-tree-dump-times "GOMP_loop_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 0, \[^)\]+\\)" 1 "ompexp" } } */
-/* { dg-final { scan-tree-dump-times "GOMP_loop_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 4, \[^)\]+\\)" 1 "ompexp" } } */
+/* { dg-final { scan-tree-dump-times "GOMP_loop_static_worksharing_dispatch \\(\[^,\]+, \[^)\]+\\)" 2 "ompexp" } } */
/* { dg-final { scan-tree-dump-times "GOMP_loop_static_worksharing_end \\(\\)" 2 "ompexp" } } */
/* { dg-final { scan-tree-dump-not "GOMP_distribute_static_worksharing \\(" "ompexp" } } */
/* { dg-final { scan-tree-dump-times "GOMP_distribute_static_worksharing_start \\(\[^\\)\]" 2 "ompexp" } } */
-/* { dg-final { scan-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 0, \[^)\]+\\)" 1 "ompexp" } } */
-/* { dg-final { scan-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 4, \[^)\]+\\)" 1 "ompexp" } } */
+/* { dg-final { scan-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^)\]+\\)" 2 "ompexp" } } */
/* { dg-final { scan-tree-dump-times "GOMP_distribute_static_worksharing_end \\(\\)" 2 "ompexp" } } */
/* { dg-final { scan-tree-dump-not "omp_get_num_threads" "ompexp" } } */
/* { dg-final { scan-tree-dump-not "omp_get_thread_num" "ompexp" } } */
@@ -64,19 +64,15 @@ GOMP_distribute_static_worksharing_start (unsigned long long niter
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. NITER is the total
- number of iterations. START is the starting iteration index. INCR is the
- increment of the loop (or step). CHUNK_SIZE is the specific chunk size
- requested in the schedule clause, or 0 if not specified. ISTART is the
- iteration index of the logical chunk start. */
+/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. START is the
+ starting index of the chunk in the logical iteration space. ITERATIONS is the
+ number of iterations in the chunk. */
void
-GOMP_distribute_static_worksharing_dispatch (
- unsigned long long niter __attribute__ ((unused)),
- unsigned long long start __attribute__ ((unused)),
- unsigned long long incr __attribute__ ((unused)),
- unsigned long long chunk_size __attribute__ ((unused)),
- unsigned long long istart __attribute__ ((unused)))
+GOMP_distribute_static_worksharing_dispatch (unsigned long long start
+ __attribute__ ((unused)),
+ unsigned long long iterations
+ __attribute__ ((unused)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
@@ -65,19 +65,15 @@ GOMP_distribute_static_worksharing_start (unsigned long long niter
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. NITER is the total
- number of iterations. START is the starting iteration index. INCR is the
- increment of the loop (or step). CHUNK_SIZE is the specific chunk size
- requested in the schedule clause, or 0 if not specified. ISTART is the
- iteration index of the logical chunk start. */
+/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. START is the
+ starting index of the chunk in the logical iteration space. ITERATIONS is the
+ number of iterations in the chunk. */
void
-GOMP_distribute_static_worksharing_dispatch (
- unsigned long long niter __attribute__ ((unused)),
- unsigned long long start __attribute__ ((unused)),
- unsigned long long incr __attribute__ ((unused)),
- unsigned long long chunk_size __attribute__ ((unused)),
- unsigned long long istart __attribute__ ((unused)))
+GOMP_distribute_static_worksharing_dispatch (unsigned long long start
+ __attribute__ ((unused)),
+ unsigned long long iterations
+ __attribute__ ((unused)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
@@ -147,9 +147,6 @@ extern bool GOMP_loop_end_cancel (void);
extern _Complex int GOMP_loop_static_worksharing (unsigned long long);
extern _Complex int GOMP_loop_static_worksharing_start (unsigned long long);
extern void GOMP_loop_static_worksharing_dispatch (unsigned long long,
- unsigned long long,
- unsigned long long,
- unsigned long long,
unsigned long long);
extern void GOMP_loop_static_worksharing_end (void);
@@ -394,9 +391,6 @@ extern void GOMP_teams_reg (void (*) (void *), void *, unsigned, unsigned,
extern _Complex int GOMP_distribute_static_worksharing (unsigned long long);
extern _Complex int GOMP_distribute_static_worksharing_start (unsigned long long);
extern void GOMP_distribute_static_worksharing_dispatch (unsigned long long,
- unsigned long long,
- unsigned long long,
- unsigned long long,
unsigned long long);
extern void GOMP_distribute_static_worksharing_end (void);
@@ -1213,19 +1213,15 @@ GOMP_loop_static_worksharing_start (unsigned long long niter
return nthreads + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. NITER is the total
- number of iterations. START is the starting iteration index. INCR is the
- increment of the loop (or step). CHUNK_SIZE is the specific chunk size
- requested in the schedule clause, or 0 if not specified. ISTART is the
- iteration index of the logical chunk start. */
+/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. START is the
+ starting index of the chunk in the logical iteration space. ITERATIONS is the
+ number of iterations in the chunk. */
void
-GOMP_loop_static_worksharing_dispatch (
- unsigned long long niter __attribute__ ((unused)),
- unsigned long long start __attribute__ ((unused)),
- unsigned long long incr __attribute__ ((unused)),
- unsigned long long chunk_size __attribute__ ((unused)),
- unsigned long long istart __attribute__ ((unused)))
+GOMP_loop_static_worksharing_dispatch (unsigned long long start
+ __attribute__ ((unused)),
+ unsigned long long iterations
+ __attribute__ ((unused)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
@@ -84,19 +84,15 @@ GOMP_distribute_static_worksharing_start (unsigned long long
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. NITER is the total
- number of iterations. START is the starting iteration index. INCR is the
- increment of the loop (or step). CHUNK_SIZE is the specific chunk size
- requested in the schedule clause, or 0 if not specified. ISTART is the
- iteration index of the logical chunk start. */
+/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. START is the
+ starting index of the chunk in the logical iteration space. ITERATIONS is the
+ number of iterations in the chunk. */
void
-GOMP_distribute_static_worksharing_dispatch (
- unsigned long long niter __attribute__ ((unused)),
- unsigned long long start __attribute__ ((unused)),
- unsigned long long incr __attribute__ ((unused)),
- unsigned long long chunk_size __attribute__ ((unused)),
- unsigned long long istart __attribute__ ((unused)))
+GOMP_distribute_static_worksharing_dispatch (unsigned long long start
+ __attribute__ ((unused)),
+ unsigned long long iterations
+ __attribute__ ((unused)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
@@ -7,6 +7,5 @@
#include "for-static.h"
/* { dg-final { scan-offload-tree-dump-times "GOMP_distribute_static_worksharing_start \\(\[^\\)\]" 2 "optimized" } } */
-/* { dg-final { scan-offload-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 0, \[^)\]+\\)" 1 "optimized" } } */
-/* { dg-final { scan-offload-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^,\]+, \[^,\]+, 4, \[^)\]+\\)" 1 "optimized" } } */
+/* { dg-final { scan-offload-tree-dump-times "GOMP_distribute_static_worksharing_dispatch \\(\[^,\]+, \[^)\]+\\)" 2 "optimized" } } */
/* { dg-final { scan-offload-tree-dump-times "GOMP_distribute_static_worksharing_end \\(\\)" 2 "optimized" } } */