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]

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


Author: cesar
Date: Wed Apr  5 15:01:37 2017
New Revision: 246706

URL: https://gcc.gnu.org/viewcvs?rev=246706&root=gcc&view=rev
Log:
Add new behavior for declare create directive with Fortran allocatable - Sec 2.13.2

	gcc/fortran/
	* gfortran.h (enum gfc_omp_map_op): Add OMP_MAP_DECLARE_ALLOCATE,
	OMP_MAP_DECLARE_DEALLOCATE.
	* openmp.c (gfc_match_oacc_declare): Add support for OMP_MAP_ALLOC and
	OMP_MAP_TO, as those match the OpenACC 2.5 semantics.
	* trans-array.c (gfc_array_allocate): Call
	gfc_trans_oacc_declare_allocate for decls with oacc_decalre_create
	attributes set.
	(gfc_array_deallocate): Likewise.
	* trans-decl.c (add_attributes_to_decl): Enable lowering of OpenACC
	declared create, copyin and deviceptr clauses.
	(add_clause): Don't duplicate OpenACC declare clauses.
	(find_module_oacc_declare_clauses): Relax oacc_declare_create to
	OMP_MAP_ALLOC, and oacc_declare_copying to OMP_MAP_TO.  This matches
	the OpenACC 2.5 semantics.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Handle
	OMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	(gfc_trans_oacc_declare_allocate): New function.
	* trans-stmt.h: Declare gfc_trans_oacc_declare_allocate.

	gcc/
	* omp-low.c (scan_sharing_clauses): Update handling of OpenACC declare
	create, copyin and deviceptr to have local lifetimes.
	(lower_omp_target): Handle GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	* tree-pretty-print.c (dump_omp_clause): Likewise.

	gcc/testsuite/
	* gfortran.dg/goacc/declare-allocatable-1.f90: New test.

	include/
	* gomp-constants.h (enum gomp_map_kind): Define GOMP_MAP_DECLARE,
	GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.

	libgomp/
	* libgomp.h: Declare gomp_acc_declare_allocate.
	* oacc-mem.c (gomp_acc_declare_allocate): New function.
	* oacc-parallel.c (GOACC_enter_exit_data): Handle
	GOMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	* testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: New test.

Added:
    branches/gomp-4_0-branch/gcc/testsuite/gfortran.dg/goacc/declare-allocatable-1.f90
    branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90
Modified:
    branches/gomp-4_0-branch/gcc/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/fortran/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/fortran/gfortran.h
    branches/gomp-4_0-branch/gcc/fortran/openmp.c
    branches/gomp-4_0-branch/gcc/fortran/trans-array.c
    branches/gomp-4_0-branch/gcc/fortran/trans-decl.c
    branches/gomp-4_0-branch/gcc/fortran/trans-openmp.c
    branches/gomp-4_0-branch/gcc/fortran/trans-stmt.h
    branches/gomp-4_0-branch/gcc/omp-low.c
    branches/gomp-4_0-branch/gcc/testsuite/ChangeLog.gomp
    branches/gomp-4_0-branch/gcc/tree-pretty-print.c
    branches/gomp-4_0-branch/include/ChangeLog.gomp
    branches/gomp-4_0-branch/include/gomp-constants.h
    branches/gomp-4_0-branch/libgomp/ChangeLog.gomp
    branches/gomp-4_0-branch/libgomp/libgomp.h
    branches/gomp-4_0-branch/libgomp/oacc-mem.c
    branches/gomp-4_0-branch/libgomp/oacc-parallel.c


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