[PATCH] testsuite: mips: use noinline attribute instead of -fno-inline

2021-06-22 Thread Xi Ruoyao via Gcc-patches
mips.exp does not support -fno-inline, causing the tests return "ERROR: Unrecognised option: -fno-inline for dg-options ... ". Use noinline attribute like other mips target tests, to workaround it. gcc/testsuite/ * gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add

testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-*

2021-06-22 Thread Xi Ruoyao via Gcc-patches
On MIPS a call to __stack_chk_fail needs an additional .reloc pseudo-op, so "stack_chk_fail" will appear two times. gcc/testsuite/ * no-stack-protector-attr-3.C (dg-final): Adjust for MIPS. --- gcc/testsuite/g++.dg/no-stack-protector-attr-3.C | 3 ++- 1 file changed, 2 insertions(+), 1 d

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-22 Thread Tobias Burnus
On 21.06.21 22:29, Tobias Burnus wrote: However, that's independent from the patch you had submitted and which is fine except for the two tiny nits. As I just did run into a test, which does trigger the error, I think it would be useful to have something like the following on top of your patch

[RFC][PATCH] contrib: add git-commit-mklog wrapper

2021-06-22 Thread Martin Liška
Hello. There's a patch candidate that comes up with a wrapper for 'git commit-mklog' alias. Using my patch, one can do: $ git commit-mklog -a -b 12345, Thoughts? Can one do that without the wrapper script and passing data through env. variable? Martin >From 6b63718e2836c1a5a63e476ea981ba

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Matthias Kretz
On Wednesday, 16 June 2021 02:48:09 CEST Jason Merrill wrote: > > IIUC, your main concern is that my proposed diagnose_as *can* be used to > > make diagnostics worse, by replacing names with strings that are not > > valid identifiers. Of course, whoever uses the attribute to that effect > > should

Re: [Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST

2021-06-22 Thread Andre Vehreschild via Gcc-patches
Hi Tobias, thanks for the review. To the questions: - I added a test only for -fcoarray=single because in the library case the optional stat is just propagated to the library, which is already tested a lot of times and which needs to handle the optional stat in any case. So an error there

[PATCH] Remove my Write After Approval entry.

2021-06-22 Thread liuhongt via Gcc-patches
ChangeLog: * MAINTAINERS: Remove my Write After Approval entry. --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 4ac4fc5f3bd..b4c50a93129 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -472,7 +472,6 @@ Nicolas Koenig

Re: [RFC][PATCH] contrib: add git-commit-mklog wrapper

2021-06-22 Thread Tobias Burnus
Hello, On 22.06.21 09:30, Martin Liška wrote: There's a patch candidate that comes up with a wrapper for 'git commit-mklog' alias. Using my patch, one can do: $ git commit-mklog -a -b 12345, Thoughts? What about '-p' – to fetch the data from GCC Bugzilla? I do note that 'git commit ' supports

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Sandiford via Gcc-patches
Kees Cook writes: > On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: >> So, if “pattern value” is “0x”, then it’s a valid canonical >> virtual memory address. However, for most OS, “0x” should >> be not in user space. >> >> My question is, is “0xFF

Re: [RFC][PATCH] contrib: add git-commit-mklog wrapper

2021-06-22 Thread Martin Liška
On 6/22/21 10:23 AM, Tobias Burnus wrote: Hello, On 22.06.21 09:30, Martin Liška wrote: There's a patch candidate that comes up with a wrapper for 'git commit-mklog' alias. Using my patch, one can do: $ git commit-mklog -a -b 12345, Thoughts? What about '-p' – to fetch the data from GCC Bugzi

Re: [PATCH] docs: drop unbalanced parenthesis in rtl.texi

2021-06-22 Thread Martin Liška
On 6/22/21 12:43 AM, Sergei Trofimovich via Gcc-patches wrote: From: Sergei Trofimovich gcc/ChangeLog: * doc/rtl.texi: drop unbalanced parenthesis. --- gcc/doc/rtl.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 5af7

Re: [Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST

2021-06-22 Thread Tobias Burnus
Hi Andre, On 22.06.21 09:40, Andre Vehreschild via Fortran wrote: To the questions: - I added a test only for -fcoarray=single because in the library case the optional stat is just propagated to the library, which is already tested a lot of times and which needs to handle the optional stat

Re: [PATCH] testsuite: add -fwrapv for 950704-1.c

2021-06-22 Thread Richard Biener via Gcc-patches
On Mon, Jun 21, 2021 at 6:53 PM Xi Ruoyao via Gcc-patches wrote: > > This test relies on wrap behavior of signed overflow. Without -fwrapv > it is known to fail on mips (and maybe some other targets as well). OK. Richard. > gcc/testsuite/ > > * gcc.c-torture/execute/950704-1.c: Add -fw

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Richard Sandiford wrote: > Kees Cook writes: > > On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: > >> So, if “pattern value” is “0x”, then it’s a valid > >> canonical virtual memory address. However, for most OS, > >> “0x” should

[PATCH] tree-optimization/101158 - adjust SLP call matching sequence

2021-06-22 Thread Richard Biener
This moves the check for same operands after verifying we're facing compatible calls. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-22 Richard Biener PR tree-optimization/101158 * tree-vect-slp.c (vect_build_slp_tree_1): Move same operand checkin

[PATCH] tree-optimization/101159 - fix missing NULL check in popcount pattern

2021-06-22 Thread Richard Biener
This fixes a missing check for a NULL vectype in the new popcount pattern. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-22 Richard Biener PR tree-optimization/101159 * tree-vect-patterns.c (vect_recog_popcount_pattern): Add missing NULL vectype

[PATCH] tree-optimization/101154 - fix out-of bound access in SLP

2021-06-22 Thread Richard Biener
This fixes an out-of-bound access of matches. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-22 Richard Biener PR tree-optimization/101154 * tree-vect-slp.c (vect_build_slp_tree_2): Fix out-of-bound access. --- gcc/tree-vect-slp.c | 21 +++---

Re: [committed] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
On Monday, 21 June 2021 19:31:59 CEST Jonathan Wakely via Gcc-patches wrote: > diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex > index d4c5d13f654..5f2d8f9ee7b 100644 > --- a/libstdc++-v3/include/std/mutex > +++ b/libstdc++-v3/include/std/mutex > @@ -512,47 +512,44 @@ _

Re: [PATCH] RISC-V: Add tune info for T-HEAD C906.

2021-06-22 Thread Kito Cheng via Gcc-patches
Thanks, committed :) On Mon, Jun 21, 2021 at 8:44 PM Jojo R via Gcc-patches wrote: > > gcc/ > * config/riscv/riscv.c (thead_c906_tune_info): New. > * config/riscv/riscv.c (riscv_tune_info_table): Use new tune. > --- > gcc/config/riscv/riscv.c | 14 ++ > 1 file

[committed] testuite: Add pthread check to dg-module-cmi for omp module testing

2021-06-22 Thread Kito Cheng
gcc/testsuite: * g++.dg/modules/omp-1_a.C: Check pthread is available for dg-module-cmi. * g++.dg/modules/omp-2_a.C: Ditto. --- gcc/testsuite/g++.dg/modules/omp-1_a.C | 2 +- gcc/testsuite/g++.dg/modules/omp-2_a.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) d

[ARM] PR66791: Gate comparison in vca intrinsics on __FAST_MATH__

2021-06-22 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch gates abs(__a) cmp abs(__b) for vca intrinsics on __FAST_MATH__. I moved vabs intrinsics before vcage_f32 since vca intrinsics use those. Bootstrapped+tested on arm-linux-gnueabihf. OK to commit ? Thanks, Prathamesh 2021-06-22 Prathamesh Kulkarni PR target/66791

Re: [PATCH] testsuite: add -fwrapv for 950704-1.c

2021-06-22 Thread Xi Ruoyao via Gcc-patches
On Tue, 2021-06-22 at 10:37 +0200, Richard Biener wrote: > On Mon, Jun 21, 2021 at 6:53 PM Xi Ruoyao via Gcc-patches > wrote: > > > > This test relies on wrap behavior of signed overflow.  Without - > > fwrapv > > it is known to fail on mips (and maybe some other targets as well). > > OK. I don

Re: [PATCH][RFC] Add x86 subadd SLP pattern

2021-06-22 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Thu, 17 Jun 2021, Uros Bizjak wrote: > >> On Thu, Jun 17, 2021 at 11:44 AM Richard Biener wrote: >> > >> > This addds SLP pattern recognition for the SSE3/AVX [v]addsubp{ds} v0, v1 >> > instructions which compute { v0[0] - v1[0], v0[1], + v1[1], ... } >> > thus subtrac

[PATCH resend] testsuite: avoid no-stack-protector-attr-3 fail on mips*-*-*

2021-06-22 Thread Xi Ruoyao via Gcc-patches
[Resend because the original subject missed "[PATCH]" and the path in ChangeLog is wrong.] On MIPS a call to __stack_chk_fail needs an additional .reloc pseudo-op, so "stack_chk_fail" will appear two times. gcc/testsuite/ * g++.dg/no-stack-protector-attr-3.C (dg-final): Adjust for

[PATCH] tree-optimization/101151 - fix irreducible region check for sinking

2021-06-22 Thread Richard Biener
The check whether two blocks are in the same irreducible region and thus post-dominance checks being unreliable was incomplete since an irreducible region can contain reducible sub-regions but if one block is in the irreducible part and one not the check still doesn't work as expected. Bootstrappe

Re: [PATCH][RFC] Add x86 subadd SLP pattern

2021-06-22 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 22, 2021 at 11:42 AM Richard Sandiford wrote: > >> Well, the pattern is called addsub in the x86 world because highpart > >> does add and lowpart does sub. In left-to-right writing systems > >> highpart comes before lowpart, so you have addsub. > > > > The other targets mentioned do n

Re: [PATCH][RFC] Add x86 subadd SLP pattern

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Uros Bizjak wrote: > On Tue, Jun 22, 2021 at 11:42 AM Richard Sandiford > wrote: > > > >> Well, the pattern is called addsub in the x86 world because highpart > > >> does add and lowpart does sub. In left-to-right writing systems > > >> highpart comes before lowpart, so you

Re: [PATCH][RFC] Add x86 subadd SLP pattern

2021-06-22 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 22, 2021 at 12:34 PM Richard Biener wrote: > > On Tue, 22 Jun 2021, Uros Bizjak wrote: > > > On Tue, Jun 22, 2021 at 11:42 AM Richard Sandiford > > wrote: > > > > > >> Well, the pattern is called addsub in the x86 world because highpart > > > >> does add and lowpart does sub. In left-

Re: [PATCH 1/4]middle-end Vect: Add support for dot-product where the sign for the multiplicant changes.

2021-06-22 Thread Richard Sandiford via Gcc-patches
Sorry for the slow review. Just concentrating on tree-vect-patterns.c, as before: Tamar Christina writes: > @@ -521,6 +522,9 @@ vect_joust_widened_type (tree type, tree new_type, tree > *common_type) >unsigned int precision = MAX (TYPE_PRECISION (*common_type), >

[PATCH] middle-end/101156 - remove not working optimization in gimplification

2021-06-22 Thread Richard Biener
This removes a premature and not working optimization from the gimplifier. When gimplification is requested not to produce a SSA name we try to avoid generating a copy when we did so anyway but instead replace the LHS of its definition. But that only works in case there are no uses of the SSA nam

Re: [PATCH 1/4]middle-end Vect: Add support for dot-product where the sign for the multiplicant changes.

2021-06-22 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: >> @@ -992,21 +1029,27 @@ vect_recog_dot_prod_pattern (vec_info *vinfo, >>/* FORNOW. Can continue analyzing the def-use chain when this stmt in a >> phi >> inside the loop (in case we are analyzing an outer-loop). */ >>vect_unpromoted_value unprom0[2]; >>

Re: [PATCH]middle-end[RFC] slp: new implementation of complex numbers

2021-06-22 Thread Richard Biener
On Mon, 21 Jun 2021, Tamar Christina wrote: > Hi Richi, > > This patch is still very much incomplete and I do know that it is > missing things but it's complete enough such that examples are working > and allows me to show what I'm working towards. > > note, that this approach will remove a lo

Re: [PATCH] AArch64: Add support for __builtin_roundeven[f] [PR100966]

2021-06-22 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > So rather than have two patterns that generate frintn, I think > it would be better to change the existing frint_pattern entry to > "roundeven" instead, and fix whatever the fallout is. Hopefully it > shouldn't be too bad, since we already use the optab names for the > other UNSPEC_

[PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Jun 2021 at 10:07, Matthias Kretz wrote: > > On Monday, 21 June 2021 19:31:59 CEST Jonathan Wakely via Gcc-patches wrote: > > +// Lock the last element of the tuple, after all previous ones are > > locked. +template > > + inline __enable_if_t<_Idx + 1 == sizeof...(_Lockables

[PATCH] fold-const: Return corresponding integral type for OFFSET_TYPE in range_check_type [PR101162]

2021-06-22 Thread Jakub Jelinek via Gcc-patches
Hi! Andrew's recent r12-1608-g2f1686ff70b25fceb04ca2ffc0a450fb682913ef change to fail verification on various unary and binary operations with OFFSET_TYPE revealed that e.g. switchconf happily performs multiplications and additions in OFFSET_TYPE. Fixed thusly, bootstrapped/regtested on x86_64-li

Re: [PATCH] fold-const: Return corresponding integral type for OFFSET_TYPE in range_check_type [PR101162]

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Jakub Jelinek wrote: > Hi! > > Andrew's recent r12-1608-g2f1686ff70b25fceb04ca2ffc0a450fb682913ef change > to fail verification on various unary and binary operations with OFFSET_TYPE > revealed that e.g. switchconf happily performs multiplications and additions > in OFFSET_T

[PATCH] expand: Fix up empty class return optimization [PR101160]

2021-06-22 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 14, 2021 at 11:24:22PM -0400, Jason Merrill via Gcc-patches wrote: > The x86_64 psABI says that an empty class isn't passed or returned in memory > or > registers, so we shouldn't set %eax in this function. Is this a reasonable > place to implement that? Another possibility would be

[PATCH] testsuite: Add testcase for recently fixed PR [PR101159]

2021-06-22 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 22, 2021 at 11:00:51AM +0200, Richard Biener wrote: > 2021-06-22 Richard Biener > > PR tree-optimization/101159 > * tree-vect-patterns.c (vect_recog_popcount_pattern): Add > missing NULL vectype check. The following patch adds the testcase for it, IMHO it can't hu

Re: [PATCH]middle-end[RFC] slp: new implementation of complex numbers

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Richard Biener wrote: > On Mon, 21 Jun 2021, Tamar Christina wrote: > > > Hi Richi, > > [...] > > since we are removing the TWO_OPERANDS node we need to drop one of the > > multiply > > and so we need to give it the original 2 vectors as a parameter. The > > current > > i

Re: [PATCH] expand: Fix up empty class return optimization [PR101160]

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Jakub Jelinek wrote: > On Mon, Jun 14, 2021 at 11:24:22PM -0400, Jason Merrill via Gcc-patches wrote: > > The x86_64 psABI says that an empty class isn't passed or returned in > > memory or > > registers, so we shouldn't set %eax in this function. Is this a reasonable > > pl

Re: [PATCH] testsuite: Add testcase for recently fixed PR [PR101159]

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Jakub Jelinek wrote: > On Tue, Jun 22, 2021 at 11:00:51AM +0200, Richard Biener wrote: > > 2021-06-22 Richard Biener > > > > PR tree-optimization/101159 > > * tree-vect-patterns.c (vect_recog_popcount_pattern): Add > > missing NULL vectype check. > > The follo

[COMMITTED 1/7] Initial value-relation code.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This file introduces a relation oracle to GCC. Rather than introducing a new enum for relations, I chose to reuse a range of enum tree_code, leaving us with mostly familiar names: EQ_EXPR, NE_EXPR, GT_EXPR, GE_EXPR, LT_EXPR and LE_EXPR.  In addition to these relations, are 2 other codes: #de

[COMMITTED 2/7] Add relational support to range-op.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
THis patch adds relation support to range-ops. a relation_kind is added to all fold and op1/2_range operations, which will allow any known relation to be applied during calculations. 4 more routines are provided which enable range-ops to indicate when a relation is caused by an expression/res

[COMMITTED 3/7] Add relational support to fold_using_range

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This patch get the ball rolling by adding relation support to fold_using_ranges. This enables relations to be set and queried by ranger, and the results applied to any ranges being calculated. At this point, any further additions to range-ops will be reflected in relational processing.  Curren

[COMMITTED 4/7] Add relations between LHS and op1/op2 for PLUS_EXPR.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This patch demonstrates how to add relation generation between the LHS of an expression and one of the operands in range-ops, using PLUS_EXPR. a_2 = b_3 + c_1 if c_1 == [0, 0], we know a_2 == b_3 if c_1 > 0, and there is no overflow/wrapping, we know a_2 > b_3 likewise, if c1 < 0 we know a_2

[COMMITTED 5/7] Add relation effects between operands to MINUS_EXPR.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This patch enhances processing of OP_MINUS to show how we can utilize relations between op1 and op2 to produce a better result. Given: a_3 = b_4 - d_1 if we know b_4 > d_1, on top of whatever other range calculations we can do with the actual ranges, we can apply the knowledge that the result

[COMMITTED 6/7] Add relation between LHS and op1 for casts and copies.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This patch provides basic relations between the LHS and OP1 for casts and copies. Copies are very straightforward,  LHS == OP1 always. Casts are a little trickier. If the RHS of the copy is of the same or lower precision as the LHS,  then we can consider them EQ_EXPR.  Otherwise, they are con

[COMMITTED 7/7] Add relational self-tests.

2021-06-22 Thread Andrew MacLeod via Gcc-patches
This patch just adds some basic self tests for some of the new relation operations. Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew >From ca1f9f22854049d6f9cab5b4bfbc46edbcb5c990 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Thu, 17 Jun 2021 13:40:05 -0400 Subject

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
On Tuesday, 22 June 2021 14:51:26 CEST Jonathan Wakely wrote: > With your suggestion > to also drop std::tuple the number of parameters decides which > function we call. And we don't instantiate std::tuple. And we can also > get rid of the __try_to_lock function, which was only used to deduce > the

Re: [PATCH 2/2] elf: Add GNU_PROPERTY_1_NEEDED check

2021-06-22 Thread H.J. Lu via Gcc-patches
On Mon, Jun 21, 2021 at 10:46 PM Fangrui Song wrote: > > On 2021-06-21, H.J. Lu wrote: > >On Mon, Jun 21, 2021 at 9:16 PM Alan Modra wrote: > >> > >> On Mon, Jun 21, 2021 at 07:12:02PM -0700, H.J. Lu wrote: > >> > On Mon, Jun 21, 2021 at 5:06 PM Alan Modra wrote: > >> > > > >> > > On Mon, Jun 21

RE: [PATCH]middle-end[RFC] slp: new implementation of complex numbers

2021-06-22 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, June 22, 2021 1:08 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: Re: [PATCH]middle-end[RFC] slp: new implementation of complex > numbers > > On Mon, 21 Jun 2021, Tamar Christina wrote: > > > Hi Richi

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Qing Zhao via Gcc-patches
So, I am wondering why not still keep my current implementation on assign different patterns for different types? This major issue with this design is the code size and runtime overhead, but for debugging purpose, those are not that important, right? And we can add some optimization later to im

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Qing Zhao wrote: > So, I am wondering why not still keep my current implementation on > assign different patterns for different types? > > This major issue with this design is the code size and runtime overhead, > but for debugging purpose, those are not that important, rig

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Qing Zhao via Gcc-patches
> On Jun 22, 2021, at 9:00 AM, Richard Biener wrote: > > On Tue, 22 Jun 2021, Qing Zhao wrote: > >> So, I am wondering why not still keep my current implementation on >> assign different patterns for different types? >> >> This major issue with this design is the code size and runtime overhe

RE: [PATCH]middle-end[RFC] slp: new implementation of complex numbers

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Tamar Christina wrote: > > > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, June 22, 2021 1:08 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd > > Subject: Re: [PATCH]middle-end[RFC] slp: new implementation of complex > > numbers >

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Biener
On Tue, 22 Jun 2021, Qing Zhao wrote: > > > > On Jun 22, 2021, at 9:00 AM, Richard Biener wrote: > > > > On Tue, 22 Jun 2021, Qing Zhao wrote: > > > >> So, I am wondering why not still keep my current implementation on > >> assign different patterns for different types? > >> > >> This major

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Qing Zhao via Gcc-patches
> On Jun 22, 2021, at 9:15 AM, Richard Biener wrote: > > On Tue, 22 Jun 2021, Qing Zhao wrote: > >> >> >>> On Jun 22, 2021, at 9:00 AM, Richard Biener wrote: >>> >>> On Tue, 22 Jun 2021, Qing Zhao wrote: >>> So, I am wondering why not still keep my current implementation on ass

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Jun 2021 at 14:21, Matthias Kretz wrote: > On Tuesday, 22 June 2021 14:51:26 CEST Jonathan Wakely wrote: > > With your suggestion > > to also drop std::tuple the number of parameters decides which > > function we call. And we don't instantiate std::tuple. And we can also > > get rid of

Re: [[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-06-22 Thread Indu Bhagat via Gcc-patches
On 6/21/21 7:01 AM, Richard Biener via Gcc-patches wrote: Command line options for debug formats == This implementation adds the following command-line options to select the emission of CTF and BTF: -gctf[123] -gbtf These options mimic the -g[123

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Matthias Kretz
On Dienstag, 22. Juni 2021 17:20:41 CEST Jonathan Wakely wrote: > On Tue, 22 Jun 2021 at 14:21, Matthias Kretz wrote: > > This does a try_lock on all lockabes even if any of them fails. I think > > that's > > not only more expensive but also non-conforming. I think you need to defer > > locking and

Re: predcom: Refactor more by encapsulating global states

2021-06-22 Thread Martin Sebor via Gcc-patches
On 6/21/21 8:35 PM, Kewen.Lin wrote: Hi Richi and Martin, Thanks Richi! One draft (not ready for review) is attached for the further discussion. It follows the idea of RAII-style cleanup. I noticed that Martin suggested stepping forward to make tree_predictive_commoning_loop and its callees

[wwwdocs] New C++23 papers

2021-06-22 Thread Marek Polacek via Gcc-patches
P1847 has always been "implemented" as the paper says. P2186 needs a few libstdc++ changes that Jonathan already implemented. Pushed. commit 7b804041d34c344a190105e78c6058e2645bf7cb Author: Marek Polacek Date: Tue Jun 22 13:10:41 2021 -0400 cxx-status: Add more C++23 proposals diff --git

[PATCH 0/3] [amdgcn] Improve debug support.

2021-06-22 Thread Hafiz Abid Qadeer
This patch series improves debug experience with ROCGDB. It enables generation of CFI, makes use of frame pointer in CFA calculations and uses proposed values of for address spaces in the debug information. Tested amdgcn-amdhsa target with no regression. Debugger testing was done manually. Haf

[PATCH 1/3] [amdgcn] Update CFI configuration

2021-06-22 Thread Hafiz Abid Qadeer
Currently we don't get any call frame information for the amdgcn target. This patch makes necessary adjustments to generate CFI that can work with ROCGDB (ROCm 3.8+). gcc/ * config/gcn/gcn.c (move_callee_saved_registers): Emit CFI notes for prologue register saves. (gcn_de

[PATCH 2/3] [amdgcn] Use frame pointer for CFA expressions.

2021-06-22 Thread Hafiz Abid Qadeer
As size of address is bigger than registers in amdgcn, we are forced to use DW_CFA_def_cfa_expression to make an expression that concatenates multiple registers for the value of the CFA. This then prohibits us from using many of the dwarf ops which expect CFA rule to be a single regsiter plus an o

[PATCH 3/3] [amdgcn] Add hook for DWARF address spaces.

2021-06-22 Thread Hafiz Abid Qadeer
Map GCN address spaces to the proposed DWARF address spaces defined by AMD at https://llvm.org/docs/AMDGPUUsage.html#amdgpu-dwarf-address-class-mapping-table gcc/ * config/gcn/gcn.c: Include dwarf2.h. (gcn_addr_space_debug): New function. (TARGET_ADDR_SPACE_DEBUG): New hoo

[wwwdocs] Document new C++ features in C++23

2021-06-22 Thread Marek Polacek via Gcc-patches
It's time to start adding new C++ features. Pushed. commit e373348138d8d767067c0a79b3ddc6a70cbee3a4 Author: Marek Polacek Date: Tue Jun 22 13:19:37 2021 -0400 gcc-12/changes.html: Add if consteval diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 42ded16d..07f70b

[committed] analyzer: fix ICE on malloc/alloca param type mismatch [PR101143]

2021-06-22 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-1731-gea4e32181d7a36055b57421abd0ced4735654cf6. gcc/analyzer/ChangeLog: PR analyzer/101143 * region-model.cc (compat_types_p): New function. (region_model::create_region_for_heap_alloc): C

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Kees Cook via Gcc-patches
On Tue, Jun 22, 2021 at 09:25:57AM +0100, Richard Sandiford wrote: > Kees Cook writes: > > On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: > >> So, if “pattern value” is “0x”, then it’s a valid > >> canonical virtual memory address. However, for most OS, > >> “0xF

Re: [PATCH] libstdc++: Fix for deadlock in std::counting_semaphore [PR100806]

2021-06-22 Thread Thomas Rodgers via Gcc-patches
Tested x86_64-pc-linux-gnu. Committed to master, backported to releases/gcc-11. On Thu, Jun 17, 2021 at 9:46 AM Jonathan Wakely wrote: > On Wed, 16 Jun 2021 at 20:53, Thomas Rodgers > wrote: > > > > Same as previous version except removing the copyright notice from the > > test. > > > > libstdc

Re: [PATCH 2/2] elf: Add GNU_PROPERTY_1_NEEDED check

2021-06-22 Thread Fangrui Song
On 2021-06-22, H.J. Lu wrote: On Mon, Jun 21, 2021 at 10:46 PM Fangrui Song wrote: On 2021-06-21, H.J. Lu wrote: >On Mon, Jun 21, 2021 at 9:16 PM Alan Modra wrote: >> >> On Mon, Jun 21, 2021 at 07:12:02PM -0700, H.J. Lu wrote: >> > On Mon, Jun 21, 2021 at 5:06 PM Alan Modra wrote: >> > > >>

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Sandiford via Gcc-patches
Kees Cook writes: > On Tue, Jun 22, 2021 at 09:25:57AM +0100, Richard Sandiford wrote: >> Kees Cook writes: >> > On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: >> >> So, if “pattern value” is “0x”, then it’s a valid >> >> canonical virtual memory address. However, fo

Re: [wwwdocs] New C++23 papers

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/22/21 1:14 PM, Marek Polacek wrote: P1847 has always been "implemented" as the paper says. P2186 needs a few libstdc++ changes that Jonathan already implemented. I figured these removals didn't need to be called out in the table, but it's also fine to have them. commit 7b804041d34c344a

Re: [RFC][PATCH] contrib: add git-commit-mklog wrapper

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/22/21 3:30 AM, Martin Liška wrote: Hello. There's a patch candidate that comes up with a wrapper for 'git commit-mklog' alias. Using my patch, one can do: $ git commit-mklog -a -b 12345, Thoughts? Looks good to me. Can one do that without the wrapper script and passing data throu

[PATCH] c++: CTAD and deduction guide selection [PR86439]

2021-06-22 Thread Patrick Palka via Gcc-patches
During CTAD, we select the best viable deduction guide via build_new_function_call, which performs overload resolution on the set of candidate guides and then forms a call to the guide. As the PR points out, this latter step is unnecessary and occasionally gives us the wrong answer since a call to

Re: [wwwdocs] New C++23 papers

2021-06-22 Thread Marek Polacek via Gcc-patches
On Tue, Jun 22, 2021 at 02:38:46PM -0400, Jason Merrill wrote: > On 6/22/21 1:14 PM, Marek Polacek wrote: > > P1847 has always been "implemented" as the paper says. > > P2186 needs a few libstdc++ changes that Jonathan already implemented. > > I figured these removals didn't need to be called out

Re: rs6000: Fix typos in float128 ISA3.1 support

2021-06-22 Thread Segher Boessenkool
Hi! On Mon, Jun 21, 2021 at 05:27:06PM +0800, Kewen.Lin wrote: > Recently if we build gcc on Power with the assembler which doesn't > have Power10 support, the build will fail when building libgcc with > one error message like: > > Error: invalid switch -mpower10 > Error: unrecognized option -mpo

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Richard Biener
On June 22, 2021 4:33:09 PM GMT+02:00, Qing Zhao wrote: > > >> On Jun 22, 2021, at 9:15 AM, Richard Biener >wrote: >> >> On Tue, 22 Jun 2021, Qing Zhao wrote: >> >>> >>> On Jun 22, 2021, at 9:00 AM, Richard Biener >wrote: On Tue, 22 Jun 2021, Qing Zhao wrote: > So,

Re: [PATCH v2] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Jun 2021 at 17:03, Matthias Kretz wrote: > > On Dienstag, 22. Juni 2021 17:20:41 CEST Jonathan Wakely wrote: > > On Tue, 22 Jun 2021 at 14:21, Matthias Kretz wrote: > > > This does a try_lock on all lockabes even if any of them fails. I think > > > that's > > > not only more expensive b

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/22/21 3:30 AM, Matthias Kretz wrote: On Wednesday, 16 June 2021 02:48:09 CEST Jason Merrill wrote: IIUC, your main concern is that my proposed diagnose_as *can* be used to make diagnostics worse, by replacing names with strings that are not valid identifiers. Of course, whoever uses the att

Re: [PATCH] c++: CTAD and deduction guide selection [PR86439]

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/22/21 2:45 PM, Patrick Palka wrote: During CTAD, we select the best viable deduction guide via build_new_function_call, which performs overload resolution on the set of candidate guides and then forms a call to the guide. As the PR points out, this latter step is unnecessary and occasionall

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Matthias Kretz
On Tuesday, 22 June 2021 21:52:16 CEST Jason Merrill wrote: > For alias templates, you probably want the attribute only on the > templated class, not on the instantiations. Oh good point. My current patch does not allow the attribute on alias templates. Consider: template struct X {}; templa

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-22 Thread Martin Sebor via Gcc-patches
On 6/21/21 1:15 AM, Richard Biener wrote: On Fri, Jun 18, 2021 at 6:03 PM Martin Sebor wrote: On 6/18/21 4:38 AM, Richard Biener wrote: On Thu, Jun 17, 2021 at 4:43 PM Martin Sebor wrote: On 6/17/21 12:03 AM, Richard Biener wrote: On Wed, Jun 16, 2021 at 6:01 PM Martin Sebor wrote: On

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

2021-06-22 Thread Jason Merrill via Gcc-patches
On 5/31/21 12:57 PM, Jose E. Marchesi via Gcc-patches wrote: This patch introduces a dwarf2int.h header, to be used by code that needs access to the internal DIE structures and their attributes. Why not put these bits in dwarf2out.h? The following functions which were previously defined as st

Re: [PATCH] c++: CTAD and deduction guide selection [PR86439]

2021-06-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Jun 2021 at 19:45, Patrick Palka wrote: > This change causes us to reject some container CTAD examples in the > libstdc++ testsuite due to deduction failure for {}, which AFAICT is the > correct behavior. Previously, in the case of e.g. the first removed > example for std::map, the type

Re: [PATCH] Add gnu::diagnose_as attribute

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/22/21 4:01 PM, Matthias Kretz wrote: On Tuesday, 22 June 2021 21:52:16 CEST Jason Merrill wrote: For alias templates, you probably want the attribute only on the templated class, not on the instantiations. Oh good point. My current patch does not allow the attribute on alias templates. Co

Re: [[PATCH V9] 3/7] CTF/BTF debug formats

2021-06-22 Thread Jason Merrill via Gcc-patches
On 5/31/21 12:57 PM, Jose E. Marchesi via Gcc-patches wrote: @@ -28219,7 +28219,7 @@ dwarf2out_source_line (unsigned int line, unsigned int column, dw_line_info_table *table; static var_loc_view lvugid; - if (debug_info_level < DINFO_LEVEL_TERSE) + if (debug_info_level < DINFO_LEVE

Re: [[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-06-22 Thread Jason Merrill via Gcc-patches
On 6/21/21 10:01 AM, Richard Biener wrote: On Mon, May 31, 2021 at 7:16 PM Jose E. Marchesi via Gcc-patches wrote: [Changes from V8: - Rebased to today's master. - Adapted to use the write-symbols new infrastructure recently applied upstream. - Little change in libiberty to copy .BTF sectio

[committed] libstdc++: Implement LWG 3422 for std::seed_seq

2021-06-22 Thread Jonathan Wakely via Gcc-patches
This ensures that the std::seed_seq initializer-list constructor will not be used for list-initialization unless the initializers in the list are integers. This allows list-initialization syntax to be used with a pair of pointers and for that to use the appropriate constructor. Signed-off-by: Jona

[committed] libstdc++: Remove garbage collection support for C++23 [P2186R2]

2021-06-22 Thread Jonathan Wakely via Gcc-patches
This removes the non-functional garbage colection support from , as proposed for C++23 by P2186R2. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/std/memory (declare_reachable, undeclare_reachable) (declare_no_pointers, undeclare_no_pointers, get_pointer_safety

[PATCH v3] libstdc++: Improve std::lock algorithm

2021-06-22 Thread Jonathan Wakely via Gcc-patches
On Tue, 22 Jun 2021 at 20:51, Jonathan Wakely wrote: > > On Tue, 22 Jun 2021 at 17:03, Matthias Kretz wrote: > > > > On Dienstag, 22. Juni 2021 17:20:41 CEST Jonathan Wakely wrote: > > > On Tue, 22 Jun 2021 at 14:21, Matthias Kretz wrote: > > > > This does a try_lock on all lockabes even if any of

[PING][PATCH] make rich_location safe to copy

2021-06-22 Thread Martin Sebor via Gcc-patches
Ping: David, I'm still looking for approval of the semi_embedded_vec change in the originally posted patch (independent of the already approved subsequent change to rich_location). https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572845.html On 6/15/21 7:48 PM, Martin Sebor wrote: While debu

[PATCH, rs6000] Do not enable pcrel-opt by default

2021-06-22 Thread Aaron Sawdey via Gcc-patches
SPEC2017 testing on p10 shows that this optimization does not have a positive impact on performance. So we are no longer going to enable it by default. The test cases for it needed to be updated so they always enable it to test it. OK for trunk and backport to 11 if bootstrap/regtest passes? Than

Re: [PATCH RFA] expand: empty class return optimization [PR88529]

2021-06-22 Thread Joseph Myers
This introduces an ICE building libgomp for ColdFire, as detected by my glibc bot. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101170 -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-22 Thread Qing Zhao via Gcc-patches
Okay. Now, I believe that we agreed on the following: For this current patch: 1. Use byte-repeatable pattern for pattern-initialization; 2. Use one pattern for all types; 3. Use “0xFE” for the byte pattern value. Possible future improvement: 1. Type specific patterns if needed; 2. User-specifi

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-22 Thread Gaius Mulley via Gcc-patches
Jakub Jelinek writes: > > On Mon, Jun 21, 2021 at 11:36:48PM +0100, Gaius Mulley via Gcc-patches wrote: >> > : error: the file containing the definition module >> > <80><98>M2RTS >> > <80><99> cannot be found >> > compiler exited with status 1 >> > output is: >> > : error: the file containing th

Re: [PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765)

2021-06-22 Thread David Malcolm via Gcc-patches
On Fri, 2021-06-04 at 15:41 -0600, Martin Sebor wrote: > The attached patch introduces the suppress_warning(), > warning_suppressed(), and copy_no_warning() APIs without making > use of them in the rest of GCC.  They are in three files: > >    diagnostic-spec.{h,c}: Location-centric overloads. >  

Re: [PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765)

2021-06-22 Thread David Malcolm via Gcc-patches
On Tue, 2021-06-22 at 19:18 -0400, David Malcolm wrote: > On Fri, 2021-06-04 at 15:41 -0600, Martin Sebor wrote: > > The attached patch introduces the suppress_warning(), > > warning_suppressed(), and copy_no_warning() APIs without making > > use of them in the rest of GCC.  They are in three files

Re: [PATCH 2/2] elf: Add GNU_PROPERTY_1_NEEDED check

2021-06-22 Thread H.J. Lu via Gcc-patches
On Tue, Jun 22, 2021 at 11:15 AM Fangrui Song wrote: > > On 2021-06-22, H.J. Lu wrote: > >On Mon, Jun 21, 2021 at 10:46 PM Fangrui Song wrote: > >> > >> On 2021-06-21, H.J. Lu wrote: > >> >On Mon, Jun 21, 2021 at 9:16 PM Alan Modra wrote: > >> >> > >> >> On Mon, Jun 21, 2021 at 07:12:02PM -0700,

Re: [PATCH 2/7] Duplicate the range information of the phi onto the new ssa_name

2021-06-22 Thread Andrew Pinski via Gcc-patches
On Sun, Jun 20, 2021 at 11:50 PM Richard Biener via Gcc-patches wrote: > > On Sat, Jun 19, 2021 at 9:49 PM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > Since match_simplify_replacement uses gimple_simplify, there is a new > > ssa name created sometimes and then we go a

  1   2   >