Re: [RFC] Run pass_sink_code once more after ivopts/fre

2021-05-14 Thread Xionghu Luo via Gcc-patches
Hi Richi, On 2021/4/21 19:54, Richard Biener wrote: > On Tue, 20 Apr 2021, Xionghu Luo wrote: > >> >> >> On 2021/4/15 19:34, Richard Biener wrote: >>> On Thu, 15 Apr 2021, Xionghu Luo wrote: >>> Thanks, On 2021/4/14 14:41, Richard Biener wrote: >> "#538,#235,#234,#233" will all

Re: [pushed] libsanitizer, Darwin : Handle missing __builtin_os_log_format.

2021-05-14 Thread Martin Liška
On 5/13/21 10:26 PM, Iain Sandoe wrote: Hi, The update to libsanitizer broke bootstrap on Darwin, since the upstream sources assume building with clang on Darwin and make use of a header depending on a builtin that GCC does not currently implement. Hello. Thank you for the fix. Btw. is it som

[PATCH V8 3/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
Move some functionality into a procedure of its own. This is only so that when the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit more uniform. gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): New procedure. --- gcc/testsuite/lib/g

[PATCH V8 1/7] dwarf: add a dwarf2int.h internal interface

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. The following functions which were previously defined as static in dwarf2out.c are now non-static, and extern prototypes for them have been added to dwarf2int.h: -

[PATCH V8 2/7] dwarf: new dwarf_debuginfo_p predicate

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch introduces a dwarf_debuginfo_p predicate that abstracts and replaces complex checks on write_symbols. 2021-04-14 Indu Bhagat gcc/ChangeLog * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * confi

[PATCH V8 0/7] Support for the CTF and BTF debug formats

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
[Notes for V8: - In order to not disturb the on-going review, this series is still based on the two already accepted preparatory patches: + dwarf: new dwarf_debuginfo_p predicate + dwarf: add a dwarf2int.h internal interface Instead of being based on the patch: + opts: change write_symbol

[PATCH V8 7/7] Enable BTF generation in the BPF backend

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This patch changes the BPF GCC backend in order to use the DWARF debug hooks and therefore enables the user to generate BTF debugging information with -gbtf. Generating BTF is crucial when compiling BPF programs, since the CO-RE (compile-once, run-everwhere) mechanism used by the kernel BPF loader

[PATCH V8 5/7] CTF/BTF testsuites

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This commit adds a new testsuite for the CTF debug format. 2021-05-14 Indu Bhagat David Faust gcc/testsuite/ * lib/gcc-dg.exp (gcc-dg-frontend-supports-ctf): New procedure. (gcc-dg-debug-runtest): Add -gctf support. * gcc.dg/debug/btf/btf-1.c: New test.

[PATCH V8 6/7] CTF/BTF documentation

2021-05-14 Thread Jose E. Marchesi via Gcc-patches
This commit documents the new command line options introduced by the CTF and BTF debug formats. 2021-05-14 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. --- gcc/doc/invoke.texi | 20 1 file changed, 20 insertions(+) diff --git a/gcc/

Re: Ping: [PATCH] rs6000: Expand fmod and remainder when built with fast-math [PR97142]

2021-05-14 Thread Xionghu Luo via Gcc-patches
Test SPEC2017 Ofast P8LE for this patch : 511.povray_r +1.14%, 526.blender_r +1.72%, no obvious changes to others. On 2021/5/6 10:36, Xionghu Luo via Gcc-patches wrote: Gentle ping, thanks. On 2021/4/16 15:10, Xiong Hu Luo wrote: fmod/fmodf and remainder/remainderf could be expanded instead

Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-14 Thread Richard Biener
On May 14, 2021 4:52:56 AM GMT+02:00, Jiufu Guo wrote: >As discussed in the PR, Richard mentioned the method to >figure out which VAR was not set TREE_ADDRESSABLE, and >then cause this failure. It is address_expression which >build addr_expr (build_fold_addr_expr_loc), but not set >TREE_ADDRESSAB

Re: [pushed] libsanitizer, Darwin : Handle missing __builtin_os_log_format.

2021-05-14 Thread Iain Sandoe
Martin Liška wrote: On 5/13/21 10:26 PM, Iain Sandoe wrote: Hi, The update to libsanitizer broke bootstrap on Darwin, since the upstream sources assume building with clang on Darwin and make use of a header depending on a builtin that GCC does not currently implement. Thank you for the fix.

Re: [PATCH] Port gnat-style to Sphinx.

2021-05-14 Thread Arnaud Charlet
> Right now, 2/3 of Ada manuals are both in .texi and .rst. I would like to port > a small gnat-style manual based on [1]. > > Ready for master? OK, thanks. > [1] https://github.com/davidmalcolm/texi2rst > > gcc/ada/ChangeLog: > > * doc/Makefile: Add gnat-style target. > * doc/shar

Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-14 Thread guojiufu via Gcc-patches
On 2021-05-14 15:15, Richard Biener wrote: On May 14, 2021 4:52:56 AM GMT+02:00, Jiufu Guo wrote: As discussed in the PR, Richard mentioned the method to figure out which VAR was not set TREE_ADDRESSABLE, and then cause this failure. It is address_expression which build addr_expr (build_fold_a

[DWARF] Couple of pending patches

2021-05-14 Thread Eric Botcazou
Hi, They are at: https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568731.html and https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568916.html I can devise a gnat.dg/ testcase for each of them if need be, although they will be exercised by the GDB testsuite. Thanks in advance. --

Re: [PATCH] go/100537 - Bootstrap-O3 and bootstrap-debug fail

2021-05-14 Thread guojiufu via Gcc-patches
On 2021-05-14 15:39, guojiufu via Gcc-patches wrote: On 2021-05-14 15:15, Richard Biener wrote: On May 14, 2021 4:52:56 AM GMT+02:00, Jiufu Guo wrote: As discussed in the PR, Richard mentioned the method to figure out which VAR was not set TREE_ADDRESSABLE, and then cause this failure. It is

Question about non-POD class type

2021-05-14 Thread Feng Xue OS via Gcc-patches
For an instance of a non-POD class, can I always assume that any operation on it should be type-safe, any wrong or even trick code to violate this is UB in C++ spec? For example, here are some ways: union { Type1 *p1; Type2 *p2; }; or union { Type1 t1; Type2 t2; }; or void

[PATCH] gcc-changelog: detect Co-Authored-By before ChangeLog entries

2021-05-14 Thread Martin Liška
Pushed to master. It handles e.g. commit f1a68574b1f8d2961d3a676dbcf0cc24b6368578: libstdc++: Define __cpp_lib_to_chars for C++20 [PR 100146] This defines the feature test macro when uselocale is available, because the floating-point std::from_chars support currently depends

[OG11] Merge GCC 11 into branch, cherry picks from mainline

2021-05-14 Thread Tobias Burnus
OG11 = devel/omp/gcc-11, a branch with some OpenMP/OpenACC/offload patches which are not yet on mainline. Additionally, patches in this area are cherry-picked from mainline (currently, only those listed below). Hence, I pushed those new commits: dfdb3550cc5 openmp: Add testcases to verify OpenMP

[PATCH] aarch64: Make sqdmlal2 patterns match canonical RT

2021-05-14 Thread Kyrylo Tkachov via Gcc-patches
Hi all, The sqdmlal2 patterns are hidden beneath the SBINQOPS iterator and unfortunately they don't match canonical RTL because the simple accumulate operand comes in the first arm of the SS_PLUS. This patch splits the SS_PLUS and SS_MINUS forms with the SS_PLUS operands set up to match the can

Re: [PATCH] regcprop: Fix another cprop_hardreg bug [PR100342]

2021-05-14 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > On Thu, May 13, 2021 at 05:37:36PM +0200, Jakub Jelinek wrote: >> So, do you want something like (I've deleted the old comment as I think >> the new one is enough, but am open to keep both) the patch below, where >> it REG_CAN_CHANGE_MODE_P is false, we punt (return), other

Re: [PR66791][ARM] Replace __builtin_neon_vtst*

2021-05-14 Thread Richard Earnshaw via Gcc-patches
On 14/05/2021 04:36, Prathamesh Kulkarni wrote: > On Wed, 12 May 2021 at 20:33, Richard Earnshaw > wrote: >> >> On 12/05/2021 12:05, Prathamesh Kulkarni via Gcc-patches wrote: >>> On Wed, 12 May 2021 at 16:02, Richard Earnshaw >>> wrote: On 12/05/2021 08:46, Prathamesh Kulkarn

Re: Why don't recently added -Wexceptions and -Winvalid-imported-macros use "Warning" flag?

2021-05-14 Thread Martin Liška
On 5/13/21 11:33 PM, Vadim Zeitlin wrote: Hello, While running my script[1] parsing gcc/c-family/c.opt to extract information about the new warnings for C++ programs, I've noticed that a couple of new warnings in gcc 11 don't use the "Warning" flag which, I had assumed, would be used for all

Re: [PATCH, LIBPHOBOS] Cleanup temp files in libphobos unittest at src/std/process.d

2021-05-14 Thread Iain Buclaw via Gcc-patches
Excerpts from Bernd Edlinger's message of May 14, 2021 7:19 am: > Hi, > > I've noticed that a couple temp files are leaked after each full > gcc test-suite run. > > I'd like to fix that by the following patch. > > > Bootstrapped and reg-tested on x86_64-pc-linux-gnu. > Is it OK for trunk? > T

Re: [PATCH] tsan: fix false positive for pthread_cond_clockwait

2021-05-14 Thread Martin Liška
On 5/13/21 7:10 PM, Michael de Lang wrote: |Thanks for updating LLVM to upstream. I've added the rebased patch below.| Thanks, I've just tested and pushed your commit: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=80b4ce1a5190ebe764b1009afae57dcef45f92c2 Martin

Re: [PATCH, LIBPHOBOS] Cleanup temp files in libphobos unittest at src/std/process.d

2021-05-14 Thread Bernd Edlinger
Hi Iain, On 5/14/21 11:55 AM, Iain Buclaw wrote: > Excerpts from Bernd Edlinger's message of May 14, 2021 7:19 am: >> Hi, >> >> I've noticed that a couple temp files are leaked after each full >> gcc test-suite run. >> >> I'd like to fix that by the following patch. >> >> >> Bootstrapped and reg-t

Re: [PATCH, LIBPHOBOS] Cleanup temp files in libphobos unittest at src/std/process.d

2021-05-14 Thread Iain Buclaw via Gcc-patches
Excerpts from Bernd Edlinger's message of May 14, 2021 12:43 pm: > Hi Iain, > > On 5/14/21 11:55 AM, Iain Buclaw wrote: >> Excerpts from Bernd Edlinger's message of May 14, 2021 7:19 am: >>> Hi, >>> >>> I've noticed that a couple temp files are leaked after each full >>> gcc test-suite run. >>> >>

Re: [PATCH, LIBPHOBOS] Cleanup temp files in libphobos unittest at src/std/process.d

2021-05-14 Thread Bernd Edlinger
On 5/14/21 1:54 PM, Iain Buclaw wrote: > > Oops, sorry I meant src/MERGE, druntime has nothing to do with it. > > So yes, please add 63f4caa900e17c541042617b2fa187059b86bf88 to > libphobos/src/MERGE and it's good to go. > Okay, so this is what I've pushed now: commit cb787efa45782adab764575a2e

Re: [PATCH, OG10, OpenMP 5.0, committed] Remove array section base-pointer mapping semantics, and other front-end adjustments.

2021-05-14 Thread Chung-Lin Tang
On 2021/5/11 11:15 , Thomas Schwinge wrote: Hi Chung-Lin! On 2021-05-11T19:28:04+0800, Chung-Lin Tang wrote: This patch largely implements three pieces of functionality: (1) Per discussion and clarification on the omp-lang mailing list, standards conforming behavior for mapping array sectio

Re: [GOVERNANCE] Where to file complaints re project-maintainers?

2021-05-14 Thread Georg-Johann Lay via Gcc-patches
abebeos via Gcc-patches schrieb: Again, just heavily fascinating to see how you ignore the overall essence of this, which is of course directly related to gcc. (bountysource is just a secondary disaster, it all starts here, at gcc. * You postet a patch to gcc-patches@. * You did not answer an

[PATCH, OpenMP 5.0] Implement relaxation of implicit map vs. existing device mappings (for mainline trunk)

2021-05-14 Thread Chung-Lin Tang
Hi Jakub, This is a version of patch https://gcc.gnu.org/pipermail/gcc-patches/2021-May/569665.html for mainline trunk. This patch implements relaxing the requirements when a map with the implicit attribute encounters an overlapping existing map. As the OpenMP 5.0 spec describes on page 320, l

[Patch] gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598]

2021-05-14 Thread Tobias Burnus
Fixes the build fail: ../../gcc/genversion.c:37:20: error: ‘BASEVER’ was not declared in this scope char basever[] = BASEVER; when doing a cross compilation. Cf. patch for details. OK for mainline? (The runstatedir appears when not using 2.69 but a newer subrelease. [I think it was 2.69b?].)

[committed] Add testcases for already fixed PRs PR88872, PR90019, PR94616, PR95226

2021-05-14 Thread Jakub Jelinek via Gcc-patches
Hi! While going through [8 Regression] PRs that weren't fixed in 8.5 and thus will remain broken in 8.x forever I've committed following 4 testcases into the testsuite after testing them on x86_64-linux. Jakub testsuite: Add testcase for already fixed PR [PR88872] 2021-05-14 Jakub Jelin

Re: [PATCH] avoid using an incompletely populated struct (PR 100574)

2021-05-14 Thread Martin Sebor via Gcc-patches
On 5/13/21 10:53 PM, Bernd Edlinger wrote: On 5/14/21 12:35 AM, Martin Sebor wrote: On 5/13/21 11:36 AM, Martin Sebor wrote: On 5/13/21 11:20 AM, Bernd Edlinger wrote: On 5/13/21 3:55 AM, Martin Sebor via Gcc-patches wrote: A logic bug in the handling of PHI arguments in compute_objsize that

Re: [GOVERNANCE] Where to file complaints re project-maintainers?

2021-05-14 Thread abebeos via Gcc-patches
Hi there IT-fascists, clowns, master-clowns, totally-confused-incompetent-code-plumbers, activity-trapped-silent-high-performers, stay-out-of-trouble-silent-high-performers! (Guess where G.J. Lay fits in the collection...). Please be aware that I do not read any messages here (including the one I'

[RFC] split loop for NE condition.

2021-05-14 Thread guojiufu via Gcc-patches
I've refined the patch as below. This patch is checking "unsigned type" adn iv.no_overflow. While I'm thinking to use "number_of_iterations_exit (loop, e, &niter, false, false, NULL)" and "niter.control.no_overflow" to check overflow/wrap, which maybe more accurate, but relative "expensive". "n

Re: [PATCH 1/4] rs6000: Add -mrop-protect and -mprivileged flags

2021-05-14 Thread Segher Boessenkool
On Thu, May 13, 2021 at 10:34:54PM -0500, Bill Schmidt via Gcc-patches wrote: > +mprivileged > +Target Var(rs6000_privileged) Init(0) > +Enable generation of instructions that require privileged state. That isn't quite it -- it will generate "p" insns instead of the usual ones, it isn't just that

Re: [PATCH] Add gnu::diagnose_as attribute

2021-05-14 Thread Martin Sebor via Gcc-patches
On 5/4/21 5:13 AM, Matthias Kretz wrote: From: Matthias Kretz This attribute overrides the diagnostics output string for the entity it appertains to. The motivation is to improve QoI for library TS implementations, where diagnostics have a very bad signal-to-noise ratio due to the long namespace

[pushed] c++: simplify enclosing_instantiation_of [PR95870]

2021-05-14 Thread Jason Merrill via Gcc-patches
Comparing DECL_SOURCE_LOCATION like the GCC 11 patch for PR 95870 will also work for user-defined functions, if we update their location when instantiating. Another option would be to use LAMBDA_EXPR_REGEN_INFO for lambdas, but this way is even simpler. Tested x86_64-pc-linux-gnu, applying to tru

[Patch] Fortran/OpenMP: Handle implicit SAVE for variables in main

2021-05-14 Thread Tobias Burnus
Found when working on another patch. Variables in the specification part of a module – but also in a main program are implicitly SAVE. Likewise for variables with initialization - but that was already handled. OK for mainline and GCC 11? Tobias - Mentor Graphics (Deutschland) G

[Patch] Fortran/OpenMP: Support 'omp parallel master'

2021-05-14 Thread Tobias Burnus
(Testcase requires just posted "Fortran/OpenMP: Handle implicit SAVE for variables in main" patch.) (Found when looking the testcases generated for PR 99928 but otherwise not related to that PR.) "omp parallel master" was unsupported; while the it becomes more useful once taskloop is also supp

[PATCH][AArch64]: Use UNSPEC_LD1_SVE for all LD1 loads

2021-05-14 Thread Andre Vieira (lists) via Gcc-patches
Hi, I noticed we were missing out on LD1 + UXT combinations in some cases and found it was because of inconsistent use of the unspec enum UNSPEC_LD1_SVE. The combine pattern for LD1[S][BHWD] uses UNSPEC_LD1_SVE whereas one of the LD1 expanders was using UNSPEC_PRED_X. I wasn't sure whether to

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-14 Thread Bernd Edlinger
On 5/13/21 5:17 PM, Jeff Law via Gcc-patches wrote: > > On 5/13/2021 6:23 AM, Martin Jambor wrote: >> Hi, >> >> When SRA transforms an assignment where the RHS is an aggregate decl >> that it creates replacements for, the (least efficient) fallback >> method of dealing with them is to store all th

Re: [Patch] Fortran/OpenMP: Handle implicit SAVE for variables in main

2021-05-14 Thread Jakub Jelinek via Gcc-patches
On Fri, May 14, 2021 at 06:13:55PM +0200, Tobias Burnus wrote: > Found when working on another patch. Variables in the specification > part of a module – but also in a main program are implicitly SAVE. > > Likewise for variables with initialization - but that was already > handled. > > OK for mai

Re: [PATCH] tree-sra: Avoid refreshing into const base decls (PR 100453)

2021-05-14 Thread Eric Botcazou
> Looks like this caused: > > === acats tests === > FAIL: c41325a > FAIL: c45347d > FAIL: c74402a > FAIL: c95085m > FAIL: cc3601a > > === gnat tests === > > FAIL: gnat.dg/addr12.adb (test for excess errors) > UNRESOLVED: gnat.dg/addr12.adb compilation fa

Re: [Patch] Fortran/OpenMP: Support 'omp parallel master'

2021-05-14 Thread Jakub Jelinek via Gcc-patches
On Fri, May 14, 2021 at 06:15:15PM +0200, Tobias Burnus wrote: > (Testcase requires just posted "Fortran/OpenMP: Handle > implicit SAVE for variables in main" patch.) > (Found when looking the testcases generated for PR 99928 > but otherwise not related to that PR.) > > > "omp parallel master"

Re: [PATCH] libstdc++: Fix wrong thread waking on notify [PR100334]

2021-05-14 Thread Jonathan Wakely via Gcc-patches
On 13/05/21 18:54 -0700, Thomas Rodgers wrote: From: Thomas Rodgers Please ignore the previous patch. This one removes the need to carry any extra state in the case of a 'laundered' atomic wait. libstdc++/ChangeLog: * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop un

Re: [PATCH][AArch64]: Use UNSPEC_LD1_SVE for all LD1 loads

2021-05-14 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > Hi, > > I noticed we were missing out on LD1 + UXT combinations in some cases > and found it was because of inconsistent use of the unspec enum > UNSPEC_LD1_SVE. The combine pattern for LD1[S][BHWD] uses UNSPEC_LD1_SVE > whereas one of the LD1 expanders was usin

Re: [PATCH] phiopt: Optimize (x <=> y) cmp z [PR94589]

2021-05-14 Thread Jakub Jelinek via Gcc-patches
On Thu, May 06, 2021 at 09:42:41PM +0200, Marc Glisse wrote: > We can probably do it in 2 steps, first something like > > (for cmp (eq ne) > (simplify > (cmp (bit_and:c @0 @1) @0) > (cmp (@0 (bit_not! @1)) { build_zero_cst (TREE_TYPE (@0)); }))) > > to get rid of the double use, and then sim

[PATCH] libstdc++: Simplify range adaptors' forwarding of bound args when possible

2021-05-14 Thread Patrick Palka via Gcc-patches
r11-8053 rewrote the range adaptor implementation in conformance with P2281, making partial application act like a SFINAE-friendly perfect forwarding call wrapper. Making SFINAE-friendliness coexist with perfect forwarding here requires adding fallback deleted operator() overloads (as described in

Re: [PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-14 Thread Segher Boessenkool
Hi! On Thu, May 13, 2021 at 10:34:55PM -0500, Bill Schmidt via Gcc-patches wrote: > +;; ROP mitigation instructions. > + > +(define_insn "hashst" > + [(set (match_operand:DI 0 "simple_offsettable_mem_operand" "=m") > +(unspec:DI [(match_operand:DI 1 "int_reg_operand" "r")] > +

Re: [PATCH 3/4] rs6000: Conditionally define __ROP_PROTECT__

2021-05-14 Thread Segher Boessenkool
On Thu, May 13, 2021 at 10:34:56PM -0500, Bill Schmidt via Gcc-patches wrote: > gcc/ > * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define > __ROP_PROTECT__ if -mrop-protect is selected. Okay for trunk and 11. Segher

Re: [PATCH 2/4] rs6000: Emit ROP-mitigation instructions in prologue and epilogue

2021-05-14 Thread Bill Schmidt via Gcc-patches
On 5/14/21 1:44 PM, Segher Boessenkool wrote: Please make this an unspec_volatile? Oops!  Sorry for missing that the first time. Thanks for the review!! Bill

Re: [PATCH 4/4] rs6000: Add ROP tests

2021-05-14 Thread Segher Boessenkool
On Thu, May 13, 2021 at 10:34:57PM -0500, Bill Schmidt via Gcc-patches wrote: > gcc/testsuite/ > * gcc.target/powerpc/rop-1.c: New. > * gcc.target/powerpc/rop-2.c: New. > * gcc.target/powerpc/rop-3.c: New. > * gcc.target/powerpc/rop-4.c: New. > * gcc.target/powerpc/rop

Re: [PATCH] PING implement pre-c++20 contracts

2021-05-14 Thread Jason Merrill via Gcc-patches
On 4/30/21 1:44 PM, Jeff Chapman wrote: Hello! Looping back around to this. re: https://gcc.gnu.org/pipermail/gcc-patches/2021-March/567334.html On 3/25/21, Jason Merrill wrote: On 3/1/21 8:12 AM, Jeff Chapman wrote: On 1/18/21, Jason Merrill wrote: On 1/4/21 9:58 AM, Jeff Chapman wrote: P

Re: [PATCH] PING implement pre-c++20 contracts

2021-05-14 Thread Marek Polacek via Gcc-patches
On Fri, May 14, 2021 at 04:54:10PM -0400, Jason Merrill via Gcc-patches wrote: > Please add an overview of the implementation strategy to the top of > cxx-contracts.c. Particularly to discuss the why and how of > pre/post/guarded/unguarded functions. And I think let's please name the file contrac

[PATCH 0/5] OpenACC/OpenMP: Rework struct component handling

2021-05-14 Thread Julian Brown
Hi, This patch series reworks how indirect struct (or class or derived-type) component mappings are lowered for OpenMP and OpenACC. I previously posted this against the og10 branch: https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570058.html This version of the series, rebased to trunk, in

[PATCH 1/5] Unify ARRAY_REF/INDIRECT_REF stripping code in extract_base_bit_offset

2021-05-14 Thread Julian Brown
For historical reasons, it seems that extract_base_bit_offset unnecessarily used two different ways to strip ARRAY_REF/INDIRECT_REF nodes from component accesses. I verified that the two ways of performing the operation gave the same results across the whole testsuite (and several additional benchm

[PATCH 2/5] Refactor struct lowering for OpenMP/OpenACC in gimplify.c

2021-05-14 Thread Julian Brown
This patch is a second attempt at refactoring struct component mapping handling for OpenACC/OpenMP during gimplification, after the patch I posted here: https://gcc.gnu.org/pipermail/gcc-patches/2018-November/510503.html And improved here, post-review: https://gcc.gnu.org/pipermail/gcc-patch

[PATCH 3/5] Rewrite GOMP_MAP_ATTACH_DETACH mappings for OpenMP also

2021-05-14 Thread Julian Brown
It never makes sense for a GOMP_MAP_ATTACH_DETACH mapping to survive beyond gimplify.c, and with OpenMP making use of that mapping type too now alongside OpenACC, there are cases where it was making it through to omp-low.c. This patch rewrites such mappings to GOMP_MAP_ATTACH or GOMP_MAP_DETACH un

[PATCH 4/5] Rework indirect struct handling for OpenACC/OpenMP in gimplify.c

2021-05-14 Thread Julian Brown
This patch reworks indirect struct handling in gimplify.c (i.e. for struct components mapped with "mystruct->a[0:n]", "mystruct->b", etc.), for both OpenACC and OpenMP. The key observation leading to these changes was that component mappings of references-to-structures is already implemented and w

[PATCH 5/5] Mapping of components of references to pointers to structs for OpenMP/OpenACC

2021-05-14 Thread Julian Brown
GCC currently raises a parse error for indirect accesses to struct members, where the base of the access is a reference to a pointer. This patch fixes that case. OK for trunk? Thanks, Julian 2021-05-14 Julian Brown gcc/cp/ * semantics.c (finish_omp_clauses): Handle components of ref