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

2024-04-11 Thread Thomas Schwinge
Hi! I've filed "OpenMP 'indirect' clause: dynamic image loading/unloading" for the following issue: On 2023-11-13T12:47:04+0100, Tobias Burnus wrote: > On 13.11.23 11:59, Thomas Schwinge wrote: Also, for my understanding: why is 'build_indirect_map' done at

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

2024-01-03 Thread Kwok Cheung Yeung
On 09/11/2023 12:24 pm, Thomas Schwinge wrote: --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -350,6 +350,9 @@ enum omp_clause_code { /* OpenMP clause: doacross ({source,sink}:vec). */ OMP_CLAUSE_DOACROSS, + /* OpenMP clause: indirect [(constant-integer-expression)]. */ +

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

2024-01-03 Thread Kwok Cheung Yeung
Hello I have committed the following trivial patch to emit FUNC_MAP or IND_FUNC_MAP in separate branches of an if statement. Kwok On 09/11/2023 12:24 pm, Thomas Schwinge wrote: Similar to how you have it here: --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@

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

2023-11-13 Thread Tobias Burnus
Hi Thomas, On 13.11.23 11:59, Thomas Schwinge wrote: - 'gcc/cp/pt.cc:tsubst_omp_clauses', - 'gcc/gimplify.cc:gimplify_scan_omp_clauses', 'gcc/gimplify.cc:gimplify_adjust_omp_clauses' - 'gcc/omp-low.cc:scan_sharing_clauses' (twice) -

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

2023-11-13 Thread Thomas Schwinge
Hi! On 2023-11-09T17:00:11+0100, Tobias Burnus wrote: > On 09.11.23 13:24, Thomas Schwinge wrote: >> Also, assuming that the order of appearance of 'IND_FUNC_MAP' does matter >> as it does for 'FUNC_MAP', ... >> https://github.com/MentorEmbedded/nvptx-tools/pull/29 ... > > It should matter.

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

2023-11-09 Thread Tobias Burnus
Hi Thomas, hi Kwok, (Skipping some valid (review) comments and bare remarks.) On 09.11.23 13:24, Thomas Schwinge wrote: Also, assuming that the order of appearance of 'IND_FUNC_MAP' does matter as it does for 'FUNC_MAP', ... https://github.com/MentorEmbedded/nvptx-tools/pull/29 ... It

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

2023-11-09 Thread Thomas Schwinge
Hi Kwok! Nice work! A few comments: On 2023-11-03T19:53:28+, Kwok Cheung Yeung wrote: > Subject: [PATCH] openmp: Add support for the 'indirect' clause in C/C++ > > This adds support for the 'indirect' clause in the 'declare target' > directive. Functions declared as indirect m

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-07 Thread Jakub Jelinek
On Tue, Nov 07, 2023 at 09:37:22PM +, Joseph Myers wrote: > This looks like targets that libgomp/configure.tgt does *not* have any > special handling for, and so never adds "linux" to config_path for. Indeed, I don't really see anything linux specific about the

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

2023-11-07 Thread Joseph Myers
I'm seeing build failures "make[5]: *** No rule to make target 'target-indirect.c', needed by 'target-indirect.lo'. Stop." for many targets in my glibc bot. https://sourceware.org/pipermail/libc-testresults/2023q4/012061.html FAIL: compilers-arc-linux-gnu gcc build FAIL:

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

2023-11-06 Thread Tobias Burnus
On 03.11.23 20:53, Kwok Cheung Yeung wrote: On 17/10/2023 2:12 pm, Tobias Burnus wrote: C++11 (and C23) attribute do not seem to be properly handled: (Side remark: Since Saturday, the [[omp::]] attributes syntax is now also supported in C23.) [Quoted email text by Kwok: Lots of lines removed

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

2023-11-03 Thread Kwok Cheung Yeung
r: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955From adcd938b1dee1cc5a9df6efee40d47a2aab254f8 Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Fri, 3 Nov 2023 18:03:50 + Subject: [PATCH] openmp: Add support for the 'indirect' clause

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

2023-10-17 Thread Tobias Burnus
On 17.10.23 15:34, Jakub Jelinek wrote: On Tue, Oct 17, 2023 at 03:12:46PM +0200, Tobias Burnus wrote: C++11 (and C23) attribute do not seem to be properly handled: [[omp::decl (declare target,indirect(1))]] int foo(void) { return 5; } [[omp::decl (declare target indirect)]] int bar(void) {

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

2023-10-17 Thread Jakub Jelinek
On Tue, Oct 17, 2023 at 03:12:46PM +0200, Tobias Burnus wrote: > C++11 (and C23) attribute do not seem to be properly handled: > > [[omp::decl (declare target,indirect(1))]] > int foo(void) { return 5; } > [[omp::decl (declare target indirect)]] > int bar(void) { return 8; } Isn't that correct?

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

2023-10-17 Thread Tobias Burnus
Hi Kwok, hi Jakub, hi all, some first comments based on both playing around and reading the patch - and some generic comments to any patch reader. In general, the patch looks good. I just observe: * There is an issue with [[omp::decl(...)]]' * () - there is a C/C++ inconsistency in what is

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

2023-10-08 Thread Kwok Cheung Yeung
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. Functions declared as indirect may be called via function