[COMMITTED] MAINTAINERS: Add my gcc.gnu.org username

2025-04-28 Thread Kwok Cheung Yeung
I committed this patch to add my gcc username to MAINTAINERS in accordance with the new format. Kwok Yeung From 45d82eb7b7389a7c668db29bf2d5ec4ed2bc4da0 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 28 Apr 2025 19:27:59 +0100 Subject: [PATCH] MAINTAINERS: Add my gcc.gnu.org

[OG14] [COMMITTED] openmp: Support for OpenMP iterators in map, to and from clauses

2025-04-17 Thread Kwok Cheung Yeung
I have committed the following patches onto the devel/omp/gcc-14 OpenMP development branch to implement support for iterators in mapping clauses and in to/from clauses in 'target update' constructs: 76e5b71adb8 openmp: Refactor handling of iterators 28f09913235 openmp: Add support for iterators

[PATCH] openmp: Add support for non-constant iterator parameters in map, to and from clauses

2024-12-13 Thread Kwok Cheung Yeung
moved around and removed at that point. KwokFrom d277a9539ad78fae9eb97a156949320623060a0d Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 12 Dec 2024 21:22:20 + Subject: [PATCH] openmp: Add support for non-constant iterator parameters in map, to and from clauses This patch

[PATCH v4 1/5] openmp: Refactor handling of iterators

2024-11-28 Thread Kwok Cheung Yeung
(c)), while map clauses store it in OMP_CLAUSE_ITERATORS (c).From a25a986ae707395b3bf31a7d3f08e0d04554aed3 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 27 Nov 2024 21:49:12 + Subject: [PATCH 1/5] openmp: Refactor handling of iterators Move code to calculate the iteration size

[PATCH v4 0/5] openmp: Add support for iterators in OpenMP mapping clauses

2024-11-28 Thread Kwok Cheung Yeung
This is a revised version of the patch series posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664541.html The previous version performed the expansion of the iterators into loops at the omp-lowering stage, but that meant that the Gimplification of the clauses with iterators w

[PATCH v4 5/5] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

2024-11-28 Thread Kwok Cheung Yeung
This part of the patch is unchanged.From e761481eb3d9b322267b3a22773caa0f0270275f Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 27 Nov 2024 21:56:08 + Subject: [PATCH 5/5] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

[PATCH v4 4/5] openmp, fortran: Add support for map iterators in OpenMP target construct (Fortran)

2024-11-28 Thread Kwok Cheung Yeung
When constructing an iterator with a subset of the original, the original BLOCK_SUBBLOCKS is moved to the first new iterator. Otherwise this part of the patchset is unchanged.From f40b72c1e750ec948ebf3ffd92da107679d0b702 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 27 Nov 2024 21

[PATCH v4 3/5] openmp: Add support for iterators in 'target update' clauses (C/C++)

2024-11-28 Thread Kwok Cheung Yeung
The target update clause decls and sizes are now Gimplified in gimplify_scan_omp_clauses. The rest of the patch is mostly unchanged.From 79159cbf815d458114e7c6da8dbb138ce24b7df1 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 27 Nov 2024 21:51:34 + Subject: [PATCH 3/5] openmp

[PATCH v4 2/5] openmp: Add support for iterators in map clauses (C/C++)

2024-11-28 Thread Kwok Cheung Yeung
entry if not present. The variables in the clause are then remapped to those in the new iterator.From ceb003984d80067ec1b92f70ac5bfe4ce2072d81 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 27 Nov 2024 21:49:32 + Subject: [PATCH 2/5] openmp: Add support for iterators in map clauses (C

[PATCH v3 5/5] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

2024-10-04 Thread Kwok Cheung Yeung
This patch adds parsing and translation of the 'to' and 'from' clauses for the 'target update' construct in Fortran.From da8ab0cb38d2bc347cf902ec417b0397c28e24e2 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 4 Oct 2024 15:16:38 +0100 Subject: [P

[PATCH v3 4/5] openmp, fortran: Add support for map iterators in OpenMP target construct (Fortran)

2024-10-04 Thread Kwok Cheung Yeung
in the context of each iteration of the iterator).From a24aa032c2e23577d4fbc61df6da79345bae8292 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 4 Oct 2024 15:16:29 +0100 Subject: [PATCH 4/5] openmp, fortran: Add support for map iterators in OpenMP target construct (Fortran) Thi

[PATCH v3 3/5] openmp: Add support for iterators in 'target update' clauses (C/C++)

2024-10-04 Thread Kwok Cheung Yeung
This patch extends the previous patch to cover to/from clauses in 'target update'.From 1c8bf84ec99fe2fd371e345f012eb0d84a923153 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 4 Oct 2024 15:16:21 +0100 Subject: [PATCH 3/5] openmp: Add support for iterators in 'target u

[PATCH v3 2/5] openmp: Add support for iterators in map clauses (C/C++)

2024-10-04 Thread Kwok Cheung Yeung
, otherwise it will get out of sync with the expected layout and the wrong variables will be picked up by the target function.From 50557e513ca534ba32f50d1b056a07a6f671 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 4 Oct 2024 15:16:12 +0100 Subject: [PATCH 2/5] openmp: Add support

[PATCH v3 1/5] openmp: Refactor handling of iterators

2024-10-04 Thread Kwok Cheung Yeung
ator clause with a macro OMP_ITERATOR_DECL_P, as it needs to be done frequently.From 34bf780b1e0395028ecdacfa1385238a8da13be6 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 4 Oct 2024 15:15:42 +0100 Subject: [PATCH 1/5] openmp: Refactor handling of iterators Move code to calculate the

[PATCH v3 0/5] openmp: Add support for iterators in OpenMP mapping clauses

2024-10-04 Thread Kwok Cheung Yeung
This is a further improved patch series to that posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662138.html The main change is that the expansion of the iterators is pushed back further to the omp-lowering stage. This is because the recently committed deep-mapping support (a

[PATCH v2 5/5] openmp, fortran: Add support for iterators in OpenMP 'target update' constructs (Fortran)

2024-09-03 Thread Kwok Cheung Yeung
This patch adds parsing and translation of the 'to' and 'from' clauses for the 'target update' construct in Fortran.From cfb6b76da5bba038d854d510a4fd44ddf4fa8f1f Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:34:29 +0100 Subject: [P

[PATCH v2 4/5] openmp, fortran: Add support for map iterators in OpenMP target construct (Fortran)

2024-09-03 Thread Kwok Cheung Yeung
or the target, only the address associated with the first map generated by an iterator is set (as only a single slot in the data structure is allocated for each iterator map).From f7cdf555e9d5c49b455a364a1eef2123c7bb76d1 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19

[PATCH v2 3/5] openmp: Add support for iterators in 'target update' clauses (C/C++)

2024-09-03 Thread Kwok Cheung Yeung
This patch extends the previous patch to cover to/from clauses in 'target update'.From c3dfc4a792610530a4ab729c3f250917b828e469 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:34:09 +0100 Subject: [PATCH 3/5] openmp: Add support for iterators in 'target u

[PATCH v2 2/5] openmp: Add support for iterators in map clauses (C/C++)

2024-09-03 Thread Kwok Cheung Yeung
, inserting them into the list of mappings at the point where iterator data occurred.From dd65c671dc9f5fb34290938a413c610eb0110ef6 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:33:47 +0100 Subject: [PATCH 2/5] openmp: Add support for iterators in map clauses (C/C++) This adds

[PATCH v2 1/5] openmp: Refactor handling of iterators

2024-09-03 Thread Kwok Cheung Yeung
ator clause with a macro OMP_ITERATOR_DECL_P, as it needs to be done frequently.From d2cf47a312d9decc14d0cf37fa57ad358a96743d Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 2 Sep 2024 19:33:08 +0100 Subject: [PATCH 1/5] openmp: Refactor handling of iterators Move code to calculate the

[PATCH v2 0/5] openmp: Add support for iterators in OpenMP mapping clauses

2024-09-03 Thread Kwok Cheung Yeung
This is an improved version of the previous series that was posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652680.html Compared to the previous version, this version delays the gimplification of iterators until the very end of gimplify_adjust_omp_clauses (instead of doing it in

[PATCH 3/3] openmp: Add support for iterators in to/from clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
This patch extends the previous patch to cover to/from clauses in 'target update'.From 99addc124535307b50fbdeb66c4f90bb0cbeb041 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 15 Apr 2024 13:50:22 +0100 Subject: [PATCH 3/3] openmp: Add support for iterators in to/from cla

[PATCH 2/3] openmp: Add support for iterators in map clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
info array, inserting them into the list of mappings at the point where iterator data occurred.From b2e8ff46929d5a2781781486ec942b344056d78b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 12 Mar 2024 22:51:06 + Subject: [PATCH 2/3] openmp: Add support for iterators in map clauses

[PATCH 1/3] openmp: Refactor handling of iterators

2024-05-24 Thread Kwok Cheung Yeung
erator clause with a macro OMP_ITERATOR_DECL_P, as it needs to be done frequently.From 0439fce03c2b5fb2802eaf65831e28f548ca074b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 12 Mar 2024 20:51:38 + Subject: [PATCH 1/3] openmp: Refactor handling of iterators Move code to calculate

[PATCH 0/3] openmp: Add support for iterators in OpenMP mapping clauses (C/C++)

2024-05-24 Thread Kwok Cheung Yeung
This series of patches adds support for OpenMP iterators in the 'map' clause of the 'target' construct (and it's derivatives such as 'target enter data'), and the 'to' and 'from' constructs of the 'target update' construct, currently for C and C++ only. The approach in this patch differs from

[COMMITTED] libgomp: Update documentation for indirect calls in target regions

2024-02-15 Thread Kwok Cheung Yeung
Hi, I have committed this patch to the libgomp documentation to reflect that indirect calls in offloaded target regions are now supported in C, C++ and Fortran. KwokFrom b3b3bd250f0a7c22b7d46d3522c8b94c6a35d22a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 15 Feb 2024 21:22:26

Re: [PATCH v2] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-02-06 Thread Kwok Cheung Yeung
69e0fd Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 5 Feb 2024 20:31:49 + Subject: [PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive 2024-02-05 Kwok Cheung Yeung gcc/fortran/ * dump-parse-tree.cc

[PATCH v2] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-02-05 Thread Kwok Cheung Yeung
f6662a7bc76d400fecb5013ad6d6ab3b00b8a6e7 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 5 Feb 2024 20:31:49 + Subject: [PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive 2024-02-05 Kwok Cheung Yeung gcc/fortran

[PATCH v2] openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls

2024-01-29 Thread Kwok Cheung Yeung
Can you please akso update the comments to talk about hashtab instead of splay? Hello This version has the comments updated and removes a stray 'volatile' in the #ifdefed out code. Thanks KwokFrom 5737298f4f5e5471667b05e207b22c9c91b94ca0 Mon Sep 17 00:00:00 2001 From: Kwok Ch

[committed] MAINTAINERS: Update my email address

2024-01-29 Thread Kwok Cheung Yeung
I have committed this to update my work email address in MAINTAINERS (but forgot to change my git user.mail first - oops!). Thanks Kwok Yeung From f3fdaa3eecd155dbdc78c1ec9a259dfa4e379ea4 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 29 Jan 2024 16:40:49 + Subject: [PATCH

[PATCH] openmp, fortran: Add Fortran support for indirect clause on the declare target directive

2024-01-22 Thread Kwok Cheung Yeung
ed to Fortran where appropriate. Okay for mainline? Thanks KwokFrom 545bdb2c8ab9a43e79c7a3a2992bd9edc7d08a6f Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 11 Jan 2024 19:52:53 + Subject: [PATCH 2/2] openmp, fortran: Add Fortran support for indirect clause on the declare targe

[PATCH] openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls

2024-01-22 Thread Kwok Cheung Yeung
e reached do the initialisation. This removes the need for locking during initialisation. Tested with offloading to NVPTX and GCN with a x86_64 host. Okay for master? Thanks KwokFrom 721ec33bec2fddc7ee37e227358e36fec923f8da Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 17 Jan 2024 16

[committed] Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2024-01-03 Thread Kwok Cheung Yeung
xplicitly list such cases as gcc_unreachable (it might imply that it can reach the ME, but just not at that particular point?) or not though. KwokFrom a56a693a74dd3bee71b1266b09dbd753694ace94 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 3 Jan 2024 14:34:39 + Subject: [PATC

[committed] Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2024-01-03 Thread Kwok Cheung Yeung
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); ... maintain separate 'if' branches for 'FUNC_MAP' vs. 'IND_FUNC_MAP', so that we're able to easily locate those with 'grep', for example. From 6ae84729940acff598e1a7f49d7b381025082ceb Mon Sep 1

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-07 Thread Kwok Cheung Yeung
Yes, I believe that is the right fix. The version in libgomp/config/accel/ should then override the version in libgomp/ for accelerator targets. I'll do a quick check that this works as expected and push it ASAP. Sorry for breaking the build for so many targets! Kwok On 07/11/2023 9:51 pm,

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-11-03 Thread Kwok Cheung Yeung
ending successful testing (still in progress)? Thanks Kwok Thanks, Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft:

[PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-10-08 Thread Kwok Cheung Yeung
r mainline? Thanks KwokFrom 46129c254990a9fff4b6d8512f04ad8fa7d61f0e Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Sun, 8 Oct 2023 13:50:25 +0100 Subject: [PATCH] openmp: Add support for the 'indirect' clause in C/C++ This adds support for the 'indirect' clause in the 'declare target' directive

Re: [PATCH] amdgcn: Enable SIMD vectorization of math functions

2023-03-02 Thread Kwok Cheung Yeung
Hello I've made the suggested changes. Should I hold off on committing this until GCC 13 has been branched off? Kwok On 01/03/2023 10:01 am, Andrew Stubbs wrote: On 28/02/2023 23:01, Kwok Cheung Yeung wrote: Hello This patch implements the TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUN

[PATCH] amdgcn: Enable SIMD vectorization of math functions

2023-02-28 Thread Kwok Cheung Yeung
st for now - it is still useful to check that calls to the correct functions are being made. The runtime correctness is still covered by the libgomp test. Okay for trunk? Thanks Kwok From 69d13dc898ff7c70e80299a92dc895a89a9e679b Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 28 F

[PATCHv2] openmp: Add support for 'present' modifier

2023-02-17 Thread Kwok Cheung Yeung
- The Fortran parse tree dump now shows clauses with 'present' applied. - The reordering of OpenMP clauses has been moved to gimplify_scan_omp_clauses, where the other clause reordering rules are applied. Thanks KwokFrom 24b6225578bb08bbd745d6ec653aab60802dd220 Mon Sep 17 00:00:00 2001

Re: [OG12][committed] openmp: Add support for the 'present' modifier

2023-02-14 Thread Kwok Cheung Yeung
Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 14 Feb 2023 21:24:19 + Subject: [PATCH] openmp: Add support for 'present' modifier in the Fortran parse tree dump 2023-02-14 Kwok Cheung Yeung gcc/fortran/ * dump-parse-tree.cc (show_omp_namelist): Display

[OG12][committed] openmp: Add support for the 'present' modifier

2023-02-09 Thread Kwok Cheung Yeung
Hello I've ported my patch for supporting the OpenMP 5.1 'present' modifier and committed it to the devel/omp/gcc-12 development branch: 229b705862c openmp: Add support for the 'present' modifier Tested with offloading on amdgcn and nvptx. Kwok

[PATCH] openmp: Add support for 'present' modifier

2023-02-03 Thread Kwok Cheung Yeung
ses. Bootstrapped on x86-64, no regressions in GCC testsuite, libgomp tested with x86-64 (no offloading), AMD GCN and NVPTX offloading. This is too late for GCC 13 now, but will this be okay for GCC 14? Thanks KwokFrom ba9368f88514a27f374d84e53e36ce36fa9ac5bc Mon Sep 17 00:00:00 2001 From: Kwo

Re: [PATCH][OG12] amdgcn: Support AMD-specific 'isa' and 'arch' traits in OpenMP context selectors

2022-12-02 Thread Kwok Cheung Yeung
So this is the OG12-specific part (including metadirective and dynamic context selectors) of the previous patch. Once https://gcc.gnu.org/r13-4446-ge41b243302e996 is backported, is it OK for OG12? Looks good to me, thanks! Kwok

Re: [PATCH][OG12] amdgcn: Support AMD-specific 'isa' and 'arch' traits in OpenMP context selectors

2022-11-30 Thread Kwok Cheung Yeung via Gcc-patches
Hello PA, --- libgomp/config/gcn/selector.c +++ libgomp/config/gcn/selector.c @@ -36,7 +36,7 @@ GOMP_evaluate_current_device (const char *kind, const char *arch, if (kind && strcmp (kind, "gpu") != 0) return false; - if (arch && strcmp (arch, "gcn") != 0) + if (arch && (strcmp (arc

Re: [OG12] [committed] amdgcn: Enable SIMD vectorization of math library functions

2022-11-08 Thread Kwok Cheung Yeung
Hello These additional patches were pushed onto the devel/omp/gcc-12 branch to fix various issues with the SIMD math library: ecf1603b7ad amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin 6c40e3f5daa amdgcn: Various fixes for SIMD math library 8e6c5b18e10 amdgcn: Fixed intermittent failure i

[COMMITTED] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin

2022-11-08 Thread Kwok Cheung Yeung
2001 From: Kwok Cheung Yeung Date: Tue, 8 Nov 2022 14:38:23 + Subject: [PATCH] amdgcn: Fix expansion of GCN_BUILTIN_LDEXPV builtin 2022-11-08 Kwok Cheung Yeung gcc/ * config/gcn/gcn.cc (gcn_expand_builtin_1): Expand first argument of GCN_BUILTIN_LDEXPV to V64DFmode

[PATCH] amdgcn: Add builtins for vectorized native versions of abs, floorf and floor

2022-11-08 Thread Kwok Cheung Yeung
37f49b204d501327d0867b3e8a3f01b9445fb9bd Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 8 Nov 2022 11:59:58 + Subject: [PATCH] amdgcn: Add builtins for vectorized native versions of abs, floorf and floor 2022-11-08 Kwok Cheung Yeung gcc/ * config/gcn/gcn

[PATCH] amdgcn: Fix instruction generation for exp2 and log2 operations

2022-11-03 Thread Kwok Cheung Yeung
kFrom c0e74e01743cd3a3e0dcb2a071396e3a5751ff4c Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 3 Nov 2022 17:19:11 + Subject: [PATCH] amdgcn: Fix instruction generation for exp2 and log2 operations The GCN instructions for the exp2 and log2 operations are v_exp_* and v

[OG12] [committed] amdgcn: Enable SIMD vectorization of math library functions

2022-11-01 Thread Kwok Cheung Yeung
Hello I have committed the following patches onto the devel/omp/gcc-12 development branch: 863579c4e30 amdgcn: Enable SIMD vectorization of math functions bd9a6106b95 amdgcn: Add SIMD versions of math routines to libgcc d3a2a1cc424 amdgcn: Add builtins for vector floor/floorf a3c04a367a9 amdgc

[PATCH] amdgcn: Add support for additional natively supported floating-point operations

2022-09-08 Thread Kwok Cheung Yeung
7 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 8 Sep 2022 17:37:26 + Subject: [PATCH] amdgcn: Add support for additional natively supported floating-point operations This adds support for the following natively supported floating-point operations, in scalar and vectorized modes: floor,

[og12] [committed] Port remaining OG11 patches

2022-07-01 Thread Kwok Cheung Yeung
(hsaco_attr_type: ... this.) + * config/gcn/mkoffload.c (SET_XNACK_ANY): New macro. + (TEST_XNACK): Delete. + (TEST_XNACK_ANY): New macro. + (TEST_XNACK_ON): New macro. + (main): Support the new -mxnack=on/off/any syntax. + 2022-06-30 Kwok Cheung Yeung

[og12] [committed] Fix bootstrap build of OG12

2022-06-30 Thread Kwok Cheung Yeung
ompatible with the " + "selected %<-foffload-memory%> option"); flag_offload_memory = OFFLOAD_MEMORY_UNIFIED; } else if (!strcmp (p, "dynamic_allocators")) -- 2.25.1 From e9ee746093bd989c33685e3197c75b

[committed] wwwdocs: Document devel/omp/gcc-12

2022-06-29 Thread Kwok Cheung Yeung
previous devel/omp/gcc-11 branch now joins the list of inactive OMP branches. KwokFrom 0695e5e969eba730e517a6adbdf38b8774f89437 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 29 Jun 2022 22:32:39 +0100 Subject: [PATCH] Document devel/omp/gcc-12 branch Also moves the old devel/omp/gcc-11

[PATCH][v2] openmp, fortran: Check that the type of an event handle in a detach clause is suitable [PR104131]

2022-03-02 Thread Kwok Cheung Yeung
bly be treated separatedly. I don’t know how difficult the bullet 2 above would be, but bullet 1 and 3 seem quite doable.From 3ed6eb1e38ad2a25c6eca18f9ff4d05d3f227db3 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 2 Mar 2022 17:09:45 + Subject: [PATCH] openmp, fortran: Check that

Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
On 28/02/2022 5:37 pm, Jakub Jelinek wrote: On Mon, Feb 28, 2022 at 06:33:15PM +0100, Mikael Morin wrote: It is true that the spots I saw in fortran/openmp.cc that test rank look like: if (!gfc_resolve_expr (el->expr) || el->expr->ts.type != BT_INTEGER || el->expr->rank !

Re: [PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
On 28/02/2022 2:07 pm, Jakub Jelinek wrote: On Mon, Feb 28, 2022 at 02:01:03PM +, Kwok Cheung Yeung wrote: diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 19142c4d8d0..50a1c476009 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -531,9 +531,10

[PATCH] openmp, fortran: Check that event handles passed to detach clauses are not arrays [PR104131]

2022-02-28 Thread Kwok Cheung Yeung
event handle during parsing if it is any type of array, thereby preventing the situation leading to an ICE in the first place. Okay for trunk? Thanks KwokFrom 8ed3b8bd793298f94bdefbdff32f91eaea1a9d70 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 28 Feb 2022 12:34:22 + Subject

[og11][committed] openmp: Improve handling of nested OpenMP metadirectives in C and C++

2022-02-18 Thread Kwok Cheung Yeung
This patch has been committed to the devel/omp/gcc-11 development branch: 249df772b70f7b9f50f68030d4ea9c25624cc578 openmp: Improve handling of nested OpenMP metadirectives in C and C++ Kwok

[PATCH] openmp: Improve handling of nested OpenMP metadirectives in C and C++ (was: Re: [PATCH 1/7] openmp: Add C support for parsing metadirectives)

2022-02-18 Thread Kwok Cheung Yeung
rectives. KwokFrom a9e4936b8476b97f11bb81b416ef3d28fa60cd37 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 18 Feb 2022 19:00:57 + Subject: [PATCH] openmp: Improve handling of nested OpenMP metadirectives in C and C++ This patch fixes a misparsing issue when encountering code

[OG11][committed] Fortran metadirective fixes

2022-02-14 Thread Kwok Cheung Yeung
Hello I have backported and committed the recent two fixes for Fortran metadirective handling onto the devel/omp/gcc-11 development branch: 38ed9d83b893df0bbd098c7b44dbbeb56ed7dd1c openmp: Eliminate non-matching metadirective variants early in Fortran front-end (https://gcc.gnu.org/pipermai

Re: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2022-02-14 Thread Kwok Cheung Yeung
adirective (i.e. just '!$omp metadirective' with nothing else) is fixed. Thanks KwokFrom 153b8dbd19cf90b1869be7f409d55d1ab5ba81d5 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 11 Feb 2022 15:42:50 + Subject: [PATCH 2/2] openmp: More Fortran front-end fixes for metadir

Re: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2022-02-14 Thread Kwok Cheung Yeung
ost metadirective state to that of 'program P' in order to find the proper end type, and not just one level as it currently does. Thanks KwokFrom 5a7b109a014422a5b43e43669df1dc0d59e830cf Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 11 Feb 2022 11:20:18 + Subject: [PA

Re: [OG11][committed] OpenMP metadirective support

2022-01-31 Thread Kwok Cheung Yeung
because the expected wording of the error message has changed. This fix is already in the version of the patch posted at: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589191.html KwokFrom 23dd64c4715b2df2181aaf995e3040d54edba129 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon,

[OG11][committed] openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly

2022-01-28 Thread Kwok Cheung Yeung
Hello I have backported and committed the patch 'openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly' to the devel/omp/gcc-11 development branch: d6d82af7918 openmp: Add warning when functions containing metadirectives with 'construct={targe

[PATCH] openmp: Add warning when functions containing metadirectives with 'construct={target}' called directly

2022-01-28 Thread Kwok Cheung Yeung
irective patches are done)? Thanks Kwok On 26/07/2021 10:23 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: Yes, that is a target variant, but I'm pretty sure we've decided that the target construct added for declare target is actual

Re: [PATCH] openmp: Add support for target_device selector set in metadirectives

2022-01-26 Thread Kwok Cheung Yeung
Hello Just noticed a bug in the ISA checking in the nvptx plugin - the minor version should only be compared if the major version is equal, otherwise it would reject an isa of sm_35 if the card is capable of supporting sm_52, for example. This patch fixes the issue. Thanks Kwokdiff --git a/

[OG11][committed] OpenMP metadirective support

2022-01-25 Thread Kwok Cheung Yeung
Hello I have backported and committed my metadirective patches onto the current OpenMP development branch (devel/omp/gcc-11). These are: f464df13a44b9814341659be631f051377a2ce25 openmp: Add C support for parsing metadirectives a238b6934b62ce3e8342047e41840c804d83b59d openmp: Add middle-end su

[PATCH] openmp: Add support for target_device selector set in metadirectives

2022-01-24 Thread Kwok Cheung Yeung
GCC 12 is released)? Thanks KwokFrom 2d2f00947783e1ecdf54943d9c499015ce61d267 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Wed, 24 Nov 2021 02:51:28 -0800 Subject: [PATCH] openmp: Add support for 'target_device' context selector set 2022-01-18 Kwok Cheung Yeung gc

[PATCH] openmp: Metadirective patch fixes

2022-01-24 Thread Kwok Cheung Yeung
n't matter much, as GCC readily eliminates the resulting 'if ()' statements via constant folding. These fixes should be merged into the original metadirective patches. Thanks KwokFrom 77f419aef8a608440789b0ebb4a08f11d69f00e2 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date:

[PATCH 7/7] openmp: Add testcases for metadirectives

2021-12-10 Thread Kwok Cheung Yeung
This adds testcases for metadirectives. KwokFrom d3f80b603298fb2f3501a28b888acfdbc02a64e7 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Tue, 7 Dec 2021 11:25:33 + Subject: [PATCH 7/7] openmp: Add testcases for metadirectives 2021-12-10 Kwok Cheung Yeung gcc/testsuite

[PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
n internal implementation detail not visible to end users. KwokFrom eed8a06fca397edd5fb451f08c8b1a6f7d67951a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:59:36 + Subject: [PATCH 6/7] openmp, fortran: Add Fortran support for parsing metadirectives This adds s

[PATCH 5/7] openmp: Add C++ support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
This patch adds metadirective parsing support to the C++ parser. This is basically just a straight port of the C code to the C++ front end. KwokFrom e9bb138d4c3f560e48e408facce2361533685a98 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:58:01 + Subject: [PATCH 5

[PATCH 4/7] openmp: Add support for streaming metadirectives and resolving them after LTO

2021-12-10 Thread Kwok Cheung Yeung
85826d05e029571fd003dd629aa04ce3e17d9c71 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:56:07 + Subject: [PATCH 4/7] openmp: Add support for streaming metadirectives and resolving them after LTO This patch adds support for streaming metadirective Gimple statements during

[PATCH 3/7] openmp: Add support for resolving metadirectives during parsing and Gimplification

2021-12-10 Thread Kwok Cheung Yeung
65ee7342256db3c81cc6741ce2c96e36dd4a9ca6 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 2021 22:49:23 + Subject: [PATCH 3/7] openmp: Add support for resolving metadirectives during parsing and Gimplification This adds support for resolving metadirectives according to the OpenMP 5.1

[PATCH 2/7] openmp: Add middle-end support for metadirectives

2021-12-10 Thread Kwok Cheung Yeung
to pass through the middle-end. GCC will emit an ICE if it makes it through to the back-end though, as the metadirective is supposed to be eliminated before it gets that far. KwokFrom 1a2fcbb2191fd1dd694ea5730e54fab19d6465b4 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 6 Dec 202

[PATCH 1/7] openmp: Add C support for parsing metadirectives

2021-12-10 Thread Kwok Cheung Yeung
x27;end ' form (apart from the 'nothing' directive), and in C/C++, the only directive that we support with an end form is 'declare target', which we currently forbid since it is declarative. KwokFrom dc88559b0295104472a0cbf79de03b0549bd35f5 Mon Sep 17 00:00:00 2001 From:

[PATCH 0/7] openmp: OpenMP metadirectives support

2021-12-10 Thread Kwok Cheung Yeung
Hello This is my current patchset for OpenMP metadirectives support. It aims to implement the specification from OpenMP 5.1, with dynamic selector support (though currently only the dynamic user selector set is supported), and supports the C, C++ and Fortran front ends. The patch has been bo

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-12-10 Thread Kwok Cheung Yeung
Hello It has been several months since I posted my WIP patch, and my current patch set (which I will post separately) has evolved considerably since then. I have added C++ and Fortran support, as well as dynamic selectors from the OpenMP 5.1 spec (currently only the 'user={condition()}' selec

Re: [PATCH] openmp, fortran: Add support for declare variant in Fortran

2021-10-18 Thread Kwok Cheung Yeung
From 38733234024697d2144613c4a992e970f40afad8 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 18 Oct 2021 13:56:59 -0700 Subject: [PATCH] openmp: Add additional tests for declare variant in Fortran Add tests to check that explicitly specifying the containing procedure as the base name for declare va

[COMMIT] openmp: Mark declare variant directive as supported in Fortran

2021-10-14 Thread Kwok Cheung Yeung
From: Kwok Cheung Yeung Date: Thu, 14 Oct 2021 09:29:13 -0700 Subject: [PATCH] openmp: Mark declare variant directive in documentation as supported in Fortran 2021-10-14 Kwok Cheung Yeung libgomp/ * libgomp.texi (OpenMP 5.0): Update entry for declare variant directive. --

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
On 26/07/2021 10:23 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 10:19:35PM +0100, Kwok Cheung Yeung wrote: In that comment, Deepak says: So, we decided to keep the target trait static, requiring that the declare target directive must be explicit and that the function version must be

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello On 26/07/2021 8:56 pm, Jakub Jelinek wrote: On Mon, Jul 26, 2021 at 08:28:16PM +0100, Kwok Cheung Yeung wrote: In Section 1.2.2 of the OpenMP TR10 spec, 'target variant' is defined as: A version of a device routine that can only be executed as part of a target region. Yes,

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Hello Thanks for your reply. On 26/07/2021 3:29 pm, Jakub Jelinek wrote: On Fri, Jul 09, 2021 at 12:16:15PM +0100, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void

Re: [WIP, OpenMP] OpenMP metadirectives support

2021-07-26 Thread Kwok Cheung Yeung
Ping? Does anyone have any opinions on how this issue should be resolved? On 09/07/2021 12:16 pm, Kwok Cheung Yeung wrote: 3) In the OpenMP examples (version 5.0.1), section 9.7, the example metadirective.3.c does not work as expected. #pragma omp declare target void exp_pi_diff(double *d

[WIP, OpenMP] OpenMP metadirectives support

2021-07-09 Thread Kwok Cheung Yeung
Hello This is a WIP implementation of metadirectives as defined in the OpenMP 5.0 spec. I intend to add support for metadirectives as specified in OpenMP 5.1 later (where the directive can be selected dynamically at runtime), but am concentrating on the static part for now. Parsing has only be

[PATCH] openmp: Notify team barrier of pending tasks in, omp_fulfill_event

2021-05-17 Thread Kwok Cheung Yeung
ding and offloading to Nvidia, with no fails. Okay to commit to master, releases/gcc-11 and devel/omp/gcc-11? Thanks Kwok From 348c7cd00e358a8dc0b7563055f367fce2713fa5 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 14 May 2021 09:59:11 -0700 Subject: [PATCH] openmp: Notify team ba

[COMMIT] wwwdocs: Document devel/omp/gcc-11

2021-05-13 Thread Kwok Cheung Yeung
, and have moved devel/omp/gcc-10 to the list of inactive branches. Kwok commit 8a006e10264a471a8f9ece2ce3720eff0910f77d Author: Kwok Cheung Yeung Date: Thu May 13 22:09:36 2021 +0100 Document devel/omp/gcc-11 branch This also moves the old devel/omp/gcc-10 branch to the inactive

[commit] [OG10] amdgcn: Add gfx908 support

2021-03-25 Thread Kwok Cheung Yeung
Hello I have backported commit 3535402e20118655b2ad4085a6e1d4f1b9c46e92 (amdgcn: Add gfx908 support) from mainline to the devel/omp/gcc-10 branch as commit bb55967ccde0b48f285150caf6443a327159b4a2. This adds support for the gfx908 GPU type. Kwok

[PATCH] [og10] openmp: Scale precision of collapsed iteration variable

2021-03-01 Thread Kwok Cheung Yeung
b7a1575920c8de17359b2dfcad5404a112 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 1 Mar 2021 14:15:30 -0800 Subject: [PATCH] openmp: Scale type precision of collapsed iterator variable This sets the type precision of the collapsed iterator variable to the sum of the precision of the

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-25 Thread Kwok Cheung Yeung
comment. Otherwise LGTM. I will get this committed later if the regression tests finish with no surprises. Thank you for your time in reviewing this patch! Kwok From 462c86549de28f28d5a71e4a7e83e2c17fd19c17 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:47 -0800 Su

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-24 Thread Kwok Cheung Yeung
team. If I omit the 'omp parallel' (to try to get an undeferred task), GCC refuses to compile (only 'distribute', 'parallel' or 'loop' regions are allowed to be strictly nested inside 'teams' region). And you can't nest 'omp teams'

Re: [WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-23 Thread Kwok Cheung Yeung
On 19/02/2021 7:12 pm, Kwok Cheung Yeung wrote: I have included the current state of my patch. All task-detach-* tests pass when executed without offloading or with offloading to GCN, but with offloading to Nvidia, task-detach-6.* hangs consistently but everything else passes (probably because

[WIP] Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-02-19 Thread Kwok Cheung Yeung
ding to GCN, but with offloading to Nvidia, task-detach-6.* hangs consistently but everything else passes (probably because of the missing gomp_team_barrier_done?). Kwok From 31a5c736910036364fd1f0f3cf7ac28437864a27 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:

[OG10] [committed] Backport patches for non-rectangular loop collapse

2021-02-09 Thread Kwok Cheung Yeung
Hello I have backported the following patches for supporting non-rectangular loop collapse from mainline to the devel/omp/gcc-10 branch: 7bfdb5a1c694cb9006e0478941e4443b230f5b98 openmp: Fix ICE on non-rectangular loop with known 0 iterations 88528328ea560230f728af97110e89396c8267d2 openmp: Im

[PATCH] libgomp: Add documentation for omp_fulfill_event

2021-01-25 Thread Kwok Cheung Yeung
Hello I forgot to update the libgomp documentation to document the new omp_fulfill_event runtime routine introduced by task detach support. Is this patch okay for trunk? Thanks Kwok From efeaac839879bc30e0e7e129ca43381192a6f109 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 25

[OG10][committed] Backport patches for OpenMP task detach support

2021-01-22 Thread Kwok Cheung Yeung
I have backported a number of patches from mainline to the devel/omp/gcc-10 branch: * openmp: Add support for the OpenMP 5.0 task detach clause (de460a5faff80a2338ccd46f249c964fa34b4c16) * libgomp: Don't access gomp_sem_t as int using atomics unconditionally (2b93ffc7219aa53815ece2adb21f56dd

Re: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-01-21 Thread Kwok Cheung Yeung
On 21/01/2021 7:33 pm, Kwok Cheung Yeung wrote: With Nvidia and GCN offloading though, task-detach-6 hangs... I _think_ the reason why it 'worked' before was because the taskwait allowed tasks with detach clauses to always complete immediately after execution. Since that backdoor

[PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738]

2021-01-21 Thread Kwok Cheung Yeung
patch okay for trunk? Thanks Kwok From 12cc24c937e9294d5616dd0cd9a754c02ffb26fa Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Thu, 21 Jan 2021 05:38:47 -0800 Subject: [PATCH] openmp: Fix intermittent hanging of task-detach-6 libgomp tests [PR98738] This adds support for the task detach clause to taskwa

Re: [PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

2021-01-16 Thread Kwok Cheung Yeung
Thanks for the review. On 16/01/2021 9:25 am, Jakub Jelinek wrote: On Fri, Jan 15, 2021 at 03:07:56PM +, Kwok Cheung Yeung wrote: + { + tree detach_decl = OMP_CLAUSE_DECL (*detach_seen); + + for (pc = &clauses, c = clauses; c ; c =

  1   2   3   >