gcc/include
Jakub Jelinek 3bc75533d1 openmp: Add support for strict modifier on grainsize/num_tasks clauses
With strict: modifier on these clauses, the standard is explicit about
how many iterations (and which) each generated task of taskloop directive
should contain.  For num_tasks it actually matches what we were already
implementing, but for grainsize it does not (and even violates the old
rule - without strict it requires that the number of iterations (unspecified
which exactly) handled by each generated task is >= grainsize argument and
< 2 * grainsize argument, with strict: it requires that each generated
task handles exactly == grainsize argument iterations, except for the
generated task handling the last iteration which can handles <= grainsize
iterations).

The following patch implements it for C and C++.

2021-08-23  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* tree.h (OMP_CLAUSE_GRAINSIZE_STRICT): Define.
	(OMP_CLAUSE_NUM_TASKS_STRICT): Define.
	* tree-pretty-print.c (dump_omp_clause) <case OMP_CLAUSE_GRAINSIZE,
	case OMP_CLAUSE_NUM_TASKS>: Print strict: modifier.
	* omp-expand.c (expand_task_call): Use GOMP_TASK_FLAG_STRICT in iflags
	if either grainsize or num_tasks clause has the strict modifier.
gcc/c/
	* c-parser.c (c_parser_omp_clause_num_tasks,
	c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
gcc/cp/
	* parser.c (cp_parser_omp_clause_num_tasks,
	cp_parser_omp_clause_grainsize): Parse the optional strict: modifier.
include/
	* gomp-constants.h (GOMP_TASK_FLAG_STRICT): Define.
libgomp/
	* taskloop.c (GOMP_taskloop): Handle GOMP_TASK_FLAG_STRICT.
	* testsuite/libgomp.c-c++-common/taskloop-4.c (main): Fix up comment.
	* testsuite/libgomp.c-c++-common/taskloop-5.c: New test.
2021-08-23 10:16:24 +02:00
..
gdb Update copyright years. 2021-01-04 10:26:59 +01:00
COPYING
COPYING3
ChangeLog Daily bump. 2021-07-25 00:16:22 +00:00
ChangeLog-9103
ChangeLog.jit
ansidecl.h include: Fix -Wundef warnings in ansidecl.h 2021-07-24 12:51:00 -04:00
btf.h BTF: Support for BTF_KIND_FLOAT 2021-07-02 08:32:44 -07:00
ctf.h CTF/BTF debug formats 2021-06-28 18:47:20 +02:00
demangle.h c++: Adjust mangling of __alignof__ [PR88115] 2021-03-30 22:57:11 -04:00
dwarf2.def Update copyright years. 2021-01-04 10:26:59 +01:00
dwarf2.h Update copyright years. 2021-01-04 10:26:59 +01:00
dyn-string.h Update copyright years. 2021-01-04 10:26:59 +01:00
environ.h Update copyright years. 2021-01-04 10:26:59 +01:00
fibheap.h Update copyright years. 2021-01-04 10:26:59 +01:00
filenames.h Update copyright years. 2021-01-04 10:26:59 +01:00
floatformat.h Update copyright years. 2021-01-04 10:26:59 +01:00
fnmatch.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-c-fe.def Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-c-interface.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-cp-fe.def Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-cp-interface.h Update copyright years. 2021-01-04 10:26:59 +01:00
gcc-interface.h Update copyright years. 2021-01-04 10:26:59 +01:00
getopt.h Update copyright years. 2021-01-04 10:26:59 +01:00
gomp-constants.h openmp: Add support for strict modifier on grainsize/num_tasks clauses 2021-08-23 10:16:24 +02:00
hashtab.h libiberty: add htab_eq_string 2021-05-06 08:51:28 -06:00
hsa.h Import HSA header files from AMD 2020-12-09 11:10:40 +00:00
hsa_ext_amd.h Import HSA header files from AMD 2020-12-09 11:10:40 +00:00
hsa_ext_image.h Import HSA header files from AMD 2020-12-09 11:10:40 +00:00
leb128.h Update copyright years. 2021-01-04 10:26:59 +01:00
libiberty.h Update copyright years. 2021-01-04 10:26:59 +01:00
longlong.h Update copyright years. 2021-01-04 10:26:59 +01:00
lto-symtab.h Update copyright years. 2021-01-04 10:26:59 +01:00
md5.h Update copyright years. 2021-01-04 10:26:59 +01:00
objalloc.h Update copyright years. 2021-01-04 10:26:59 +01:00
obstack.h Update copyright years. 2021-01-04 10:26:59 +01:00
partition.h Update copyright years. 2021-01-04 10:26:59 +01:00
plugin-api.h Update copyright years. 2021-01-04 10:26:59 +01:00
safe-ctype.h Update copyright years. 2021-01-04 10:26:59 +01:00
sha1.h Update copyright years. 2021-01-04 10:26:59 +01:00
simple-object.h Update copyright years. 2021-01-04 10:26:59 +01:00
sort.h Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree.h Update copyright years. 2021-01-04 10:26:59 +01:00
symcat.h Update copyright years. 2021-01-04 10:26:59 +01:00
timeval-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
unique-ptr.h Update copyright years. 2021-01-04 10:26:59 +01:00
vtv-change-permission.h Update copyright years. 2021-01-04 10:26:59 +01:00
xregex.h
xregex2.h Update copyright years. 2021-01-04 10:26:59 +01:00
xtensa-config.h Update copyright years. 2021-01-04 10:26:59 +01:00