r202270 - in /branches/gomp-4_0-branch: gcc/Cha...

jakub@gcc.gnu.org jakub@gcc.gnu.org
Thu Sep 5 07:28:00 GMT 2013


Author: jakub
Date: Thu Sep  5 07:28:28 2013
New Revision: 202270

URL: http://gcc.gnu.org/viewcvs?rev=202270&root=gcc&view=rev
Log:
	* tree-cfg.c (make_edges): For GIMPLE_OMP_TARGET
	with GF_OMP_TARGET_KIND_UPDATE, don't look for
	GIMPLE_OMP_RETURN and immediately restore previous
	region.
	* langhooks.c (lhd_omp_mappable_type): New function.
	* omp-low.c (scan_sharing_clauses): Ignore OMP_CLAUSE_SHARED
	in GIMPLE_OMP_TEAMS constructs.  Handle OMP_CLAUSE_NUM_TEAMS,
	OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP,
	OMP_CLAUSE_TO and OMP_CLAUSE_FROM.
	(create_omp_child_function): If current function has
	"omp declare target" attribute or if current region
	is OMP_TARGET or lexically nested in it, add that
	attribute to the omp child function.
	(scan_omp_target, scan_omp_teams): New functions.
	(check_omp_nesting_restrictions): Fix a typo in TEAMS nesting
	check.
	(scan_omp_1_stmt): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	(lower_rec_input_clauses): Ignore OMP_CLAUSE_SHARED
	in GIMPLE_OMP_TEAMS constructs.
	(expand_omp_synch): Handle GIMPLE_OMP_TEAMS.
	(expand_omp_target): New function.
	(expand_omp): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	(build_omp_regions_1): For GIMPLE_OMP_TARGET with
	GF_OMP_TARGET_KIND_UPDATE, don't look for GIMPLE_OMP_RETURN and
	immediately restore previous region.
	(lower_omp_single): Emit a CLOBBER stmt after GIMPLE_OMP_RETURN.
	(lower_omp_taskreg): Likewise.
	(lower_omp_target, lower_omp_teams): New functions.
	(lower_omp_1): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
	* tree.h (enum omp_clause_map_kind): Improve description of
	OMP_CLAUSE_MAP_POINTER.
	(OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION): Define.
	* gimple.def (GIMPLE_OMP_TARGET): Use GSS_OMP_PARALLEL instead
	of GSS_OMP_SINGLE.
	* langhooks.h (struct lang_hooks_for_types): Add
	omp_mappable_type hook.
	* langhooks-def.h (lhd_omp_mappable_type): New prototype.
	(LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	* gimple.h (gimple_omp_target_clauses, gimple_omp_target_clauses_ptr,
	gimple_omp_target_set_clauses): Use gimple_omp_parallel
	instead of gimple_omp_single.
	(gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr,
	gimple_omp_target_set_child_fn, gimple_omp_target_data_arg,
	gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg): New
	inlines.
	* omp-builtins.def (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA,
	BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE,
	BUILT_IN_GOMP_TEAMS): New builtins.
	* gimple-pretty-print.c (dump_gimple_omp_target): Print child_fn
	for #pragma omp target.
	* gimplify.c (omp_notice_variable): Diagnose if implicitly mapped
	decl doesn't have mappable type.
	(gimplify_scan_omp_clauses): For OMP_CLAUSE_MAP don't clear
	notice_outer.
	(gimplify_adjust_omp_clauses_1): Add OMP_CLAUSE_MAP even if the same
	decl is already referenced in target data construct surrounding it.
	(gimplify_adjust_omp_clauses): Likewise.  Handle
	OMP_CLAUSE_THREAD_LIMIT.
	(gimplify_omp_workshare): Fix up gimplification of target or target
	data construct body.  For target data add GOMP_target_end_data
	call in a try/finally cleanup.
	* builtin-types.def (BT_FN_VOID_UINT_UINT,
	BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.
c/
	* c-typeck.c (handle_omp_array_sections_1): Remove pointer_based_p
	argument.  Do c_save_expr on low bound unconditionally.
	(handle_omp_array_sections): Adjust caller.  Call c_fully_fold when
	needed.  Add OMP_CLAUSE_MAP_POINTER map clause even for array based
	array sections.
	(c_finish_omp_clauses): Don't complain about non-mappable types
	for OMP_CLAUSE_MAP_POINTER.  Check for duplicates even for map
	clauses.  Handle OMP_CLAUSE_NUM_TEAMS.
	* c-parser.c (c_parser_omp_target_data, c_parser_omp_target): Call
	keep_next_level ().
cp/
	* parser.c (cp_parser_omp_target_data, cp_parser_omp_target): Call
	keep_next_level (true).
	* cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
	* semantics.c (handle_omp_array_sections_1): Remove pointer_based_p
	argument.  Do cp_save_expr on low bound unconditionally.
	(handle_omp_array_sections): Adjust caller.  Add OMP_CLAUSE_MAP_POINTER
	map clause even for array based array sections.
	(finish_omp_clauses): Don't complain about non-mappable types
	for OMP_CLAUSE_MAP_POINTER.  Check for duplicates even for map
	clauses.
fortran/
	* types.def (BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.
testsuite/
	* c-c++-common/gomp/map-1.c (foo): Add dg-error for implicitly
	mapped non-mappable var.
libgomp/
	* libgomp.map (GOMP_4.0): Add GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update and GOMP_teams.
	* Makefile.am (libgomp_la_SOURCES): Add target.c.
	* Makefile.in: Regenerated.
	* target.c: New file.
	* libgomp_g.h (GOMP_target, GOMP_target_data,
	GOMP_target_end_data, GOMP_target_update, GOMP_teams): New prototypes.
	* testsuite/libgomp.c++/for-11.C (main): Uncomment
	#pragma omp target teams directive.
	* testsuite/libgomp.c/for-3.c (main): Likewise.
	* testsuite/libgomp.c++/target-1.C: New test.
	* testsuite/libgomp.c/target-1.c: New test.

Added:
    branches/gomp-4_0-branch/libgomp/target.c
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.c++/target-1.C
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.c/target-1.c
Modified:
    branches/gomp-4_0-branch/gcc/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/builtin-types.def
    branches/gomp-4_0-branch/gcc/c/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/c/c-parser.c
    branches/gomp-4_0-branch/gcc/c/c-typeck.c
    branches/gomp-4_0-branch/gcc/cp/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/cp/cp-objcp-common.h
    branches/gomp-4_0-branch/gcc/cp/parser.c
    branches/gomp-4_0-branch/gcc/cp/semantics.c
    branches/gomp-4_0-branch/gcc/fortran/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/fortran/types.def
    branches/gomp-4_0-branch/gcc/gimple-pretty-print.c
    branches/gomp-4_0-branch/gcc/gimple.def
    branches/gomp-4_0-branch/gcc/gimple.h
    branches/gomp-4_0-branch/gcc/gimplify.c
    branches/gomp-4_0-branch/gcc/langhooks-def.h
    branches/gomp-4_0-branch/gcc/langhooks.c
    branches/gomp-4_0-branch/gcc/langhooks.h
    branches/gomp-4_0-branch/gcc/omp-builtins.def
    branches/gomp-4_0-branch/gcc/omp-low.c
    branches/gomp-4_0-branch/gcc/testsuite/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/testsuite/c-c++-common/gomp/map-1.c
    branches/gomp-4_0-branch/gcc/tree-cfg.c
    branches/gomp-4_0-branch/gcc/tree.h
    branches/gomp-4_0-branch/libgomp/ChangeLog.gomp
    branches/gomp-4_0-branch/libgomp/Makefile.am
    branches/gomp-4_0-branch/libgomp/Makefile.in
    branches/gomp-4_0-branch/libgomp/libgomp.map
    branches/gomp-4_0-branch/libgomp/libgomp_g.h
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.c++/for-11.C
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.c/for-3.c



More information about the Gcc-cvs mailing list