This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r262974 - in /branches/gomp-5_0-branch: gcc/Cha...


Author: jakub
Date: Wed Jul 25 16:18:02 2018
New Revision: 262974

URL: https://gcc.gnu.org/viewcvs?rev=262974&root=gcc&view=rev
Log:
	* gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST.
	(struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
	comments.
	(struct gimple_statement_omp_single_layout): And remove here.
	(struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
	than gimple_statement_omp_single_layout.
	(is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
	GIMPLE_OMP_TEAMS.
	(is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
	(gimple_omp_subcode): Formatting fix.
	(gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
	gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
	gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
	gimple_omp_teams_host, gimple_omp_teams_set_host): New inline
	functions.
	* gimple.def (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
	of GSS_OMP_SINGLE_LAYOUT, adjust comments.
	* gimplify.c (enum omp_region_type): Reserve bits 1 and 2 for
	auxiliary flags, renumber values of most of ORT_* enumerators,
	add ORT_HOST_TEAMS and ORT_COMBINED_HOST_TEAMS enumerators.
	(maybe_fold_stmt): Don't fold even in host teams regions.
	(gimplify_scan_omp_clauses, gimplify_omp_for): Adjust tests for
	ORT_COMBINED_TEAMS.
	(gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
	ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
	host teams, use gimplify_and_return_first etc. for body like
	for target or target data constructs, and at the end call
	gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
	* omp-builtins.def (BUILT_IN_GOMP_TEAMS_REG): New builtin.
	* omp-low.c (is_host_teams_ctx): New function.
	(is_taskreg_ctx): Return true also if is_host_teams_ctx.
	(scan_sharing_clauses): Don't ignore shared clauses in
	is_host_teams_ctx contexts.
	(finish_taskreg_scan): Handle GIMPLE_OMP_TEAMS like
	GIMPLE_OMP_PARALLEL.
	(scan_omp_teams): Handle host teams constructs.
	(check_omp_nesting_restrictions): Allow teams with no outer
	OpenMP context.  Adjust diagnostics for teams strictly nested into
	some explicit OpenMP construct other than target.
	(scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
	taskreg_nesting_level while scanning host teams construct.
	(lower_rec_input_clauses): Don't ignore shared clauses in
	is_host_teams_ctx contexts.
	(lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
	for host teams constructs.
	* omp-expand.c (expand_teams_call): New function.
	(expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
	expand_teams_call for it.  Formatting fix.
	(expand_omp_synch): For host teams call expand_omp_taskreg.
c/
	* c-parser.c (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
	around teams body.  Use SET_EXPR_LOCATION.
	(c_parser_omp_target): Use SET_EXPR_LOCATION.
cp/
	* cp-tree.h (finish_omp_atomic): Add LOC argument.
	* parser.c (cp_parser_omp_atomic): Pass pragma_tok->location as
	LOC to finish_omp_atomic.
	(cp_parser_omp_single): Use SET_EXPR_LOCATION.
	(cp_parser_omp_teams): Force a BIND_EXPR with BLOCK around teams
	body.
	* semantics.c (finish_omp_atomic): Add LOC argument, pass it through
	to c_finish_omp_atomic and set it as location of OMP_ATOMIC* trees.
	* pt.c (tsubst_expr): Force a BIND_EXPR with BLOCK around teams body.
	Adjust finish_omp_atomic caller.
testsuite/
	* c-c++-common/gomp/teams-1.c: New test.
	* c-c++-common/gomp/teams-2.c: New test.
	* g++.dg/gomp/tpl-atomic-2.C: Adjust expected diagnostic lines.
	* gcc.dg/gomp/teams-1.c: Likewise.
libgomp/
	* Makefile.am (libgomp_la_SOURCES): Add teams.c.
	* libgomp_g.h (GOMP_teams_reg): New prototype.
	* libgomp.map (GOMP_5.0): Export GOMP_teams_reg.
	* icv-device.c (omp_get_num_teams, omp_get_team_num): Move these
	functions to ...
	* teams.c: ... here.  New file.
	* config/nvptx/icv-device.c (omp_get_num_teams, omp_get_team_num):
	Move these functions to ...
	* config/nvptx/teams.c: ... here.  New file.
	* testsuite/libgomp.c++/for-16.C: New test.
	* testsuite/libgomp.c++/for-26.C: New test.
	* testsuite/libgomp.c-c++-common/for-14.c: New test.
	* testsuite/libgomp.c-c++-common/for-15.c: New test.
	* testsuite/libgomp.c-c++-common/pr66199-10.c: New test.
	* testsuite/libgomp.c-c++-common/pr66199-11.c: New test.
	* testsuite/libgomp.c-c++-common/pr66199-12.c: New test.
	* testsuite/libgomp.c-c++-common/pr66199-13.c: New test.
	* testsuite/libgomp.c-c++-common/pr66199-14.c: New test.
	* testsuite/libgomp.c/teams-1.c: New test.
	* testsuite/libgomp.c/teams-2.c: New test.
	* testsuite/libgomp.c/thread-limit-5.c: New test.
	* testsuite/libgomp.c/thread-limit-4.c: New test.
	* Makefile.in: Regenerated.

Added:
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/teams-1.c
    branches/gomp-5_0-branch/gcc/testsuite/c-c++-common/gomp/teams-2.c
    branches/gomp-5_0-branch/libgomp/config/nvptx/teams.c
    branches/gomp-5_0-branch/libgomp/teams.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c++/for-16.C
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c++/for-26.C
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/for-14.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/for-15.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/pr66199-10.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/pr66199-11.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/pr66199-12.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/pr66199-13.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c-c++-common/pr66199-14.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c/teams-1.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c/teams-2.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c/thread-limit-4.c
    branches/gomp-5_0-branch/libgomp/testsuite/libgomp.c/thread-limit-5.c
Modified:
    branches/gomp-5_0-branch/gcc/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/c/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/c/c-parser.c
    branches/gomp-5_0-branch/gcc/cp/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/cp/cp-tree.h
    branches/gomp-5_0-branch/gcc/cp/parser.c
    branches/gomp-5_0-branch/gcc/cp/pt.c
    branches/gomp-5_0-branch/gcc/cp/semantics.c
    branches/gomp-5_0-branch/gcc/gimple.def
    branches/gomp-5_0-branch/gcc/gimple.h
    branches/gomp-5_0-branch/gcc/gimplify.c
    branches/gomp-5_0-branch/gcc/omp-builtins.def
    branches/gomp-5_0-branch/gcc/omp-expand.c
    branches/gomp-5_0-branch/gcc/omp-low.c
    branches/gomp-5_0-branch/gcc/testsuite/ChangeLog.gomp
    branches/gomp-5_0-branch/gcc/testsuite/g++.dg/gomp/tpl-atomic-2.C
    branches/gomp-5_0-branch/gcc/testsuite/gcc.dg/gomp/teams-1.c
    branches/gomp-5_0-branch/libgomp/ChangeLog.gomp
    branches/gomp-5_0-branch/libgomp/Makefile.am
    branches/gomp-5_0-branch/libgomp/Makefile.in
    branches/gomp-5_0-branch/libgomp/config/nvptx/icv-device.c
    branches/gomp-5_0-branch/libgomp/icv-device.c
    branches/gomp-5_0-branch/libgomp/libgomp.map
    branches/gomp-5_0-branch/libgomp/libgomp_g.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]