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,
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,
"GOMP_loop_static_worksharing_end", BT_FN_VOID,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_WORKSHARING_DISPATCH,
- "GOMP_loop_static_worksharing_dispatch", BT_FN_VOID,
+ "GOMP_loop_static_worksharing_dispatch",
+ BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING,
"GOMP_distribute_static_worksharing",
"GOMP_distribute_static_worksharing_end", BT_FN_VOID,
ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DISTRIBUTE_STATIC_WORKSHARING_DISPATCH,
- "GOMP_distribute_static_worksharing_dispatch", BT_FN_VOID,
+ "GOMP_distribute_static_worksharing_dispatch",
+ BT_FN_VOID_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG,
ATTR_NOTHROW_LEAF_LIST)
default:
gcc_unreachable ();
}
- gcall *g = gimple_build_call (decl, 0);
- gsi_insert_before (&gsi, g, GSI_SAME_STMT);
+ 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);
+ force_gimple_operand_gsi (&gsi, call, true, NULL_TREE, true,
+ GSI_SAME_STMT);
}
gsi = gsi_last_nondebug_bb (exit_bb);
default:
gcc_unreachable ();
}
- gcall *g = gimple_build_call (decl, 0);
- gsi_insert_before (&gsi, g, GSI_SAME_STMT);
+ 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);
+ force_gimple_operand_gsi (&gsi, call, true, NULL_TREE, true,
+ GSI_SAME_STMT);
}
/* Connect the new blocks. */
/* { 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 \\(\\)" 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_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 \\(\\)" 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_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" } } */
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. */
+/* 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. */
void
-GOMP_distribute_static_worksharing_dispatch (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)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. */
+/* 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. */
void
-GOMP_distribute_static_worksharing_dispatch (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)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
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 (void);
+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);
/* loop_ull.c */
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 (void);
+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);
/* allocator.c */
return nthreads + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. */
+/* 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. */
void
-GOMP_loop_static_worksharing_dispatch (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)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
return nteams + tid * 1I;
}
-/* Stub for OMPT callback enabled by -fopenmp-ompt-detailed. */
+/* 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. */
void
-GOMP_distribute_static_worksharing_dispatch (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)))
{}
/* Stub for OMPT callback enabled by -fopenmp-ompt. */
#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 \\(\\)" 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_end \\(\\)" 2 "optimized" } } */