Re: [PATCH] Introduce build_debug_expr_decl

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Martin Jambor wrote: > Hi, > > this patch introduces a helper function build_debug_expr_decl to build > DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a > call of this function all code pieces which build such a DECL itself > and sets its mode to the TYPE_

Re: [PATCH] ipa: Fix segfault when remapping debug_binds with expressions (PR 103132)

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Martin Jambor wrote: > Hi, > > my initial implementation of the method > ipa_param_body_adjustments::remap_with_debug_expressions was based on > the assumption that if it was asked to remap an expression (as opposed > to a simple SSA_NAME), the expression would not contain an

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 7:34 AM Prathamesh Kulkarni wrote: > > On Mon, 8 Nov 2021 at 16:42, Richard Biener > wrote: > > > > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches > > wrote: > > > > > > Hi, > > > The attached patch removes redundant check for number of loops in > > >

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-08 Thread Richard Biener via Gcc-patches
On Tue, Nov 9, 2021 at 12:47 AM Qing Zhao wrote: > > Hi, I tried both the following patches: > > Patch1: > > [opc@qinzhao-ol8u3-x86 gcc]$ git diff > diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c > index 0cba95411a6..ca49d2b4514 100644 > --- a/gcc/internal-fn.c > +++ b/gcc/internal-fn.c > @@ -

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, 8 Nov 2021, Jakub Jelinek wrote: > On Mon, Nov 08, 2021 at 12:46:04PM +0100, Jakub Jelinek via Gcc-patches wrote: > > So, if we want to make PCH work for PIEs, I'd say we can: > > 1) add a new GTY option, say callback, which would act like > >skip for non-PCH and for PCH would make us

Re: [PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Bernhard Reutner-Fischer via Gcc-patches
On Tue, 9 Nov 2021 00:12:10 -0500 Jason Merrill wrote: > On 11/8/21 20:41, Marek Polacek wrote: > > On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: > > + for (auto opt : v) > > +{ > > + char *cln = strstr (opt, "::"); > > + /* We don't accept '::attr'. */ > > +

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Nov 2021 at 16:42, Richard Biener wrote: > > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches > wrote: > > > > Hi, > > The attached patch removes redundant check for number of loops in > > pass_vectorize::execute, > > since it only calls vectorize_loops, and in vector

Re: [PATCH] c++: Skip unnamed bit-fields more

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 14:49, Marek Polacek wrote: As Jason noticed in , we shouldn't require an initializer for an unnamed bit-field, because, as [class.bit] says, they cannot be initialized. Bootstrapped/regtested on x86_64-pc-linux-gnu,

Re: [PATCH] c++: bogus error w/ variadic concept-id as if cond [PR98394]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 19:54, Patrick Palka wrote: On Mon, 8 Nov 2021, Jason Merrill wrote: On 11/8/21 10:35, Patrick Palka wrote: Here when tentatively parsing the if condition as a declaration, we try to treat C<1> as the start of a constrained placeholder type, which we quickly reject because C doesn't

Re: [PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 20:41, Marek Polacek wrote: On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: On 11/6/21 14:28, Marek Polacek wrote: On Sat, Nov 06, 2021 at 02:32:26AM +0100, Bernhard Reutner-Fischer wrote: On 6 November 2021 01:21:43 CET, Marek Polacek via Gcc-patches wrote: Than

Re: [RFA] Minor optimization of variable bit testing

2021-11-08 Thread Jeff Law via Gcc-patches
On 11/3/2021 2:15 AM, Richard Biener via Gcc-patches wrote: On Tue, Nov 2, 2021 at 4:53 PM Jeff Law wrote: I was wandering spec chasing down instances where we should be generating bit-test, bit-set and bit-clear types of instructions for our target when I ran across a generic missed optimiz

Re: [PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-08 Thread Navid Rahimi via Gcc-patches
Sorry, a last minute update via my editor changed the MIME type to application/octet-stream. You can find the patch with correct MIME (text/x-diff) attached to this email. (Same file and content, fixed MIME). Best wishes, Navid. From: Gcc-patches on b

[PATCH] PR tree-optimization/102232 Adding a missing pattern to match.pd

2021-11-08 Thread Navid Rahimi via Gcc-patches
Hi GCC community, This patch will add the missed pattern described in bug 102232 [1] to the match.pd. The testcase will test whether the multiplication and division has been removed from the code or not. The correctness proof for this pattern is here [2] in case anyone is curious. PR tree-opti

Re: [PATCH 1/2] [Gimple] Simplify (trunc)fmax/fmin((extend)a, (extend)b) to MAX/MIN(a,b)

2021-11-08 Thread Hongtao Liu via Gcc-patches
On Mon, Nov 8, 2021 at 4:59 PM Richard Biener wrote: > > On Mon, Nov 8, 2021 at 2:30 AM Hongtao Liu wrote: > > > > On Fri, Nov 5, 2021 at 5:52 PM Richard Biener > > wrote: > > > > > > On Fri, Nov 5, 2021 at 6:38 AM liuhongt wrote: > > > > > > > > a and b are same type as trunc type and has less

[PATCH] fix up compute_objsize (including PR 103143)

2021-11-08 Thread Martin Sebor via Gcc-patches
The pointer-query code that implements compute_objsize() that's in turn used by most middle end access warnings now has a few warts in it and (at least) one bug. With the exception of the bug the warts aren't behind any user-visible bugs that I know of but they do cause problems in new code I've

[PATCH] [pass_if_conversion] Extend is_cond_scalar_reduction to handle bit_and/bit_xor/bit_ior.

2021-11-08 Thread liuhongt via Gcc-patches
This will enable transformation like - # sum1_50 = PHI - # sum2_52 = PHI + # sum1_50 = PHI <_87(13), 0(4)> + # sum2_52 = PHI <_89(13), 0(4)> # ivtmp_62 = PHI i.2_7 = (long unsigned int) i_49; _8 = i.2_7 * 8; ... vec1_i_38 = vec1_29 >> _10; vec2_i_39 = vec2_31 >> _10; _11 =

[PATCH v6] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-11-08 Thread Marek Polacek via Gcc-patches
On Sat, Nov 06, 2021 at 03:29:57PM -0400, Jason Merrill wrote: > On 11/6/21 14:28, Marek Polacek wrote: > > On Sat, Nov 06, 2021 at 02:32:26AM +0100, Bernhard Reutner-Fischer wrote: > > > On 6 November 2021 01:21:43 CET, Marek Polacek via Gcc-patches > > > wrote: > > > > > > > > > > > Thanks, s

Re: [PATCH] c++: bogus error w/ variadic concept-id as if cond [PR98394]

2021-11-08 Thread Patrick Palka via Gcc-patches
On Mon, 8 Nov 2021, Jason Merrill wrote: > On 11/8/21 10:35, Patrick Palka wrote: > > Here when tentatively parsing the if condition as a declaration, we try > > to treat C<1> as the start of a constrained placeholder type, which we > > quickly reject because C doesn't accept a type as its first a

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-08 Thread Jeff Law via Gcc-patches
On 11/4/2021 6:18 PM, Maciej W. Rozycki wrote: On Thu, 4 Nov 2021, Jeff Law wrote: Sometimes the language we're using in email is not as crisp as it should be.  So just to be clear, the canonicalization I'm referring to is only in effect within a MEM.  It does not apply to address calculatio

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-11-08 Thread Jeff Law via Gcc-patches
On 10/15/2021 4:39 AM, Aldy Hernandez wrote: On 10/15/21 2:47 AM, Andrew MacLeod wrote: On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-08 Thread Qing Zhao via Gcc-patches
Hi, I tried both the following patches: Patch1: [opc@qinzhao-ol8u3-x86 gcc]$ git diff diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 0cba95411a6..ca49d2b4514 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -3073,12 +3073,14 @@ expand_DEFERRED_INIT (internal_fn, gcall *stmt)

[PATCH v2] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-08 Thread Marek Polacek via Gcc-patches
On Sun, Nov 07, 2021 at 12:45:24AM -0400, Jason Merrill wrote: > On 11/5/21 19:22, Marek Polacek wrote: > > 2021 update: Last year I posted a version of this patch: > > > > but it didn't make it in. The main objection seemed to

Re: [PATCH v1 1/7] LoongArch Port: gcc

2021-11-08 Thread Joseph Myers
You have: > +#define GLIBC_DYNAMIC_LINKER_LP64 "/lib64/ld.so.1" See my comments on the glibc patch series . Specifically, the point that all new glibc ports should have unique per-ABI dynamic linker names for each ABI suppor

PING [PATCH 0/2] provide simple detection of indeterminate pointers

2021-11-08 Thread Martin Sebor via Gcc-patches
Ping for the two patches below: -Wuse-after-free: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583044.html and -Wdangling-pointer: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583045.html On 11/1/21 4:15 PM, Martin Sebor wrote: This two-patch series adds support for the d

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-11-08 Thread François Dumont via Gcc-patches
Yet another version this time with only 1 guard implementation. The predicate to invalidate the safe iterators has been externalized. Ok to commit ? On 06/11/21 2:51 pm, François Dumont wrote: You were right to delay your reply. Here is a new version with less code duplication and a bug fix i

Re: [PATCH] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-08 Thread Marek Polacek via Gcc-patches
On Sun, Nov 07, 2021 at 04:48:46PM -0700, Martin Sebor wrote: > On 11/5/21 5:22 PM, Marek Polacek via Gcc-patches wrote: > > 2021 update: Last year I posted a version of this patch: > > > > but it didn't make it in. The main obj

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-08 Thread John David Anglin
On 2021-11-08 2:48 p.m., Jakub Jelinek wrote: Not really sure about PA or IA-64 function descriptors, are any of those allocated by the dynamic linker rather than created by the static linker? On PA, the static linker creates all function descriptors.  The dynamic linker is responsible for reso

[PATCH] c++: __builtin_bit_cast To C array target type [PR103140]

2021-11-08 Thread Will Wray via Gcc-patches
This patch allows __builtin_bit_cast to materialize a C array as its To type. It was developed as part of an implementation of P1997, array copy-semantics, but is independent, so makes sense to submit, review and merge ahead of it. gcc/cp/ChangeLog: * constexpr.c (check_bit_cast_type): h

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-08 Thread Matthias Kretz
I forgot to mention why I tagged it [RFC]: I needed one more bit of information on the template args TREE_VEC to encode EXPLICIT_TEMPLATE_ARGS_P. Its TREE_CHAIN already points to an integer constant denoting the number of non-default arguments, so I couldn't trivially replace that. Therefore, I

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-08 Thread Hans-Peter Nilsson via Gcc-patches
> From: "Maciej W. Rozycki" > Date: Wed, 3 Nov 2021 14:53:58 +0100 > gcc/ > PR middle-end/103059 > * reload.c (find_reloads_address_1): Also accept the ASHIFT form > of indexed addressing. > (find_reloads): Adjust accordingly. > --- > gcc/reload.c |9 ++---

Re: [PATCH] PR middle-end/103059: reload: Also accept ASHIFT with indexed addressing

2021-11-08 Thread Hans-Peter Nilsson via Gcc-patches
> From: "Maciej W. Rozycki" > Date: Wed, 3 Nov 2021 14:53:58 +0100 > gcc/ > PR middle-end/103059 > * reload.c (find_reloads_address_1): Also accept the ASHIFT form > of indexed addressing. > (find_reloads): Adjust accordingly. > --- > gcc/reload.c |9 ++---

[PATCH] c++: Skip unnamed bit-fields more

2021-11-08 Thread Marek Polacek via Gcc-patches
As Jason noticed in , we shouldn't require an initializer for an unnamed bit-field, because, as [class.bit] says, they cannot be initialized. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog:

[PATCH] pch: Add support for PCH for relocatable executables

2021-11-08 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 08, 2021 at 12:46:04PM +0100, Jakub Jelinek via Gcc-patches wrote: > So, if we want to make PCH work for PIEs, I'd say we can: > 1) add a new GTY option, say callback, which would act like >skip for non-PCH and for PCH would make us skip it but >remember for address bias transla

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when

Re: [PATCH 18/18] rs6000: Add escape-newline support for builtins files

2021-11-08 Thread Bill Schmidt via Gcc-patches
On 11/5/21 6:50 PM, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 01, 2021 at 11:13:54AM -0500, Bill Schmidt wrote: >> +/* Escape-newline support. For readability, we prefer to allow developers >> + to use escape-newline to continue long lines to the next one. We >> + maintain a buffer of "

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/8/21 10:05 AM, Martin Liška wrote: On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when

Re: Move uncprop after modref pass

2021-11-08 Thread Jeff Law via Gcc-patches
On 11/8/2021 11:50 AM, Jan Hubicka via Gcc-patches wrote: Hi, this patch moves uncprop after modref and pure/const pass and adds a comment that this pass should alwasy be last since it is only supposed to help PHI lowering. The pass replaces constant by SSA names that are known to be constant

Re: [PATCH] Introduce build_debug_expr_decl

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 8 Nov 2021 at 23:24, Martin Jambor wrote: > > Hi, > > this patch introduces a helper function build_debug_expr_decl to build > DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a > call of this function all code pieces which build such a DECL itself > and sets its mode to

[PATCH] arm: Initialize vector costing fields

2021-11-08 Thread Christophe Lyon via Gcc-patches
The movi, dup and extract costing fields were recently added to struct vector_cost_table, but there initialization is missing for the arm (aarch32) specific descriptions. Although the arm port does not use these fields (only aarch64 does), this is causing warnings during the build, and even build

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-11-08 Thread Uecker, Martin
Am Montag, den 08.11.2021, 12:13 -0500 schrieb Jason Merrill: > On 11/7/21 01:40, Uecker, Martin wrote: > > Am Mittwoch, den 03.11.2021, 10:18 -0400 schrieb Jason Merrill: ... > > > > Thank you! I made these changes and ran > > bootstrap and tests again. > > Hmm, it doesn't look like you made t

Revert workaround allowing interposition on nested functions

2021-11-08 Thread Jan Hubicka via Gcc-patches
Hi, the workaround seems to be no longer necessary - it seems that all the issues was isolated to wrong beaviour of can_be_interposed wrt partitioned functions. Honza * gimple.c (gimple_call_static_chain_flags): Revert the workaround allowing interposition since issues with binds_

[PATCH] Introduce build_debug_expr_decl

2021-11-08 Thread Martin Jambor
Hi, this patch introduces a helper function build_debug_expr_decl to build DEBUG_EXPR_DECL tree nodes in the most common way and replaces with a call of this function all code pieces which build such a DECL itself and sets its mode to the TYPE_MODE of its type. There still remain 11 instances of

[COMMITTED] tree-optimization/103022 - Don't calculate new values when using the private context, callback.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
When using the private communication method I introduced for fold_stmt to acquire context, we are suppose to be using the cache in read-only mode.  I didn't query it in that mode, so it was accidentally triggering another lookup before finishing the original query, and that triggered the safety

Move uncprop after modref pass

2021-11-08 Thread Jan Hubicka via Gcc-patches
Hi, this patch moves uncprop after modref and pure/const pass and adds a comment that this pass should alwasy be last since it is only supposed to help PHI lowering. The pass replaces constant by SSA names that are known to be constant at the place which hardly helps other passes. Modref now allo

[PING PATCH] rs6000: Add optimizations for _mm_sad_epu8

2021-11-08 Thread Paul A. Clarke via Gcc-patches
Gentle ping... On Fri, Oct 22, 2021 at 12:28:49PM -0500, Paul A. Clarke via Gcc-patches wrote: > Power9 ISA added `vabsdub` instruction which is realized in the > `vec_absd` instrinsic. > > Use `vec_absd` for `_mm_sad_epu8` compatibility intrinsic, when > `_ARCH_PWR9`. > > Also, the realization

[PING PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2021-11-08 Thread Paul A. Clarke via Gcc-patches
Gentle ping... On Thu, Oct 21, 2021 at 12:22:12PM -0500, Paul A. Clarke via Gcc-patches wrote: > Power10 ISA added `vextract*` instructions which are realized in the > `vec_extractm` instrinsic. > > Use `vec_extractm` for `_mm_movemask_ps`, `_mm_movemask_pd`, and > `_mm_movemask_epi8` compatibili

[PING PATCH] rs6000: Add Power10 optimization for _mm_blendv*

2021-11-08 Thread Paul A. Clarke via Gcc-patches
Gentle ping... On Wed, Oct 20, 2021 at 08:42:07PM -0500, Paul A. Clarke via Gcc-patches wrote: > Power10 ISA added `xxblendv*` instructions which are realized in the > `vec_blendv` instrinsic. > > Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and > `_mm_blendv_pd` compatibility intrins

Re: [PING^2 PATCH v4 2/3] rs6000: Support SSE4.1 "round" intrinsics

2021-11-08 Thread Paul A. Clarke via Gcc-patches
On Tue, Oct 26, 2021 at 03:00:11PM -0500, Paul A. Clarke via Gcc-patches wrote: > Patches 1/3 and 3/3 have been committed. > This is only a ping for 2/3. Gentle re-ping. > On Mon, Oct 18, 2021 at 08:15:11PM -0500, Paul A. Clarke via Gcc-patches > wrote: > > Suppress exceptions (when specified),

Re: [COMMITTED] path oracle: Do not look at root oracle for killed defs.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/6/21 11:35 AM, Aldy Hernandez wrote: [This is more Andrew's domain, but this is a P1 PR and I'd like to unbreak the SPEC run, since this is a straigthforward fix. When he returns he can double check my work and give additional suggestions.] The problem here is that we are incorrectly thre

Re: [COMMITTED] path oracle: Do not look at root oracle for killed defs.

2021-11-08 Thread Andrew MacLeod via Gcc-patches
On 11/8/21 3:44 AM, Richard Biener via Gcc-patches wrote: On Sat, Nov 6, 2021 at 4:38 PM Aldy Hernandez via Gcc-patches wrote: [This is more Andrew's domain, but this is a P1 PR and I'd like to unbreak the SPEC run, since this is a straigthforward fix. When he returns he can double check my wo

Re: [PATCH] c++: unexpanded pack in var tmpl partial spec [PR100652]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 09:45, Patrick Palka wrote: Here we're not spotting a bare parameter pack appearing in the argument list of a variable template partial specialization because we only look for them within the decl's TREE_TYPE, which is sufficient for class templates but not for variable templates. Boo

Re: [PATCH] c++: bogus error w/ variadic concept-id as if cond [PR98394]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/8/21 10:35, Patrick Palka wrote: Here when tentatively parsing the if condition as a declaration, we try to treat C<1> as the start of a constrained placeholder type, which we quickly reject because C doesn't accept a type as its first argument. But since we're parsing tentatively, we shoul

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-11-08 Thread Jason Merrill via Gcc-patches
On 11/7/21 01:40, Uecker, Martin wrote: Am Mittwoch, den 03.11.2021, 10:18 -0400 schrieb Jason Merrill: On 10/31/21 05:22, Uecker, Martin wrote: Hi Jason, here is the fourth version of the patch. I followed your suggestion and now make this transformation sooner in pointer_int_sum. I also add

Re: [i386] Fix couple of issues in large PIC model on x86-64/VxWorks

2021-11-08 Thread Olivier Hainque via Gcc-patches
> On 8 Nov 2021, at 09:27, Eric Botcazou wrote: > >> LGTM for the generic part, no idea for VxWorks. > > Thanks. The VxWorks-specific hunk is needed to make GCC compatible with the > system compiler on this architecture (LLVM) and I have CCed Olivier. Good for me, thanks Eric!

Re: [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6

2021-11-08 Thread Olivier Hainque via Gcc-patches
> On 8 Nov 2021, at 10:56, Rasmus Villemoes wrote: > > According to > https://gcc.gnu.org/legacy-ml/gcc-patches/2008-03/msg01698.html, the > TLS support, including the __tls_lookup function, was added to VxWorks > in 6.6. > > It certainly doesn't exist on our VxWorks 5 platform, but the fallb

[PATCH] ipa: Fix segfault when remapping debug_binds with expressions (PR 103132)

2021-11-08 Thread Martin Jambor
Hi, my initial implementation of the method ipa_param_body_adjustments::remap_with_debug_expressions was based on the assumption that if it was asked to remap an expression (as opposed to a simple SSA_NAME), the expression would not contain an SSA_NAME operand which is to be debug-reset. While th

[RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-08 Thread Matthias Kretz
On Tuesday, 17 August 2021 20:31:54 CET Jason Merrill wrote: > > 2. Given a DECL_TI_ARGS tree, can I query whether an argument was deduced > > or explicitly specified? I'm asking because I still consider diagnostics > > of function templates unfortunate. `template void f()` is fine, > > as is `voi

Re: [PATCH v1 1/7] LoongArch Port: gcc

2021-11-08 Thread Xi Ruoyao via Gcc-patches
On Mon, 2021-11-08 at 10:30 +0800, Chenghua Xu wrote: > This patch does not arrive at  mail list. Send as an attachment in a > compressed format. I think .patch.gz is perferred instead of .tar.gz. And is it possible to seperate this into multiple commits? For example the whole "-march=native" s

Re: [PATCH] ipa: Unshare expresseions before putting them into debug statements (PR 103099, PR 103107)

2021-11-08 Thread Jan Hubicka via Gcc-patches
> Hi, > > my recent patch to improve debug experience when there are removed > parameters (by ipa-sra or ipa-split) was not careful to unshare the > expressions that were then put into debug statements, which manifests > itself as PR 103099. This patch adds unsharing them using > unshare_expr_wit

[PATCH] ipa: Unshare expresseions before putting them into debug statements (PR 103099, PR 103107)

2021-11-08 Thread Martin Jambor
Hi, my recent patch to improve debug experience when there are removed parameters (by ipa-sra or ipa-split) was not careful to unshare the expressions that were then put into debug statements, which manifests itself as PR 103099. This patch adds unsharing them using unshare_expr_without_location

Re: Some PINGs

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 3:02 PM Roger Sayle wrote: > > > Hi Richard, > > >> I wonder if reviewers could take a look (or a second look) at some of > >> my outstanding patches. > >> PR middle-end/100810: Penalize IV candidates with undefined value > >> bases > >> https://gcc.gnu.org/pipermail/gcc-pat

[PATCH] c++: bogus error w/ variadic concept-id as if cond [PR98394]

2021-11-08 Thread Patrick Palka via Gcc-patches
Here when tentatively parsing the if condition as a declaration, we try to treat C<1> as the start of a constrained placeholder type, which we quickly reject because C doesn't accept a type as its first argument. But since we're parsing tentatively, we shouldn't emit an error in this case. Bootstr

[PATCH] Fix spurious valgrind errors in irred loop verification

2021-11-08 Thread Richard Biener via Gcc-patches
The sbitmap bitmap_{set,clear}_bit changes trigger spurious uninit value use reportings from valgrind since we now read the old value before setting/clearing a bit so verify_loop_structures optimization to not clear the sbitmap is reported. Fixed by using a temporary BB flag which should also be m

[COMMITTED] path solver: Avoid recalculating ranges already in the cache.

2021-11-08 Thread Aldy Hernandez via Gcc-patches
The problem here is an ordering issue with a path that starts with 19->3: [local count: 916928331]: # value_20 = PHI # n_27 = PHI n_16 = n_27 + 4; value_17 = value_20 / 1; if (value_20 > 4294967295) goto ; [89.00%] else goto ; [11.00%] The problem here is that both

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-08 Thread Martin Liška
On 9/28/21 22:39, Andrew MacLeod wrote: In Theory, modifying the IL should be fine, it happens already in places, but  its not extensively tested under those conditions yet. Hello Andrew. I've just tried using a global gimple_ranger and it crashes when loop unswitching duplicates some BBs. P

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-08 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Mon, Nov 8, 2021 at 2:06 PM Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Mon, Nov 8, 2021 at 11:45 AM Richard Sandiford via Gcc-patches >> > wrote: >> >> >> >> One of the things we want to do on AArch64 is compare vector loops >> >>

[PATCH] c++: unexpanded pack in var tmpl partial spec [PR100652]

2021-11-08 Thread Patrick Palka via Gcc-patches
Here we're not spotting a bare parameter pack appearing in the argument list of a variable template partial specialization because we only look for them within the decl's TREE_TYPE, which is sufficient for class templates but not for variable templates. Bootstrapped and regtested on x86_64-pc-linu

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 2:06 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, Nov 8, 2021 at 11:45 AM Richard Sandiford via Gcc-patches > > wrote: > >> > >> One of the things we want to do on AArch64 is compare vector loops > >> side-by-side and pick the best one. For some targ

Re: [PATCH] Remove dead code.

2021-11-08 Thread Jeff Law via Gcc-patches
On 11/8/2021 2:59 AM, Jakub Jelinek via Gcc-patches wrote: On Mon, Nov 08, 2021 at 09:45:39AM +0100, Martin Liška wrote: This fixes issue reported in the PR. Ready to be installed? I'm not sure. liboffloadmic is copied from upstream, so the right thing if we want to do anything at all (if

RE: Some PINGs

2021-11-08 Thread Roger Sayle
Hi Richard, >> I wonder if reviewers could take a look (or a second look) at some of >> my outstanding patches. >> PR middle-end/100810: Penalize IV candidates with undefined value >> bases >> https://gcc.gnu.org/pipermail/gcc-patches/2021-August/578441.html > > I did comment on this one, not

Re: [PATCH] Objective-C: fix protocol list count type (pertinent to non-LP64)

2021-11-08 Thread Iain Sandoe
> On 7 Nov 2021, at 22:50, Matt Jacobson wrote: > > >> On Oct 25, 2021, at 5:43 AM, Iain Sandoe wrote: >> >> Did you test objective-c++ on Darwin? >> >> I see a lot of fails of the form: >> Excess errors: >> : error: initialization of a flexible array member [-Wpedantic] > > Looked into t

Re: [PATCH 11/18] rs6000: Builtin expansion, part 6

2021-11-08 Thread Bill Schmidt via Gcc-patches
Sorry for the misunderstanding.  What I meant is the 6 patches entitled "Builtin expansion, part N". I still have 6-7 patches left to look at. Thanks! Bill On 11/7/21 3:05 PM, Segher Boessenkool wrote: > Hi! > > On Sun, Nov 07, 2021 at 09:28:09AM -0600, Bill Schmidt wrote: >> Thank you for all

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-08 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Mon, Nov 8, 2021 at 11:45 AM Richard Sandiford via Gcc-patches > wrote: >> >> One of the things we want to do on AArch64 is compare vector loops >> side-by-side and pick the best one. For some targets, we want this >> to be based on issue rates as well as the usual la

Re: GCC 11 backports

2021-11-08 Thread Martin Liška
On 11/5/21 17:08, Martin Liška wrote: On 8/23/21 10:54, Martin Liška wrote: On 8/16/21 13:13, Martin Liška wrote: I'm going to apply the following 3 tested patches. Martin One more patch I've just tested. Martin And one more backport. Martin One more tested patch. Martin

Re: [PATCH] Add debug counters to back threader.

2021-11-08 Thread Martin Liška
n 11/6/21 16:53, Aldy Hernandez wrote: Martin, pinskia, do you have opinions here? Hello. I do prefer having the 4 counters as introduced: DEBUG_COUNTER (back_thread1) DEBUG_COUNTER (back_thread2) DEBUG_COUNTER (back_threadfull1) DEBUG_COUNTER (back_threadfull2) Cheers, Martin

Re: [PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Martin Liška
On 11/8/21 12:51, Martin Liška wrote: Pushed with the modification as g:409767d774c59ee4c3eefca5015ba00539fddc08. Sorry, I forgot to commit it, so fixed in: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=355eb60b6672220642fae853021599afaa87dfd6 Martin

Re: [PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Martin Liška
On 11/8/21 12:17, Jan Hubicka wrote: diff --git a/gcc/cgraph.c b/gcc/cgraph.c index de078653781..8299ee92946 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2203,6 +2203,10 @@ cgraph_node::dump (FILE *f) fprintf (f, " %soperator_delete", DECL_IS_REPLACEABLE_OPERATOR (decl) ?

Re: [PATCH 0/4] config: Allow a host to opt out of PCH.

2021-11-08 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 05, 2021 at 04:37:09PM +, Iain Sandoe wrote: > It is hard to judge the relative effort in the two immediately visible > solutions: > > 1. relocatable PCH > 2. taking the tree streamer from the modules implementation, moving its home > to c-family and adding hooks so that each

Re: [PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Jan Hubicka via Gcc-patches
> > diff --git a/gcc/cgraph.c b/gcc/cgraph.c > > index de078653781..8299ee92946 100644 > > --- a/gcc/cgraph.c > > +++ b/gcc/cgraph.c > > @@ -2203,6 +2203,10 @@ cgraph_node::dump (FILE *f) > > fprintf (f, " %soperator_delete", > > DECL_IS_REPLACEABLE_OPERATOR (decl) ? "replaceable_" :

Re: [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches wrote: > > Hi, > The attached patch removes redundant check for number of loops in > pass_vectorize::execute, > since it only calls vectorize_loops, and in vectorize_loops, we > immediately bail out if no loops are present: > ve

Re: [PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Eric Botcazou via Gcc-patches
> diff --git a/gcc/cgraph.c b/gcc/cgraph.c > index de078653781..8299ee92946 100644 > --- a/gcc/cgraph.c > +++ b/gcc/cgraph.c > @@ -2203,6 +2203,10 @@ cgraph_node::dump (FILE *f) > fprintf (f, " %soperator_delete", >DECL_IS_REPLACEABLE_OPERATOR (decl) ? "replaceable_" : ""); > > +

Re: [PATCH] gcov-profile: Fix -fcompare-debug with -fprofile-generate [PR100520]

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 12:01 PM Jan Hubicka via Gcc-patches wrote: > > > On 11/5/21 18:30, Jan Hubicka wrote: > > > every gcc source looks like bit of overkill given that is can be open > > > coded in 3 statements? > > > > Why? It's a static inline function with few statements. I don't want to >

Re: [PATCH] vect: Move vector costs to loop_vec_info

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 11:59 AM Richard Sandiford via Gcc-patches wrote: > > target_cost_data is in vec_info but is really specific to > loop_vec_info. This patch moves it there and renames it to > vector_costs, to distinguish it from scalar target costs. > > Tested on aarch64-linux-gnu and x86_6

[tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

2021-11-08 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached patch removes redundant check for number of loops in pass_vectorize::execute, since it only calls vectorize_loops, and in vectorize_loops, we immediately bail out if no loops are present: vect_loops_num = number_of_loops (cfun); /* Bail out if there are no loops. */ if (vect

Re: [PATCH] vect: Pass scalar_costs to finish_cost

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 11:48 AM Richard Sandiford via Gcc-patches wrote: > > When finishing the vector costs, it can be useful to know > what the associated scalar costs were. This allows targets > to read information collected about the original scalar loop > when trying to make a final judgemen

Re: [PATCH] vect: Keep scalar costs around longer

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 11:47 AM Richard Sandiford via Gcc-patches wrote: > > The scalar costs for a loop are fleeting, with only the final > single_scalar_iteration_cost being kept for later comparison. > This patch replaces single_scalar_iteration_cost with the cost > structure, so that (with lat

Re: [PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Jan Hubicka via Gcc-patches
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * cgraph.c (cgraph_node::dump): Dump static_chain_decl. OK Honza > --- > gcc/cgraph.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a

Re: [PATCH] gcov-profile: Fix -fcompare-debug with -fprofile-generate [PR100520]

2021-11-08 Thread Jan Hubicka via Gcc-patches
> On 11/5/21 18:30, Jan Hubicka wrote: > > every gcc source looks like bit of overkill given that is can be open > > coded in 3 statements? > > Why? It's a static inline function with few statements. I don't want to > copy&paste > the same code at every location. I bet there must quite some open-

[PATCH] vect: Move vector costs to loop_vec_info

2021-11-08 Thread Richard Sandiford via Gcc-patches
target_cost_data is in vec_info but is really specific to loop_vec_info. This patch moves it there and renames it to vector_costs, to distinguish it from scalar target costs. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * tree-vectorizer.h (vec_info::t

Re: [PATCH] vect: Hookize better_loop_vinfo_p

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 11:45 AM Richard Sandiford via Gcc-patches wrote: > > One of the things we want to do on AArch64 is compare vector loops > side-by-side and pick the best one. For some targets, we want this > to be based on issue rates as well as the usual latency-based costs > (at least fo

[PATCH] Dump static chain for cgraph_node.

2021-11-08 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * cgraph.c (cgraph_node::dump): Dump static_chain_decl. --- gcc/cgraph.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/cgraph.c b/gcc/cgraph.c index

Re: [PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-08 Thread Richard Biener via Gcc-patches
On Mon, Nov 8, 2021 at 11:44 AM Richard Sandiford via Gcc-patches wrote: > > The vector costs now use a common base class instead of being > completely abstract. This means that there's no longer a > need to record the inside and outside costs separately. > > Tested on aarch64-linux-gnu and x86_6

[PATCH] vect: Pass scalar_costs to finish_cost

2021-11-08 Thread Richard Sandiford via Gcc-patches
When finishing the vector costs, it can be useful to know what the associated scalar costs were. This allows targets to read information collected about the original scalar loop when trying to make a final judgement about the cost of the vector code. This patch therefore passes the scalar costs t

[PATCH] vect: Keep scalar costs around longer

2021-11-08 Thread Richard Sandiford via Gcc-patches
The scalar costs for a loop are fleeting, with only the final single_scalar_iteration_cost being kept for later comparison. This patch replaces single_scalar_iteration_cost with the cost structure, so that (with later patches) it's possible for targets to examine other target-specific cost properti

[ping^3] Make sure that we get unique test names if several DejaGnu directives refer to the same line [PR102735]

2021-11-08 Thread Thomas Schwinge
Hi! Ping, once more. Grüße Thomas On 2021-10-14T12:12:41+0200, I wrote: > Hi! > > Ping, again. > > Commit log updated for > "privatization-1-compute.c results in both XFAIL and PASS". > > > Grüße > Thomas > > > On 2021-09-30T08:42:25+0200, I wrote: >> Hi! >> >>

[PATCH] vect: Hookize better_loop_vinfo_p

2021-11-08 Thread Richard Sandiford via Gcc-patches
One of the things we want to do on AArch64 is compare vector loops side-by-side and pick the best one. For some targets, we want this to be based on issue rates as well as the usual latency-based costs (at least for loops with relatively high iteration counts). The current approach to doing this

[PATCH] vect: Remove vec_outside/inside_cost fields

2021-11-08 Thread Richard Sandiford via Gcc-patches
The vector costs now use a common base class instead of being completely abstract. This means that there's no longer a need to record the inside and outside costs separately. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard gcc/ * tree-vectorizer.h (_loop_vec_i

RE: [PATCH][GCC] arm: enable cortex-a710 CPU

2021-11-08 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Przemyslaw Wirkus > Sent: Monday, November 8, 2021 10:35 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Ramana > Radhakrishnan ; Kyrylo Tkachov > ; ni...@redhat.com > Subject: RE: [PATCH][GCC] arm: enable cortex-a710 CPU > > Ping :) > > > -O

RE: [PATCH][GCC] arm: add armv9-a architecture to -march

2021-11-08 Thread Kyrylo Tkachov via Gcc-patches
Hi Przemek, > -Original Message- > From: Przemyslaw Wirkus > Sent: Monday, November 8, 2021 10:34 AM > To: gcc-patches@gcc.gnu.org > Cc: Richard Earnshaw ; Ramana > Radhakrishnan ; Kyrylo Tkachov > ; ni...@redhat.com > Subject: RE: [PATCH][GCC] arm: add armv9-a architecture to -march > >

[committed] aarch64: LD3/LD4 post-modify costs for struct modes

2021-11-08 Thread Richard Sandiford via Gcc-patches
The LD3/ST3 and LD4/ST4 address cost code had no test coverage (oops). This patch fixes that and updates it for the new structure modes. The test only covers Advanced SIMD because SVE doesn't have post-increment forms. Tested on aarch64-linxu-gnu & pushed. Richard gcc/ * config/aarch64/

  1   2   >