aboutsummaryrefslogtreecommitdiff
path: root/libgomp
AgeCommit message (Collapse)AuthorFilesLines
2020-03-26Really fix og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof"devel/omp/gcc-9Thomas Schwinge2-4/+13
In my yesterday's commit 9ae129017c7fc1fa638d6beedd3802b515ca692b 'Fix og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof"', I wrongly blamed the og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof" to be responsible for the hang being back, when in fact it's only the later og9 "OpenACC Profiling Interface (incomplete)" backport from trunk that introduced the problem. The confusing thing was that the og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof" commit appears *before* the og9 "OpenACC Profiling Interface (incomplete)" backport that it relates to. And, in addition to that, I pushed the wrong (incomplete) version of my fix. libgomp/ * oacc-init.c (acc_init_1): Move other 'acc_init_state' logic to where it belongs.
2020-03-25Fix og9 "Fix hang when running oacc exec with CUDA 9.0 nvprof"Thomas Schwinge2-5/+10
Compared to the original og7 version, and still-good og8 version, the og9 version of this patch did get its code altered in a way so that it no longer resolves the problem it's meant to resolve -- the hang was back. libgomp/ * oacc-init.c (acc_init_1): Move 'acc_init_state' logic to where it belongs.
2020-03-05Merge remote-tracking branch 'origin/releases/gcc-9' into devel/omp/gcc-9Tobias Burnus11-6/+265
Update all GCC 9 commits between tag 'releases/gcc-9.2.0' (r9-7613) and today's GCC 9 branch (r9-8340-g7beafc829c5b122298093ba517023015611aeca8).
2020-03-05Merge commit 'a0c06cc27d2146b7d86758ffa236516c6143d62c' into devel/omp/gcc-9Tobias Burnus10-32/+328
This merges all patches after releases/gcc-9.1.0 until and including to the commit belonging to the tag 'releases/gcc-9.2.0'. That's r9-7613-ga0c06cc27d2146b7d86758ffa236516c6143d62c on the releases/gcc-9 branch.
2020-03-03[og9] Fix libgomp.oacc-fortran/lib-16.f90 testKwok Cheung Yeung2-0/+9
2019-11-22 Kwok Cheung Yeung <kcy@codesourcery.com> libgomp/ * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue. (cherry picked from openacc-gcc-9-branch commit d68cd776e4a5e7a93e7c5c4cb24ae7d664a6e995)
2020-03-03[og9] Re-do OpenACC private variable resolutionJulian Brown3-5/+14
gcc/ * config/gcn/gcn-protos.h (gcn_goacc_adjust_gangprivate_decl): Rename to... (gcn_goacc_adjust_private_decl): ...this. * config/gcn/gcn-tree.c (diagnostic-core.h): Include. (gcn_goacc_adjust_gangprivate_decl): Rename to... (gcn_goacc_adjust_private_decl): ...this. Add LEVEL parameter. * config/gcn/gcn.c (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename to... (TARGET_GOACC_ADJUST_PRIVATE_DECL): ...this. * config/nvptx/nvptx.c (tree-pretty-print.h): Include. (nvptx_goacc_adjust_private_decl): New function. (TARGET_GOACC_ADJUST_PRIVATE_DECL): Define hook using above function. * doc/tm.texi.in (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename to... (TARGET_GOACC_ADJUST_PRIVATE_DECL): ...this. * doc/tm.texi: Regenerated. * internal-fn.c (expand_UNIQUE): Handle IFN_UNIQUE_OACC_PRIVATE. * internal-fn.h (IFN_UNIQUE_CODES): Add OACC_PRIVATE. * omp-low.c (omp_context): Remove oacc_partitioning_levels field. (lower_oacc_reductions): Add PRIVATE_MARKER parameter. Insert before fork. (lower_oacc_head_tail): Add PRIVATE_MARKER parameter. Modify its gimple call arguments as appropriate. Don't set oacc_partitioning_levels in omp_context. Pass private_marker to lower_oacc_reductions. (oacc_record_private_var_clauses): Don't check for NULL ctx. (make_oacc_private_marker): New function. (lower_omp_for): Only call oacc_record_vars_in_bind for OpenACC contexts. Create private marker and pass to lower_oacc_head_tail. (lower_omp_target): Remove unnecessary call to oacc_record_private_var_clauses. Remove call to mark_oacc_gangprivate. Create private marker and pass to lower_oacc_reductions. (process_oacc_gangprivate_1): Remove. (lower_omp_1): Only call oacc_record_vars_in_bind for OpenACC. Don't iterate over contexts calling process_oacc_gangprivate_1. (omp-offload.c (oacc_loop_xform_head_tail): Treat private-variable markers like fork/join when transforming head/tail sequences. (execute_oacc_device_lower): Use IFN_UNIQUE_OACC_PRIVATE instead of "oacc gangprivate" attributes to determine partitioning level of variables. * omp-sese.c (find_gangprivate_vars): New function. (find_local_vars_to_propagate): Use GANGPRIVATE_VARS parameter instead of "oacc gangprivate" attribute to determine which variables are gang-private. (oacc_do_neutering): Use find_gangprivate_vars. * target.def (adjust_gangprivate_decl): Rename to... (adjust_private_decl): ...this. Update documentation (briefly). libgomp/ * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Use oaccdevlow dump and update scanned output. * testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: Likewise. Add missing atomic to force worker partitioning for test variable. (cherry picked from openacc-gcc-9-branch commit bbad7288269195b39603cdfde6c15f9488de83dc)
2020-03-03[og9] Fix libgomp serial-dims.c test for AMD GCNJulian Brown2-0/+11
libgomp/ * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN. (cherry picked from openacc-gcc-9-branch commit 195a5318951ab947de00a4372d216ba9536493d3)
2020-03-03Fix OpenMP's use_device_ptr with Fortran array descriptorsTobias Burnus2-0/+612
gcc/fortran * f95-lang.c (LANG_HOOKS_OMP_ARRAY_DATA): Set to gfc_omp_array_data. * trans-array.c (gfc_conv_descriptor_data_get): Handle ref types. * trans-openmp.c (gfc_omp_array_data): New. * trans.h (gfc_omp_array_data): Declare. gcc/ * hooks.c (hook_tree_tree_null): New. * hooks.h (hook_tree_tree_null): Declare. * langhooks-def.h (LANG_HOOKS_OMP_ARRAY_DATA): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it. * langhooks.h (lang_hooks_for_types): Add omp_array_data. * omp-general.c (omp_is_optional_argument): Handle value+optional. * omp-low.c (omp_context): Add array_data_map + present_map. (install_var_field): Handle array descriptors. (delete_omp_context): Free new maps. (scan_sharing_clauses): Handle array descriptors. (lower_omp_target): Ditto. Fix optional-arg present check. gcc/testsuite/ * gfortran.dg/gomp/use_device_ptr1.f90: New. * gfortran.dg/gomp/use_device_ptr2.f90: New. * gfortran.dg/gomp/use_device_ptr3.f90: New. libgomp/ * testsuite/libgomp.fortran/use_device_ptr1.f90: New. (cherry picked from openacc-gcc-9-branch commit d13968ca4a60e3edb24bf61eac1a15bacb66406a)
2020-03-03[og9] Handle references in OpenACC "private" clausesJulian Brown4-0/+205
gcc/ * gimplify.c (localize_reductions): Rewrite references for OMP_CLAUSE_PRIVATE also. libgomp/ * testsuite/libgomp.oacc-fortran/privatized-ref-1.f95: New test. * testsuite/libgomp.oacc-c++/privatized-ref-2.C: New test. * testsuite/libgomp.oacc-c++/privatized-ref-3.C: New test. (cherry picked from openacc-gcc-9-branch commit 28b843e3c547bda9857d2c60ffcc44f343e8ac4f)
2020-03-03[og9] Add 'ephemeral' parameter to GOMP_OFFLOAD_openacc_async_host2devJulian Brown2-1/+17
libgomp/ * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_host2dev): Add EPHEMERAL parameter, and FIXME function comment. (cherry picked from openacc-gcc-9-branch commit 3e8fcd5d0dafe0a83ce51c30d908de0318d13672)
2020-03-03libgomp - fix dg-warning line numbersTobias Burnus3-5/+11
libgomp/ * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Fix dg-warning line numbers. * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise. (cherry picked from openacc-gcc-9-branch commit 0f2a4240229e97fdbcd3c8299642ed4b85f5b347)
2020-03-03Use PRId64 if availableTobias Burnus2-1/+15
libgomp/ 2019-09-18 Tobias Burnus <tobias@codesourcery.com> * linux/gomp_print.c (gomp_print_integer): Use PRId64 if available, otherwise cast for %ld. (cherry picked from openacc-gcc-9-branch commit 8a8ebae1a419e1d3642d22874195acf6d5bae7d8)
2020-03-03[og9] Fix OpenACC "ephemeral" asynchronous host-to-device copiesJulian Brown10-87/+133
libgomp/ * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_host2dev): Update prototype. * libgomp.h (gomp_copy_host2dev): Update prototype. * oacc-host.c (host_openacc_async_host2dev): Add ephemeral parameter. * oacc-mem.c (memcpy_tofrom_device): Update call to gomp_copy_host2dev. (update_dev_host): Likewise. * oacc-parallel.c (GOACC_enter_exit_data): Call async versions of acc_attach/acc_detach/acc_detach_finalize functions. * plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock aq->mutex here. (queue_push_launch): Lock aq->mutex before calling wait_for_queue_nonfull. (queue_push_callback): Likewise. (queue_push_asyncwait): Likewise. (queue_push_placeholder): Likewise. (GOMP_OFFLOAD_openacc_async_host2dev): Add ephemeral parameter. Copy source data to temporary space immediately if true, and pass to queue_push_copy. (goacc_device_copy_async): Remove. (gomp_copy_host2dev): Add ephemeral parameter. Update function comment. Call async host2dev plugin hook directly. (gomp_copy_dev2host): Call async dev2host plugin hook directly. (gomp_map_vars_existing, gomp_map_pointer, gomp_attach_pointer, gomp_detach_pointer): Update calls to gomp_copy_host2dev. (gomp_map_vars_internal): Don't use coalescing buffer for asynchronous copies. Update calls to gomp_copy_host2dev. (gomp_update): Update calls to gomp_copy_host2dev. * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c (main): Fix async-safety issue. Increase number of iterations. * testsuite/libgomp.oacc-fortran/lib-16-2.f90: Fix async-safety issue. (cherry picked from openacc-gcc-9-branch commit 3a25e449d04d5768c3a799264ba0e5cab8ae181f)
2020-03-03[og9] OpenACC profiling-interface fixes for asynchronous operationsJulian Brown6-88/+197
libgomp/ * oacc-host.c (host_openacc_async_queue_callback): Invoke callback function immediately. * oacc-parallel.c (struct async_prof_callback_info, async_prof_dispatch, queue_async_prof_dispatch): New. (GOACC_parallel_keyed): Call queue_async_prof_dispatch for asynchronous profile-event dispatches. (GOACC_enter_exit_data): Likewise. (GOACC_update): Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c (cb_compute_construct_start): Remove/fix TODO. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c (cb_exit_data_start): Tweak expected state values. (cb_exit_data_end): Likewise. (cb_compute_construct_start): Remove/fix TODO. (cb_compute_construct_end): Don't do adjustments for acc_ev_enqueue_launch_start/acc_ev_enqueue_launch_end callbacks. (cb_compute_construct_end): Tweak expected state values. (cb_enqueue_launch_start, cb_enqueue_launch_end): Don't expect launch-enqueue operations to happen synchronously with respect to profiling events on async streams. (main): Tweak expected state values. * testsuite/libgomp.oacc-c-c++-common/lib-94.c (main): Reorder operations for async-safety. (cherry picked from openacc-gcc-9-branch commit 9bd8ebbc1a1e7a3263571105b3c1237080e9eea7)
2020-03-03[og9] Fix uninitialised read in gomp_map_vars_internalJulian Brown2-2/+6
libgomp/ * target.c (gomp_map_vars_internal): Remove read of uninitialised data. (cherry picked from openacc-gcc-9-branch commit dce6d63aa6d598939b36ac968aa9aa48eaf5f3a2)
2020-03-03[og9] A couple of GCN-specific test fixesJulian Brown5-5/+25
libgomp/ * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run NVidia-specific test on NVidia hardware. * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main): Initialise for acc_device_gcn if testing on AMD GCN. * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support AMD GCN. * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip vector dimension test for AMD GCN. (cherry picked from openacc-gcc-9-branch commit 0467f885d40e76d2d34dac372e4b3dd9b84c31f1)
2020-03-03libgomp plugin-gcn - init stringTobias Burnus2-3/+8
libgomp/ 2019-09-13 Tobias Burnus <tobias@codesourcery.com> * plugin/plugin-gcn.c (hsa_warn, hsa_fatal, hsa_error): Ensure string is initialized. (cherry picked from openacc-gcc-9-branch commit 392044a8db285d9aea0a280983ce7c5014a4e99c)
2020-03-03[og9] Clean up dead/write-only fields in GCN libgomp pluginJulian Brown2-67/+30
gcc/ * config/gcn/mkoffload.c (process_asm): Remove omp_data_size, gridified_kernel_p, kernel_dependencies_count, kernel_dependencies from emitted hsa_kernel_description struct array. libgomp/ * plugin/plugin-gcn.c (GOMP_hsa_kernel_dispatch): Remove omp_data_memory, kernel_dispatch_count, debug, omp_level, children_dispatches and omp_num_threads fields. (hsa_kernel_description): Remove omp_data_size, gridified_kernel_p, kernel_dependencies_count, kernel_dependencies fields to match mkoffload output. (kernel_info): Remove omp_data_size, dependencies, dependencies_count, max_omp_data_size and gridified_kernel_p fields. (init_basic_kernel_info): Don't copy newly-deleted fields. (create_single_kernel_dispatch): Remove omp_data_size parameter. Remove write-only initialization of deleted GOMP_hsa_kernel_dispatch fields. (release_kernel_dispatch): Update debug output. Don't free deleted omp_data_memory field. (init_single_kernel): Remove max_omp_data_size parameter. Remove deleted fields from debug output. (print_kernel_dispatch): Don't print deleted fields. (create_kernel_dispatch): Remove omp_data_size parameter. (init_kernel): Update calls to init_single_kernel and create_kernel_dispatch. (cherry picked from openacc-gcc-9-branch commit c52fb36bc65b613a718e7816682cfd4fb2e8f2b1)
2020-03-03[og9] Improve async serialize implementation for AMD GCN libgomp pluginJulian Brown4-25/+198
libgomp/ * plugin/plugin-gcn.c (struct placeholder, struct asyncwait_info, enum entry_type): New. (queue_entry): Use entry_type enum for tag. Add asyncwait and placeholder event type fields. (wait_for_queue_nonfull): New function. (queue_push_launch): Use above function instead of raising a fatal error on queue-full condition. Use KERNEL_LAUNCH instead of hardwired 0. (queue_push_callback): Use wait_for_queue_nonfull instead of open-coded wait sequence. Use CALLBACK instead of hardwired 1. (queue_push_asyncwait, queue_push_placeholder): New. (execute_queue_entry): Implement ASYNC_WAIT and ASYNC_PLACEHOLDER event types. (GOMP_OFFLOAD_openacc_async_serialize): Use queue_push_placeholder and queue_push_asyncwait instead of host-synchronized wait_queue calls. * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c (main): Add missing asynchronous waits. * testsuite/libgomp.oacc-c-c++-common/data-2.c (main): Likewise. (cherry picked from openacc-gcc-9-branch commit 714b46df96da40f15b38757bc8900451892f32be)
2020-03-03[og9] Fix src_copy mismerge in GOMP_OFFLOAD_openacc_async_host2devJulian Brown2-1/+6
libgomp/ * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Enqueue copy from src_copy not src. (cherry picked from openacc-gcc-9-branch commit 182c52fc5b247a2bb08a83d27edf269ef668e7dd)
2020-03-03Fix memory leak in libgomp when using OpenMPKwok Cheung Yeung2-0/+5
2019-09-10 Kwok Cheung Yeung <kcy@codesourcery.com> libgomp/ * config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list. (cherry picked from openacc-gcc-9-branch commit 6cee7b36a0fa68d0ca1ad4cc7fb860c54eaf4c6b)
2020-03-03Detect number of GPU compute units.Andrew Stubbs2-3/+36
2019-09-10 Andrew Stubbs <ams@codesourcery.com> libgomp/ * plugin/plugin-gcn.c (HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT): Define. (dump_hsa_agent_info): Dump compute unit count. (get_cu_count): New function. (parse_target_attributes): Use get_cu_count for default gdims. (gcn_exec): Likewise. (cherry picked from openacc-gcc-9-branch commit 4bc3e873bcaa3b671dc7c6afbfaa02a4459daae6)
2020-03-03Fix relocations with multiple devices.Andrew Stubbs2-18/+13
2019-09-10 Andrew Stubbs <ams@codesourcery.com> libgomp/ * plugin/plugin-gcn.c (obstack_chunk_alloc): Delete. (obstack_chunk_free): Delete. (obstack.h): Remove include. (create_and_finalize_hsa_program): Remove all unmodified_sections_os and use sections directly from the issue. Use "or 0x80" instead of SHT_NOTE to hide relocations, and then simply recognise that ourselves. (cherry picked from openacc-gcc-9-branch commit 9e56738ddf5a5574ee67065096e19e8d73e993e0)
2020-03-03Move offload data into GPU memory.Andrew Stubbs2-50/+96
2019-09-09 Andrew Stubbs <ams@codesourcery.com> gcc/ * config/gcn/gcn-run.c (heap_region): New global variable. (struct hsa_runtime_fn_info): Add hsa_memory_assign_agent_fn. (init_hsa_runtime_functions): Initialize hsa_memory_assign_agent. (get_kernarg_region): Move contents to .... (get_memory_region): .... here. (get_heap_region): New function. (init_device): Initialize the heap_region. (device_malloc): Add region parameter. (struct kernargs): Move heap .... (heap): ... to global scope. (main): Allocate heap separate to kernargs. libgomp/ * plugin/plugin-gcn.c (struct hsa_runtime_fn_info): Add hsa_memory_assign_agent_fn. (struct agent_info): Add data_region. (init_hsa_runtime_functions): Initialize hsa_memory_assign_agent. (get_kernarg_memory_region): Move contents to new function ... (get_memory_region): ... here. (get_data_memory_region): New function. (GOMP_OFFLOAD_get_property): Use data_region, not kernarg_region. (GOMP_OFFLOAD_init_device): Initialize data_region. (create_and_finalize_hsa_program): Use data_region, not kernarg_region, and assign heap to device agent. (GOMP_OFFLOAD_alloc_by_agent): Likewise. (image_address_p): Delete function. (struct copy_data): Remove use_hsa_memory_copy. (copy_data): Always use hsa_memory_copy. (queue_push_copy): Remove use_hsa_memory_copy. (GOMP_OFFLOAD_dev2host): Always use hsa_memory_copy. (GOMP_OFFLOAD_host2dev): Likewise. (GOMP_OFFLOAD_dev2dev): Likewise. (gcn_exec): Use hsa_memory_copy. (GOMP_OFFLOAD_openacc_async_host2dev): Always use hsa_memory_copy. (GOMP_OFFLOAD_openacc_async_dev2host): Likewise. (cherry picked from openacc-gcc-9-branch commit cd5b623df8eccfdf81930414765e2c1f1ecaab9a)
2020-03-03[og9] OpenACC profiling support for AMD GCNJulian Brown5-0/+123
2019-09-06 Julian Brown <julian@codesourcery.com> libgomp/ * plugin/plugin-gcn.c (GOMP_OFFLOAD_alloc_by_agent, GOMP_OFFLOAD_free, gcn_exec): Add profiling support. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Add GCN support. * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise. (cherry picked from openacc-gcc-9-branch commit 3a62e6e8be2456f110b855386b207312478aa890)
2020-03-03[og9] Add omp_pause_resource{,_all} for AMD GCNJulian Brown2-0/+23
libgomp/ * config/gcn/target.c (omp_pause_resource, omp_pause_resource_all): New functions, plus ialiases. (cherry picked from openacc-gcc-9-branch commit d984b46069361bf599255a137185a642065b07b8)
2020-03-03[og9] Enable worker partitioning for AMD GCNJulian Brown2-3/+6
gcc/ * config/gcn/gcn.c (gcn_goacc_validate_dims): Remove no-flag_worker-partitioning assertion. (TARGET_GOACC_WORKER_PARTITIONING): Define target hook to true. * config/gcn/gcn.opt (flag_worker_partitioning): Change default to 1. libgomp/ * plugin/plugin-gcn.c (gcn_exec): Change default number of workers to 16. (cherry picked from openacc-gcc-9-branch commit 79e7692178509467f622ecc649cda6aa8717406a)
2020-03-03[og9] Fix libgomp.oacc-fortran/lib-13.f90 async bugJulian Brown2-2/+6
libgomp/ * testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after wait API calls. (cherry picked from openacc-gcc-9-branch commit c8992567df068c321e669ae27b8627f98dd08d25)
2020-03-03[og9] Wait on queue-full condition in AMD GCN libgomp offloading pluginJulian Brown2-2/+14
libgomp/ * plugin/plugin-gcn.c (queue_push_callback): Wait on queue-full condition. (cherry picked from openacc-gcc-9-branch commit b4bc0ff301aae3b6a6359f007b3c773419c3163b)
2020-03-03[og9] Use temporary buffers for async host2dev copiesJulian Brown3-38/+52
libgomp/ * plugin/plugin-gcn.c (struct copy_data): Add using_src_copy field. (copy_data): Free temporary buffer if using. (queue_push_copy): Add using_src_copy parameter. (GOMP_OFFLOAD_dev2dev, GOMP_OFFLOAD_async_dev2host): Update calls to queue_push_copy. (GOMP_OFFLOAD_async_host2dev): Likewise. Allocate temporary buffer and copy source data to it immediately. * target.c (gomp_copy_host2dev): Update function comment. (copy_host2dev_immediate): Remove. (gomp_map_pointer, gomp_map_vars_internal): Replace calls to copy_host2dev_immediate with calls to gomp_copy_host2dev. (cherry picked from openacc-gcc-9-branch commit 6723cd26bad519660b91d8eb371d6c9d57876e72)
2020-03-03[og9] Use a single worker for OpenACC on AMD GCNJulian Brown2-1/+8
gcc/ * config/gcn/gcn.c (gcn_goacc_validate_dims): Ensure flag_worker_partitioning is not set. (TARGET_GOACC_WORKER_PARTITIONING): Remove target hook definition. * config/gcn/gcn.opt (macc-experimental-workers): Default to off. libgomp/ * plugin/plugin-gcn.c (gcn_exec): Use 1 for the default number of workers. (cherry picked from openacc-gcc-9-branch commit bae2ce6026b3fe06b86bde41f1f0ee4a642755cc)
2020-03-03[og9] Fix configury for AMD GCN testingJulian Brown7-8/+23
libgomp/ * plugin/configfrag.ac (amdgcn): Set tgt_plugin. * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): Add AMD GCN support. (check_effective_target_openacc_amdgcn_accel_selected): Test offload_target instead of offload_target_openacc. * testsuite/libgomp.oacc-c++/c++.exp (amdgcn*): Rename stanza to... (gcn): ...this. Don't set tagopt redundantly here. * testsuite/libgomp.oacc-c/c.exp (amdgcn*, gcn): Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp (amdgcn*, gcn): Likewise. * configure: Regenerated. (cherry picked from openacc-gcc-9-branch commit a48bf635e1b7ef94a057ed10d433070ccf5724de)
2020-03-03[og9] Add missing exec_params libgomp plugin entry pointsJulian Brown2-0/+22
libgomp/ * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_exec_params, GOMP_OFFLOAD_openacc_async_exec_params): New functions. (cherry picked from openacc-gcc-9-branch commit 6a2a29256ca9c964745ae18d65ca681afec460c9)
2020-03-03[og9] Update parallel-dims.c and serial-dims.c warning line numbering.Julian Brown3-5/+11
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Use relative line numbers for warning. * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise. (cherry picked from openacc-gcc-9-branch commit fcea4b6e384e30231ab6d88b1f9feb1007b3e96b)
2020-03-03[og9] NVPTX GOMP_OFFLOAD_openacc_async_construct arg fix and gomp_print_* ↵Julian Brown3-1/+28
support libgomp/ * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer, gomp_print_double): New. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add dummy device parameter. (cherry picked from openacc-gcc-9-branch commit 3df3ea7e8163b9ec0c7227c70c6e1154bf95c24a)
2020-03-03[og9] Make OpenACC function-parameter explosion optionalJulian Brown4-57/+48
* configure.ac (amdgcn*-*-*): Add target-libffi to noconfigdirs for AMD GCN. * configure: Regenerated. gcc/ * builtin-types.def (BT_FN_VOID_INT_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR): Remove. * config/i386/i386.c (ix86_goacc_explode_args): New. (TARGET_GOACC_EXPLODE_ARGS): Define, using above function. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Add TARGET_GOACC_EXPLODE_ARGS hook. * fortran/types.def (BT_FN_VOID_INT_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR): Remove. * omp-builtins.def (GOACC_parallel_keyed_v2): Remove. * omp-expand.c (expand_omp_target): Use explode_args target hook. Use GOMP_LAUNCH_ARGS_EXPLODED launch tag. * omp-low.c (build_receiver_ref, build_sender_ref, create_omp_child_function, scan_omp_target, lower_omp_target): Use explode_args target hook. * target.def (explode_args): New target hook. * tree-ssa-structalias.c (target.h): Include. (find_func_aliases_for_builtin_call): Conditionalise disabling of pass for OpenACC parallel regions based on explode_args target hook. Remove 'params' from BUILT_IN_GOACC_PARALLEL arguments. (find_func_clobbers): Likewise. (ipa_pta_execute): Update for removed 'params' argument. include/ * gomp-constants.h (GOMP_LAUNCH_ARGS_EXPLODED): Define. libgomp/ * libgomp.map (GOMP_2.0.GOMP_4_BRANCH): Remove GOACC_parallel_keyed_v2. * libgomp_g.h (GOACC_parallel_keyed_v2): Remove prototype. * oacc-parallel.c (GOACC_parallel_keyed_internal): Rename to... (GOACC_parallel_keyed): ...this. Handle GOMP_LAUNCH_ARGS_EXPLODED launch tag. Remove previous wrapper functions. (GOACC_parallel_keyed_v2): Remove. (cherry picked from openacc-gcc-9-branch commit d1a4d60a3bb42efaba6ac417af4116f053d32f93)
2020-03-03[og9] AMD GCN offloading supportJulian Brown104-211/+6508
gcc/ * config.gcc (amdgcn-*-*): Add default option for gfx906. * config/gcn/mkoffload.c: New. * config/gcn/offload.h: New. libgcc/ * Makefile.in: Allow disabling of emutls. * config/gcn/gomp_print.c: New. * config/gcn/reduction.c: New. * config/gcn/t-amdgcn (LIB2ADD): Add gomp_print.c and reduction.c. Disable emutls.c. * config/gcn/t-gcn-hsa: New. libgomp/ * Makefile.am (libgomp_la_SOURCES): Add gomp_print.c. * Makefile.in: Regenerate. * affinity-fmt.c: Rename calls to gomp_write_string from gomp_print_string. * config.h.in (PLUGIN_GCN): Add #undef. * config/nvptx/libgomp-plugin.c: Rename to... * config/accel/libgomp-plugin.c: ...this. * config/nvptx/lock.c: Rename to... * config/accel/lock.c: ...this. * config/nvptx/mutex.c: Rename to... * config/accel/mutex.c: ...this. * config/nvptx/mutex.h: Rename to... * config/accel/mutex.h: ...this. * config/nvptx/oacc-async.c: Rename to... * config/accel/oacc-async.c: ...this. * config/nvptx/oacc-cuda.c: Rename to... * config/accel/oacc-cuda.c: ...this. * config/nvptx/oacc-host.c: Rename to... * config/accel/oacc-host.c: ...this. * config/nvptx/oacc-init.c: Rename to... * config/accel/oacc-init.c: ...this. * config/nvptx/oacc-mem.c: Rename to... * config/accel/oacc-mem.c: ...this. * config/nvptx/oacc-plugin.c: Rename to... * config/accel/oacc-plugin.c: ...this. * config/nvptx/omp-lock.h: Rename to... * config/accel/omp-lock.h: ...this. * config/nvptx/openacc.f90: Rename to... * config/accel/openacc.f90: ...this. Add acc_device_hsa and acc_device_gcn. * config/nvptx/pool.h: Rename to... * config/accel/pool.h: ...this. * config/nvptx/proc.c: Rename to... * config/accel/proc.c: ...this. Add omp_get_num_procs alias. * config/nvptx/ptrlock.c: Rename to... * config/accel/ptrlock.c: ...this. * config/nvptx/ptrlock.h: Rename to... * config/accel/ptrlock.h: ...this. * config/nvptx/sem.c: Rename to... * config/accel/sem.c: ...this. * config/nvptx/sem.h: Rename to... * config/accel/sem.h: ...this. * config/nvptx/thread-stacksize.h: Rename to... * config/accel/thread-stacksize.h: ...this. * config/gcn/affinity-fmt.c: New. * config/gcn/bar.c: New. * config/gcn/bar.h: New. * config/gcn/doacross.h: New. * config/gcn/gomp_print.c: New. * config/gcn/icv-device.c: New. * config/gcn/simple-bar.h: New. * config/gcn/target.c: New. * config/gcn/task.c: New. * config/gcn/team.c: New. * config/gcn/time.c: New. * config/linux/gomp_print.c: New. * configure.ac (amdgcn*-*-*): Disable pthreads. * configure: Regenerated. * configure.tgt (nvptx*-*-*): Add 'accel' config_path. (amdgcn*-*-*): Set config_path. * fortran.c (omp_display_affinity_): Rename calls to gomp_write_string from gomp_print_string. * libgomp-plugin.h (enum offload_target_type): Add OFFLOAD_TARGET_TYPE_GCN. (GOMP_OFFLOAD_openacc_async_construct): Change parameter type to int. * libgomp.h (gcn_thrs, set_gcn_thrs, gomp_thread): Add for __AMDGCN__. (gomp_print_string): Rename to... (gomp_write_string): ...this. * libgomp.map (GOMP_4.5): Add gomp_rpint_string, gomp_print_integer, gomp_print_double. * oacc-async.c (lookup_goacc_asyncqueue): Pass target_id to async queue construct function. * oacc-host.c (host_openacc_async_construct): Add dummy device parameter. * oacc-init.c (name_of_acc_device_t): Add acc_device_gcn. * oacc-int.h (goacc_thread): Add dummy implementation for __AMDGCN__. * oacc-parallel.c (GOACC_enter_exit_data): Support acc_async_noval and zero-length array sections. * omp.h.in (gomp_print_string, gomp_print_integer, gomp_print_double): Add prototypes. * omp_lib.f90.in (gomp_print_string, gomp_print_integer, gomp_print_double): Add interfaces. * openacc.f90 (openacc_kinds): Add acc_device_gcn. Bump acc_device_current code. * openacc.h (acc_device_t): Add acc_device_gcn, bump acc_device_current code. * openacc_lib.h (acc_device_hsa, acc_device_gcn): Add. * plugin/Makefrag.am (PLUGIN_GCN): Support building GCN plugin. * plugin/configfrag.am (PLUGIN_GCN, PLUGIN_GCN_CPPFLAGS, PLUGIN_GCN_LDFLAGS, PLUGIN_GCN_LIBS): Add. Add suport for GCN plugin. * plugin/plugin-gcn.c: New. * target.c (stdio.h): Include unconditionally. (gomp_copy_host2dev): Add function comment. (copy_host2dev_immediate): New function. (gomp_map_pointer, gomp_map_vars_internal): Use copy_host2dev_immediate where appropriate. (offload_target_to_plugin_name): Support gcn. * team.c (gomp_free_pool_helper): Support gcn. * testsuite/Makefile.in: Regenerated. * testsuite/lib/libgomp.exp (check_effective_target_openacc_amdgcn_accel_present): New. (check_effective_target_openacc_amdgcn_accel_selected): New. * testsuite/libgomp.c/c.exp (generate_tests, test_lists, generated_tests): New. (tests): Add generated tests. * testsuite/libgomp.c/for-1.h: New. * testsuite/libgomp.c/for-2.h: New. * testsuite/libgomp.c/for-3.h: New. * testsuite/libgomp.c/for-3.list: New. * testsuite/libgomp.c/for-5.c: New. * testsuite/libgomp.c/for-5.list: New. * testsuite/libgomp.c/for-6.c: New. * testsuite/libgomp.c/for-6.list: New. * testsuite/libgomp.c/target-print-1.c: New. * testsuite/libgomp.fortran/target-print-1.f90: New. * testsuite/libgomp.oacc-c++/c++.exp (amdgcn*): Add support for AMD GCN. * testsuite/libgomp.oacc-c-c++-common/atomic_capture-2.c: Adjust for portability. * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Skip unsuitable test for AMD GCN. * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Adjust for portability. * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-variables-2.c: New. * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Skip for AMD GCN. * testsuite/libgomp.oacc-c/c.exp (amdgcn*): Add support for AMD GCN. * testsuite/libgomp.oacc-c/offload-target-1.c: Add AMD GCN support. * testsuite/libgomp.oacc-c/print-1.c: New. * testsuite/libgomp.oacc-fortran/fortran.exp (amdgcn*): Add AMD GCN support. * testsuite/libgomp.oacc-fortran/atomic_capture-1.f90: Adjust for portability. * testsuite/libgomp.oacc-fortran/collapse-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/error_stop-1.f: Support AMD GCN. * testsuite/libgomp.oacc-fortran/error_stop-2.f: Support AMD GCN. * testsuite/libgomp.oacc-fortran/error_stop-3.f: Support AMD GCN. * testsuite/libgomp.oacc-fortran/print-1.f90: New. (cherry picked from openacc-gcc-9-branch commit dfe3cbfb88da3984ed8c791e941059ad514af0b2)
2020-03-03Add changes to profiling interface from OG8 branchKwok Cheung Yeung16-41/+137
This bundles up the parts of the profiling code from the OG8 branch that were not included in the upstream patch. libgomp/ * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Update. libgomp/ * oacc-init.c (get_property_any): Add profiling code. libgomp/ * Makefile.am (libgomp_la_SOURCES): Add oacc-profiling-acc_register_library.c. * Makefile.in: Regenerate. * libgomp.texi: Remove paragraph about acc_register_library. * oacc-parallel.c (GOACC_parallel_keyed_internal): Set device_api for profiling. * oacc-profiling-acc_register_library.c: New file. * oacc-profiling.c (goacc_profiling_initialize): Call acc_register_library. Avoid duplicate registration. (acc_register_library): Remove. * config/nvptx/oacc-profiling-acc_register_library.c: New empty file. * config/nvptx/oacc-profiling.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: Remove call to acc_register_library. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c: Likewise. (cherry picked from openacc-gcc-9-branch commit b1321d52402d217793a27592e2959b07319df75b)
2020-03-03OpenACC Profiling Interface (incomplete)Thomas Schwinge23-71/+4401
libgomp/ * acc_prof.h: New file. * oacc-profiling.c: Likewise. * Makefile.am (nodist_libsubinclude_HEADERS, libgomp_la_SOURCES): Add these, respectively. * Makefile.in: Regenerate. * env.c (initialize_env): Call goacc_profiling_initialize. * oacc-plugin.c (GOMP_PLUGIN_goacc_thread) (GOMP_PLUGIN_goacc_profiling_dispatch): New functions. * oacc-plugin.h (GOMP_PLUGIN_goacc_thread) (GOMP_PLUGIN_goacc_profiling_dispatch): Declare. * libgomp.map (OACC_2.5.1): Add acc_prof_lookup, acc_prof_register, acc_prof_unregister, and acc_register_library. (GOMP_PLUGIN_1.3): Add GOMP_PLUGIN_goacc_profiling_dispatch, and GOMP_PLUGIN_goacc_thread. * oacc-int.h (struct goacc_thread): Add prof_info, api_info, prof_callbacks_enabled members. (goacc_prof_enabled, goacc_profiling_initialize) (_goacc_profiling_dispatch_p, _goacc_profiling_setup_p) (goacc_profiling_dispatch): Declare. (GOACC_PROF_ENABLED, GOACC_PROFILING_DISPATCH_P) (GOACC_PROFILING_SETUP_P): Define. * oacc-async.c (acc_async_test, acc_async_test_all, acc_wait) (acc_wait_async, acc_wait_all, acc_wait_all_async): Update for OpenACC Profiling Interface. * oacc-cuda.c (acc_get_current_cuda_device) (acc_get_current_cuda_context, acc_get_cuda_stream) (acc_set_cuda_stream): Likewise. * oacc-init.c (acc_init_1, goacc_attach_host_thread_to_device) (acc_init, acc_set_device_type, acc_get_device_type) (acc_get_device_num, goacc_lazy_initialize): Likewise. * oacc-mem.c (acc_malloc, acc_free, memcpy_tofrom_device) (acc_deviceptr, acc_hostptr, acc_is_present, acc_map_data) (acc_unmap_data, present_create_copy, delete_copyout) (update_dev_host): Likewise. * oacc-parallel.c (GOACC_parallel_keyed, GOACC_data_start) (GOACC_data_end, GOACC_enter_exit_data, GOACC_update, GOACC_wait): Likewise. * plugin/plugin-nvptx.c (nvptx_exec, nvptx_alloc, nvptx_free) (GOMP_OFFLOAD_openacc_exec, GOMP_OFFLOAD_openacc_async_exec): Likewise. * libgomp.texi: Update. * testsuite/libgomp.oacc-c-c++-common/acc_prof-dispatch-1.c: New file. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-valid_bytes-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-version-1.c: Likewise. (cherry picked from openacc-gcc-9-branch commit 1246da4f164bcf2ec4430b89686a38c47e55b5f9)
2020-03-03Commit of https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00336.htmlChung-Lin Tang2-2/+2
2019-07-04 Chung-Lin Tang <cltang@codesourcery.com> libatomic/ PR other/79543 * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libffi/ PR other/79543 * acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libgomp/ PR other/79543 * acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libitm/ PR other/79543 * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. libstdc++-v3/ PR other/79543 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version scanning to conform to the GNU Coding Standards. * configure: Regenerate. (cherry picked from openacc-gcc-9-branch commit b3c9281e6a2f6dfdbca701626c4bc1d82fb60d8f)
2020-03-03Allow the accelerator to have more offloaded functions than the hostCesar Philippidis2-1/+6
libgomp/ * target.c (gomp_load_image_to_device): Allow the accelerator to possess more offloaded functions than the host. (cherry picked from openacc-gcc-9-branch commit 1d39156f663fa9913446dadfa5c4bb77a92aa494)
2020-03-03Support Fortran 2003 class pointers in OpenACCJulian Brown8-1/+322
gcc/ * gimplify.c (insert_struct_comp_map): Handle GOMP_MAP_ATTACH_DETACH. (gimplify_scan_omp_clauses): Separate out handling of OACC_ENTER_DATA and OACC_EXIT_DATA. Remove GOMP_MAP_POINTER and GOMP_MAP_TO_PSET mappings, apart from those following GOMP_MAP_DECLARE_{,DE}ALLOCATE. Handle GOMP_MAP_ATTACH_DETACH. * tree-pretty-print.c (dump_omp_clause): Support GOMP_MAP_ATTACH_DETACH. Print "bias" not "len" for attach/detach clause types. include/ * gomp-constants.h (gomp_map_kind): Add GOMP_MAP_ATTACH_DETACH. gcc/c/ * c-typeck.c (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH for OpenACC attach/detach operations. gcc/cp/ * semantics.c (handle_omp_array_sections): Likewise. (finish_omp_clauses): Handle GOMP_MAP_ATTACH_DETACH. gcc/fortran/ * openmp.c (resolve_oacc_data_clauses): Allow polymorphic allocatable variables. * trans-expr.c (gfc_conv_component_ref, conv_parent_component_reference): Make global. (gfc_auto_dereference_var): New function, broken out of... (gfc_conv_variable): ...here. Call outlined function instead. * trans-openmp.c (gfc_trans_omp_array_section): New function, broken out of... (gfc_trans_omp_clauses): ...here. Separate out OpenACC derived type/polymorphic class pointer handling. Call above outlined function. * trans.h (gfc_conv_component_ref, conv_parent_component_references, gfc_auto_dereference_var): Add prototypes. gcc/testsuite/ * c-c++-common/goacc/mdc-1.c: Update clause matching patterns. libgomp/ * oacc-parallel.c (GOACC_enter_exit_data): Fix optional arguments for changes to clause stripping in enter data/exit data directives. * testsuite/libgomp.oacc-fortran/class-ptr-param.f95: New test. * testsuite/libgomp.oacc-fortran/classtypes-1.f95: New test. * testsuite/libgomp.oacc-fortran/classtypes-2.f95: New test. * testsuite/libgomp.oacc-fortran/derivedtype-1.f95: New test. * testsuite/libgomp.oacc-fortran/derivedtype-2.f95: New test. * testsuite/libgomp.oacc-fortran/multidim-slice.f95: New test. (cherry picked from openacc-gcc-9-branch commit 3c260613f2e74d6639c4dbd43b018b6640ae8454)
2020-03-03Merge tag 'releases/gcc-9.1.0'Kwok Cheung Yeung1-0/+4
(cherry picked from openacc-gcc-9-branch commit 891935361130d470567210e4a2dfefde2f634030)
2020-03-03Apply gangprivate attribute to innermost declJulian Brown2-0/+27
...and fix parallelism-level calculation when applying the attribute. gcc/ * omp-low.c (mark_oacc_gangprivate): Add CTX parameter. Use to look up correct decl to add attribute to. (lower_omp_for): Move "oacc gangprivate" processing from here... (process_oacc_gangprivate_1): ...to here. New function. (lower_omp_target): Update call to mark_oacc_gangprivate. (execute_lower_omp): Call process_oacc_gangprivate_1 for each OMP context. libgomp/ * testsuite/libgomp.oacc-fortran/gangprivate-attrib-2.f90: New test. (cherry picked from openacc-gcc-9-branch commit ac8b85410f6d8b0c02f130527713da488f243d57)
2020-03-03Link libquadmath in Fortran libgomp testsAndrew Jenner3-2/+9
When invoking gcc to compile fortran code, fortran.exp is currently adding the options -lgfortran -foffload=-lgfortran to the gcc command line. libgfortran statically links to libquadmath and the gfortran driver invokes the linker with -lquadmath as well as -lgfortran so fortran.exp should do so too. libgomp/ * testsuite/libgomp.fortan/fortran.exp (lang_link_flags): Add -lquadmath. * testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags): Add -lquadmath. (cherry picked from openacc-gcc-9-branch commit bb65425bb284f3efc08bff4d94661123cdc27b41)
2020-03-03Fix missing gstdint.h errorKwok Cheung Yeung2-1/+5
libgomp/ * libgomp_g.h: Include stdint.h instead of gstdint.h. (cherry picked from openacc-gcc-9-branch commit 9ff104a9f24e99fd137b75bb4e9bf03687ff1cab)
2020-03-03Fix warning syntax and typos in two libgomp testsJulian Brown3-10/+15
libgomp/ * testsuite/libgomp.oacc-c-c++-common/kernels-decompose-1.c: Expect "optimized:" not "note:" in warnings. * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Fix typos in warnings. (cherry picked from openacc-gcc-9-branch commit d6627e7056558a844c0a26f21dfaa5e0b5040709)
2020-03-03Add kernels for-index reuse testcase.Julian Brown2-0/+41
libgomp/ * testsuite/libgomp.oacc-c-c++-common/kernels-for-index-reuse-1.c: New test. (cherry picked from openacc-gcc-9-branch commit 3f86b73b7706bdf066b1af71dfc5d8eb461eaa05)
2020-03-03Initialise KEY and OFFSET fields when if_present test fails.Julian Brown2-2/+11
libgomp/ * target.c (gomp_map_vars_async): Initialise KEY and OFFSET fields in not-present case. (cherry picked from openacc-gcc-9-branch commit 995f9680a46c3a7246fe465faa847f8009e47ed8)
2020-03-03Update OpenACC version to 2.6Julian Brown6-71/+84
gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711. gcc/doc/ * invoke.texi: Update mention of OpenACC version to 2.6. gcc/fortran/ * cpp.c (cpp_define_builtins): Update _OPENACC define to 201711. * gfortran.texi: Update mentions of OpenACC version to 2.6. * intrinsic.texi: Likewise. gcc/testsuite/ * c-c++-common/cpp/openacc-define-3.c: Update expected value for _OPENACC define. * gfortran.dg/openacc-define-3.f90: Likewise. libgomp/ * libgomp.texi: Update mentions of OpenACC version to 2.6. Update section numbers to match version 2.6 of the spec. * openacc.f90 (openacc_version): Update to 201711. * openacc_lib.h (openacc_version): Update to 201711. * testsuite/libgomp.oacc-fortran/openacc_version-1.f: Update expected openacc_version to 201711. * testsuite/libgomp.oacc-fortran/openacc_version-2.f90: Likewise. (cherry picked from openacc-gcc-9-branch commit 7a22697197b85931d9fda66e8b0f75171ea13b43)