Re: [RFC PATCH] Detecting lifetime-dse issues via Valgrind

2023-11-20 Thread Alexander Monakov
On Mon, 13 Nov 2023, Richard Biener wrote: > > Ideally we'd position it such that more locals are put in SSA form, > > but not too late to miss some UB, right? Perhaps after first pass_ccp? > > I guess it’s worth experimenting. Even doing it right before RTL expansion > might work. Note if you

[PATCH] middle-end/112622 - adjust arm testcases

2023-11-20 Thread Richard Biener
The error message improved, adjust arm specific testcases. Pushed. * gcc.target/arm/bfloat16_vector_typecheck_1.c: Adjust. * gcc.target/arm/bfloat16_vector_typecheck_2.c: Likewise. * gcc.target/aarch64/bfloat16_vector_typecheck_1.c: Likewise. * gcc.target/aarch64/b

Re: [PATCH] [APX PPX] Support Intel APX PPX

2023-11-20 Thread Hongtao Liu
On Tue, Nov 21, 2023 at 1:45 PM Hongyu Wang wrote: > > > I think you just need to add an extra (unspec [(const_int 0)] > > UNSPEC_PPX) to origin push_di pattern, then no need for particular > > handling of dwarf and cfa stuffs. > > Ditto for popp and push2p and pop2p. > > Yes, such change also wor

[PATCH] tree-optimization/111970 - fix issue with SLP of emulated gather/scatter

2023-11-20 Thread Richard Biener
There's a missed index adjustment for the SLP vector number when computing the index/data vectors for emulated gather/scatter with SLP. The following fixes this. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/111970 * tree-vect-stmts.cc (vectoriz

Re: [PATCH v3] RISC-V: Implement TLS Descriptors.

2023-11-20 Thread Tatsuyuki Ishi
> On Nov 21, 2023, at 15:59, Fangrui Song wrote: > > On Mon, Nov 20, 2023 at 6:20 AM Tatsuyuki Ishi > wrote: >> >> This implements TLS Descriptors (TLSDESC) as specified in [1]. >> >> The 4-instruction sequence is implemented as a single RTX insn for >> simplici

Re: [PATCH v3] RISC-V: Implement TLS Descriptors.

2023-11-20 Thread Fangrui Song
On Mon, Nov 20, 2023 at 6:20 AM Tatsuyuki Ishi wrote: > > This implements TLS Descriptors (TLSDESC) as specified in [1]. > > The 4-instruction sequence is implemented as a single RTX insn for > simplicity, but this can be revisited later if instruction scheduling or > more flexible RA is desired.

Re: [PATCH V3 1/7] df: Add DF_LIVE_SUBREG problem

2023-11-20 Thread Lehua Ding
Hi Richard, On 2023/11/21 4:11, Richard Sandiford wrote: Lehua Ding writes: This patch adds a live_subreg problem to extend the original live_reg to track the liveness of subreg. We will only try to trace speudo registers who's mode size is a multiple of nature size and eventually a small port

Re: [PATCH] Bump LTO_minor_version

2023-11-20 Thread Richard Biener
> Am 20.11.2023 um 19:02 schrieb Martin Jambor : > > Hi Richi, > >> On Wed, Sep 20 2023, Richard Biener wrote: >> The following turns MAX_NUM_CHAINS and MAX_CHAIN_LEN to params which >> allows to experiment with raising them. For the testcase in PR111489 >> raising MAX_CHAIN_LEN from 5 to 8

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Martin Uecker
(corrected address) > On Mon, 20 Nov 2023, Jakub Jelinek wrote: > > > On Mon, Nov 20, 2023 at 08:37:55AM +, Richard Biener wrote: > > > > I'm not sure about that, it would be nice for them to be usable there, > > > > > > Btw, I think that {( .. )} should be made usable in sizeof () and >

Re: [PATCH] [APX PPX] Support Intel APX PPX

2023-11-20 Thread Hongyu Wang
> I think you just need to add an extra (unspec [(const_int 0)] > UNSPEC_PPX) to origin push_di pattern, then no need for particular > handling of dwarf and cfa stuffs. > Ditto for popp and push2p and pop2p. Yes, such change also worked and no cfa adjustment required then, thanks for the suggestio

[PATCH 2/2] bugzilla: remove `gcc-bugs@` mailing list address

2023-11-20 Thread Ben Boeckel
Bugzilla is preferred today. ChangeLog: * config-ml.in: Replace gcc-bugs@ with Bugzilla link. * symlink-tree: Replace gcc-bugs@ with Bugzilla link. fixincludes/ChangeLog: * README: Replace gcc-bugs@ with Bugzilla link. gcc/testsuite/ChangeLog: * lib/file-format

[PATCH 1/1] email: fix bug and patch email addresses

2023-11-20 Thread Ben Boeckel
Changelog: * config-ml.in: Update bug and patch email address. * symlink-tree: Update bug and patch email address. --- config-ml.in | 4 ++-- symlink-tree | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config-ml.in b/config-ml.in index 68854a4f16c..107d31

Pushed: LoongArch: Fix libgcc build failure when libc is not available (was Re: genopts: Add infrastructure to generate code for new features in ISA evolution)

2023-11-20 Thread Xi Ruoyao
On Tue, 2023-11-21 at 08:00 +0800, Xi Ruoyao wrote: /* snip */ > > This has broken libgcc builds when target libc isn't yet available. > > > > In file included from > > /scratch/jmyers/glibc-bot/src/gcc/libgcc/../gcc/config/loongarch/loongarch-def.h:49, > > from > > /scratch/j

[Committed] RISC-V: Fix reduc_run-9.c test value check bug

2023-11-20 Thread Juzhe-Zhong
The current test value check is incorrect which is exposed on -march=rv64gcv_zvl256b Confirm on X86 also abort: [jzzhong@rios-cad121:/work/home/jzzhong/work/insn]$./a.out --33.00,4078.00,45001776.00,63369904.00--- Aborted (core dumped) Adapt the value check according to X86 r

[PATCH v4] libstdc++: Remove UB from month and weekday additions and subtractions.

2023-11-20 Thread Cassio Neri
The following invoke signed integer overflow (UB) [1]: month + months{MAX} // where MAX is the maximum value of months::rep month + months{MIN} // where MIN is the maximum value of months::rep month - months{MIN} // where MIN is the minimum value of months::rep weekday + days {MAX}

Re: [PATCH 0/4] v2 of Option handling: add documentation URLs

2023-11-20 Thread Hans-Peter Nilsson
> From: David Malcolm > Date: Thu, 16 Nov 2023 09:28:54 -0500 > How is this looking for trunk? > > Thanks > Dave > > > David Malcolm (4): > options: add gcc/regenerate-opt-urls.py > Add generated .opt.urls files > opts: add logic to generate options-urls.cc > options: wire up options-u

Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-20 Thread Arsen Arsenović
Bruno Haible writes: > Arsen Arsenović wrote: >> Comparing stages 2 and 3 >> Bootstrap comparison failure! >> gettext/libasprintf/autosprintf.o differs >> make[2]: *** [Makefile:23435: compare] Error 1 > > You should be able to work around this by passing the additional option > --disabl

Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-20 Thread Arsen Arsenović
David Edelsohn writes: > _GLOBAL__F_xxx is the EH frame data. > > It's using the filename with full path for the unique name, which is why it > includes .._.._.. . Apparently it is adding a random number as well for > uniqueness. I guess that this is the downside of building in tree, and > app

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Joseph Myers
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > and be done with that. If there is an agreement we should do that > for all 14 rather than just those 3 + the 2 ugly hacks (__builtin_c{l,t}zg > with > 0ULL second argument and __builtin_bit_complement), I can change the I tend to agree with the "ugly

Re: [PATCH v2 2/6] LoongArch: genopts: Add infrastructure to generate code for new features in ISA evolution

2023-11-20 Thread Xi Ruoyao
On Mon, 2023-11-20 at 23:15 +, Joseph Myers wrote: > On Sat, 18 Nov 2023, Xi Ruoyao wrote: > > > diff --git a/gcc/config/loongarch/loongarch-def.h > > b/gcc/config/loongarch/loongarch-def.h > > index b319cded456..6123c8e0f19 100644 > > --- a/gcc/config/loongarch/loongarch-def.h > > +++ b/gcc/

Re: [PATCH] libgccjit Fix a RTL bug for libgccjit

2023-11-20 Thread David Malcolm
On Mon, 2023-11-20 at 16:38 -0700, Jeff Law wrote: > > > On 11/20/23 15:46, David Malcolm wrote: > > On Fri, 2023-11-17 at 14:09 -0700, Jeff Law wrote: > > > > > > > > > On 11/17/23 14:08, Antoni Boucher wrote: > > > > In contrast with the other frontends, libgccjit can be executed > > > > mult

Re: [PATCH] libgccjit Fix a RTL bug for libgccjit

2023-11-20 Thread Jeff Law
On 11/20/23 15:46, David Malcolm wrote: On Fri, 2023-11-17 at 14:09 -0700, Jeff Law wrote: On 11/17/23 14:08, Antoni Boucher wrote: In contrast with the other frontends, libgccjit can be executed multiple times in a row in the same process. Yup.  I'm aware of that.  Even so calling init_e

Re: [PATCH] libgccjit: Add ways to set the personality function

2023-11-20 Thread David Malcolm
On Fri, 2023-11-17 at 17:48 -0500, Antoni Boucher wrote: > Hi. > This adds functions to set the personality function (bug 112603). > > I'm not sure I can make a test for this: it seems the personality > function will not be set if there are no try/catch inside the > functions. > Do you know a way

Re: [PATCH v2 2/6] LoongArch: genopts: Add infrastructure to generate code for new features in ISA evolution

2023-11-20 Thread Joseph Myers
On Sat, 18 Nov 2023, Xi Ruoyao wrote: > diff --git a/gcc/config/loongarch/loongarch-def.h > b/gcc/config/loongarch/loongarch-def.h > index b319cded456..6123c8e0f19 100644 > --- a/gcc/config/loongarch/loongarch-def.h > +++ b/gcc/config/loongarch/loongarch-def.h > @@ -46,6 +46,7 @@ along with GCC;

Re: [PATCH] libgccjit: Add vector permutation and vector access operations

2023-11-20 Thread David Malcolm
On Fri, 2023-11-17 at 17:36 -0500, Antoni Boucher wrote: > Hi. > This patch adds a vector permutation and vector access operations > (bug > 112602). > > This was split from this patch: > https://gcc.gnu.org/pipermail/jit/2023q1/001606.html > Thanks for the patch. Overall, looks good, but 3 mino

Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-20 Thread Bruno Haible
Arsen Arsenović wrote: > Comparing stages 2 and 3 > Bootstrap comparison failure! > gettext/libasprintf/autosprintf.o differs > make[2]: *** [Makefile:23435: compare] Error 1 You should be able to work around this by passing the additional option --disable-libasprintf to gettext-runtime/co

Re: [PATCH] libgccjit Fix a RTL bug for libgccjit

2023-11-20 Thread David Malcolm
On Fri, 2023-11-17 at 14:09 -0700, Jeff Law wrote: > > > On 11/17/23 14:08, Antoni Boucher wrote: > > In contrast with the other frontends, libgccjit can be executed > > multiple times in a row in the same process. > Yup.  I'm aware of that.  Even so calling init_emit_once more than > one > time

Re: [PATCH] RISC-V: testsuite: Do not set default arch for RVV.

2023-11-20 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-11-21 00:26 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH] RISC-V: testsuite: Do not set default arch for RVV. Hi, as per recent discussion and in order to fix inconsistencies betwee

Re: [PATCH] RISC-V: testsuite: Add rv64 requirement for bug-9 and bug-14.

2023-11-20 Thread 钟居哲
/* { dg-do run { target { { {riscv_v} && {rv64} } } } } */ Seems you should remove rv64 here ? sicne I think it is redundant here. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-11-21 00:26 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH]

Re: [PATCH] analyzer: deal with -fshort-enums

2023-11-20 Thread David Malcolm
On Sun, 2023-11-19 at 04:39 -0300, Alexandre Oliva wrote: > > On platforms that enable -fshort-enums by default, various switch- > enum > analyzer tests fail, because apply_constraints_for_gswitch doesn't > expect the integral promotion type cast.  I've arranged for the code > to cope with those c

Re: [PATCH v5] c-family: Implement __has_feature and __has_extension [PR60512]

2023-11-20 Thread Jason Merrill
On 11/17/23 09:50, Alex Coplan wrote: Hi, This is a v5 patch to address Marek's feedback here: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635157.html I also implemented Jason's suggestion to use constexpr for the tables from this review: https://gcc.gnu.org/pipermail/gcc-patches/20

Re: [PATCH] testsuite: analyzer: expect alignment warning with -fshort-enums

2023-11-20 Thread David Malcolm
On Sun, 2023-11-19 at 08:13 -0700, Jeff Law wrote: > > > On 11/19/23 00:36, Alexandre Oliva wrote: > > > > On targets that have -fshort-enums enabled by default, the type > > casts > > in the pr108251 analyzer tests warn that the byte-aligned enums may > > not be sufficiently aligned to be a str

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

2023-11-20 Thread Tamar Christina
Good morning, Here's the respun patch, as discussed we now use reductions and inductions rather than scalar values: This adds support to vectorizable_live_reduction to handle multiple exits by doing a search for which exit the live value should be materialized in. Additinally which value in th

RE: [PATCH 7/21]middle-end: update IV update code to support early breaks and arbitrary exits

2023-11-20 Thread Tamar Christina
> > > > Ok, so I currently have the following solution. Let me know if you > > agree with it and I'll polish it up today and tomorrow and respin things. > > > > 1. During vect_update_ivs_after_vectorizer we no longer touch any PHIs > aside from > > Just updating IVtemps with the expected rema

RE: [PATCH 4/21]middle-end: update loop peeling code to maintain LCSSA form for early breaks

2023-11-20 Thread Tamar Christina
Hi All, Here's the respun patch: This splits the part of the function that does peeling for loops at exits to a different function. In this new function we also peel for early breaks. Peeling for early breaks works by redirecting all early break exits to a single "early break" block and combine

RE: [PATCH]AArch64 docs: update -mcpu=generic definition on aarch64

2023-11-20 Thread Tamar Christina
> -Original Message- > From: Richard Earnshaw > Sent: Monday, November 20, 2023 12:53 PM > To: Tamar Christina ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; Richard Sandiford > > Subject: Re: [PATCH]AArch64 docs: update -mcpu=generic defin

Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-20 Thread David Edelsohn
_GLOBAL__F_xxx is the EH frame data. It's using the filename with full path for the unique name, which is why it includes .._.._.. . Apparently it is adding a random number as well for uniqueness. I guess that this is the downside of building in tree, and apparently it is rebuilding gettext itse

Re: [PATCH] c++: P2280R4, Using unknown refs in constant expr [PR106650]

2023-11-20 Thread Jason Merrill
On 11/17/23 16:46, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This patch is an attempt to implement (part of?) P2280, Using unknown pointers and references in constant expressions. (Note that R4 seems to only allow References to unknown/Accesses v

Re: [PATCH v3 0/2] Replace intl/ with out-of-tree GNU gettext

2023-11-20 Thread Arsen Arsenović
David Edelsohn writes: > On Sun, Nov 19, 2023 at 5:15 PM Bruno Haible wrote: > >> David Edelsohn wrote: >> > --disable-threads currently does not completely disable threads. Bruno >> is >> > suggesting --enable-threads=isoc that relies on mtx mutex functions in >> libc. >> >> Unfortunately, as

Re: [PATCH] RISC-V: testsuite: Fix popcount test.

2023-11-20 Thread Robin Dapp
Mhm, not so obvious after all. We vectorize 250 instances with rv32gcv, 229 with rv64gcv and 250 with rv64gcv_zbb. Will have another look tomorrow. Regards Robin

Re: [PATCH V3 1/7] df: Add DF_LIVE_SUBREG problem

2023-11-20 Thread Richard Sandiford
Lehua Ding writes: > This patch adds a live_subreg problem to extend the original live_reg to > track the liveness of subreg. We will only try to trace speudo registers > who's mode size is a multiple of nature size and eventually a small portion > of the inside will appear to use subreg. With liv

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

2023-11-20 Thread Eli Zaretskii
> Date: Mon, 20 Nov 2023 20:57:38 +0100 > Cc: gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > From: Björn Schäpers > > +#ifndef NOMINMAX > +#define NOMINMAX > +#endif Why is this part needed? Otherwise, LGTM, thanks. (But I'm don't have the approval rights, so please wait for Ian to chime in.)

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

2023-11-20 Thread Björn Schäpers
An updated version, using neither A or W, but just the macro. Am 21.01.2023 um 12:42 schrieb Eli Zaretskii: Date: Sat, 21 Jan 2023 11:47:42 +0100 Cc: g...@hazardy.de, gcc-patches@gcc.gnu.org, g...@gcc.gnu.org From: Gabriel Ravier On 1/21/23 05:05, Eli Zaretskii wrote: Date: Fri, 20 Jan 2023

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-11-20 Thread Björn Schäpers
Hi, this is what I'm using with GCC 12 and 13 on my windows machines, rebased onto the current HEAD. Kind regards, Björn. Am 06.02.2023 um 01:22 schrieb Ian Lance Taylor: On Sun, Feb 5, 2023 at 1:21 AM Björn Schäpers wrote: Am 24.01.2023 um 19:32 schrieb Ian Lance Taylor: On Tue, Jan 24,

Re: [PATCH #2/4] c++: mark short-enums as packed

2023-11-20 Thread Jason Merrill
On 11/19/23 21:33, Alexandre Oliva wrote: Unlike C, C++ doesn't mark enums shortened by -fshort-enums as packed. This makes for undesirable warning differences between C and C++, e.g. c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early*.c triggers a warning about a type cast fro

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

2023-11-20 Thread Florian Weimer
* Eric Gallager: > On Mon, Nov 20, 2023 at 4:58 AM Florian Weimer wrote: >> >> This used to be a warning, enabled by default, without its own option. > > Right, I meant to ask: why create a new option of > -Wdeclaration-missing-parameter-type instead of reusing the existing > -Wmissing-parameter-

[RFC] RISC-V: Support RISC-V Profiles in -march option.

2023-11-20 Thread Jiawei
Supports RISC-V profiles[1] in -march option. Default input set the profile is before other formal extensions. [1]https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc gcc/ChangeLog: * common/config/riscv/riscv-common.cc (struct riscv_profiles): New struct. (

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

2023-11-20 Thread Eric Gallager
On Mon, Nov 20, 2023 at 4:58 AM Florian Weimer wrote: > > This used to be a warning, enabled by default, without its own option. Right, I meant to ask: why create a new option of -Wdeclaration-missing-parameter-type instead of reusing the existing -Wmissing-parameter-type for this? > > A subsequ

Re: [PATCH, v2] Fortran: restrictions on integer arguments to SYSTEM_CLOCK [PR112609]

2023-11-20 Thread Steve Kargl
Harald, Sorry about delayed response. Got side-tracked by Family this weekend. On Sun, Nov 19, 2023 at 09:46:46PM +0100, Harald Anlauf wrote: > > On 11/19/23 01:04, Steve Kargl wrote: > > On Sat, Nov 18, 2023 at 11:12:55PM +0100, Harald Anlauf wrote: > > > Regtested on x86_64-pc-linux-gnu. OK

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
> On Nov 20, 2023, at 17:45, Richard Biener wrote: > > On Mon, Nov 20, 2023 at 2:42 PM Maxim Kuvyrkov > wrote: >> >>> On Nov 20, 2023, at 17:09, Richard Biener >>> wrote: >>> >>> On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov >>> wrote: This patch avoids sched-deps.cc:find_inc()

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

2023-11-20 Thread Dimitar Dimitrov
On Sun, Nov 19, 2023 at 05:47:56PM -0700, Jeff Law wrote: ... > +/* Process uses in INSN. Set appropriate bits in LIVENOW for any chunks of > + pseudos that become live, potentially filtering using bits from LIVE_TMP. > + > + If MODIFIED is true, then optimize sign/zero extensions to SUBREGs w

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

2023-11-20 Thread Richard Sandiford
Jeff Law writes: > This is work originally started by Joern @ Embecosm. > > There's been a long standing sense that we're generating too many > sign/zero extensions on the RISC-V port. REE is useful, but it's really > focused on a relatively narrow part of the extension problem. > > What Joern'

[PATCH] Bump LTO_minor_version

2023-11-20 Thread Martin Jambor
Hi Richi, On Wed, Sep 20 2023, Richard Biener wrote: > The following turns MAX_NUM_CHAINS and MAX_CHAIN_LEN to params which > allows to experiment with raising them. For the testcase in PR111489 > raising MAX_CHAIN_LEN from 5 to 8 avoids the bogus diagnostics > at -O2, at -O3 we need a MAX_CHAIN_

Re: [PATCH 1/2] gcov: Use unshare_expr() in gen_counter_update()

2023-11-20 Thread Dimitar Dimitrov
On Mon, Nov 20, 2023 at 03:33:30PM +0100, Sebastian Huber wrote: > This fixes issues like this: > > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c: In function > 'main': > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c:19:1: error: > incorrect sharing of tree node

Re: Re: RISC-V: Support XTheadVector extensions

2023-11-20 Thread Jason Kridner
Adding Drew and Robert. On Sun, Nov 19, 2023 at 10:04 PM juzhe.zh...@rivai.ai wrote: > As kito's suggestions. I just have a quick try. > > This patch should does following things: > > 1. Remove all new API that RVV1.0 doesn't have. E.g. vlb. > They should be another separate patch to be revi

Re: [committed] libstdc++: Fix aligned formatting of stacktrace_entry and thread::id [PR112564]

2023-11-20 Thread Jonathan Wakely
On Mon, 20 Nov 2023 at 16:18, Hans-Peter Nilsson wrote: > > > From: Jonathan Wakely > > Date: Mon, 20 Nov 2023 11:55:22 + > > > The changelog entry does say "Change compile test to run." > > Wow, it's right there. The doh:est of doh:s on me. Sorry > for wasting your time on that. Heh, no r

Re: libstdc++: Speed up push_back

2023-11-20 Thread Jonathan Wakely
On Mon, 20 Nov 2023 at 15:44, Jan Hubicka wrote: > > > > + // RAII type to destroy initialized elements. > > > > There's only one initialized element, not "elements". > > > > > + struct _Guard_elts > > > + { > > > + pointer _M_first, _M_last; // Elements

[PATCH] RISC-V: testsuite: Fix popcount test.

2023-11-20 Thread Robin Dapp
Hi, since Jakub's recent middle-end changes we vectorize more popcount instances. This patch just adjusts the dump check. Going to commit as obvious once I have figured out why there is a dump difference between my local tester and on the server. Regards Robin gcc/testsuite/ChangeLog:

[RFC PATCH] i386: Fix ICE with -mforce-indirect-call and -fsplit-stack [PR89316]

2023-11-20 Thread Uros Bizjak
With the above two options, use a temporary register regno (as returned from split_stack_prologue_scratch_regno) as an indirect call scratch register to hold __morestack function address. On 64-bit targets, two temporary registers are always available, so load the function address in %r11 and call

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Alexander Monakov
On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > > On Nov 20, 2023, at 17:52, Alexander Monakov wrote: > > > > > > On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > > > >> This patch avoids sched-deps.cc:find_inc() creating exponential number > >> of dependencies, which become memory and compilation

Re: Propagate value ranges of return values

2023-11-20 Thread Martin Jambor
Hi, thanks for working on this. On Sun, Nov 19 2023, Jan Hubicka wrote: > Hi, > this is updated version which also adds testuiste compensation > I lost earlier while maintaining the patch in my testing tree. > There are quite few testcases that use constant return values to hide > something from

[PATCH] RISC-V: testsuite: Add rv64 requirement for bug-9 and bug-14.

2023-11-20 Thread Robin Dapp
Hi, this adds an effective target requirement to compile the tests. Since we disabled 64-bit indices on rv32 targets those tests should be unsupported on rv32. Regards Robin gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/bug-14.C: Add dg-require-effective-target rv64.

[PATCH] RISC-V: testsuite: Do not set default arch for RVV.

2023-11-20 Thread Robin Dapp
Hi, as per recent discussion and in order to fix inconsistencies between spike and qemu this patch removes gcc_march and gcc_mabi arguments from the default CFLAGS in the testsuite invocation for some sub directories. Juzhe reported that this helps for him. Regards Robin gcc/testsuite/ChangeLo

Re: [PATCH 1/1] email: fix bug and patch email addresses

2023-11-20 Thread Xi Ruoyao
On Mon, 2023-11-20 at 11:22 -0500, Ben Boeckel wrote: > Changelog: > > * config-ml.in: Update bug and patch email address. > * symlink-tree: Update bug and patch email address. > --- >  config-ml.in | 4 ++-- >  symlink-tree | 4 ++-- >  2 files changed, 4 insertions(+), 4 deletions(-) >

[PATCH 1/1] gcc-14: document P1689R5 scanning output support

2023-11-20 Thread Ben Boeckel
--- htdocs/gcc-14/changes.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 7278f753..b506eeb1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -112,6 +112,17 @@ a work-in-progress.

[PATCH 1/1] email: fix bug and patch email addresses

2023-11-20 Thread Ben Boeckel
Changelog: * config-ml.in: Update bug and patch email address. * symlink-tree: Update bug and patch email address. --- config-ml.in | 4 ++-- symlink-tree | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config-ml.in b/config-ml.in index 68854a4f16c..107d31

Re: [committed] libstdc++: Fix aligned formatting of stacktrace_entry and thread::id [PR112564]

2023-11-20 Thread Hans-Peter Nilsson
> From: Jonathan Wakely > Date: Mon, 20 Nov 2023 11:55:22 + > The changelog entry does say "Change compile test to run." Wow, it's right there. The doh:est of doh:s on me. Sorry for wasting your time on that. > > PS. Sorry, I have no idea why regarding the underlying multi-target problem

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:50, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 15:39, Richard Earnshaw wrote: On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earn

Re: [PATCH v2[1/5] aarch64: Add cpu feature detection to libgcc

2023-11-20 Thread Richard Sandiford
Andrew Carlotti writes: > This is added to enable function multiversioning, but can also be used > directly. The interface is chosen to match that used in LLVM's > compiler-rt, to facilitate cross-compiler compatibility. > > The content of the patch is derived almost entirely from Pavel's prior >

Re: libstdc++: Speed up push_back

2023-11-20 Thread Jan Hubicka
> > + // RAII type to destroy initialized elements. > > There's only one initialized element, not "elements". > > > + struct _Guard_elts > > + { > > + pointer _M_first, _M_last; // Elements to destroy > > We only need to store one pointer here, call it

Re: [PATCH] c++: for contracts, cdtors never return this

2023-11-20 Thread Jason Merrill
On 11/19/23 02:28, Alexandre Oliva wrote: When targetm.cxx.cdtor_return_this() holds, cdtors have a non-VOID_TYPE_P result, but IMHO this ABI implementation detail shouldn't leak to the abstract language conceptual framework, in which cdtors don't have return values. For contracts, specifically

Re: [PATCH] call maybe_return_this in build_clone

2023-11-20 Thread Jason Merrill
On 11/19/23 02:38, Alexandre Oliva wrote: __dt_base doesn't get its body from a maybe_return_this caller, it's rather cloned with the full body within build_clone, and then it's left alone, without going through finish_function_body or build_delete_destructor_body, that call maybe_return_this.

Re: Propagate value ranges of return values

2023-11-20 Thread Jan Hubicka
> > On 11/18/23 20:21, Jan Hubicka wrote: > > Hi, > > this patch implements very basic propaation of return value ranges from VRP > > pass. This helps std::vector's push_back since we work out value range of > > allocated block. This propagates only within single translation unit. I > > hoped

GCC/Rust libgrust-v2/to-submit branch (was: [PATCH 2/3] build: Add libgrust as compilation modules)

2023-11-20 Thread Thomas Schwinge
Hi! Arthur and Pierre-Emmanuel have prepared a GCC/Rust libgrust-v2/to-submit branch: . In that one, most of the issues raised have been addressed, and which I've now successfully "tested" in my different GCC configurations, requiring j

Re: [PATCH] c: Add __builtin_stdc_bit_{width,floor,ceil} builtins

2023-11-20 Thread Joseph Myers
On Sat, 18 Nov 2023, Jakub Jelinek wrote: > +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})} > +The @code{__builtin_stdc_bit_ceil} function is available only > +in C. It is type-generic, the argument can be any unsigned integer > +(standard, extended or bit-precise). No in

Re: [PATCH 1/2] gcov: Use unshare_expr() in gen_counter_update()

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 3:34 PM Sebastian Huber wrote: > > This fixes issues like this: > > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c: In function > 'main': > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c:19:1: error: > incorrect sharing of tree nodes > __

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 15:39, Richard Earnshaw wrote: > > > > On 20/11/2023 14:24, Christophe Lyon wrote: > > On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 20/11/2023 13:36, Christophe Lyon wrote: > >>> On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw > >>> wrote

Re: Propagate value ranges of return values

2023-11-20 Thread Andrew MacLeod
On 11/18/23 20:21, Jan Hubicka wrote: Hi, this patch implements very basic propaation of return value ranges from VRP pass. This helps std::vector's push_back since we work out value range of allocated block. This propagates only within single translation unit. I hoped we will also do the pr

[PATCH v2] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
This patch avoids sched-deps.cc:find_inc() creating exponential number of dependencies, which become memory and compilation time hogs. Consider example (simplified from PR96388) ... === sp=sp-4 // sp_insnA mem_insnA1[sp+A1] ... mem_insnAN[sp+AN] sp=sp-4 // sp_insnB mem_insnB1[sp+B1] ... mem_insnBM[

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:39, Richard Earnshaw wrote: On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wr

Re: [PATCH] Fortran: fix reallocation on assignment of polymorphic variables [PR110415]

2023-11-20 Thread Tobias Burnus
Hi Andrew, On 20.11.23 14:56, Andrew Jenner wrote: This patch adds the testcase from PR110415 and fixes the bug. Thanks. I can confirm experimentally that it fixes the original PR. However, if I extend the original testcase (-2), it fails with run with valgrind or when run with -fsanitize=a

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
> On Nov 20, 2023, at 17:52, Alexander Monakov wrote: > > > On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > >> This patch avoids sched-deps.cc:find_inc() creating exponential number >> of dependencies, which become memory and compilation time hogs. >> Consider example (simplified from PR96388) ...

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:28,

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

2023-11-20 Thread Jason Merrill
On 11/19/23 16:44, waffl3x wrote: On Sunday, November 19th, 2023 at 1:34 PM, Jason Merrill wrote: On 11/19/23 13:36, waffl3x wrote: I'm having trouble fixing the error for this case, the control flow when the functions are overloaded is much more complex. struct S { void f(this S&)

[PATCH 1/2] gcov: Use unshare_expr() in gen_counter_update()

2023-11-20 Thread Sebastian Huber
This fixes issues like this: gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c: In function 'main': gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c:19:1: error: incorrect sharing of tree nodes __gcov0.main[0] # .MEM_12 = VDEF <.MEM_9> __gcov0.main[0] = PROF_edge

[PATCH 2/2] gcov: Fix integer types in gen_counter_update()

2023-11-20 Thread Sebastian Huber
This change fixes issues like this: gcc.dg/gomp/pr27573.c: In function ‘main._omp_fn.0’: gcc.dg/gomp/pr27573.c:19:1: error: non-trivial conversion in ‘ssa_name’ 19 | } | ^ long int long unsigned int # .MEM_19 = VDEF <.MEM_18> __gcov7.main._omp_fn.0[0] = PROF_time_profile_1

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: > > > > On 20/11/2023 13:36, Christophe Lyon wrote: > > On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 20/11/2023 10:23, Christophe Lyon wrote: > >>> Hi Richard, > >>> > >>> On Mon, 13 Nov 2023 at 15:28, Richa

Re: [pushed] wwwdocs: *: Remove unused buildstat pages

2023-11-20 Thread Jonathan Wakely
On Mon, 20 Nov 2023 at 08:42, Thomas Schwinge wrote: > > Hi! > > On 2023-10-15T23:42:39+0200, Gerald Pfeifer wrote: > > [ Release managers, heads-up for when you branch future releases! ] > > > For GCC 9 to GCC 13 the per-release series buildstat pages have not > > been populated at all, so remov

[PATCH] middle-end/112622 - convert and vector-to-float

2023-11-20 Thread Richard Biener
The following avoids ICEing when trying to convert a vector to a scalar float. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/112622 * convert.cc (convert_to_real_1): Use element_precision where a vector type might appear. Provide specific

[PATCH] tree-optimization/112281 - loop distribution and zero dependence distances

2023-11-20 Thread Richard Biener
The following fixes an omission in dependence testing for loop distribution. When the overall dependence distance is not zero but the dependence direction in the innermost common loop is = there is a conflict between the partitions and we have to merge them. Bootstrapped and tested on x86_64-unkn

[PATCH] tree-optimization/112618 - unused .MASK_CALL

2023-11-20 Thread Richard Biener
We have to make sure to remove unused .MASK_CALL internal function calls after vectorization. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112618 * tree-vect-loop.cc (vect_transform_loop_stmt): For not relevant and unused .MASK_CALL mak

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: A number of tests in the gcc testsuite, especially for arm-specific targets

Re: [PATCH v4] Introduce hardbool attribute for C

2023-11-20 Thread Richard Biener
On Mon, 20 Nov 2023, Alexandre Oliva wrote: > On Oct 20, 2023, Alexandre Oliva wrote: > > > Here's a refreshed and retested version of the patch for hardened > > booleans in C. It is unchanged aside from some conflict resolution, > > compared with the previous version posted back in June. > > h

Re: [PATCH v3] Introduce -finline-stringops

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 1:51 PM Alexandre Oliva wrote: > > On Sep 23, 2023, Alexandre Oliva wrote: > > > On Sep 21, 2023, Alexandre Oliva wrote: > >> On Sep 15, 2023, Alexandre Oliva wrote: > >>> On Jun 22, 2023, Alexandre Oliva wrote: > On Jun 2, 2023, Alexandre Oliva wrote: > > In

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Alexander Monakov
On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > This patch avoids sched-deps.cc:find_inc() creating exponential number > of dependencies, which become memory and compilation time hogs. > Consider example (simplified from PR96388) ... > === > sp=sp-4 // sp_insnA > mem_insnA1[sp+A1] > ... > mem_insnA

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 2:42 PM Maxim Kuvyrkov wrote: > > > On Nov 20, 2023, at 17:09, Richard Biener > > wrote: > > > > On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov > > wrote: > >> > >> This patch avoids sched-deps.cc:find_inc() creating exponential number > >> of dependencies, which become

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
> On Nov 20, 2023, at 17:09, Richard Biener wrote: > > On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov > wrote: >> >> This patch avoids sched-deps.cc:find_inc() creating exponential number >> of dependencies, which become memory and compilation time hogs. >> Consider example (simplified from PR9

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: > > > > On 20/11/2023 10:23, Christophe Lyon wrote: > > Hi Richard, > > > > On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: > >> > >> > >> A number of tests in the gcc testsuite, especially for arm-specific > >> targets, add various flag

[PATCH 1/1] gcc-14: document P1689R5 scanning output support

2023-11-20 Thread Ben Boeckel
--- htdocs/gcc-14/changes.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 7278f753..b506eeb1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -112,6 +112,17 @@ a work-in-progress.

Re: [BUG FIX] RISC-V: Fix intermediate mode on slide1 instruction for SEW64 on RV32

2023-11-20 Thread Robin Dapp
LGTM. I prefer that over the iterator. Regards Robin

  1   2   >