gcc/libgomp/testsuite/libgomp.fortran
Alexander Monakov 6103184e81 OpenMP offloading to NVPTX: libgomp changes
* Makefile.am (libgomp_la_SOURCES): Add atomic.c, icv.c, icv-device.c.
	* Makefile.in. Regenerate.
	* configure.ac [nvptx*-*-*] (libgomp_use_pthreads): Set and use it...
	(LIBGOMP_USE_PTHREADS): ...here; new define.
	* configure: Regenerate.
	* config.h.in: Likewise.
	* config/posix/affinity.c: Move to...
	* affinity.c: ...here (new file).  Guard use of Pthreads-specific
	interface by LIBGOMP_USE_PTHREADS. 
	* critical.c: Split out GOMP_atomic_{start,end} into...
	* atomic.c: ...here (new file).
	* env.c: Split out ICV definitions into...
	* icv.c: ...here (new file) and...
	* icv-device.c: ...here. New file.
	* config/linux/lock.c (gomp_init_lock_30): Move to generic lock.c.
	(gomp_destroy_lock_30): Ditto.
	(gomp_set_lock_30): Ditto.
	(gomp_unset_lock_30): Ditto.
	(gomp_test_lock_30): Ditto.
	(gomp_init_nest_lock_30): Ditto.
	(gomp_destroy_nest_lock_30): Ditto.
	(gomp_set_nest_lock_30): Ditto.
	(gomp_unset_nest_lock_30): Ditto.
	(gomp_test_nest_lock_30): Ditto.
	* lock.c: New.
	* config/nvptx/lock.c: New.
	* config/nvptx/bar.c: New.
	* config/nvptx/bar.h: New.
	* config/nvptx/doacross.h: New.
	* config/nvptx/error.c: New.
	* config/nvptx/icv-device.c: New.
	* config/nvptx/mutex.h: New.
	* config/nvptx/pool.h: New.
	* config/nvptx/proc.c: New.
	* config/nvptx/ptrlock.h: New.
	* config/nvptx/sem.h: New.
	* config/nvptx/simple-bar.h: New.
	* config/nvptx/target.c: New.
	* config/nvptx/task.c: New.
	* config/nvptx/team.c: New.
	* config/nvptx/time.c: New.
	* config/posix/simple-bar.h: New.
	* libgomp.h: Guard pthread.h inclusion.  Include simple-bar.h.
	(gomp_num_teams_var): Declare.
	(struct gomp_thread_pool): Change threads_dock member to
	gomp_simple_barrier_t.
	[__nvptx__] (gomp_thread): New implementation.
	(gomp_thread_attr): Guard by LIBGOMP_USE_PTHREADS.
	(gomp_thread_destructor): Ditto.
	(gomp_init_thread_affinity): Ditto.
	* team.c: Guard uses of Pthreads-specific interfaces by
	LIBGOMP_USE_PTHREADS.  Adjust all uses of threads_dock.
	(gomp_free_thread) [__nvptx__]: Do not call 'free'.

	* config/nvptx/alloc.c: Delete.
	* config/nvptx/barrier.c: Ditto.
	* config/nvptx/fortran.c: Ditto.
	* config/nvptx/iter.c: Ditto.
	* config/nvptx/iter_ull.c: Ditto.
	* config/nvptx/loop.c: Ditto.
	* config/nvptx/loop_ull.c: Ditto.
	* config/nvptx/ordered.c: Ditto.
	* config/nvptx/parallel.c: Ditto.
	* config/nvptx/priority_queue.c: Ditto.
	* config/nvptx/sections.c: Ditto.
	* config/nvptx/single.c: Ditto.
	* config/nvptx/splay-tree.c: Ditto.
	* config/nvptx/work.c: Ditto.

	* testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Pass
	-foffload=-lgfortran in addition to -lgfortran.
	* testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Ditto.

	* plugin/plugin-nvptx.c: Include <limits.h>.
	(struct targ_fn_descriptor): Add new fields.
	(struct ptx_device): Ditto.  Set them...
	(nvptx_open_device): ...here.
	(nvptx_adjust_launch_bounds): New.
	(nvptx_host2dev): Allow NULL 'nvthd'.
	(nvptx_dev2host): Ditto.
	(GOMP_OFFLOAD_get_caps): Add GOMP_OFFLOAD_CAP_OPENMP_400.
	(link_ptx): Adjust log sizes.
	(nvptx_host2dev): Allow NULL 'nvthd'.
	(nvptx_dev2host): Ditto.
	(nvptx_set_clocktick): New.  Use it...
	(GOMP_OFFLOAD_load_image): ...here.  Set new targ_fn_descriptor
	fields.
	(GOMP_OFFLOAD_dev2dev): New.
	(nvptx_adjust_launch_bounds): New.
	(nvptx_stacks_size): New.
	(nvptx_stacks_alloc): New.
	(nvptx_stacks_free): New.
	(GOMP_OFFLOAD_run): New.
	(GOMP_OFFLOAD_async_run): New (stub).

Co-Authored-By: Dmitry Melnik <dm@ispras.ru>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r242789
2016-11-23 21:36:41 +03:00
..
appendix-a
examples-4 libgomp testsuite: add missing map clauses 2016-11-15 20:14:32 +03:00
affinity1.f90
affinity2.f90
aligned1.f03
alloc-comp-1.f90
alloc-comp-2.f90
alloc-comp-3.f90
allocatable1.f90
allocatable2.f90
allocatable3.f90
allocatable4.f90
allocatable5.f90
allocatable6.f90
allocatable7.f90
allocatable8.f90
allocatable9.f90
allocatable10.f90
allocatable11.f90
allocatable12.f90
associate1.f90
associate2.f90
associate3.f90 re PR fortran/71717 (A gfortran silent "wrong code" bug in the transition from 4.9.0 -> 4.9.1, using OpenMP.) 2016-07-01 17:13:28 +02:00
cancel-do-1.f90
cancel-do-2.f90
cancel-parallel-1.f90
cancel-parallel-3.f90
cancel-sections-1.f90
cancel-taskgroup-2.f90
character1.f90
character2.f90
collapse1.f90
collapse2.f90
collapse3.f90
collapse4.f90
condinc1.f
condinc1.inc
condinc2.f
condinc3.f90
condinc4.f90
crayptr1.f90
crayptr2.f90
crayptr3.f90
declare-simd-1.f90
declare-simd-2.f90
declare-simd-3.f90
declare-simd-4.f90 Don't call call_cgraph_insertion_hooks in simd_clone_create 2016-02-16 09:23:09 +00:00
declare-target-1.f90
declare-target-2.f90
depend-1.f90
depend-2.f90
depend-3.f90
do1.f90
do2.f90
doacross1.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
doacross2.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
doacross3.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
fortran.exp OpenMP offloading to NVPTX: libgomp changes 2016-11-23 21:36:41 +03:00
jacobi.f
lastprivate1.f90
lastprivate2.f90
lib1.f90
lib2.f
lib3.f
lib4.f90
lock-1.f90
lock-2.f90
nested1.f90
nestedfn1.f90
nestedfn2.f90
nestedfn3.f90
nestedfn4.f90
nestedfn5.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
omp_atomic1.f90
omp_atomic2.f90
omp_atomic3.f90
omp_atomic4.f90
omp_atomic5.f90
omp_cond1.f
omp_cond2.f
omp_cond3.F90
omp_cond4.F90
omp_hello.f
omp_orphan.f
omp_parse1.f90
omp_parse2.f90
omp_parse3.f90
omp_parse4.f90
omp_reduction.f
omp_workshare1.f
omp_workshare2.f
openmp_version-1.f cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307. 2016-11-10 18:05:18 +01:00
openmp_version-2.f90 cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307. 2016-11-10 18:05:18 +01:00
parloops-exit-first-loop-alt-2.f95
parloops-exit-first-loop-alt.f95
pointer1.f90
pointer2.f90
pr25162.f
pr25219.f90
pr27395-1.f90
pr27395-2.f90
pr27416-1.f90
pr27916-1.f90
pr27916-2.f90
pr28390.f
pr29629.f90
pr32359.f90
pr32550.f90
pr33880.f90
pr34020.f90
pr35130.f90
pr42162.f90
pr46753.f90
pr48894.f90
pr49792-1.f90
pr49792-2.f90
pr63938-1.f90
pr63938-2.f90
pr65597.f90
pr66199-1.f90
pr66199-2.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
pr66680.f90 Move pr66680.f90 to libgomp 2016-01-07 10:18:29 -08:00
pr71014.f90 re PR fortran/71014 (associate statement inside omp parallel do appears to disable default private attribute for inner loop indices) 2016-08-19 17:30:33 +02:00
pr71734-1.f90 Add 2 tests for PR middle-end/71734 2016-07-03 09:40:22 -07:00
pr71734-2.f90 Add 2 tests for PR middle-end/71734 2016-07-03 09:40:22 -07:00
procptr1.f90
recursion1.f90
reduction1.f90
reduction2.f90
reduction3.f90
reduction4.f90
reduction5.f90
reduction6.f90
reference1.f90
reference2.f90
retval1.f90
retval2.f90
sharing1.f90
sharing2.f90
simd1.f90
simd2.f90
simd3.f90
simd4.f90
simd5.f90
simd6.f90
simd7.f90
stack.f90
strassen.f90
tabs1.f90
tabs2.f
target1.f90
target2.f90
target3.f90
target4.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
target5.f90
target6.f90
target7.f90
target8.f90
task1.f90
task2.f90
task3.f90
task4.f90
taskgroup1.f90
taskloop1.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
taskloop2.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
taskloop3.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
taskloop4.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
threadprivate1.f90
threadprivate2.f90
threadprivate3.f90
threadprivate4.f90
udr1.f90
udr2.f90
udr3.f90
udr4.f90
udr5.f90
udr6.f90
udr7.f90
udr8.f90
udr9.f90
udr10.f90
udr11.f90
udr12.f90
udr13.f90
udr14.f90
udr15.f90
use_intrinsic_1.f90
vla1.f90
vla2.f90
vla3.f90
vla4.f90
vla5.f90
vla6.f90
vla7.f90
vla8.f90
workshare1.f90
workshare2.f90