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 re PR fortran/45045 (Named COMMON with different size: No warning with -fwhole-file) 2010-07-24 00:15:51 +02:00
examples-4 libgomp testsuite: add missing map clauses 2016-11-15 20:14:32 +03:00
affinity1.f90 builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
affinity2.f90 builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
aligned1.f03 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
alloc-comp-1.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
alloc-comp-2.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
alloc-comp-3.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable1.f90
allocatable2.f90
allocatable3.f90
allocatable4.f90
allocatable5.f90 re PR fortran/42866 (ICE for REDUCTION with ALLOCATABLE array as variable on SECTIONS) 2010-01-26 10:47:45 +01:00
allocatable6.f90 re PR fortran/46874 ([OpenMP] ICE in gfc_conv_descriptor_data_get, at fortran/trans-array.c:147) 2010-12-14 14:56:25 +01:00
allocatable7.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
allocatable8.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
allocatable9.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable10.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable11.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable12.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
associate1.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
associate2.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
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 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-do-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-parallel-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-parallel-3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-sections-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-taskgroup-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
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 re PR libgomp/59467 (copyprivate in the fortran testsuite) 2013-12-12 09:52:06 +01:00
crayptr3.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
declare-simd-1.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
declare-simd-2.f90 declare-simd-1.f90: Require vect_simd_clones effective target. 2014-05-27 11:14:53 +02:00
declare-simd-3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
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 varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for the external decls. 2015-03-13 13:30:26 +00:00
declare-target-2.f90 varpool.c (varpool_node::get_create): Don't set 'offloadable' flag for the external decls. 2015-03-13 13:30:26 +00:00
depend-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
depend-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
depend-3.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
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 lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
lib2.f lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
lib3.f lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
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 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
omp_atomic4.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
omp_atomic5.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
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 Insert new bound in try_transform_to_exit_first_loop_alt 2015-07-10 08:25:18 +00:00
parloops-exit-first-loop-alt.f95 Insert new bound in try_transform_to_exit_first_loop_alt 2015-07-10 08:25:18 +00:00
pointer1.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
pointer2.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
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 crayptr2.f90: Remove forced static linkage for darwin... 2009-12-22 22:16:02 +00:00
pr33880.f90
pr34020.f90 pr34020.f90: Make compile with TS 18508/Fortran 2015 2014-07-13 08:40:16 +02:00
pr35130.f90
pr42162.f90 re PR fortran/42162 (OpenMP: ICE: tree check in omp_add_variable, at gimplify.c:5282) 2009-11-25 21:28:56 +01:00
pr46753.f90 re PR fortran/46753 (ICE: OpenMP - in extract_omp_for_data, at omp-low.c:335) 2010-12-02 15:37:20 +01:00
pr48894.f90 re PR fortran/48894 (generic omp_get_ancestor_thread_num(l(i)) produces incorrect output) 2011-05-06 12:11:07 +02:00
pr49792-1.f90 re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment) 2011-08-19 15:25:22 +02:00
pr49792-2.f90 re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment) 2011-08-19 15:25:22 +02:00
pr63938-1.f90 re PR fortran/63938 (OpenMP atomic update does not protect access to automatic array) 2014-11-25 00:08:26 +01:00
pr63938-2.f90 re PR fortran/63938 (OpenMP atomic update does not protect access to automatic array) 2014-11-25 00:08:26 +01:00
pr65597.f90 re PR middle-end/65597 (ICE in build_outer_var_ref, at omp-low.c:1043) 2015-03-30 19:54:05 +02:00
pr66199-1.f90 re PR middle-end/66199 (lastprivate/linear clause issues on combined constructs) 2015-05-19 18:16:15 +02:00
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 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
recursion1.f90 Make 's' atomic 2010-01-04 06:28:30 -08:00
reduction1.f90
reduction2.f90
reduction3.f90
reduction4.f90
reduction5.f90
reduction6.f90
reference1.f90
reference2.f90
retval1.f90 re PR testsuite/59534 (FAIL: libgomp.fortran/retval1.f90 execution test due to denormals) 2013-12-17 16:17:00 +01:00
retval2.f90
sharing1.f90
sharing2.f90
simd1.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
simd2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
simd3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
simd4.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
simd5.f90 langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. 2014-06-25 11:16:12 +02:00
simd6.f90 langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. 2014-06-25 11:16:12 +02:00
simd7.f90 langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. 2014-06-25 11:16:12 +02:00
stack.f90
strassen.f90 Disable strassen.f90 test for aarch64 tiny memory. 2013-06-28 12:45:57 +00:00
tabs1.f90
tabs2.f
target1.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
target2.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
target3.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
target4.f90 omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
target5.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
target6.f90 gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. 2014-06-18 09:16:12 +02:00
target7.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
target8.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
task1.f90
task2.f90
task3.f90 re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)) 2011-02-27 13:05:36 +01:00
task4.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
taskgroup1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
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 trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL if threadprivate. 2011-08-26 16:55:05 +02:00
udr1.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr2.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr3.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr4.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr5.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr6.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr7.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr8.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr9.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr10.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr11.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr12.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr13.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr14.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
udr15.f90 gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, [...]): Make sure OMP_CLAUSE_SIZE is non-NULL. 2014-06-24 09:45:22 +02:00
use_intrinsic_1.f90 use_intrinsic_1.f90: New; moved from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90. 2012-12-19 16:02:50 +01:00
vla1.f90
vla2.f90
vla3.f90
vla4.f90 re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives) 2012-06-07 08:36:55 +02:00
vla5.f90 re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives) 2012-06-07 08:36:55 +02:00
vla6.f90
vla7.f90
vla8.f90 * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0. 2010-12-01 13:41:59 +00:00
workshare1.f90
workshare2.f90