[PATCH, nios2] Fix to nios2_legitimize_address

2015-09-22 Thread Chung-Lin Tang
Nios II Linux had a bad TLS relocation generated, exposed by the test case for PR 65771. A fix for this in nios2_legitimize_address() was tested and applied. Chung-Lin 2015-09-22 Chung-Lin Tang * config/nios2/nios2.c (nios2_legitimize_address): When handling 'reg +

Re: [PATCH 1/3, libgomp] Adjust offload plugin interface for avoiding deadlock on exit

2015-09-22 Thread Chung-Lin Tang
Ping x2. On 2015/9/9 04:08 PM, Chung-Lin Tang wrote: > Ping. > > On 2015/8/27 09:44 PM, Chung-Lin Tang wrote: >> We've discovered that, for several of the libgomp plugin interface routines, >> if the target specific routine calls exit() (usually upon a fatal conditio

Re: [PATCH 1/3, libgomp] Adjust offload plugin interface for avoiding deadlock on exit

2015-09-29 Thread Chung-Lin Tang
On 2015/9/25 上午 04:27, Ilya Verbin wrote: > On Thu, Aug 27, 2015 at 21:44:50 +0800, Chung-Lin Tang wrote: >> We've discovered that, for several of the libgomp plugin interface routines, >> if the target specific routine calls exit() (usually upon a fatal condition), >>

[gomp4] Adjust Fortran OACC async lib test

2015-11-23 Thread Chung-Lin Tang
Hi Thomas, this fix adds more acc_wait's to libgomp.oacc-fortran/lib-1[13].f90. For lib-12.f90, it's sort of a fix before we can resolve the issue of intended semantics for "wait+async". As for lib-13.f90, I believe these added acc_wait calls seem reasonable, since we can't immediately assume the

[PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-11-23 Thread Chung-Lin Tang
The OpenACC wait directive is represented as a call to the runtime function "GOACC_wait" instead of a tree code. I am seeing when '#pragma acc wait' is using inside a template function, the CALL_EXPR to GOACC_wait is being silently ignored/removed during tsubst_expr(). I think the correct way to

[PATCH, libgomp] Rewire OpenACC async

2015-11-24 Thread Chung-Lin Tang
those. Tested without regressions, is this okay for trunk? Thanks, Chung-Lin 2015-11-24 Chung-Lin Tang * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async' parameter, use to set as

Re: [gomp4] Adjust Fortran OACC async lib test

2015-12-02 Thread Chung-Lin Tang
Ping. Hi Thomas, this is only for gomp4 ATM, okay to commit? Thanks, Chung-Lin On 2015/11/23 7:09 PM, Chung-Lin Tang wrote: > Hi Thomas, > this fix adds more acc_wait's to libgomp.oacc-fortran/lib-1[13].f90. > > For lib-12.f90, it's sort of a fix before we can resolve t

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-02 Thread Chung-Lin Tang
Ping. On 2015/11/23 9:15 PM, Chung-Lin Tang wrote: > The OpenACC wait directive is represented as a call to the runtime > function "GOACC_wait" instead of a tree code. I am seeing when > '#pragma acc wait' is using inside a template function, the CALL_EXPR >

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Chung-Lin Tang
On 2015/12/3 4:59 PM, Thomas Schwinge wrote: > Hi! > > On Thu, 03 Dec 2015 09:51:31 +0100, I wrote: >> On Mon, 23 Nov 2015 21:15:00 +0800, Chung-Lin Tang >> wrote: >>> The OpenACC wait directive is represented as a call to the runtime >>> function &qu

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-03 Thread Chung-Lin Tang
On 2015/12/3 6:11 PM, Jakub Jelinek wrote: > On Thu, Dec 03, 2015 at 06:05:36PM +0800, Chung-Lin Tang wrote: >>> Oh wait, it looks like the C++ front end is not actually using the >>> functions defined in the C/C++-shared gcc/c-family/c-omp.c, but has its >>>

Re: [PATCH, libgomp] Rewire OpenACC async

2015-12-05 Thread Chung-Lin Tang
On 2015/12/1 08:01 PM, Julian Brown wrote: > On Tue, 24 Nov 2015 18:27:24 +0800 > Chung-Lin Tang wrote: > >> Hi, this patch reworks some of the way that asynchronous copyouts are >> implemented for OpenACC in libgomp. >> >> Before this patch, we had a somew

Re: [PATCH, C++] Wrap OpenACC wait in EXPR_STMT

2015-12-05 Thread Chung-Lin Tang
On 2015/12/3 06:32 PM, Chung-Lin Tang wrote: > On 2015/12/3 6:11 PM, Jakub Jelinek wrote: >> On Thu, Dec 03, 2015 at 06:05:36PM +0800, Chung-Lin Tang wrote: >>>> Oh wait, it looks like the C++ front end is not actually using the >>>> functions defined in the C/C++

[PATCH, nvptx, libgomp] Avoid use of GOMP_PLUGIN_acc_thread() in nvptx_free()

2020-08-20 Thread Chung-Lin Tang
n general we have to ensure nvptx_free() could be used under both normal/callback context) This patch has been libgomp tested for x86_64-linux with nvptx offloading without regressions, and should be applied for mainline and GCC10. Is this okay? Thanks, Chung-Lin 2020-08-20 Chung-Lin Tang

Re: [PATCH, nvptx, libgomp] Avoid use of GOMP_PLUGIN_acc_thread() in nvptx_free()

2020-08-20 Thread Chung-Lin Tang
Hi Tom, thanks for the extremely quick review :) On 2020/8/20 9:33 PM, Tom de Vries wrote: I reviewed the CUDA API docs and see that CUDA_ERROR_NOT_PERMITTED is returned for such CUDA calls inside callback context, Right, that's "Callbacks must not make any CUDA API calls. Attempting to use a C

[PATCH, 1/3, OpenMP] Target mapping changes for OpenMP 5.0, front-end parts

2020-09-01 Thread Chung-Lin Tang
Hi Jakub, this patch set implements parts of the target mapping changes introduced in OpenMP 5.0, mainly the attachment requirements for pointer-based list items, and the clause ordering. The first patch here are the C/C++ front-end changes. The entire set of changes has been tested for without

[PATCH, 2/3, OpenMP] Target mapping changes for OpenMP 5.0, middle-end parts and compiler testcases

2020-09-01 Thread Chung-Lin Tang
These are the middle-end gimplifier and omp-low changes. Compiler testcases are also included in this patch. For attach/detach clauses, I'm currently using the clause tree expression itself as the key for lookup, to solve the "same-decl" problem when multiple clauses have the same OMP_CLAUSE_DECL

[PATCH, 3/3, OpenMP] Target mapping changes for OpenMP 5.0, libgomp parts [resend]

2020-09-01 Thread Chung-Lin Tang
[resending this 3rd patch since keep not seeing it on the list, pardon if this gets duplicated] This patch is the changes to libgomp and testcases. There is now (again) a need to indicate OpenACC/OpenMP and an 'enter data' style directive, so the associated changes to 'enum gomp_map_vars_kind'.

Re: [PATCH v3 4/4] libgomp/test: Remove a build sysroot fix regression

2020-03-25 Thread Chung-Lin Tang
On 2020/2/28 9:18 AM, Maciej W. Rozycki wrote: Fix a problem with commit c8e759b4215b ("libgomp/test: Fix compilation for build sysroot") that caused a regression in some standalone test environments where testsuite/libgomp-test-support.exp is used, but the compiler is expected to be determined b

(v4 update) Re: [PATCH, OpenACC, v3] Non-contiguous array support for OpenACC data clauses

2020-04-07 Thread Chung-Lin Tang
On 2019/11/26 10:49 PM, Chung-Lin Tang wrote: Hi Thomas, this is a reorg of the last non-contiguous arrays patch. You'll notice that: (1) A large part of the code has been pulled into oacc-parallel.c, with most of the data structure declarations in oacc-int.h. (2) target.c only con

Re: [PATCH, nvptx] Expand OpenACC child function arguments to use CUDA params space

2019-09-24 Thread Chung-Lin Tang
Hi Thomas, thanks for the review. On 2019/9/20 12:28 AM, Thomas Schwinge wrote: This new implementation works by modifying the GIMPLE for child functions directly at the very start (before, actually) of RTL expansion That's now near the other end of the pipeline.;-) What's the motivation for p

Re: [PATCH, nvptx] Expand OpenACC child function arguments to use CUDA params space

2019-10-01 Thread Chung-Lin Tang
On 2019/9/24 6:43 PM, Chung-Lin Tang wrote: --- gcc/config/nvptx/nvptx.c(revision 275493) +++ gcc/config/nvptx/nvptx.c(working copy) +static void +nvptx_expand_to_rtl_hook (void) +{ +  /* For utilizing CUDA .param kernel arguments, we detect and modify + the gimple of offloaded

[PATCH, OpenACC] Fortran deviceptr

2019-10-18 Thread Chung-Lin Tang
, and tested libgomp without regressions. Also, I've added a new libgomp.oacc-fortran/deviceptr-2.f90 testcase that actually copies out and verifies the deviceptr computation. Is this okay for trunk now? Thanks, Chung-Lin 2019-10-18 Cesar Philippidis Chung-Lin Tang

Re: [PATCH, OpenACC] Fortran deviceptr

2019-10-21 Thread Chung-Lin Tang
On 2019/10/19 9:04 PM, Bernhard Reutner-Fischer wrote: On 18 October 2019 17:08:54 CEST, Chung-Lin Tang wrote: Also, I've added a new libgomp.oacc-fortran/deviceptr-2.f90 testcase that actually copies out and verifies the deviceptr computation. In testcases please do not 'call ab

Re: [PATCH v2, OpenMP 5, C++] Implement implicit mapping of this[:1] (PR92120)

2020-12-14 Thread Chung-Lin Tang
Ping. On 2020/11/13 9:13 PM, Chung-Lin Tang wrote: Hi Jakub, there was a first version of this patch here: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554087.html The attached patch here is a v2 version  that adds implementation of this part in the this[:1] functionality

Re: [PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0

2020-12-14 Thread Chung-Lin Tang
Ping. On 2020/12/4 10:15 PM, Chung-Lin Tang wrote: Hi Jakub, this is a new version of the structure element mapping patch for OpenMP 5.0 requirement changes. This one uses the approach you've outlined in your concept patch [1], basically to use more special REFCOUNT_* values to mark

[PATCH, OpenMP 5.0] Allow duplicate mapping of variables

2020-12-16 Thread Chung-Lin Tang
tage1 reopens? Thanks, Chung-Lin 2020-12-16 Chung-Lin Tang gcc/c/ * c-typeck.c (c_finish_omp_clauses): Adjust to allow duplicate mapped variables for OpenMP. gcc/cp/ * semantics.c (finish_omp_clauses): Adjust to allow duplicate mapped variables for O

[PATCH, OpenMP 5.0] Basic support of release/delete clauses on target/target-data directives

2020-12-16 Thread Chung-Lin Tang
tation of these clauses inside libgomp will be finished later) Is this okay for trunk after stage1 reopens? Thanks, Chung-Lin 2020-12-16 Chung-Lin Tang gcc/c/ * c-parser.c (c_parser_omp_target_data): Allow 'release' and 'delete' map kinds, updat

[PATCH, OpenMP 5.0] Target mapping C++ members inside member functions

2020-12-23 Thread Chung-Lin Tang
ful for compiling some programs, and enter/exit data usage. Tested C++ and libgomp without regressions, is this okay? Probably will need to wait till stage1 to commit. Thanks, Chung-Lin 2020-12-23 Chung-Lin Tang gcc/cp/ * parser.c (cp_parser_

Re: [PATCH, OpenMP 5.0] Basic support of release/delete clauses on target/target-data directives

2021-01-12 Thread Chung-Lin Tang
On 2021/1/11 6:28 PM, Jakub Jelinek wrote: On Wed, Dec 16, 2020 at 11:06:10PM +0800, Chung-Lin Tang wrote: we have some other sollve_vv tests for OpenMP 5.0, which tests the occurrence of 'delete' map kind on the target directive. That is strange. In OpenMP 5.0, I certainly see

[PATCH, OpenMP 5.0] More implementation of the requires directive

2021-01-13 Thread Chung-Lin Tang
27;re still unsure if complete block-out of program execution is the right thing for the user. This can be discussed later. Is this okay for trunk after stage1 re-opens? Thanks, Chung-Lin 2021-01-13 Chung-Lin Tang gcc/c/ * c-parser.c (c_parser_declaration_or_fndef)

Re: [PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0

2021-01-13 Thread Chung-Lin Tang
Ping x2. Hi Jakub, would like this part of OpenMP 5.0 to be considered for GCC 11. Thanks, Chung-Lin On 2020/12/14 6:32 PM, Chung-Lin Tang wrote: Ping. On 2020/12/4 10:15 PM, Chung-Lin Tang wrote: Hi Jakub, this is a new version of the structure element mapping patch for OpenMP 5.0

Re: [PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0

2021-01-19 Thread Chung-Lin Tang
On 2021/1/16 5:45 下午, Jakub Jelinek wrote: +/* Unified reference count for structure element siblings, this is used + when REFCOUNT_STRUCTELEM_FIRST_P(k->refcount) == true, the first sibling + in a structure element sibling list item sequence. */ +uintptr_t structelem_refc

[PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0

2020-12-04 Thread Chung-Lin Tang
atch long ago, is this okay to be considered as committable now after approval? Thanks, Chung-Lin 2020-12-04 Chung-Lin Tang libgomp/ * hashtab.h (htab_clear): New function with initialization code factored out from... (htab_create): ...here, adjust to

[PATCH, OpenMP 5.0] Implement structure element mapping changes in 5.0

2020-10-23 Thread Chung-Lin Tang
region. This patch has been tested on x86_64-linux with nvptx offloading with no regressions, also currently testing for powerpc64le-linux, seeking approval for trunk. (BTW Jakub, thanks for your review of the other first patch set, I will be working on that revision next). T

Re: [PATCH, OpenMP 5.0] Implement structure element mapping changes in 5.0

2020-10-23 Thread Chung-Lin Tang
Hi Jakub, thanks for the prompt review. On 2020/10/23 8:13 PM, Jakub Jelinek wrote: In general, upon encountering a construct, we can't statically determine and insert alloc/release maps for each element of a structure variable, since we don't really know which region of the structure is curre

Re: [PATCH] nvptx: Cache stacks block for OpenMP kernel launch

2020-10-28 Thread Chung-Lin Tang
On 2020/10/27 9:17 PM, Julian Brown wrote: And, in which context are cuStreamAddCallback registered callbacks run? E.g. if it is inside of asynchronous interrput, using locking in there might not be the best thing to do. The cuStreamAddCallback API is documented here: https://docs.nvidia.com

Re: [PATCH, 1/3, OpenMP] Target mapping changes for OpenMP 5.0, front-end parts

2020-10-28 Thread Chung-Lin Tang
Hi Jakub, Thank you for the review. On 2020/10/13 9:01 PM, Jakub Jelinek wrote: gcc/c-family/ * c-common.h (c_omp_adjust_clauses): New declaration. * c-omp.c (c_omp_adjust_clauses): New function. Besides the naming, I wonder why is it done in a separate function and s

Re: [PATCH, 2/3, OpenMP] Target mapping changes for OpenMP 5.0, middle-end parts and compiler testcases

2020-10-28 Thread Chung-Lin Tang
On 2020/10/13 9:31 PM, Jakub Jelinek wrote: +/* Implement OpenMP 5.x map ordering rules for target directives. There are + several rules, and with some level of ambiguity, hopefully we can at least + collect the complexity here in one place. */ + +static void +omp_target_reorder_clauses (tre

Re: [PATCH, 3/3, OpenMP] Target mapping changes for OpenMP 5.0, libgomp parts [resend]

2020-10-28 Thread Chung-Lin Tang
On 2020/9/1 9:37 PM, Chung-Lin Tang wrote: his patch is the changes to libgomp and testcases. There is now (again) a need to indicate OpenACC/OpenMP and an 'enter data' style directive, so the associated changes to 'enum gomp_map_vars_kind'. There is a slight ch

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-30 Thread Chung-Lin Tang
Hi Jakub, this is v3 of the uses_allocators patch. On 2022/5/20 1:46 AM, Jakub Jelinek wrote: On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: @@ -15624,6 +15626,233 @@ c_parser_omp_clause_allocate (c_parser *parser, tree list) return nl; } +/* OpenMP 5.2

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Chung-Lin Tang
On 2022/5/31 6:02 PM, Jakub Jelinek wrote: 5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just look how it is handled for private too Jakub About private() for non-static members, is it really working right now? A simple test: struct C { omp_allocator_handle

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Chung-Lin Tang
On 2022/6/6 9:22 下午, Jakub Jelinek wrote: On Mon, Jun 06, 2022 at 09:19:18PM +0800, Chung-Lin Tang wrote: On 2022/5/31 6:02 PM, Jakub Jelinek wrote: 5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just look how it is handled for private too Jakub

[PATCH, OpenMP, v4] Implement uses_allocators clause for target regions

2022-06-08 Thread Chung-Lin Tang
Hi Jakub, this is v4 of the uses_allocators patch. On 2022/5/31 6:02 PM, Jakub Jelinek wrote: The response I got on omp-lang is that it is intentional that in the new syntax only a single allocator is allowed. So I'd suggest to implement: 1) if has_modifiers (i.e. certainly new syntax), only all

Re: [PATCH, OpenMP, v4] Implement uses_allocators clause for target regions

2022-06-13 Thread Chung-Lin Tang
On 2022/6/9 8:22 PM, Jakub Jelinek wrote: + OpenMP 5.2: + + uses_allocators ( modifier : allocator-list ) Please drop the -list above. + uses_allocators ( modifier , modifier : allocator-list ) and here too. Thanks for catching. + struct item_tok + { +location_t loc; +tree

[PATCH, libgomp] Fix chunk_size<1 for dynamic schedule

2022-06-23 Thread Chung-Lin Tang
Hi Jakub, with the way that chunk_size < 1 is handled for gomp_iter_dynamic_next: (1) chunk_size <= -1: wraps into large unsigned value, seems to work though. (2) chunk_size == 0: infinite loop The (2) behavior is obviously not desired. This patch fixes this by changing the chunk_size initializ

[PATCH, OG10, C++, committed] Fix non-static member mapping in templates

2021-03-11 Thread Chung-Lin Tang
egressions, and pushed to devel/omp/gcc-10. Chung-Lin From 4e714eaad985f68533f267b8df2026e5c14d084a Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Thu, 11 Mar 2021 00:31:08 -0800 Subject: [PATCH] Fix template case of non-static member access inside member functions Prior patches for C++

[PATCH, OG10, C++, OpenMP 5.0] Support lambda capturing of pointers and references in target directives

2021-03-18 Thread Chung-Lin Tang
ed without regressions on x86_64-linux with nvptx offloading, and pushed to devel/omp/gcc-10. 2021-03-18 Chung-Lin Tang gcc/cp/ChangeLog: * cp-tree.h (set_omp_target_this_expr): Delete. (finish_omp_target_clauses): New prototype. * lambda.c (lambda_expr_this_capture): Remo

Re: [PATCH, v3, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0

2021-06-17 Thread Chung-Lin Tang
ed is the final patch I pushed. Thanks, Chung-Lin From 275c736e732d29934e4d22e8f030d5aae8c12a52 Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Thu, 17 Jun 2021 21:33:32 +0800 Subject: [PATCH] libgomp: Structure element mapping for OpenMP 5.0 This patch implement OpenMP 5.0 requirements of incrementing/decrementing

[PATCH, C++, OpenMP 5.0, OG11] Fixes for lambda in offload regions

2021-06-17 Thread Chung-Lin Tang
/target-lambda-2.C: New test. libgomp/ChangeLog: * testsuite/libgomp.c++/target-lambda-2.C: New test. From dbf5d72f4c077215330e5b06fbb9b3311b807c2a Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Thu, 17 Jun 2021 21:53:10 +0800 Subject: [PATCH] Fixes for lambda in offload regions T

[PATCH, OpenMP 5.0] Improve OpenMP target support for C++ [PR92120 v4]

2021-06-18 Thread Chung-Lin Tang
Hi Jakub, this patch is the "v4" version of my PR92120 patch, v3 was here: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570886.html (there I listed the various patches from devel/omp/gcc-10 branch that was combined, which I won't repeat here). Basically this v4 adds fixes for lambda captu

[PATCH, libgomp, PR101114, committed] Fix struct-elem-5.c regression

2021-06-25 Thread Chung-Lin Tang
Add "target offload_device_nonshared_as" condition for enabling test. From e0672017370b9a9362fda52ecffe33d1c9c41829 Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Sat, 26 Jun 2021 00:42:58 +0800 Subject: [PATCH] testsuite/101114: Adjust libgomp.c-c++-common/struct-elem-5.c testcase The dg

Re: [PATCH, nvptx] Expand OpenACC child function arguments to use CUDA params space

2019-11-26 Thread Chung-Lin Tang
On 2019/11/8 8:55 PM, Chung-Lin Tang wrote: On 2019/10/8 10:05 PM, Thomas Schwinge wrote: Hi Chung-Lin! While we're all waiting for Tom to comment on this;-)  -- here's another item I realized: On 2019-09-10T19:41:59+0800, Chung-Lin Tang  wrote: The libgomp nvptx plugin change

[PATCH, OpenACC, v3] Non-contiguous array support for OpenACC data clauses

2019-11-26 Thread Chung-Lin Tang
Hi Thomas, this is a reorg of the last non-contiguous arrays patch. You'll notice that: (1) A large part of the code has been pulled into oacc-parallel.c, with most of the data structure declarations in oacc-int.h. (2) target.c only contains relatively little code from gomp_map_vars_internal tha

[PATCH, OpenMP] PR103642 - Fix omp-low ICE for indirect references based off component access

2022-01-03 Thread Chung-Lin Tang
->a[:N]), map(t.s[:1]) is not implicitly mapped, thus the entire offloaded access does not work as is. (fixing that omptests test is out of scope here) Tested without regressions, okay for trunk? Thanks, Chung-Lin 2022-01-03 Chung-Lin Tang gcc/ChangeLog: PR middle-end/103

[PATCH, OpenMP, Fortran] PR103643: ICE in gimplify_omp_affinity

2022-01-03 Thread Chung-Lin Tang
7;. Considering the use of the affinity() clause, which should be specifying the location of a particular object in memory, this probably makes sense. Tested without regressions, seeking approval for trunk. Thanks, Chung-Lin 2022-01-03 Chung-Lin Tang gcc/ChangeLog: PR middle-e

[PATCH, OpenMP, libgomp, committed] Fix GOMP_DEVICE_NUM_VAR stringification error

2022-01-04 Thread Chung-Lin Tang
-gcn.c (GOMP_OFFLOAD_load_image): Change uses of STRINGX into XSTRING when looking for GOMP_DEVICE_NUM_VAR in offload image. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Likewise. From fbb592407c9dd244b4cea086cbb90d7bd0bf60bb Mon Sep 17 00:00:00 2001 From: Chung-Lin Tang Date: Tue

[PATCH, OpenMP, C/C++] Fix PR103705

2022-01-10 Thread Chung-Lin Tang
For cases like: #pragma omp target update from(s[0].a[0:1]) The handling in [c_]finish_omp_clauses was only peeling off ARRAY_REF once before the loop handling COMPONENT_REF, and snagged when the base of the component_ref is an array access. This adds the handling there for both C and C++ front

Re: [PATCH, OpenMP, C/C++] Fix PR103705

2022-01-10 Thread Chung-Lin Tang
Forgot to attach the patch, here it is :P On 2022/1/10 10:59 PM, Chung-Lin Tang wrote: For cases like:   #pragma omp target update from(s[0].a[0:1]) The handling in [c_]finish_omp_clauses was only peeling off ARRAY_REF once before the loop handling COMPONENT_REF, and snagged when the base of

Re: [PATCH, OpenMP] PR103642 - Fix omp-low ICE for indirect references based off component access

2022-01-17 Thread Chung-Lin Tang
Ping. On 2022/1/3 10:15 PM, Chung-Lin Tang wrote: This issue was triggered after the patch extending syntax for component access in map clauses (https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=0ab29cf0bb68960c) In gimplify_scan_omp_clauses, the case for handling indirect accesses (which

[PATCH] Handle TARGET_SPLIT_COMPLEX_ARG in default VA_ARG_EXPR implementation

2018-08-02 Thread Chung-Lin Tang
ch we tested to fix several _Complex va_args related FAILs and without regressions. (the patch fragment is actually adapted from the xtensa port, FWIW) Is this okay for trunk? Thanks, Chung-Lin 2018-08-02 Chung-Lin Tang * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of

Re: [PATCH] Handle TARGET_SPLIT_COMPLEX_ARG in default VA_ARG_EXPR implementation (ping)

2018-08-13 Thread Chung-Lin Tang
Ping. On 2018/8/2 5:17 PM, Chung-Lin Tang wrote: Hi, during testing of the new in-review C-SKY port, we discovered some FAILs due to the default va_args gimplifying (targhooks.c:std_gimplify_va_arg_expr) not properly having the logic to handle the TARGET_SPLIT_COMPLEX_ARG hook. It appears

[PATCH, OpenACC] Properly handle wait clause with no arguments

2018-08-30 Thread Chung-Lin Tang
logically independent. [1] https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01842.html Re-tested with offloading to ensure no regressions, is this okay for trunk? Thanks, Chung-Lin 2018-08-30 Chung-Lin Tang gcc/c/ * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait

[libgomp, OpenACC] Add more map handling for enter/exit data directives

2017-06-13 Thread Chung-Lin Tang
g-Lin 2016-06-13 Cesar Philippidis Thomas Schwinge Chung-Lin Tang libgomp/ * oacc-parallel.c (find_pset): Adjust and rename from... (find_pointer): ...this function. (GOACC_enter_exit_data): Handle GOMP_MAP_TO and GOMP_MAP_

Re: [libgomp, OpenACC] Add more map handling for enter/exit data directives

2017-06-22 Thread Chung-Lin Tang
data > calls? GOMP_MAP_FORCE_PRESENT does not appear in enter/exit data directives, while GOMP_MAP_POINTER is handled in find_pointer(). Thanks, Chung-Lin 2017-06-22 Cesar Philippidis Thomas Schwinge Chung-Lin Tang libgomp/ * oacc-mem.c (gomp_ac

Re: [gomp4] OpenACC async re-work

2017-06-27 Thread Chung-Lin Tang
On 2017/6/27 6:45 AM, Cesar Philippidis wrote: >> (1) Instead of essentially implementing the entire OpenACC async support >> inside the plugin, we now use an opaque 'goacc_asyncqueue' implemented >> by the plugin, along with core 'test', 'synchronize', 'serialize', etc. >> plugin functions. Most o

[PATCH, OpenACC 2.5, libgomp] Add *_async versions of runtime library API functions

2018-09-10 Thread Chung-Lin Tang
ng with no regressions, is this okay for trunk? Thanks, Chung-Lin 2018-09-10 Chung-Lin Tang libgomp/ * oacc-mem.c (memcpy_tofrom_device): New function, combined from acc_memcpy_to/from_device functions, now with async parameter. (acc_memcpy_to_device): Mod

Re: [PATCH, OpenACC 2.5, libgomp] Add *_async versions of runtime library API functions

2018-09-11 Thread Chung-Lin Tang
On 2018/9/11 1:22 AM, Cesar Philippidis wrote: On 09/10/2018 08:04 AM, Chung-Lin Tang wrote: GOACC_2.0 { Index: libgomp/oacc-mem.c === --- libgomp/oacc-mem.c (revision 264192) +++ libgomp/oacc-mem.c (working copy) @@ -153,8

[PATCH 0/6, OpenACC, libgomp] Async re-work

2018-09-25 Thread Chung-Lin Tang
t incomplete submission of our testsuite adjustment patches, or other independent problems. Seeking permission to commit this to trunk first. Thanks, Chung-Lin 2018-09-25 Chung-Lin Tang include/ * gomp-constants.h (GOMP_ASYNC_DEFAULT): Define. (GOMP_VERSION): Increment fo

[PATCH 1/6, OpenACC, libgomp] Async re-work, interfaces

2018-09-25 Thread Chung-Lin Tang
This patch separates out the header interface changes. GOMP_VERSION has been bumped, and various changes to the plugin interface, and a few libgomp internal functions declared. The libgomp linkmap updated as well. Thanks, Chung-Lin include/ * gomp-constants.h (GOMP_ASYNC_DEFAUL

[PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts

2018-09-25 Thread Chung-Lin Tang
Hi Thomas, These are the OpenACC specific changes, mostly the re-implementation of async-related acc_* runtime library API functions to use the new backend plugin interfaces, in a non-target specific way. Thanks, Chung-Lin * oacc-async.c (get_goacc_thread): New function. (get_

[PATCH 3/6, OpenACC, libgomp] acc_get/set_default_async API, Fortran specific parts

2018-09-25 Thread Chung-Lin Tang
This patch adds the OpenACC 2.5 new APIs of acc_get_default_async/acc_set_default_async, contained are the modifications for Fortran in libgomp/openacc.f90, libgomp/openacc_lib.h, and a small testsuite adjustment. Thanks, Chung-Lin * openacc.f90 (acc_async_default): Declare. (a

[PATCH 5/6, OpenACC, libgomp] Async re-work, C/C++ testsuite changes

2018-09-25 Thread Chung-Lin Tang
These are the testsuite/libgomp.oacc-c-c++-common/* changes. Thanks, Chung-Lin * testsuite/libgomp.oacc-c-c++-common/asyncwait-2.c: New testcase. * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: Adjust testcase. * testsuite/libgomp.oacc-c-c++-common/data-2.c: Likewise.

[PATCH 4/6, OpenACC, libgomp] Async re-work, libgomp/target.c changes

2018-09-25 Thread Chung-Lin Tang
Hi Jakub, This part has changes to 'struct goacc_asyncqueue*' arguments to various memory copying/mapping functions. To lessen the amount of code changes new 'gomp_map/unmap_vars_async' functions names are used (with the non-async original names defined with the asyncqueue==NULL). Inside gomp_t

[PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes

2018-09-25 Thread Chung-Lin Tang
Hi Tom, this patch removes large portions of plugin/plugin-nvptx.c, since a lot of it is now in oacc-async.c now. The new code is essentially a NVPTX/CUDA-specific implementation of the new-style goacc_asyncqueues. Also, some needed functions in cuda-lib.def are added. The cuda.h function has a

Re: [PATCH, OpenACC] Properly handle wait clause with no arguments

2018-10-02 Thread Chung-Lin Tang
Ping (adding Thomas to CC as OpenACC maintainer) On 2018/8/30 9:27 PM, Chung-Lin Tang wrote: Hi, this patch properly handles OpenACC 'wait' clauses without arguments, making it an equivalent of "wait all". (current trunk basically discards and ignores such argument-less

Re: [PATCH][3/3] Re-submission of Altera Nios II port, libgcc parts

2013-11-16 Thread Chung-Lin Tang
On 2013/7/14 03:55 PM, Chung-Lin Tang wrote: > nios2 libgcc parts. Since the original post, the only main change has > been the fdpbit vs soft-fp issue raised by Joseph, which has been > resolved. Other parts are mostly the same. The Nios II libgcc parts have been further updated to incl

Re: [PATCH][2/3] Re-submission of Altera Nios II port, testsuite parts

2013-11-16 Thread Chung-Lin Tang
On 2013/10/17 10:20 PM, Bernd Schmidt wrote: > On 07/14/2013 09:54 AM, Chung-Lin Tang wrote: >> These are nios2 patches for the gcc testsuite. Some new testcases were >> added since the last posting. > >> Index: gcc/testsuite/gcc.c-torture/ex

Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts

2013-11-20 Thread Chung-Lin Tang
On 13/11/20 1:34 AM, Richard Sandiford wrote: > Chung-Lin Tang writes: >>>> +;; Integer logical Operations >>>> + >>>> +(define_code_iterator LOGICAL [and ior xor]) >>>> +(define_code_attr logical_asm [(and "and") (ior &quo

Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts

2013-11-20 Thread Chung-Lin Tang
On 13/11/21 7:21 AM, Richard Sandiford wrote: > Chung-Lin Tang writes: >> On 13/11/20 1:34 AM, Richard Sandiford wrote: >>> Chung-Lin Tang writes: >>>>>> +;; Integer logical Operations >>>>>> + >>>>>> +(define_code_iterator

Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts

2013-11-21 Thread Chung-Lin Tang
On 2013/11/21 03:25 PM, Richard Henderson wrote: > On 11/21/2013 02:41 PM, Chung-Lin Tang wrote: >> I'm not saying we tolerate "wrong" RTL form, but rather that, it should >> be an issue of the RTL passes, not the backend. The backend should just >> be as much

Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts

2013-11-22 Thread Chung-Lin Tang
On 13/11/22 10:31 PM, Bernd Schmidt wrote: >> If you don't object, I'll keep the clobbers there for now. > > If they serve no purpose (and I think they don't), they should go. I'll check again, but I remember df_regs_ever_live_p doesn't include the RA reg if the call pattern doesn't have the clob

[PATCH, ARM] MI-thunk fix for TARGET_THUMB1_ONLY

2014-06-08 Thread Chung-Lin Tang
. Original patch was by Julian, with trivial adaptations for trunk by me. We've been carrying this fix for a while by now. Okay for trunk? (and stable branches?) Thanks, Chung-Lin 2014-06-08 Julian Brown Chung-Lin Tang * config/arm/arm.c (arm_output_mi_thunk): Fix offse

[PATCH, ARM] Cortex-A9 MPCore volatile load workaround

2014-06-09 Thread Chung-Lin Tang
eador, and finally a few trivial adjustments by me. Again, we've been carrying this fix for a release or two. Okay for trunk? Thanks, Chung-Lin 2014-06-09 Julian Brown Meador Inge Chung-Lin Tang * config/arm/arm.c (arm_option_override): Emit warning if

Re: [ARM] Fix build failure due to movsi_compare0 (PR 61430)

2014-06-11 Thread Chung-Lin Tang
On 2014/6/11 下午 06:32, James Greenhalgh wrote: > > Hi, > > A recent change somewhere exposed a latent bug between LRA and the definition > of the movsi_compare0 pattern. > > This pattern ties the source and destination register of a set together > a (match_dup) and register constraints: > >

Re: [ARM] Fix build failure due to movsi_compare0 (PR 61430)

2014-06-16 Thread Chung-Lin Tang
On 14/6/16 5:55 PM, James Greenhalgh wrote: > On Fri, Jun 13, 2014 at 05:46:45PM +0100, Vladimir Makarov wrote: >> On 2014-06-11, 1:17 PM, Chung-Lin Tang wrote: >>> Looking at this too, as an LRA exercise. I don't really think the >>> pattern is wrong, rather LR

Re: [PATCH, ARM] MI-thunk fix for TARGET_THUMB1_ONLY

2014-06-19 Thread Chung-Lin Tang
On 2014/6/18 上午 06:26, Ramana Radhakrishnan wrote: > On Sun, Jun 8, 2014 at 12:27 PM, Chung-Lin Tang > wrote: >> > Hi Richard, Ramana, >> > >> > Attached is a small fix for resolving a g++.old-deja/g++.jason/thunk2.C >> > regression we found un

Re: [PATCH, ARM] Cortex-A9 MPCore volatile load workaround

2014-06-19 Thread Chung-Lin Tang
Ping. On 2014/6/9 10:03 PM, Chung-Lin Tang wrote: > Hi Richard, > As we talked about earlier, here's a patch to add a compiler option to > work around Cortex-A9 MPCore errata 761319: > http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a/UAN0004A_a9_read_read.pdf > &g

[PATCH, PR61554] ICE during CCP

2014-06-22 Thread Chung-Lin Tang
...) Bootstrapped and tested on x86_64-linux, is this okay for trunk? Thanks, Chung-Lin 2014-06-23 Chung-Lin Tang PR tree-optimization/61554 * tree-ssa-propagate.c (substitute_and_fold_dom_walker): Add 'vec bbs_to_purge_dead_eh_edges' member, prope

Re: [PATCH, PR61554] ICE during CCP

2014-06-23 Thread Chung-Lin Tang
On 2014/6/23 04:45 PM, Richard Biener wrote: > On Mon, Jun 23, 2014 at 7:32 AM, Chung-Lin Tang > wrote: >> Hi Richard, >> >> In this change: >> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01278.html >> >> where substitute_and_fold() was changed to us

Re: [PATCH, ARM] Cortex-A9 MPCore volatile load workaround

2014-06-26 Thread Chung-Lin Tang
Ping x2. On 14/6/20 2:24 PM, Chung-Lin Tang wrote: > Ping. > > On 2014/6/9 10:03 PM, Chung-Lin Tang wrote: >> Hi Richard, >> As we talked about earlier, here's a patch to add a compiler option to >> work around Cortex-A9 MPCore errata 761319: >>

Re: [patch, libgomp] Re-factor GOMP_MAP_POINTER handling

2015-05-21 Thread Chung-Lin Tang
Ping x2. On 15/5/11 7:19 PM, Chung-Lin Tang wrote: > Ping. > > On 2015/4/21 08:21 PM, Chung-Lin Tang wrote: >> Hi, >> while investigating some issues in the variable mapping code, I observed >> that the GOMP_MAP_POINTER handling is essentially duplicated under the P

[patch, libgomp] Re-factor GOMP_MAP_POINTER handling

2015-04-21 Thread Chung-Lin Tang
trunk? Thanks, Chung-Lin 2015-04-21 Chung-Lin Tang libgomp/ * target.c (gomp_map_pointer): New function abstracting out GOMP_MAP_POINTER handling. (gomp_map_vars): Remove GOMP_MAP_POINTER handling code and use gomp_map_pointer(). Index: target.c

Re: [patch, libgomp] Re-factor GOMP_MAP_POINTER handling

2015-05-11 Thread Chung-Lin Tang
Ping. On 2015/4/21 08:21 PM, Chung-Lin Tang wrote: > Hi, > while investigating some issues in the variable mapping code, I observed > that the GOMP_MAP_POINTER handling is essentially duplicated under the PSET > case. > This patch abstracts and unifies the handling code, basically

[patch, nios2, committed] Fix nios2-linux crti/crtn settings

2015-03-25 Thread Chung-Lin Tang
is patch removes the extra_parts setting for nios2-linux libgcc; now crti.o/crtn.o links to the correct ones provided by glibc. Chung-Lin 2015-03-25 Chung-Lin Tang libgcc/ * config.host (nios2-*-linux*): Remove 'extra_parts

[gomp4] Generate sequential loop for OpenACC loop directive inside kernels

2015-06-16 Thread Chung-Lin Tang
makes the front-ends create OMP_FOR, which the loop analysis phases don't understand. Tested and committed to gomp-4_0-branch. Chung-Lin 2015-06-16 Chung-Lin Tang * omp-low.c (struct omp_region): Add inside_kernels_p field. (expand_omp_for_generic): Adjust to gen

Re: [gomp4] Generate sequential loop for OpenACC loop directive inside kernels

2015-06-23 Thread Chung-Lin Tang
On 2015/6/16 05:05 PM, Tom de Vries wrote: > On 16/06/15 10:59, Chung-Lin Tang wrote: >> This patch adjusts omp-low.c:expand_omp_for_generic() to expand to a >> "sequential" >> loop form (without the OMP runtime calls), used for loop directives inside >> Ope

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-29 Thread Chung-Lin Tang
On 2015/6/30 12:22 PM, Sandra Loosemore wrote: > On 06/29/2015 09:07 PM, Kito Cheng wrote: >> Hi all: >> >> This patch seem will broken when disable assert checking for c6x >> >> Index: gcc/config/c6x/c6x.c >> === >> --- gcc/config

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-29 Thread Chung-Lin Tang
On 2015/6/30 下午 01:13, Chung-Lin Tang wrote: > On 2015/6/30 12:22 PM, Sandra Loosemore wrote: >> On 06/29/2015 09:07 PM, Kito Cheng wrote: >>> Hi all: >>> >>> This patch seem will broken when disable assert checking for c6x

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-30 Thread Chung-Lin Tang
On 2015/6/30 05:06 PM, Eric Botcazou wrote: >> I notice the way gcc_assert() is defined in system.h now, the test won't >> disappear even when runtime checks are disabled, though you might still >> adjust it to avoid any programmer confusion. > > It will disappear at run time, see the definition:

[gomp4] implicit firstprivate and other testcase fixes

2015-07-01 Thread Chung-Lin Tang
ogether in the patch. Also a typo-bug in testcase libgomp.oacc-c-c++-common/reduction-4.c is also corrected, where reduction variable names are apparently wrong. Tested without regressions, and applied to gomp-4_0-branch. Chung-Lin 2015-07-01 Chung-Lin Tang gcc/ *

<    1   2   3   4   5   6   >