https://gcc.gnu.org/g:cb9fb802ed206834be7a518420dd863007ce557f
commit cb9fb802ed206834be7a518420dd863007ce557f Author: Tobias Burnus <[email protected]> Date: Wed Sep 23 09:37:37 2026 +0200 ChangeLog.omp bump Diff: --- gcc/ChangeLog.omp | 94 ++++++++++++++++++++ gcc/DATESTAMP.omp | 2 +- gcc/c-family/ChangeLog.omp | 7 ++ gcc/c/ChangeLog.omp | 12 +++ gcc/cp/ChangeLog.omp | 22 +++++ gcc/fortran/ChangeLog.omp | 13 +++ gcc/lto/ChangeLog.omp | 18 ++++ gcc/testsuite/ChangeLog.omp | 40 +++++++++ include/ChangeLog.omp | 6 ++ libgomp/ChangeLog.omp | 207 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 420 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp index 111727060040..72ab4eeb87bf 100644 --- a/gcc/ChangeLog.omp +++ b/gcc/ChangeLog.omp @@ -1,3 +1,97 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * omp-offload.cc (omp_discover_implicit_declare_target): + For self_maps/unified_shared_memory case, adjust to not convert + 'omp declare target local' variables to 'link'. + * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_LOCAL. + * tree.cc (omp_clause_num_ops): Add entry for OMP_CLAUSE_LOCAL. + (omp_clause_code_name): Likewise. + * varpool.cc (varpool_node::get_create): Do not add variable to + offload_vars if "local" argument is present in "omp declare target". + +2026-09-18 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-18 Andrew Stubbs <[email protected]> + + * config/gcn/gcn-valu.md (mov<mode>_exec): Add xnack alternatives. + (@mov<mode>_sgprbase): Likewise. + +2026-09-17 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-17 Andrew Stubbs <[email protected]> + + * config/gcn/gcn.cc (gcn_spill_class): Spill scalars in VGPRs to + SCALAR_SPILL_REGS. + (gcn_memory_move_cost): Handle SCALAR_SPILL_REGS. + * config/gcn/gcn.h (enum reg_class): Add SCALAR_SPILL_REGS. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Likewise. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-07 Andrew Stubbs <[email protected]> + + * config/gcn/gcn.cc (gcn_spill_class): Spill scalars to SGPRs. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-10 Andrew Stubbs <[email protected]> + + * config/gcn/gcn.md (one_cmpldi2): Use s_not_b64. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-07 Andrew Stubbs <[email protected]> + + * config/gcn/gcn-valu.md (vnhi): New mode attribute. + (VnHI): Likewise. + (<u>mul<mode><vnsi>3<exec>): New. + (<u>mul<mode><vnhi>3<exec>): New. + * config/gcn/gcn.md (<u>mulqihi3_scalar): Rename this ... + (<u>mulqihi3): ... to this. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-07 Andrew Stubbs <[email protected]> + + * config/gcn/gcn-opts.h (TARGET_RDNA3_PLUS): New. + * config/gcn/gcn-valu.md (<expander><mode>2<exec>): New. + (<expander><mode>2): New. + (<expander><mode>2_natural): New. + * config/gcn/gcn.md (rnda): Add n3 and 3p values. + (enabled): Handle rdna n3 and 3p. + (mnemonic): Add clz and ctz. + (rdna_mnemonic): New code attribute. + +2026-09-11 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-08 Chung-Lin Tang <[email protected]> + + PR middle-end/122205 + * omp-offload.cc (omp_discover_implicit_declare_target): For variables, + under 'OMP_REQUIRES_SELF_MAPS | OMP_REQUIRES_UNIFIED_SHARED_MEMORY', + remove "omp declare target" attribute and add "omp declare target link". + +2026-09-10 Tobias Burnus <[email protected]> + + * config/gcn/mkoffload.cc (main): Pass -L<dir> on to the + device compiler. + +2026-09-10 Tobias Burnus <[email protected]> + + * config/gcn/gcn-devices.def (gfx9-4-generic): Set sram-ecc + default to HSACO_ATTR_ANY. + 2026-07-09 Chung-Lin Tang <[email protected]> Sandra Loosemore <[email protected]> diff --git a/gcc/DATESTAMP.omp b/gcc/DATESTAMP.omp index 76403c9887d1..086b6e065352 100644 --- a/gcc/DATESTAMP.omp +++ b/gcc/DATESTAMP.omp @@ -1 +1 @@ -20260709 +20260923 diff --git a/gcc/c-family/ChangeLog.omp b/gcc/c-family/ChangeLog.omp index 7008806f4643..2e347bb1ada2 100644 --- a/gcc/c-family/ChangeLog.omp +++ b/gcc/c-family/ChangeLog.omp @@ -1,3 +1,10 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_LOCAL. + 2026-07-09 Chung-Lin Tang <[email protected]> Sandra Loosemore <[email protected]> diff --git a/gcc/c/ChangeLog.omp b/gcc/c/ChangeLog.omp index 6ccb755be41f..ae845a6a3b6d 100644 --- a/gcc/c/ChangeLog.omp +++ b/gcc/c/ChangeLog.omp @@ -1,3 +1,15 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * c-parser.cc (c_parser_omp_clause_name): Add "local" case. + (c_parser_omp_all_clauses): Add PRAGMA_OMP_CLAUSE_LOCAL case. + (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_LOCAL. + ( c_parser_omp_declare_target): Handle OMP_CLAUSE_LOCAL. + * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_LOCAL. + Emit error if local clause variable appears in map clause. + 2026-07-09 Chung-Lin Tang <[email protected]> * c-parser.cc (c_parser_omp_variable_list): Adjust parsing of opening diff --git a/gcc/cp/ChangeLog.omp b/gcc/cp/ChangeLog.omp index e91c0688faae..2dc8ec18eee2 100644 --- a/gcc/cp/ChangeLog.omp +++ b/gcc/cp/ChangeLog.omp @@ -1,3 +1,25 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * parser.cc (cp_parser_omp_clause_name): Add "local" case. + (cp_parser_omp_all_clauses): Add PRAGMA_OMP_CLAUSE_LOCAL case. + (handle_omp_declare_target_clause): Handle OMP_CLAUSE_LOCAL. + (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_LOCAL. + * semantics.cc (finish_omp_clauses): Handle OMP_CLAUSE_LOCAL. + Emit error if local clause variable appears in map clause. + +2026-09-10 Tobias Burnus <[email protected]> + + * pt.cc (tsubst_omp_clauses): Add OMP_CLAUSE_DEVICE_TYPE + to switch statement. + +2026-09-10 Thomas Schwinge <[email protected]> + + PR c++/119102 + * module.cc (module_state): Update comment for 'SE_BITS' change. + 2026-07-09 Chung-Lin Tang <[email protected]> * parser.cc (cp_parser_omp_var_list_no_open): Adjust parsing of opening diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp index d16e87242acc..476187063796 100644 --- a/gcc/fortran/ChangeLog.omp +++ b/gcc/fortran/ChangeLog.omp @@ -1,3 +1,16 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * openmp.cc (gfc_match_omp_declare_target): Adjust error handling + to handle local clause. + * trans-common.cc (build_common_decl): Adjust handling of device_type + clause, remove sorry and FIXME of LOCAL clause, handle local clause. + * trans-decl.cc (add_attributes_to_decl): Adjust handling of device_type + clause, remove sorry of LOCAL clause, adjust creating of + "omp declare target [link]" attribute between OpenACC/OpenMP. + 2026-07-09 Kwok Cheung Yeung <[email protected]> Andrew Stubbs <[email protected]> diff --git a/gcc/lto/ChangeLog.omp b/gcc/lto/ChangeLog.omp new file mode 100644 index 000000000000..f5318c93b286 --- /dev/null +++ b/gcc/lto/ChangeLog.omp @@ -0,0 +1,18 @@ +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-16 Tobias Burnus <[email protected]> + + PR middle-end/127273 + * lto.cc (offload_handle_link_vars): Remove has-value-expr check; + store link vars and processing them after walking the varpool. + (lto_main): Remove duplicated offload_handle_link_vars call. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-10 Tobias Burnus <[email protected]> + + PR middle-end/127273 + * lto.cc (offload_handle_link_vars): Create node and force_output; + avoid creating the same '...$linkptr' var multiple times. \ No newline at end of file diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp index 195c25921a66..8ec1335fcea6 100644 --- a/gcc/testsuite/ChangeLog.omp +++ b/gcc/testsuite/ChangeLog.omp @@ -1,3 +1,43 @@ +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * c-c++-common/gomp/declare-target-1.c: Add local clause test. + * c-c++-common/gomp/declare-target-8.c: New testcase. + * gfortran.dg/gomp/declare-target-1.f90: Add local clause test. + * gfortran.dg/gomp/declare-target-7.f90: New testcase. + * gfortran.dg/gomp/groupprivate-2.f90: Adjust test. + +2026-09-17 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-17 Andrew Stubbs <[email protected]> + + * gcc.target/gcn/avgpr-spill-int.c: Increase register pressure. + * gcc.target/gcn/sgpr-spill-double.c: Allow some AVGPR spills. + * gcc.target/gcn/sgpr-spill-int.c: Likewise. + * gcc.target/gcn/sgpr-spill-long.c: Likewise. + * gcc.target/gcn/sgpr-spill-short.c: Likewise. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-07 Andrew Stubbs <[email protected]> + + * gcc.target/gcn/avgpr-spill-double.c: Switch to vector type. + * gcc.target/gcn/avgpr-spill-int.c: Likewise. + * gcc.target/gcn/avgpr-spill-long.c: Likewise. + * gcc.target/gcn/avgpr-spill-short.c: Likewise. + * gcc.target/gcn/sgpr-spill-double.c: New test. + * gcc.target/gcn/sgpr-spill-int.c: New test. + * gcc.target/gcn/sgpr-spill-long.c: New test. + * gcc.target/gcn/sgpr-spill-short.c: New test. + +2026-09-10 Tobias Burnus <[email protected]> + + * g++.dg/gomp/target-device-type.C: New test. + 2026-07-09 Kwok Cheung Yeung <[email protected]> Sandra Loosemore <[email protected]> diff --git a/include/ChangeLog.omp b/include/ChangeLog.omp index d7c4ee61c55e..948be56bb375 100644 --- a/include/ChangeLog.omp +++ b/include/ChangeLog.omp @@ -1,3 +1,9 @@ +2026-09-10 Tobias Burnus <[email protected]> + Andrew Stubbs <[email protected]> + supers1ngular <[email protected]> + + * hsa.h (hsa_system_info_t): Add HSA_AMD_SYSTEM_INFO_XNACK_ENABLED. + 2026-07-09 Julian Brown <[email protected]> * gomp-constants.h (gomp_map_kind): Add GOMP_MAP_TO_GRID, diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 7ad9f18ff158..1b44f9b5e672 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,210 @@ +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-10 Tobias Burnus <[email protected]> + + PR middle-end/127273 + * testsuite/libgomp.c/usm_env_handling-1-self.c: Remove 'dg-ice'. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-09 Tobias Burnus <[email protected]> + + PR middle-end/122205 + * testsuite/libgomp.c/usm_env_handling-2.c: Improve debug printf. + * testsuite/libgomp.c/usm_env_handling-1.c: likewise; add + '#ifdef USE_SELF_MAPS'. + * testsuite/libgomp.c/usm_env_handling-1-self.c: New test. + * testsuite/libgomp.c/usm_env_handling-2-self.c: New test. + * testsuite/libgomp.c/usm_env_handling-3-self.c: New test. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-07 Tobias Burnus <[email protected]> + + * libgomp.texi (OpenMP 6.0 implementation status): Mark + 'need_device_addr' as supported. + (GOMP_RUNTIME_USM): Improve wording of the unsupported part. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-04 Tobias Burnus <[email protected]> + + PR libgomp/127186 + * libgomp.texi (GOMP_RUNTIME_USM): Update caveat section. + * target.c (gomp_target_enter_exit_data_usm): Handle GOMP_MAP_ATTACH. + * testsuite/libgomp.c/usm_env_handling-3.c: New test. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-02 Tobias Burnus <[email protected]> + + PR libgomp/127186 + * target.c (GOMP_target_ext): Fix comment related to + GOMP_RUNTIME_USM. + * testsuite/libgomp.c/usm_env_handling-2.c: New test. + +2026-09-23 Tobias Burnus <[email protected]> + + Backported from master: + 2026-09-01 Tobias Burnus <[email protected]> + + * target.c (gomp_load_image_to_device): With shared memory, do not + add 'link' variables to the splay tree. + (GOMP_target_update_ext): For OFFLOAD_CAP_SHARED_MEM, still call + gomp_update unless requires self_maps/USM is set. + (gomp_update): For OFFLOAD_CAP_SHARED_MEM, only handle global + static variables (other than 'link'). + (GOMP_target_ext, GOMP_target_data_ext): For OFFLOAD_CAP_SHARED_MEM + without 'requires self_maps/USM', abort with a 'sorry' for + global static variables other than 'link' as the MAP clause would + otherwise be ignored. + (gomp_target_enter_exit_data_usm): New; handle global static variables + other than 'link' with OFFLOAD_CAP_SHARED_MEM. + (GOMP_target_enter_exit_data): Call it in that case, unless there + is a 'requires self_maps/USM'. + * testsuite/libgomp.c/usm_env_handling-1.c: New test. + +2026-09-23 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-22 Chung-Lin Tang <[email protected]> + + * testsuite/libgomp.c-c++-common/declare-target-local-1.c: New test. + * testsuite/libgomp.c-c++-common/declare-target-local-2.c: New test. + * testsuite/libgomp.c-c++-common/declare-target-local-3.c: New test. + * testsuite/libgomp.c-c++-common/declare-target-local-4.c: New test. + * testsuite/libgomp.fortran/declare-target-local-1.f90: New test. + +2026-09-16 Andrew Stubbs <[email protected]> + + Backported from master: + 2026-09-07 Andrew Stubbs <[email protected]> + + * config/gcn/time.c (omp_get_wtime): Use "=Sg". + +2026-09-11 Chung-Lin Tang <[email protected]> + + Backported from master: + 2026-09-08 Chung-Lin Tang <[email protected]> + + PR middle-end/122205 + * testsuite/libgomp.c/omp_target_is_present.c: Adjust tests for self_maps. + * testsuite/libgomp.c-c++-common/requires-8.c: New test. + * testsuite/libgomp.fortran/requires-2.f90: New test. + +2026-09-10 supers1ngular <[email protected]> + + * env.c (enum gomp_runtime_usm_t): New variable. + (parse_rt_usm): New function to parse environment variable. + (initialize_env): Enforce default 'disabled'. + * libgomp.h (struct gomp_team_state): Whitespace. + (enum gomp_device_num): Ditto. + (enum gomp_runtime_usm_t): New enum. + (gomp_init_device): Update signature. + * libgomp.texi: Add relevant documentation. + * oacc-init.c (acc_init_1): Update function call. + (goacc_attach_host_thread_to_device): Whitespace. + (acc_init): Ditto. + (acc_set_device_type): Update function call. + (acc_set_device_num): Ditto. + (get_property_any): Ditto. + (goacc_restore_bind): Whitespace. + * target.c (resolve_device): Update function call. + (gomp_load_image_to_device): Allow copying if the device + capability is set. + (gomp_init_device): Update signature, and add capability logic. + Also add a debugging output. + (gomp_page_locked_host_alloc): Update function call. + +2026-09-10 Thomas Schwinge <[email protected]> + + * target.c (gomp_target_init): Fix OpenMP reverse offload + capability checking. + +2026-09-10 Tobias Burnus <[email protected]> + Andrew Stubbs <[email protected]> + supers1ngular <[email protected]> + + * libgomp-plugin.h (GOMP_OFFLOAD_CAP_APU_SHARED_MEM, + GOMP_OFFLOAD_CAP_UNIFIED_ADDR, GOMP_OFFLOAD_CAP_REV_OFFLOAD): Add. + (GOMP_OFFLOAD_get_dev_caps): New prototype. + (GOMP_OFFLOAD_get_num_devices): Remove requirement argument. + * libgomp.h (struct gomp_device_descr): Add get_dev_caps_func. + * libgomp.texi (nvptx, AMD Radeon): Update for by-device + USM support. + * oacc-host.c (host_get_num_devices, + host_openacc_get_property): Update call. + * oacc-init.c (resolve_device, acc_init_1, acc_shutdown_1, + goacc_attach_host_thread_to_device, acc_get_num_devices, + acc_set_device_num, get_property_any): Likewise. + * plugin/plugin-gcn.c (is_integrated_apu): Remove. + (GOMP_OFFLOAD_get_caps): Mark unified address and + reverse offload as supported. + (GOMP_OFFLOAD_get_dev_caps): New. + (GOMP_OFFLOAD_get_num_devices): Remove requirements arg. + * plugin/plugin-nvptx.c (using_usm): Init with -1. + (GOMP_OFFLOAD_get_caps): Mark unified address and + reverse offload as supported. + (GOMP_OFFLOAD_get_dev_caps): New. + (GOMP_OFFLOAD_get_num_devices): Remove requirements arg. + (GOMP_OFFLOAD_is_accessible_ptr): Check for using_usm > 0. + * target.c (gomp_load_plugin_for_device): Load get_dev_caps. + (gomp_target_init): Change to by-device capabilities, skip + only those devices not devices types that do not support a + capability. + +2026-09-10 supers1ngular <[email protected]> + + Revert: + 2026-07-14 supers1ngular <[email protected]> + + * env.c (enum gomp_runtime_usm_t): New environment variable. + (parse_rt_usm): Parse new environment variable. + (initialize_env): Behavior handling for new variable. + * libgomp-plugin.h (GOMP_OFFLOAD_CAP_AUTO_USM): New capability. + (GOMP_OFFLOAD_get_dev_caps): New function for enumeration. + * libgomp.h (enum gomp_device_num): Fix whitespace. + (enum gomp_runtime_usm_t): Define. + (struct gomp_device_descr): Add 'get_dev_caps_func'. + * libgomp.texi: Update documentation. + * plugin/plugin-gcn.c (get_memory_region): Fix whitespace. + (process_reverse_offload): Ditto. + (gcn_exec): Remove preprocessor elision. + (is_apu_with_xnack): New function. + (GCN_DEVICE): Query XNACK support. + (GOMP_OFFLOAD_get_dev_caps): New function. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_dev_caps): Ditto. + * target.c (gomp_init_device): Logic for deciding USM behavior. + (gomp_load_plugin_for_device): Get symbol. + (gomp_target_init): New comment, and fix style. + +2026-07-14 supers1ngular <[email protected]> + + * env.c (enum gomp_runtime_usm_t): New environment variable. + (parse_rt_usm): Parse new environment variable. + (initialize_env): Behavior handling for new variable. + * libgomp-plugin.h (GOMP_OFFLOAD_CAP_AUTO_USM): New capability. + (GOMP_OFFLOAD_get_dev_caps): New function for enumeration. + * libgomp.h (enum gomp_device_num): Fix whitespace. + (enum gomp_runtime_usm_t): Define. + (struct gomp_device_descr): Add 'get_dev_caps_func'. + * libgomp.texi: Update documentation. + * plugin/plugin-gcn.c (get_memory_region): Fix whitespace. + (process_reverse_offload): Ditto. + (gcn_exec): Remove preprocessor elision. + (is_apu_with_xnack): New function. + (GCN_DEVICE): Query XNACK support. + (GOMP_OFFLOAD_get_dev_caps): New function. + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_dev_caps): Ditto. + * target.c (gomp_init_device): Logic for deciding USM behavior. + (gomp_load_plugin_for_device): Get symbol. + (gomp_target_init): New comment, and fix style. + 2026-07-09 Kwok Cheung Yeung <[email protected]> Andrew Stubbs <[email protected]>
