[COMMITTED] ada: Ignore defered compile time errors without backend

2023-11-30 Thread Marc Poulhiès
From: Viljar Indus We defer some compile time warnings and errors until the backend has added the extra information needed. However it is not guaranteed that the backend has run by this point. Avoid checking these errors if the backend has not been activated and no code has been generated. gcc/a

[COMMITTED] ada: Support Put_Image for types in user-defined instances of predefined generics.

2023-11-30 Thread Marc Poulhiès
From: Steve Baird Predefined units do not generally support the Put_Image attribute. There are good reasons for this in most cases. But if a user-defined instantiation of a predefined generic occurs in Ada 2022 code, then Put_Image can be supported for types declared therein. Add this support. g

[COMMITTED] ada: Rework fix for wrong finalization of qualified aggregate in allocator

2023-11-30 Thread Marc Poulhiès
From: Eric Botcazou The problem is that there is no easy method to insert an action after an arbitrary node in the tree, so the original fix does not correctly work when the allocator is nested in another expression. Therefore this moves the burden of the insertion from Apply_Predicate_Check to

[COMMITTED] ada: Remove SPARK legality checks

2023-11-30 Thread Marc Poulhiès
From: Yannick Moy SPARK legality checks apply only to code with SPARK_Mode On, and are performed again in GNATprove for detecting SPARK-compatible declarations in code with SPARK_Mode Auto. Remove this duplication, to only perform SPARK legality checking in GNATprove. After this patch, only a few

[PATCH] RISC-V: Remove earlyclobber for wx/wf instructions.

2023-11-30 Thread Juzhe-Zhong
While working on overlap for widening instructions, I realize that we set vwadd.wx/vfwadd.wf as earlyclobber which is incorrect. Since according to RVV ISA: "The destination EEW equals the source EEW." For both vwadd.wx/vfwadd.wf source vector and dest vector operand are same EEW. So, they should

Re: [PATCH] RISC-V: Remove earlyclobber for wx/wf instructions.

2023-11-30 Thread Robin Dapp
> While working on overlap for widening instructions, I realize that we set > vwadd.wx/vfwadd.wf as earlyclobber which is incorrect. > > Since according to RVV ISA: > "The destination EEW equals the source EEW." > > For both vwadd.wx/vfwadd.wf source vector and dest vector operand are same > EEW

[PATCH V2] RISC-V: Remove earlyclobber for wx/wf instructions.

2023-11-30 Thread Juzhe-Zhong
While working on overlap for widening instructions, I realize that we set vwadd.wx/vfwadd.wf as earlyclobber which is incorrect. Since according to RVV ISA: "The destination EEW equals the source EEW." vwadd.vx widens the first source operand (i.e. 2 * source EEW = dest EEW) while vwadd.wx only w

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Tamar Christina
Hi Juzhe, I'm happy to take the hunks, just that I can't test it and don't know the specifics of how it lens work. I still need to read up on it. I tried adding that chunk in, but for the first bit `lens` seems undefined, and the second bit it seems `bias` is undefined. I'll also need what to

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zh...@rivai.ai
Thanks Tamar. I am not sure whether I am not on the same page with you. IMHO, ARM SVE will use the final mask = loop mask (generate by WHILE_ULT) & conditional mask. Use that final mask to do the cbranch. Am I right ? If yes, I leverage that for length and avoid too much codes change in your p

RE: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Tamar Christina
Hi Juzhe, I meant that “lens” is undefined, from looking around I guess that needs to be vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo); for `bias` I meant cond = gimple_build (&cond_gsi, IFN_VCOND_MASK_LEN, truth_type, all true mask, cond, all false mask, le

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-30 Thread Richard Sandiford
Wilco Dijkstra writes: > __sync_val_compare_and_swap may be used on 128-bit types and either calls the > outline atomic code or uses an inline loop. On AArch64 LDXP is only atomic if > the value is stored successfully using STXP, but the current implementations > do not perform the store if the c

Re: [PATCH V2] RISC-V: Remove earlyclobber for wx/wf instructions.

2023-11-30 Thread Robin Dapp
OK. Regards Robin

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zh...@rivai.ai
BIAS should be: signed char biasval = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo); tree bias = build_int_cst (intQI_type_node, biasval); Currently, only IBM will set LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS -1 for some situations of len_load/len_store. Otherwise, it is al

Re: [PATCH] testsuite/arm: Fix bfloat16_vector_typecheck_[12].c tests

2023-11-30 Thread Richard Earnshaw
On 30/11/2023 10:15, Christophe Lyon wrote: After commit r14-5617-gb8592186611, int32x[24]_t types now use elements of 'long int' type instead of 'int' on arm-eabi (it's still 'int' on arm-linux-gnueabihf). Both are 32-bit types anyway. This patch adjust the two tests so that they optionnall

Re: [PATCH v2 1/3] libgomp, nvptx: low-latency memory allocator

2023-11-30 Thread Tobias Burnus
Hi Andrew, On 29.11.23 17:25, Andrew Stubbs wrote: On 08/09/2023 10:04, Tobias Burnus wrote: Regarding patch 2/3 and MEMSPACE_VALIDATE. In general, I wonder how to handle memory spaces (and traits) that aren't supported. Namely, when to return 0L and when to silently use ignore the trait / us

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 6:04 AM Alexandre Oliva wrote: > > On Nov 29, 2023, Richard Biener wrote: > > > On Wed, Nov 29, 2023 at 9:53 AM Alexandre Oliva wrote: > > >> Because &arg_#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > > > 'arg_#(D)' looks like a SSA name, and no, taking t

回复:RISC-V: Support XTheadVector extensions

2023-11-30 Thread joshua
Hi Kito, Thank you for your support. We will get involved into community work actively for our XTheadVector patches. Let's work on upstream together during this process. Currently, we are polishing up our patches according to Ju-Zhe's suggestions. Patch v3 with higher quality and less invasion w

Re: [PATCH v2] AArch64: Fix strict-align cpymem/setmem [PR103100]

2023-11-30 Thread Richard Earnshaw
On 29/11/2023 18:09, Richard Sandiford wrote: Wilco Dijkstra writes: v2: Use UINTVAL, rename max_mops_size. The cpymemdi/setmemdi implementation doesn't fully support strict alignment. Block the expansion if the alignment is less than 16 with STRICT_ALIGNMENT. Clean up the condition when to

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 5:13 AM Alexandre Oliva wrote: > > On Nov 29, 2023, Richard Biener wrote: > > >> Because &arg_#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > > > 'arg_#(D)' looks like a SSA name, and no, taking the address doesn't work, > > so I assume it was &MEM[arg_(D)][

Re: [PATCH] hardcfr: libgcc sym versioning

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 8:55 AM Alexandre Oliva wrote: > > > The libgcc-exported runtime component of control flow redundancy > hardening was missing symbol versioning information. Add it. > > Regstrapped on x86_64-linux-gnu. Ok to install? OK. > > for libgcc/ChangeLog > > * libgcc-st

Re: [PATCH] doc: Update the status of build directory not fully separated

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 10:46 AM Xi Ruoyao wrote: > > Recently there are some people building GCC with srcdir == objdir and > the attempts just failed [1]. So stop to say "it should work". OTOH > objdir as a subdirectory of srcdir works (at least for LFS [2] and BLFS > [3]). > > [1]: https://gcc

Re: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread Richard Biener
On Thu, Nov 30, 2023 at 12:11 PM juzhe.zh...@rivai.ai wrote: > BIAS should be: > > signed char biasval > = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo); > tree bias = build_int_cst (intQI_type_node, biasval); > > Currently, only IBM will set LOOP_VINFO_PARTIAL_LOAD_ST

Re: [PATCH] aarch64: modify Ampere CPU tunings on reassociation/FMA

2023-11-30 Thread Richard Earnshaw
On 30/11/2023 08:27, Di Zhao OS wrote: This patch modifies tunings for ampere1/ampere1a/ampere1b, to: 1. Allow reassociation on FP additions. 2. Avoid generating loop-dependant FMA chains. Added a tuning option for this. Bootstrapped and tested. Is this ok for trunk? Thanks, Di Zhao gcc/Ch

Re: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-30 Thread juzhe.zhong
Yes. We can defer it Thanks richard. Replied Message FromRichard BienerDate11/30/2023 20:19 Tojuzhe.zh...@rivai.ai Cctamar.christina,gcc-patchesSubjectRe: RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit codeOn Thu, Nov 30, 2023 at 12:11 PM juzhe.zh...@rivai

[PATCH] tree-optimization/112766 - improve pruning of uninit diagnostics

2023-11-30 Thread Richard Biener
Uninit diagnostics has code to prune based on incoming PHI args that prove the uninit code is never executed. But that only looks at the first found flag candidate while in the PRs case only the second candidate would be the one to prune on. The following patch makes us consider all of the flag c

[PATCH] tree-optimization/112767 - spurious diagnostic after sccp/loop-split swap

2023-11-30 Thread Richard Biener
We are diagnosing an unreachable loop which we only manage to elide after the copyprop pass after sccp which leaves the code open for diagnosing by the intermittent ivcanon pass. The following makes sure to clean things up a bit earlier, propagating constant final values to uses immediately. Boot

Re: [PATCH V2] aarch64: Implement the ACLE instruction/data prefetch functions.

2023-11-30 Thread Richard Sandiford
Victor Do Nascimento writes: > Correct CV-qualification from being erroeously applied to the `addr' > pointer, applying it instead to its pointer target, as specified by > the ACLE standards. > > --- > > Implement the ACLE data and instruction prefetch functions[1] with the > following signatures:

[PATCH v6] Introduce attribute sym_alias

2023-11-30 Thread Alexandre Oliva
On Nov 22, 2023, Jan Hubicka wrote: > I wonder why you use same body aliases, which are kind of special to C++ > frontend (and come with fixup code working around its quirks you had to > disable above). TBH, I don't recall whether I had any reason to have gone down that path, or I just didn't re

Re: [PATCH v2] A new copy propagation and PHI elimination pass

2023-11-30 Thread Richard Biener
On Wed, 22 Nov 2023, Filip Kastl wrote: > Hi Richard, > > > Can you name the new file gimple-ssa-sccopy.cc please? > > Yes, no problem. > > Btw, I thought that it is standard that gimple ssa passes have the tree-ssa- > prefix. Do I understand it correctly that this is not true and many > tree-s

RE: [PATCH 8/21]middle-end: update vectorizable_live_reduction with support for multiple exits and different exits

2023-11-30 Thread Richard Biener
On Wed, 29 Nov 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Wednesday, November 29, 2023 2:29 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject: RE: [PATCH 8/21]middle-end: update vectorizable_live

[PATCH v2] doc: Update the status of build directory not fully separated

2023-11-30 Thread Xi Ruoyao
Recently there are some people building GCC with srcdir == objdir and the attempts just failed [1]. So stop to say "it should work". OTOH objdir as a subdirectory of srcdir works: we've built GCC in LFS [2] and BLFS [3] this way for decades and this is confirmed during the review of a previous ve

Ping: [PATCH] Add a late-combine pass [PR106594]

2023-11-30 Thread Richard Sandiford
Ping Richard Sandiford writes: > This patch adds a combine pass that runs late in the pipeline. > There are two instances: one between combine and split1, and one > after postreload. > > The pass currently has a single objective: remove definitions by > substituting into all uses. The pre-RA ver

Ping: [PATCH] Allow target attributes in non-gnu namespaces

2023-11-30 Thread Richard Sandiford
Ping Richard Sandiford writes: > This is a ping+rebase of the patch below. I've also optimised the > handling of ignored attributes so that we don't register empty tables. > There was also a typo in the jit changes (which I had tested, but the > typo didn't seem to cause a failure). > > Retested

Fix 'libgomp.c/declare-variant-3-*.c' compilation for configurations where GCN offloading is enabled in addition to nvptx (was: [PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c

2023-11-30 Thread Thomas Schwinge
Hi! On 2022-02-24T11:32:53+0100, Tom de Vries via Gcc-patches wrote: > [libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c \o/ Yay for test cases! > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c/declare-variant-3-sm30.c > @@ -0,0 +1,7 @@ > +/* { dg-do run { target { offload_t

Re: Fix 'libgomp.c/declare-variant-3-*.c' compilation for configurations where GCN offloading is enabled in addition to nvptx (was: [PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-s

2023-11-30 Thread Thomas Schwinge
Hi! On 2023-11-30T15:48:25+0100, I wrote: > On 2022-02-24T11:32:53+0100, Tom de Vries via Gcc-patches > wrote: >> [libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c > > \o/ Yay for test cases! > >> --- /dev/null >> +++ b/libgomp/testsuite/libgomp.c/declare-variant-3-sm30.c >> @@ -

[wwwdocs] gcc-14/changes.html: Update C++ news for GCC 14

2023-11-30 Thread Marek Polacek
Pushed. I still need to trawl all C++ commits to highlight the interesting user-visible changes. commit 4304a8b720b1e605a47e2da4c5a0ad21e3f05dec Author: Marek Polacek Date: Thu Nov 30 09:48:36 2023 -0500 changes.html: Update C++ news for GCC 14 diff --git a/htdocs/gcc-14/changes.html b/h

Re: [PATCH v6 1/1] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-30 Thread Jason Merrill
On 11/30/23 01:36, waffl3x wrote: On Wednesday, November 29th, 2023 at 10:00 PM, Jason Merrill wrote: On 11/27/23 00:35, waffl3x wrote: + val = handle_arg(TREE_VALUE (parm), Missing space. Is there a script I can use for this so I'm not wasting your time on little typos like this one?

In 'libgomp.c/declare-variant-{3,4}-*.c', restrict 'scan-offload-tree-dump's to 'only_for_offload_target [...]' (was: [PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c)

2023-11-30 Thread Thomas Schwinge
Hi! On 2022-02-24T11:32:53+0100, Tom de Vries via Gcc-patches wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.c/declare-variant-3-sm30.c > @@ -0,0 +1,7 @@ > +/* { dg-do run { target { offload_target_nvptx } } } */ This means, the test case is active if nvptx offloading compilation is e

Spin 'dg-do run' part of 'libgomp.c/declare-variant-3-sm30.c' off into new 'libgomp.c/declare-variant-3.c' (was: [PATCH][libgomp, testsuite, nvptx] Add libgomp.c/declare-variant-3-sm*.c)

2023-11-30 Thread Thomas Schwinge
Hi! On 2022-02-24T11:32:53+0100, Tom de Vries via Gcc-patches wrote: > the sm_30 test which is still dg-do run (although I've > added the compile time test) which should pass on all boards (since we > don't support below sm_30). Pushed to master branch commit 95e6e32a85566a5510d21938d439e90e504

Fix 'libgomp.c/declare-variant-4-*.c', add 'libgomp.c/declare-variant-4.c' (was: [PATCH] amdgcn: Support AMD-specific 'isa' traits in OpenMP context selectors)

2023-11-30 Thread Thomas Schwinge
Hi! On 2022-11-29T16:56:21+0100, Paul-Antoine Arras wrote: > [...] also adds test > cases checking all supported AMD ISAs are properly recognised when used > in a 'declare variant' construct. \o/ Yay for test cases! > --- /dev/null > +++ libgomp/testsuite/libgomp.c/declare-variant-4-fiji.c > @@

Re: [PATCH v6] Introduce attribute sym_alias

2023-11-30 Thread Jan Hubicka
> On Nov 22, 2023, Jan Hubicka wrote: > > > I wonder why you use same body aliases, which are kind of special to C++ > > frontend (and come with fixup code working around its quirks you had to > > disable above). > > TBH, I don't recall whether I had any reason to have gone down that > path, or

Re: [RFA] New pass for sign/zero extension elimination

2023-11-30 Thread Jeff Law
On 11/29/23 10:37, Joern Rennecke wrote: Why did you leave out MINUS from safe_for_live_propagation ? As Jivan noted, mistake on my part. jeff

Re: [PATCH] c++: partial spec constraint checking context [PR105220]

2023-11-30 Thread Patrick Palka
On Fri, 3 Nov 2023, Patrick Palka wrote: > On Tue, 3 May 2022, Jason Merrill wrote: > > > On 5/2/22 14:50, Patrick Palka wrote: > > > Currently when checking the constraints of a class template, we do so in > > > the context of the template, not the specialized type. This is the best > > > we ca

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/29/23 02:33, Xi Ruoyao wrote: On Mon, 2023-11-27 at 23:06 -0700, Jeff Law wrote: This has (of course) been tested on rv64.  It's also been bootstrapped and regression tested on x86.  Bootstrap and regression tested (C only) for m68k, sh4, sh4eb, alpha.  Earlier versions were also bootst

[PATCH] s390x: Fix PR112753

2023-11-30 Thread Juergen Christ
Commit 466b100e5fee808d77598e0f294654deec281150 introduced a bug in s390_md_asm_adjust if vector extensions are not available. Fix the control flow of this function to not adjust long double values. gcc/ChangeLog: * config/s390/s390.cc (s390_md_asm_adjust): Fix. gcc/testsuite/ChangeLog:

Re: [PATCH v3 3/3] c++: note other candidates when diagnosing deletedness

2023-11-30 Thread Patrick Palka
On Fri, 27 Oct 2023, Patrick Palka wrote: > On Fri, 27 Oct 2023, Jason Merrill wrote: > > > On 10/27/23 15:55, Patrick Palka wrote: > > > With the previous two patches in place, we can now extend our > > > deletedness diagnostic to note the other considered candidates, e.g.: > > > > > >delet

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/29/23 19:39, Joern Rennecke wrote: On Wed, 29 Nov 2023 at 20:05, Joern Rennecke wrote: I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT . Some ports do a lot of static shifting. +case SS_ASHIFT: +case US_ASHIFT: + if (!mask || XEXP (x, 1) == cons

[committed] libstdc++: Fix std::ranges::to errors

2023-11-30 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Fix some errors that Patrick noticed, and remove a #if 0 group that I didn't mean to leave in the file. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::__toable): Fix incorrect use of _Range instead of _Cont. (__deta

Re: [committed v2] libstdc++: Define std::ranges::to for C++23 (P1206R7) [PR111055]

2023-11-30 Thread Jonathan Wakely
On Wed, 29 Nov 2023 at 16:28, Patrick Palka wrote: > > On Thu, 23 Nov 2023, Jonathan Wakely wrote: > > > Here's the finished version of the std::ranges::to patch, which I've > > pushed to trunk. > > > > Tested x86_64-linux. > > > > -- >8 -- > > > > This adds the std::ranges::to functions for C++23.

[PATCH] libstdc++: Implement LGW 4016 for std::ranges::to

2023-11-30 Thread Jonathan Wakely
This hasn't been finally approved by LWG yet, but everybody seems to be in favour of it. I think I'll push this soon. Tested x86_64-linux. -- >8 -- This implements the proposed resolution of LWG 4016, so that std::ranges::to does not use std::back_inserter and std::inserter. Instead it inserts a

[PATCH] libstdc++: Add workaround to std::ranges::subrange [PR111948]

2023-11-30 Thread Jonathan Wakely
I think I'll push this to work around the compiler bug. We can revert it later if the front end gets fixed. Tested x86_64-linux. Needed on trunk and gcc-13. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/111948 * include/bits/ranges_util.h (subrange): Add constructor to _

Re: [PATCH] libstdc++: Implement LGW 4016 for std::ranges::to

2023-11-30 Thread Jonathan Wakely
Before pushing I'll fix the summary to say "LWG" instead of "LGW" (the airport code for London Gatwick!) On Thu, 30 Nov 2023 at 15:51, Jonathan Wakely wrote: > > This hasn't been finally approved by LWG yet, but everybody seems to be > in favour of it. I think I'll push this soon. > > Tested x86_6

HELP: one issue during the implementation for counted_by attribute

2023-11-30 Thread Qing Zhao
Hi, 1. For the following source code (portion): struct annotated { size_t foo; char b; char array[] __attribute__((counted_by (foo))); }; static void noinline bar () { struct annotated *p2 = alloc_buf (10); p2->array[8] = 0; return; } 2. I modified C FE to generate the following co

Re: [PATCH v3 09/11] c: Turn -Wreturn-mismatch into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 23, 2023 at 07:22:58PM +0100, Florian Weimer wrote: > * Marek Polacek: > > > On Mon, Nov 20, 2023 at 10:56:30AM +0100, Florian Weimer wrote: > >> gcc/ > >> > >>* doc/invoke.texi (Warning Options): Document changes. > > > > That's pretty vague :). How about "Document that -Wreturn

[PATCH] gcov: Fix __LIBGCC_HAVE_LIBATOMIC definition

2023-11-30 Thread Sebastian Huber
In libgcov we use defined (__LIBGCC_HAVE_LIBATOMIC), so we must define it only if needed (vs. #if __LIBGCC_HAVE_LIBATOMIC). gcc/c-family/ChangeLog: PR target/112777 * c-cppbuiltin.cc (c_cpp_builtins): Define __LIBGCC_HAVE_LIBATOMIC only if targetm.have_libatomic is true.

Re: [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]

2023-11-30 Thread Jakub Jelinek
On Wed, Nov 29, 2023 at 07:27:20PM +0100, Jakub Jelinek wrote: > Given that the s390 backend defines pretty much the same target hook > as rs6000, I believe it suffers (at least when using -mvx?) the same > problem as rs6000, though admittedly this is so far completely > untested. > > Ok for trunk

Re: [PATCH v2] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-30 Thread Jason Merrill
On 11/29/23 17:01, Marek Polacek wrote: On Wed, Nov 29, 2023 at 03:28:44PM -0500, Jason Merrill wrote: On 11/29/23 12:43, Marek Polacek wrote: On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: On Wed, 29 Nov 2023, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gn

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-30 Thread Hans-Peter Nilsson
> From: Alexandre Oliva > Date: Thu, 30 Nov 2023 01:41:55 -0300 > On Nov 29, 2023, Hans-Peter Nilsson wrote: > > >> XPASS: gcc.dg/tree-ssa/scev-3.c scan-tree-dump-times ivopts "&a" 1 > >> XPASS: gcc.dg/tree-ssa/scev-4.c scan-tree-dump-times ivopts "&a" 1 > >> XPASS: gcc.dg/tree-ssa/scev-5.c sca

Re: Ping: [PATCH] Fix PR112419

2023-11-30 Thread Hans-Peter Nilsson
> From: Martin Uecker > Cc: richard.guent...@gmail.com > Am Montag, dem 27.11.2023 um 08:36 -0700 schrieb Jeff Law: > > > > On 11/23/23 10:05, Hans-Peter Nilsson wrote: > > > > From: Hans-Peter Nilsson > > > > Date: Thu, 16 Nov 2023 05:24:06 +0100 > > > > > > > > > From: Martin Uecker > > > >

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:03AM +0100, Florian Weimer wrote: > The dg-error directives for gcc.dg/permerror-system.c can be generated > using (for the most part at least): > > perl -ne 'print if s,.*(/\* \{ dg-error .*) } \*/$,$1 "" { target *-*-* } $. > } */,' \ > < gcc/testsuite/gcc.dg/per

Re: [RFA] New pass for sign/zero extension elimination

2023-11-30 Thread Jeff Law
On 11/28/23 06:36, Joern Rennecke wrote: On Mon, 27 Nov 2023 at 20:18, Jeff Law wrote: On 11/27/23 13:03, Richard Sandiford wrote: Joern Rennecke writes: On 11/20/23 11:26, Richard Sandiford wrote: + /* ?!? What is the point of this adjustment to DST_MASK? */ + if (code

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Florian Weimer
* Marek Polacek: >> +void >> +implicit_function_declaration (void) >> +{ >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\\]" } */ >> +} >> + >> +extern implicit_int_1; /* { dg-warning "'implicit_int_1' >> \\\[-Wimplicit-int\\\]" } */ > > Oy, these \ tend to get unwieldy.

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 06:37:21PM +0100, Florian Weimer wrote: > * Marek Polacek: > > >> +void > >> +implicit_function_declaration (void) > >> +{ > >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\\]" } > >> */ > >> +} > >> + > >> +extern implicit_int_1; /* { dg-warning "'

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/29/23 19:39, Joern Rennecke wrote: On Wed, 29 Nov 2023 at 20:05, Joern Rennecke wrote: I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT . Some ports do a lot of static shifting. +case SS_ASHIFT: +case US_ASHIFT: + if (!mask || XEXP (x, 1) == const0

Re: [PATCH] AArch64: Fix __sync_val_compare_and_swap [PR111404]

2023-11-30 Thread Wilco Dijkstra
Hi Richard, Thanks for the review, now committed. > The new aarch64_split_compare_and_swap code looks a bit twisty. > The approach in lse.S seems more obvious.  But I'm guessing you > didn't want to spend any time restructuring the pre-LSE > -mno-outline-atomics code, and I agree the patch in its

Re: [PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 12:39:22PM -0500, Marek Polacek wrote: > On Thu, Nov 30, 2023 at 06:37:21PM +0100, Florian Weimer wrote: > > * Marek Polacek: > > > > >> +void > > >> +implicit_function_declaration (void) > > >> +{ > > >> + f1 (); /* { dg-warning "'f1' \\\[-Wimplicit-function-declaration\\

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Joern Rennecke
On Thu, 30 Nov 2023 at 17:53, Jeff Law wrote: > > * ext-dce.c: Fixes for carry handling. > > > > * ext-dce.c (safe_for_live_propagation): Handle MINUS. > >(ext_dce_process_uses): Break out carry handling into .. > >(carry_backpropagate): This new function. > >Bet

Re: [PATCH v3 05/11] c: Turn int-conversion warnings into permerrors

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:09AM +0100, Florian Weimer wrote: > gcc/ > > * doc/invoke.texi (Warning Options): Document changes. Let's be more specific here. > gcc/c/ > > PR c/96284 > PR c/106416 > * c-typeck.cc (build_conditional_expr): Use permerror_opt for > p

Re: [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:16AM +0100, Florian Weimer wrote: > In the future, it may make sense to avoid cascading errors from > the implicit declaration, especially its assumed int return type. > This change here only changes the kind of the diagnostic, not > its wording or consequences. Looks

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/30/23 11:31, Joern Rennecke wrote: Pretending the vector modes don't happen is not making the code safe. We have to handle them somehow, so we might as well do that in a way that is consistent and gives more potential for optimization. We're not pretending they don't happen. Quite the

[PATCH] libstdc++: Simplify ranges::to closure objects

2023-11-30 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Use the existing _Partial range adaptor closure object in the definition of ranges::to instead of essentially open coding it. libstdc++-v3/ChangeLog: * include/std/ranges (__detail::_ToClosure): Replace with ...

Re: [PATCH 3/4] libbacktrace: work with aslr on windows

2023-11-30 Thread Ian Lance Taylor
On Mon, Nov 20, 2023 at 11:58 AM Björn Schäpers wrote: > > An updated version, using neither A or W, but just the macro. Thanks. Committed as follows. Ian 1017495bc91d40570f58c37e88ca013164782129 diff --git a/libbacktrace/pecoff.c b/libbacktrace/pecoff.c index 56af4828e27..f976a963bf3 100644 --

[PATCH] htdocs/git.html: correct spelling and use git in example

2023-11-30 Thread Jonny Grant
ChangeLog: htdocs/git.html: change example to use git:// and correct spelling repostiory -> repository . >From fad03a107f5f8734e9eeafb618cdb30fa100cbbb Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Thu, 30 Nov 2023 17:55:49 + Subject: [PATCH] htdocs/

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > > Thanks a lot Alexandre for the review! This patch changed the files lingo/configure.ac and libgo/configure. Those files live in an upstream repository and should be changed there and then merged into the GCC repo, as described in libgo/README.

Re: [PATCH v3 05/11] c: Turn int-conversion warnings into permerrors

2023-11-30 Thread Florian Weimer
* Marek Polacek: >> permerror_init for -Wint-conversion warnings. > > A few extra whitespaces. >> * gcc.dg/assign-warn-4.c: New file. Extracted from >> assign-warn1.c. Expect int-cnversion errors. > > "int-conversion" (sorry about pointing out typos...) > >> * gcc.dg/dia

Re: [PATCH] libgo, libstdc++: Regenerate GCC_CHECK_ASSEMBLER_HWCAP users

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 1:30 AM Rainer Orth wrote: > > the gcc-autoregen bot correctly complained that the libgo and libstdc++ > configure scripts hadn't been regenerated. I'd have commited the > following as obvious (just whitespace change), but since libgo is > imported from upstream, I'm unce

Re: [PATCH v3 07/11] c: Turn -Wimplicit-int into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:20AM +0100, Florian Weimer wrote: > Most of these new permerrors are currently not diagnosed in system > headers. > > gcc/ > > PR c/91093 > PR c/96284 > * doc/invoke.texi (Warning Options): Document changes. > > gcc/c/ > > * c-decl.cc (warn_

Re: [PATCH v3 08/11] c: Do not ignore some forms of -Wimplicit-int in system headers

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:26AM +0100, Florian Weimer wrote: > Most -Wimplicit-int warnings were unconditionally disabled for system > headers. Only missing types for parameters in old-style function > definitions resulted in warnings. This is inconsistent with the > treatment of other permerr

Re: [PATCH 4/4] libbacktrace: get debug information for loaded dlls

2023-11-30 Thread Ian Lance Taylor
On Fri, Jan 20, 2023 at 2:55 AM Björn Schäpers wrote: > > From: Björn Schäpers > > Fixes https://github.com/ianlancetaylor/libbacktrace/issues/53, except > that libraries loaded after the backtrace_initialize are not handled. > But as far as I can see that's the same for elf. Thanks, but I don't

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Iain Sandoe
Hi Ian > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: >> >> Thanks a lot Alexandre for the review! > > This patch changed the files lingo/configure.ac and libgo/configure. > Those files live in an upstream repository and should be cha

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:56 AM Iain Sandoe wrote: > > > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > >> > >> Thanks a lot Alexandre for the review! > > > > This patch changed the files lingo/configure.ac and libgo/configure. > >

Re: [PATCH 4/4] libbacktrace: get debug information for loaded dlls

2023-11-30 Thread Eli Zaretskii
> Date: Thu, 30 Nov 2023 11:53:54 -0800 > Cc: gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > From: Ian Lance Taylor via Gcc > > Also starting with a module count of 1000 seems like a lot. Do > typical Windows programs load that many modules? Unlikely. I'd start with 100.

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > The change to build_conditional_expr drops the downgrade > from a pedwarn to warning for builtins for C99 and later > language dialects. It remains a warning in C89 mode (not > a permerror), as the -std=gnu89 -fno-permissive test sh

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -6183,6 +6183,7 @@ that have their own flag: > @gccoptlist{ > -Wimplicit-function-declaration @r{(C)} > -Wimplicit-int @r{(C)} > +-Wincompatible-pointer-types @r{(C)} > -

[PATCH] Fortran: copy-out for possibly missing OPTIONAL CLASS arguments [PR112772]

2023-11-30 Thread Harald Anlauf
Dear all, the attached rather obvious patch fixes the first testcase of pr112772: we unconditionally generated copy-out code for optional class arguments, while the copy-in properly checked the presence of arguments. Regtested on x86_64-pc-linux-gnu. OK for mainline? (The second testcase is a d

Re: [PATCH v3 11/11] c: Add new -Wdeclaration-missing-parameter-type permerror

2023-11-30 Thread Marek Polacek
On Mon, Nov 20, 2023 at 10:56:42AM +0100, Florian Weimer wrote: > This used to be a warning, enabled by default, without its own option. I think this patch is OK now. > A subsequent change could improve diagnostics and provide spelling > hints for declarations like “void function (int32t);”. Fe

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Florian Weimer
* Marek Polacek: > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -6183,6 +6183,7 @@ that have their own flag: >> @gccoptlist{ >> -Wimplicit-function-declaration @r{(C)} >> -Wimplicit-int @r{(C)} >> +-Wincompatible

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > * Marek Polacek: > > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > >> --- a/gcc/doc/invoke.texi > >> +++ b/gcc/doc/invoke.texi > >> @@ -6183,6 +6183,7 @@ that have their own flag: > >> @gccoptlist{ > >> -Wimp

Re: [PATCH] preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]

2023-11-30 Thread Marek Polacek
On Wed, Nov 01, 2023 at 05:54:57PM -0400, Lewis Hyatt wrote: > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112319 > > This is a one-line patch to fix the GCC 14 regression noted in the > PR. Bootstrap + regtest all languages on x86-64 looks good. Is it OK please? > Thanks! > > -Lewis

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > > * Marek Polacek: > > > > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: > > >> --- a/gcc/doc/invoke.texi > > >> +++ b/gcc/doc/invoke.texi > > >> @

Re: [PATCH] libgo, libstdc++: Regenerate GCC_CHECK_ASSEMBLER_HWCAP users

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:46 AM Ian Lance Taylor wrote: > > On Thu, Nov 30, 2023 at 1:30 AM Rainer Orth > wrote: > > > > the gcc-autoregen bot correctly complained that the libgo and libstdc++ > > configure scripts hadn't been regenerated. I'd have commited the > > following as obvious (just w

Re: Darwin: Replace environment runpath with embedded [PR88590]

2023-11-30 Thread Ian Lance Taylor
On Thu, Nov 30, 2023 at 11:58 AM Ian Lance Taylor wrote: > > On Thu, Nov 30, 2023 at 11:56 AM Iain Sandoe wrote: > > > > > On 30 Nov 2023, at 19:43, Ian Lance Taylor wrote: > > > > > > On Sun, Oct 22, 2023 at 2:18 PM FX Coudert wrote: > > >> > > >> Thanks a lot Alexandre for the review! > > > >

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Florian Weimer
* Jakub Jelinek: > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: >> > * Marek Polacek: >> > >> > > On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote: >> > >> --- a/gcc/doc/invoke.texi >> > >> +++ b/gc

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Jakub Jelinek
On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > >> > * Marek Polacek: > >> > > >> > > On Mon, Nov 20, 2023 at 10:56:36AM +

[PATCH v3] aarch64: New RTL optimization pass avoid-store-forwarding.

2023-11-30 Thread Manos Anagnostakis
This is an RTL pass that detects store forwarding from stores to larger loads (load pairs). This optimization is SPEC2017-driven and was found to be beneficial for some benchmarks, through testing on ampere1/ampere1a machines. For example, it can transform cases like str d5, [sp, #320] fmul d

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-30 Thread Jeff Law
On 11/30/23 14:22, Jeff Law wrote: So if you're going to add opcodes in here, don't they also need to be in safe_for_propagation_p as well?  Otherwise they won't get used, right? I'm thinking about the HIGHPART cases for example.  As well as the saturating shifts which we indicated we were

Re: [PATCH v3 00/11] : More warnings as errors by default

2023-11-30 Thread Florian Weimer
* Sam James: >>> But give Marek additional time to chime in, particularly given the >>> holidays this week in the US. Say through this time next week? >> >> [...] >> >> I'm also gathering some numbers regarding autoconf impact and potential >> silent miscompilation. > > I'd actually forgot about

Re: [PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 10:30:44PM +0100, Jakub Jelinek wrote: > On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote: > > * Jakub Jelinek: > > > > > On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote: > > >> On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote: > >

Re: [PATCH v2] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-30 Thread Marek Polacek
On Thu, Nov 30, 2023 at 11:42:36AM -0500, Jason Merrill wrote: > On 11/29/23 17:01, Marek Polacek wrote: > > On Wed, Nov 29, 2023 at 03:28:44PM -0500, Jason Merrill wrote: > > > On 11/29/23 12:43, Marek Polacek wrote: > > > > On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: > > > > >

Re: [PATCH] libgccjit: Add ability to get CPU features

2023-11-30 Thread Antoni Boucher
See more answers below. On Thu, 2023-11-09 at 19:33 -0500, Antoni Boucher wrote: > > Hi. > > See answers below. > > > > On Thu, 2023-11-09 at 18:04 -0500, David Malcolm wrote: > > > > On Thu, 2023-11-09 at 17:27 -0500, Antoni Boucher wrote: > > > > > > Hi. > > > > > > This patch adds support for

  1   2   >