Re: [PATCH v4, rs6000] Add V1TI into vector comparison expand [PR103316]

2022-05-25 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/5/26 13:30, HAO CHEN GUI wrote: > Kewen, > Thanks so much for your advice. Just one question about effective-target. > > For the test cases, it needs both power10_ok and int128 support. I saw some > existing test cases have these two checks as well. But I wonder if

Re: [PATCH v4, rs6000] Add V1TI into vector comparison expand [PR103316]

2022-05-25 Thread HAO CHEN GUI via Gcc-patches
Kewen, Thanks so much for your advice. Just one question about effective-target. For the test cases, it needs both power10_ok and int128 support. I saw some existing test cases have these two checks as well. But I wonder if power10_ok already covers int128 on powerpc targets? Can we save one

Re: [PATCH v4, rs6000] Add V1TI into vector comparison expand [PR103316]

2022-05-25 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/5/24 16:45, HAO CHEN GUI wrote: > Hi, >This patch adds V1TI mode into a new mode iterator used in vector > comparison and rotation expands. Without the patch, the comparisons > between two vector __int128 are converted to scalar comparisons. The > code is suboptimal. The

[PATCH] RISC-V: Add -mtune=thead-c906 to the invoke docs

2022-05-25 Thread Palmer Dabbelt
gcc/ChangeLog * doc/invoke.texi (RISC-V): Document -mtune=thead-c906. Signed-off-by: Palmer Dabbelt --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 71098d86313..a584dc6a7f9 100644 ---

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix std::span pretty printer

2022-05-25 Thread Jonathan Wakely via Gcc-patches
On Thu, 26 May 2022 at 00:34, Jonathan Wakely wrote: > > On Wed, 25 May 2022 at 21:29, François Dumont via Libstdc++ > wrote: > > > > Hi > > > > Here is a patch to fix std::span pretty printer in versioned > > namespace mode. > > > > Note that there is still a problem with std::atomic

Re: [PATCH][_GLIBCXX_INLINE_VERSION] Fix std::span pretty printer

2022-05-25 Thread Jonathan Wakely via Gcc-patches
On Wed, 25 May 2022 at 21:29, François Dumont via Libstdc++ wrote: > > Hi > > Here is a patch to fix std::span pretty printer in versioned > namespace mode. > > Note that there is still a problem with std::atomic after this patch. > > got: $13 = std::atomic> (empty) = {get() = 0x0} >

Re: [COMMITTED] Tweak some comments.

2022-05-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 May 2022 16:42:05 CEST, Andrew MacLeod via Gcc-patches wrote: >Just fixed some misspelling and such. Thanks!

Re: [PATCH] RISC-V: Don't unconditionally add m, a, f, d in arch-canonicalize

2022-05-25 Thread Palmer Dabbelt
On Wed, 25 May 2022 07:00:11 PDT (-0700), gcc-patches@gcc.gnu.org wrote: Committed, Thanks for fixing my stupid bug :P IMO this is a good candidate for a backport. On Wed, May 25, 2022 at 9:26 PM Simon Cook wrote: This solves an issue where rv32i, etc. are canonicalized to rv32imafd since

[PATCH, rs6000] Clean up the option_mask defines (part 3)

2022-05-25 Thread will schmidt via Gcc-patches
[PATCH, rs6000] Clean up the option_mask defines (part 3) Hi, Per code review, the MASK_REGNAMES, OPTION_MASK_REGNAMES, MASK_PROTOTYPE, OPTION_MASK_PROTOTYPE options are not used elsewhere in the codebase. Thus it should be safe to remove them. This includes an update to a nearby comment to

Re: [PATCH, rs6000] Clean up the option_mask defines (part 2)

2022-05-25 Thread will schmidt via Gcc-patches
[PATCH, rs6000] Clean up the option_mask defines (part 2) Hi, This patch reworks most of the lingering MASK_* values to OPTION_MASK_* and removes the now redundant defines. Regtested OK on power10. OK for trunk? gcc/ * rs6000.h (RS6000_BTM_VSX, RS6000_BTM_P8_VECTOR,

[PATCH][_GLIBCXX_INLINE_VERSION] Fix std::span pretty printer

2022-05-25 Thread François Dumont via Gcc-patches
Hi     Here is a patch to fix std::span pretty printer in versioned namespace mode.     Note that there is still a problem with std::atomic after this patch. got: $13 = std::atomic> (empty) = {get() = 0x0} FAIL: libstdc++-prettyprinters/cxx20.cc print spe     libstdc++:

[PATCH v2] c++: suppress -Waddress warnings with *_cast [PR105569]

2022-05-25 Thread Marek Polacek via Gcc-patches
On Wed, May 18, 2022 at 09:43:47AM -0400, Jason Merrill wrote: > On 5/16/22 13:06, Marek Polacek wrote: > > dynamic_cast can legally return nullptr, so I don't think it's helpful > > for -Waddress to warn for > > > >if (dynamic_cast()) > > // ... > > > > More generally, it's likely not

[PATCH, rs6000] Clean up the option_mask defines (part 1)

2022-05-25 Thread will schmidt via Gcc-patches
[PATCH, rs6000] Clean up the option_mask defines Hi, We have an assortment of MASK and OPTION_MASK #defines throughout the rs6000 code, MASK_ALTIVEC and OPTION_MASK_ALTIVEC as an example. We currently #define the MASK_ entries to their OPTION_MASK_ equivalents so the two names could be used

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-25 Thread Prathamesh Kulkarni via Gcc-patches
On Thu, 26 May 2022 at 00:37, Richard Biener wrote: > > > > > Am 25.05.2022 um 21:03 schrieb Prathamesh Kulkarni > > : > > > > On Wed, 25 May 2022 at 18:27, Richard Biener > > wrote: > >> > >>> On Tue, May 24, 2022 at 9:22 PM Prathamesh Kulkarni via Gcc-patches > >>> wrote: > >>> > >>> On

Re: [PATCH] c++: fix ICE on invalid attributes [PR96637]

2022-05-25 Thread Jason Merrill via Gcc-patches
On 5/25/22 14:49, Marek Polacek wrote: On Tue, May 24, 2022 at 08:22:22AM -0400, Jason Merrill wrote: On 4/29/22 10:12, Marek Polacek wrote: This patch fixes crashes with invalid attributes. Arguably it could make sense to assert seen_error() too. So in this testcase we have TREE_CHAIN of a

Re: [PATCH] Modula-2: merge proposal/review: 1/9 01.patch-set-01

2022-05-25 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: > So is there a reason to have the 'scaffold' separate from the object > of hello.mod? Perhaps the major advantage is flexibility? But no we can by default produce the scaffold within the object of hello.mod (and give users the ability to disable scaffold generation

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-25 Thread Richard Biener via Gcc-patches
> Am 25.05.2022 um 21:03 schrieb Prathamesh Kulkarni > : > > On Wed, 25 May 2022 at 18:27, Richard Biener > wrote: >> >>> On Tue, May 24, 2022 at 9:22 PM Prathamesh Kulkarni via Gcc-patches >>> wrote: >>> >>> On Tue, 24 May 2022 at 14:50, Richard Sandiford >>> wrote:

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-25 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 25 May 2022 at 18:27, Richard Biener wrote: > > On Tue, May 24, 2022 at 9:22 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > On Tue, 24 May 2022 at 14:50, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni writes: > > > > diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi

Re: [PATCH v2] DSE: Use the constant store source if possible

2022-05-25 Thread H.J. Lu via Gcc-patches
On Wed, May 25, 2022 at 2:30 AM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Tue, May 24, 2022 at 10:11 PM H.J. Lu wrote: > >> > >> On Mon, May 23, 2022 at 11:42 PM Richard Biener > >> wrote: > >> > > >> > On Mon, May 23, 2022 at 8:34 PM H.J. Lu wrote: > >> > > >

Re: [PATCH v2] DSE: Use the constant store source if possible

2022-05-25 Thread H.J. Lu via Gcc-patches
On Wed, May 25, 2022 at 12:30 AM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > > On Mon, May 23, 2022 at 12:38:06PM +0200, Richard Biener wrote: > >> On Sat, May 21, 2022 at 5:02 AM H.J. Lu via Gcc-patches > >> wrote: > >> > > >> > When recording store for RTL dead store

[pushed] c++: CTAD with alias and nested template [PR105655]

2022-05-25 Thread Jason Merrill via Gcc-patches
Here, alias_ctad_tweaks expect tsubst_decl of a FUNCTION_DECL to return a FUNCTION_DECL. A reasonable expectation, but in this case we were replacing the template args of the class-scope deduction guide with equivalent args, so looking in the hash table we found the partial instantiation stored

Re: [PATCH] c++: fix ICE on invalid attributes [PR96637]

2022-05-25 Thread Marek Polacek via Gcc-patches
On Tue, May 24, 2022 at 08:22:22AM -0400, Jason Merrill wrote: > On 4/29/22 10:12, Marek Polacek wrote: > > This patch fixes crashes with invalid attributes. Arguably it could > > make sense to assert seen_error() too. > > So in this testcase we have TREE_CHAIN of a TREE_LIST pointing to >

Re: [wwwdocs] Add C status page

2022-05-25 Thread Joseph Myers
On Tue, 24 May 2022, Marek Polacek via Gcc-patches wrote: > > And cases where some support in GCC should > > definitely be done to consider the feature implemented, even when not > > needed for conformance (e.g. the %wN, %wfN printf/scanf formats need > > implementing in glibc, and

[PATCH] c++: constrained partial spec forward decl [PR96363]

2022-05-25 Thread Patrick Palka via Gcc-patches
Here during cp_parser_single_declaration for #2, we were calling associate_classtype_constraints for TPL (the primary template type) before maybe_process_partial_specialization could get a chance to notice that we're in fact declaring a distinct constrained partial spec and not redeclaring the

Re: [PATCH] tree-optimization/105726 - adjust array bound heuristic

2022-05-25 Thread Martin Sebor via Gcc-patches
On 5/25/22 11:19, Martin Sebor wrote: On 5/25/22 04:49, Richard Biener wrote: ... [*] For example, no warning is issued for the following overread: Scratch that, there is no overread with strncpy. When there is like with memcpy, it is diagnosed as it should be. struct A a; void g (char

Re: [PATCH] tree-optimization/105726 - adjust array bound heuristic

2022-05-25 Thread Martin Sebor via Gcc-patches
On 5/25/22 04:49, Richard Biener wrote: There's heuristic to detect ptr[1].a[...] out of bound accesses reasoning that if ptr points to an array of aggregates a trailing incomplete array has to have size zero. The following more thoroughly constrains the cases this applies to avoid false

Vim swap files not ignored

2022-05-25 Thread Bruce Korb via Gcc-patches
Hi, I don't have the keys for write access anymore. This ought to be applied. Odd that it never has been. :)diff --git a/.gitignore b/.gitignore index 14ee0325176..021a8c74185 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *~ .#* *# +.*.swp *.flt *.gmo

Re: [COMMITTED] Use infer instead of side-effect for ranges.

2022-05-25 Thread Segher Boessenkool
On Wed, May 25, 2022 at 10:35:31AM -0400, Andrew MacLeod wrote: > Executive decision made. > > gimple-range-side-effect.{h,cc}   -> gimple-range-infer.{h,cc} > > class stmt_side_effects  -->  class gimple_infer_range > > class side_effect_manager  -->  class infer_range_manager > > various

[PATCH] AArch64: Cleanup option processing code

2022-05-25 Thread Wilco Dijkstra via Gcc-patches
Further cleanup option processing. Remove the duplication of global variables for CPU and tune settings so that CPU option processing is simplified even further. Move global variables that need save and restore due to target option processing into aarch64.opt. This removes the need for explicit

[Patch] libgomp.texi: Add more to-be-implemented OpenMP 5.2 features / [wwwdocs] p.texi: Add more to-be-implemented OpenMP 5.2 features

2022-05-25 Thread Tobias Burnus
I had a look at the OpenMP 5.2 changes and found some more, which I think should be listed. Some were rather hidden, two were only documented in the deprecate part. I also added the 'begin declare target', which is a variant to the delimited form of 'declare target' – the non-begin variant is

Re: [PATCH v3] libstdc++: fix pointer type exception catch [PR105387]

2022-05-25 Thread Jonathan Wakely via Gcc-patches
On Wed, 25 May 2022 at 03:30, Jakob Hasse via Libstdc++ wrote: > > Hello, > > two weeks ago I submitted the second version of the patch PR105387 for the > bug 105387. Now I added a pointer-to-member exception test just to make sure > that it doesn't break in case RTTI is enabled. The test is

[pushed] c++: deduction from auto fn [PR105623]

2022-05-25 Thread Jason Merrill via Gcc-patches
Since my patch for PR90451, we defer mark_used of single functions as late as possible. And since my r12-1273, we keep BASELINK from lookup around rather than reconstruct it later. These both made us try to instantiate g with a function type that still had 'auto' as its return type. Tested

[pushed] c++: constexpr returning deallocated ptr

2022-05-25 Thread Jason Merrill via Gcc-patches
In constexpr-new3.C, the f7 function returns a deleted pointer, which we were happily caching because the new and delete are balanced. Don't. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_call_expression): Check for heap vars in the

[pushed] c++: strict constexpr and local vars

2022-05-25 Thread Jason Merrill via Gcc-patches
A change I was working on made constexpr_searcher.cc start to fail, and when I looked at it I wondered why it had been accepted before. This turned out to be because we try to be more flexible about constant-evaluation of static initializers, as allowed, but we were wrongly doing the same for

Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Koning, Paul via Gcc-patches
On May 25, 2022, at 10:39 AM, Roger Sayle mailto:ro...@nextmovesoftware.com>> wrote: On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches mailto:patc...@gcc.gnu.org>> wrote: On Tue, May 24, 2022 at 3:55 PM Roger Sayle mailto:ro...@nextmovesoftware.com>> wrote: "For every

[COMMITTED] Tweak some comments.

2022-05-25 Thread Andrew MacLeod via Gcc-patches
Just fixed some misspelling and such. pushed. Andrew commit 761cc32e5a1c762f91904d2a86980f106a5bc441 Author: Andrew MacLeod Date: Wed May 25 10:39:31 2022 -0400 Tweak comments. Adjust some mispellings in comments. * gimple-range-cache.cc: Adjust comments.

RE: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Roger Sayle
> > On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > On Tue, May 24, 2022 at 3:55 PM Roger Sayle > wrote: > >> > >> > >> "For every pessimization, there's an equal and opposite optimization". > >> > >> In the review of my original patch for PR

[COMMITTED] Use infer instead of side-effect for ranges.

2022-05-25 Thread Andrew MacLeod via Gcc-patches
On 5/20/22 15:18, Bernhard Reutner-Fischer via Gcc-patches wrote: On 20 May 2022 16:39:20 CEST, Segher Boessenkool wrote: On Fri, May 20, 2022 at 10:11:32AM +0200, Eric Botcazou wrote: I suggest 'deduce', 'deduction', 'deducing a range'. What the code is actually doing is deducing that 'b'

Re: [PATCH] RISC-V: Don't unconditionally add m, a, f, d in arch-canonicalize

2022-05-25 Thread Kito Cheng via Gcc-patches
Committed, Thanks for fixing my stupid bug :P On Wed, May 25, 2022 at 9:26 PM Simon Cook wrote: > > This solves an issue where rv32i, etc. are canonicalized to rv32imafd > since the g->i addition of 'm', 'a', 'f', 'd' is not actually gated by > whether the input was rv32g/rv64g. > >

Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Koning, Paul via Gcc-patches
> On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches > wrote: > > On Tue, May 24, 2022 at 3:55 PM Roger Sayle > wrote: >> >> >> "For every pessimization, there's an equal and opposite optimization". >> >> In the review of my original patch for PR middle-end/98865, Richard >>

Re: [PATCH v2 09/11] OpenMP 5.0 "declare mapper" support for C++

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Tue, May 24, 2022 at 04:48:13PM +0200, Jakub Jelinek wrote: > > This version of the patch improves detection of explicitly-mapped struct > > accesses which inhibit implicitly-triggered user-defined mappers for a > > target region. > > Will start with a general comment, from looking at the

[PATCH] RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize

2022-05-25 Thread Simon Cook
This solves an issue where rv32i, etc. are canonicalized to rv32imafd since the g->i addition of 'm', 'a', 'f', 'd' is not actually gated by whether the input was rv32g/rv64g. gcc/ChangeLog: * config/riscv/arch-canonicalize: Only add mafd extension if base was rv32/rv64g. ---

Re: [PATCH] libgomp: start using LIKELY/UNLIKELY macros

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Wed, May 25, 2022 at 03:13:09PM +0200, Martin Liška wrote: > Btw. I noticed one discrepancy: > > ./libgomp/loop_ull.c: > > /* Cheap overflow protection. */ > if (__builtin_expect ((nthreads | ws->chunk_size_ull) > < 1ULL << (sizeof

Re: [PATCH] libgomp: start using LIKELY/UNLIKELY macros

2022-05-25 Thread Martin Liška
On 5/25/22 13:55, Jakub Jelinek wrote: > On Wed, May 25, 2022 at 01:52:46PM +0200, Martin Liška wrote: >> Similarly to g:22d9c8802add09a93308319fc37dd3a0f1125393, I would like to use >> {UN,}LIKELY macros in libgomp. If the community is fine, I'm planning doing >> the same in other GCC's

Re: [0/9] [middle-end] Add param to vec_perm_const hook to specify mode of input operand

2022-05-25 Thread Richard Biener via Gcc-patches
On Tue, May 24, 2022 at 9:22 PM Prathamesh Kulkarni via Gcc-patches wrote: > > On Tue, 24 May 2022 at 14:50, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi > > > index c5006afc00d..0a3c733ada9 100644 > > > ---

Re: [PATCH] Add GIMPLE switch support to loop unswitching

2022-05-25 Thread Michael Matz via Gcc-patches
Hello, On Wed, 25 May 2022, Richard Biener via Gcc-patches wrote: > I guess we might want to (warn about labels in the "toplevel" > scope in switch statements). So warn about > > switch (x) > { > case 1: > bar: > }; That style is actually used quite some time in GCC itself. Sometimes with

Re: [PATCH] c: Improve build_component_ref diagnostics [PR91134]

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Tue, May 24, 2022 at 09:59:03AM -0400, David Malcolm wrote: > > Ideally we'd have an automated check that the fix-it hint fixes the > > code, but failing that, I like to have at least some DejaGnu test > > coverage for fix-it hints - something like the tests in > > gcc.dg/fixits.c > > or

Re: [PATCH] c: Improve build_component_ref diagnostics [PR91134]

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Tue, May 24, 2022 at 09:43:54AM -0400, Marek Polacek wrote: > Consider extending the test like Done, + added the dg-*-multiline-output stuff to test the fixit hints. Thanks. Here is what I've committed: 2022-05-25 Jakub Jelinek PR c/91134 gcc/c/ * c-tree.h

Re: [PATCH v5] c++: ICE with temporary of class type in DMI [PR100252]

2022-05-25 Thread Jason Merrill via Gcc-patches
On 5/24/22 16:21, Marek Polacek wrote: On Tue, May 24, 2022 at 04:01:37PM -0400, Jason Merrill wrote: On 5/24/22 09:55, Marek Polacek wrote: On Tue, May 24, 2022 at 08:36:39AM -0400, Jason Merrill wrote: On 5/16/22 11:36, Marek Polacek wrote: +static tree

Re: [PATCH] AArch64: Prioritise init_have_lse_atomics constructor [PR 105708]

2022-05-25 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi Richard, > > I've added a comment - as usual it's just a number. A quick grep in gcc and > glibc showed that priorities 98-101 are used, so I just went a bit below so it > has a higher priority than typical initializations. Thanks. OK for trunk, and for backports

Re: [PATCH] libgomp: start using LIKELY/UNLIKELY macros

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Wed, May 25, 2022 at 01:52:46PM +0200, Martin Liška wrote: > Similarly to g:22d9c8802add09a93308319fc37dd3a0f1125393, I would like to use > {UN,}LIKELY macros in libgomp. If the community is fine, I'm planning doing > the same in other GCC's libraries. I must say I prefer __builtin_expect over

[PATCH] libgomp: start using LIKELY/UNLIKELY macros

2022-05-25 Thread Martin Liška
Similarly to g:22d9c8802add09a93308319fc37dd3a0f1125393, I would like to use {UN,}LIKELY macros in libgomp. If the community is fine, I'm planning doing the same in other GCC's libraries. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin

Re: [patch] [wwwdocs]+[invoke.texi] Update GCN for gfx90a (was: Re: [committed] amdgcn: Add gfx90a support)

2022-05-25 Thread Andrew Stubbs
On 25/05/2022 12:16, Tobias Burnus wrote: On 25.05.22 11:18, Andrew Stubbs wrote: On 24/05/2022 17:44, Tobias Burnus wrote: On 24.05.22 17:31, Andrew Stubbs wrote: amdgcn: Add gfx90a support I've deliberately avoided the MI100 and MI200 names because they're really not that simple. MI100 is

Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Richard Biener via Gcc-patches
On Tue, May 24, 2022 at 3:55 PM Roger Sayle wrote: > > > "For every pessimization, there's an equal and opposite optimization". > > In the review of my original patch for PR middle-end/98865, Richard > Biener pointed out that match.pd shouldn't be transforming X*Y into > X&-Y as the former is

Re: [patch] [wwwdocs]+[invoke.texi] Update GCN for gfx90a (was: Re: [committed] amdgcn: Add gfx90a support)

2022-05-25 Thread Tobias Burnus
On 25.05.22 11:18, Andrew Stubbs wrote: On 24/05/2022 17:44, Tobias Burnus wrote: On 24.05.22 17:31, Andrew Stubbs wrote: amdgcn: Add gfx90a support I've deliberately avoided the MI100 and MI200 names because they're really not that simple. MI100 is gfx908, but MI150 is gfx906 and MI125 is

[committed] d: add more 'final' and 'override' to gcc/d/*.cc 'visit' impls

2022-05-25 Thread Iain Buclaw via Gcc-patches
Hi, The first round of adding these missed several more cases in other files where the Visitor pattern is used in the D front-end. Bootstrapped on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * expr.cc: Add "final" and "override" to all "visit"

Re: [PATCH] Add GIMPLE switch support to loop unswitching

2022-05-25 Thread Richard Biener via Gcc-patches
On Wed, 25 May 2022, David Malcolm wrote: > On Wed, 2022-05-25 at 10:36 +0200, Richard Biener via Gcc-patches > wrote: > > This patch adds support to unswitch loops with switch statements > > based on invariant index.  It furthermore reworks the cost model > > to allow an overall budget of

[PATCH] tree-optimization/105726 - adjust array bound heuristic

2022-05-25 Thread Richard Biener via Gcc-patches
There's heuristic to detect ptr[1].a[...] out of bound accesses reasoning that if ptr points to an array of aggregates a trailing incomplete array has to have size zero. The following more thoroughly constrains the cases this applies to avoid false positive diagnostics. Bootstrapped and tested

Re: [PATCH] AArch64: Prioritise init_have_lse_atomics constructor [PR 105708]

2022-05-25 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, I've added a comment - as usual it's just a number. A quick grep in gcc and glibc showed that priorities 98-101 are used, so I just went a bit below so it has a higher priority than typical initializations. Cheers, Wilco Here is v2: Increase the priority of the

Re: [PATCH] Add GIMPLE switch support to loop unswitching

2022-05-25 Thread David Malcolm via Gcc-patches
On Wed, 2022-05-25 at 10:36 +0200, Richard Biener via Gcc-patches wrote: > This patch adds support to unswitch loops with switch statements > based on invariant index.  It furthermore reworks the cost model > to allow an overall budget of statements to be created per original > loop by all

Re: [PATCH] asan: Fix up instrumentation of assignments which are both loads and stores [PR105714]

2022-05-25 Thread Richard Biener via Gcc-patches
On Wed, 25 May 2022, Jakub Jelinek wrote: > Hi! > > On the following testcase with -Os asan pass sees: >[local count: 354334800]: > # h_21 = PHI > *c.3_5 = *d.2_4; > h_15 = h_21 + 1; > if (h_15 != 3) > goto ; [75.00%] > else > goto ; [25.00%] > >[local count:

[PATCH] asan: Fix up instrumentation of assignments which are both loads and stores [PR105714]

2022-05-25 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase with -Os asan pass sees: [local count: 354334800]: # h_21 = PHI *c.3_5 = *d.2_4; h_15 = h_21 + 1; if (h_15 != 3) goto ; [75.00%] else goto ; [25.00%] [local count: 118111600]: *c.3_5 = MEM[(struct a *) + 12B]; _13 = c.3_5->x; return

Re: [PATCH v2] DSE: Use the constant store source if possible

2022-05-25 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Tue, May 24, 2022 at 10:11 PM H.J. Lu wrote: >> >> On Mon, May 23, 2022 at 11:42 PM Richard Biener >> wrote: >> > >> > On Mon, May 23, 2022 at 8:34 PM H.J. Lu wrote: >> > > >> > > On Mon, May 23, 2022 at 12:38:06PM +0200, Richard Biener wrote: >> > >

[committed] libgomp: Fix occassional hangs with taskwait nowait depend

2022-05-25 Thread Jakub Jelinek via Gcc-patches
Hi! Richi reported occassional hangs with taskwait-depend-nowait-1.* tests and I've finally manged to reproduce. The problem is if taskwait depend without nowait is encountered soon after taskwait depend nowait and the former depends on the latter and there is no other work to do, the taskwait

Re: [PATCH v2] DSE: Use the constant store source if possible

2022-05-25 Thread Richard Biener via Gcc-patches
On Tue, May 24, 2022 at 10:11 PM H.J. Lu wrote: > > On Mon, May 23, 2022 at 11:42 PM Richard Biener > wrote: > > > > On Mon, May 23, 2022 at 8:34 PM H.J. Lu wrote: > > > > > > On Mon, May 23, 2022 at 12:38:06PM +0200, Richard Biener wrote: > > > > On Sat, May 21, 2022 at 5:02 AM H.J. Lu via

Re: [patch] [wwwdocs]+[invoke.texi] Update GCN for gfx90a (was: Re: [committed] amdgcn: Add gfx90a support)

2022-05-25 Thread Andrew Stubbs
On 24/05/2022 17:44, Tobias Burnus wrote: On 24.05.22 17:31, Andrew Stubbs wrote: amdgcn: Add gfx90a support Attached is an attempt to update invoke.texi I've deliberately avoided the MI100 and MI200 names because they're really not that simple. MI100 is gfx908, but MI150 is gfx906 and

[ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2022-05-25 Thread Joel Hutton via Gcc-patches
Ping! Just checking there is still interest in this. I'm assuming you've been busy with release. Joel > -Original Message- > From: Joel Hutton > Sent: 13 April 2022 16:53 > To: Richard Sandiford > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: [vect-patterns] Refactor

Re: [PATCH] Modula-2: merge proposal/review: 1/9 01.patch-set-01

2022-05-25 Thread Richard Biener via Gcc-patches
On Tue, May 24, 2022 at 5:45 PM Gaius Mulley wrote: > > Richard Biener writes: > > > On Sat, May 21, 2022 at 3:11 AM Gaius Mulley wrote: > >> > >> > >> Hi, > >> > >> Gaius wrote: > >> > >> > the changes do raise questions. The reason for the changes here are to > >> > allow easy linking for

Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]

2022-05-25 Thread Jan Hubicka via Gcc-patches
> On Mon, 16 May 2022, Alexander Monakov wrote: > > > On Mon, 9 May 2022, Jan Hubicka wrote: > > > > > > On second thought, it might be better to keep the assert, and place the > > > > loop > > > > under 'if (optimize)'? > > > > > > The problem is that at IPA level it does not make sense to

[PATCH] Add GIMPLE switch support to loop unswitching

2022-05-25 Thread Richard Biener via Gcc-patches
-15.c: New test. * gcc.dg/loop-unswitch-16.c: New test. * gcc.dg/loop-unswitch-17.c: New test. * gcc.dg/torture/20220518-1.c: New test. * gcc.dg/torture/20220518-2.c: New test. * gcc.dg/torture/20220525-1.c: New test. * gcc.dg/alias-10.c: Adjust

Re: [PATCH] aarch64: Fix pac-ret with unusual dwarf in libgcc unwinder [PR104689]

2022-05-25 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > The 05/13/2022 16:35, Richard Sandiford wrote: >> Szabolcs Nagy via Gcc-patches writes: >> > The RA_SIGN_STATE dwarf pseudo-register is normally only set using the >> > DW_CFA_AARCH64_negate_ra_state (== DW_CFA_window_save) operation which >> > toggles the return address

Re: OpenMP patches pending review

2022-05-25 Thread Jakub Jelinek via Gcc-patches
On Wed, May 25, 2022 at 09:25:19AM +0200, Tobias Burnus wrote: > first – thanks for all the reviews – both quick and though. > > Pending review are: > > * Julian's struct/declare mapper patch set: > 10/11 – OpenMP: Use OMP_ARRAY_SECTION instead of TREE_LIST for array sections > in C FE > 11/11

Re: [PATCH v2] DSE: Use the constant store source if possible

2022-05-25 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > On Mon, May 23, 2022 at 12:38:06PM +0200, Richard Biener wrote: >> On Sat, May 21, 2022 at 5:02 AM H.J. Lu via Gcc-patches >> wrote: >> > >> > When recording store for RTL dead store elimination, check if the source >> > register is set only once to a

OpenMP patches pending review

2022-05-25 Thread Tobias Burnus
Hi all, hi Jakub, first – thanks for all the reviews – both quick and though. Pending review are: * Julian's struct/declare mapper patch set: 10/11 – OpenMP: Use OMP_ARRAY_SECTION instead of TREE_LIST for array sections in C FE 11/11 - OpenMP: Support OpenMP 5.0 "declare mapper" directives

Re: [PATCH] AArch64: Prioritise init_have_lse_atomics constructor [PR 105708]

2022-05-25 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Increase the priority of the init_have_lse_atomics constructor so it runs > before other constructors. This improves chances that rr works when LSE > atomics are supported. Can you add a comment above the function explaining why we chose 90 in particular? I see 100 was