[PATCH v3] btf: Add support to BTF_KIND_ENUM64 type

2022-10-14 Thread Guillermo E. Martinez via Gcc-patches
Hello, The following is patch v3 to update BTF/CTF backend supporting BTF_KIND_ENUM64 type. Changes from v2: + Add a new `dtd_enum_unsigned' field in `ctf_dtdef' to indicate signedness of the enum type. + Fix endianness for representing BTF enum 64-bits enumerators. + Add {little,big}-e

Re: [PATCH v2] btf: Add support to BTF_KIND_ENUM64 type

2022-10-14 Thread Guillermo E. Martinez via Gcc-patches
On 10/11/22 13:55, Indu Bhagat wrote: Hi Guillermo, Hi Indu, On 10/3/22 7:39 AM, Guillermo E. Martinez via Gcc-patches wrote: diff --git a/gcc/ctfc.cc b/gcc/ctfc.cc index 9773358a475..253c36b6a0a 100644 --- a/gcc/ctfc.cc +++ b/gcc/ctfc.cc @@ -604,6 +604,7 @@ ctf_add_enum (ctf_container_r

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-14 Thread Palmer Dabbelt
On Fri, 14 Oct 2022 14:57:22 PDT (-0700), Palmer Dabbelt wrote: On Fri, 14 Oct 2022 13:39:33 PDT (-0700), jeffreya...@gmail.com wrote: On 10/14/22 05:03, Christoph Müllner wrote: My guess is people like the ISA mapping (more) because it has been documented and reviewed. And it is the product

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 15:21, Koning, Paul wrote: On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches wrote: On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substit

[committed] preprocessor: C2x identifier rules

2022-10-14 Thread Joseph Myers
C2x has, like C++, adopted rules for identifiers based directly on an unversioned normative reference to Unicode. Make libcpp follow those rules for c2x / gnu2x standards (this involves bringing back a flag separate from the C++ one for whether to use these identifier rules, but this time enabled

[PATCH] RISC-V: Reorganize mangle_builtin_type.[NFC]

2022-10-14 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, this patch fixed my mistake in the previous commit patch. Since "mangle_builtin_type" is a global function will be called in riscv.cc. It's reasonable move it down and put them together stay with other global functions. gcc/ChangeLog: * config/riscv/riscv-vector-

Re: [PATCH v2] RISC-V: Implement __clear_cache via __builtin___clear_cache

2022-10-14 Thread Palmer Dabbelt
On Fri, 14 Oct 2022 12:56:48 PDT (-0700), Palmer Dabbelt wrote: We have had an implementation of __builtin___clear_cache since the beginning, but didn't have the cooresponding __clear_cache library routine implemented. This directly conflicts the GCC manual in a handful of places, which indicate

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-14 Thread Palmer Dabbelt
On Fri, 14 Oct 2022 13:39:33 PDT (-0700), jeffreya...@gmail.com wrote: On 10/14/22 05:03, Christoph Müllner wrote: My guess is people like the ISA mapping (more) because it has been documented and reviewed. And it is the product of a working group that worked out the RVWMO specification. Thi

[PATCH v2] RISC-V: Implement __clear_cache via __builtin___clear_cache

2022-10-14 Thread Palmer Dabbelt
We have had an implementation of __builtin___clear_cache since the beginning, but didn't have the cooresponding __clear_cache library routine implemented. This directly conflicts the GCC manual in a handful of places, which indicates that __clear_cache should work and that __builtin_clear_cache sh

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 15:21, Koning, Paul wrote: On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches wrote: On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substit

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 5:15 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 11:36, Koning, Paul wrote: >> >>> On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: >>> >>> On 10/14/22 10:37, Koning, Paul wrote: > ... > But that approach falls down with reload/lra doing substitutions

Re: [PATCH] middle-end IFN_ASSUME support [PR106654]

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 10:43:16PM +0200, Martin Uecker wrote: > Am Montag, den 10.10.2022, 10:54 +0200 schrieb Jakub Jelinek: > > Hi! > > > > My earlier patches gimplify the simplest non-side-effects assumptions > > into if (cond) ; else __builtin_unreachable (); and throw the rest > > on the flo

[Patch] Fortran: Fixes for kind=4 characters strings [PR107266]

2022-10-14 Thread Tobias Burnus
Long introduction - but the patch is rather simple: Don't use kind=1 as type where kind=4 should be used. Long introduction + background, feel free to skip. This popped up for libgomp/testsuite/libgomp.fortran/struct-elem-map-1.f90 which uses kind=4 characters –

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 11:36, Koning, Paul wrote: On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: On 10/14/22 10:37, Koning, Paul wrote: ... But that approach falls down with reload/lra doing substitutions without validating the result. I guess it might be possible to cobble together something with s

Re: [PATCH] Add new target hook: simplify_modecc_const.

2022-10-14 Thread H.J. Lu via Gcc-patches
On Fri, Oct 14, 2022 at 1:32 PM Jeff Law via Gcc-patches wrote: > > > On 10/10/22 09:50, H.J. Lu via Gcc-patches wrote: > > On Thu, Jul 28, 2022 at 5:40 AM Richard Sandiford via Gcc-patches > > wrote: > >> Seems this thread has become a bit heated, so I'll try to proceed > >> with caution :-) > >

Re: [PATCH] middle-end IFN_ASSUME support [PR106654]

2022-10-14 Thread Martin Uecker via Gcc-patches
Am Montag, den 10.10.2022, 10:54 +0200 schrieb Jakub Jelinek: > Hi! > > My earlier patches gimplify the simplest non-side-effects assumptions > into if (cond) ; else __builtin_unreachable (); and throw the rest > on the floor. > The following patch attempts to do something with the rest too. My r

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 4:12 PM, Segher Boessenkool > wrote: > > On Fri, Oct 14, 2022 at 07:58:39PM +, Koning, Paul wrote: >>> On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches >>> wrote: >>> On 10/14/22 11:35, Segher Boessenkool wrote: On Fri, Oct 14, 2022 at 11:07:43AM -0600, J

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 05:03, Christoph Müllner wrote: My guess is people like the ISA mapping (more) because it has been documented and reviewed. And it is the product of a working group that worked out the RVWMO specification. This gives some confidence that we don't need to rework it massively beca

Re: [PATCH] Add new target hook: simplify_modecc_const.

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/10/22 09:50, H.J. Lu via Gcc-patches wrote: On Thu, Jul 28, 2022 at 5:40 AM Richard Sandiford via Gcc-patches wrote: Seems this thread has become a bit heated, so I'll try to proceed with caution :-) In the below, I'll use "X-mode const_int" to mean "a const_int that is known from cont

Re: [PATCH] Add new target hook: simplify_modecc_const.

2022-10-14 Thread Jeff Law via Gcc-patches
On 7/26/22 11:44, Segher Boessenkool wrote: Hi! On Tue, Jul 26, 2022 at 01:13:02PM +0100, Roger Sayle wrote: This patch is a major revision of the patch I originally proposed here: https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598040.html The primary motivation of this patch is to avoi

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 07:58:39PM +, Koning, Paul wrote: > > On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches > > wrote: > > On 10/14/22 11:35, Segher Boessenkool wrote: > >> On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: > LRA only ever generates insns that pass recog.

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 2:03 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 11:35, Segher Boessenkool wrote: >> On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: LRA only ever generates insns that pass recog. The backend allows this define_insn, requiring it to be s

Re: [PATCH] Fortran: fix check of polymorphic elements in data transfers [PR100971]

2022-10-14 Thread Mikael Morin
Le 09/10/2022 à 20:57, Harald Anlauf via Fortran a écrit : Dear all, the check of data transfer elements needs to verify that for polymorphic objects there is a user defined DTIO procedure. This check worked fine for scalars, but skipped arrays, leading to an ICE later. The obvious fix is to al

Re: Ping: [PATCH] elf: ELF toolchain --without-{headers, newlib} should provide stdint.h

2022-10-14 Thread Arsen Arsenović via Gcc-patches
On Tuesday, 11 October 2022 08:47:32 CEST Richard Biener wrote: > OK. Thanks for the review. I don't have push rights currently, so could you push this for me? Have a good evening, -- Arsen Arsenović signature.asc Description: This is a digitally signed message part.

Re: [PATCH] middle-end, v3: IFN_ASSUME support [PR106654]

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 11:27:07AM +, Richard Biener wrote: > > --- gcc/function.h.jj 2022-10-10 11:57:40.163722972 +0200 > > +++ gcc/function.h 2022-10-12 19:48:28.887554771 +0200 > > @@ -438,6 +438,10 @@ struct GTY(()) function { > > > >/* Set if there are any OMP_TARGET regions

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 11:35, Segher Boessenkool wrote: On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: LRA only ever generates insns that pass recog. The backend allows this define_insn, requiring it to be split (it returns template "#"), but then somehow it doesn't match in any split pass?

Re: [PATCH] libgcc: Move cfa_how into potential padding in struct frame_state_reg_info

2022-10-14 Thread Richard Sandiford via Gcc-patches
Florian Weimer via Gcc-patches writes: > On many architectures, there is a padding gap after the how array > member, and cfa_how can be moved there. This reduces the size of the > struct and the amount of memory that uw_frame_state_for has to clear. > > There is no measurable performance benefit

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 1:10 PM, Jeff Law wrote: > > On 10/14/22 10:37, Koning, Paul wrote: >> >>> ... >>> But that approach falls down with reload/lra doing substitutions without >>> validating the result. I guess it might be possible to cobble together >>> something with secondary reloads,

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 11:07:43AM -0600, Jeff Law wrote: > >LRA only ever generates insns that pass recog. The backend allows this > >define_insn, requiring it to be split (it returns template "#"), but > >then somehow it doesn't match in any split pass? > > Nope.  The elimination code will just

Re: [PATCH 2/2] ipa-cp: Better representation of aggregate values in call contexts

2022-10-14 Thread Jan Hubicka via Gcc-patches
> > 2022-08-26 Martin Jambor > > * ipa-prop.h (ipa_agg_value): Remove type. > (ipa_agg_value_set): Likewise. > (ipa_copy_agg_values): Remove function. > (ipa_release_agg_values): Likewise. > (ipa_auto_call_arg_values) Add a forward declaration. > (ipa_call_a

Re: [PATCH 1/2] ipa-cp: Better representation of aggregate values we clone for

2022-10-14 Thread Jan Hubicka via Gcc-patches
> gcc/ChangeLog: > > 2022-08-26 Martin Jambor > > * ipa-prop.h (IPA_PROP_ARG_INDEX_LIMIT_BITS): New. > (ipcp_transformation): Added forward declaration. > (ipa_argagg_value): New type. > (ipa_argagg_value_list): New type. > (ipa_agg_replacement_value): Removed typ

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:39, Richard Biener wrote: Am 14.10.2022 um 16:40 schrieb Jeff Law via Gcc-patches :  On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:37, Koning, Paul wrote: On Oct 14, 2022, at 10:38 AM, Jeff Law via Gcc-patches wrote: On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 10:37, Segher Boessenkool wrote: Hi! On Thu, Oct 13, 2022 at 10:47:20PM -0600, Jeff Law wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc

[PATCH] libgomp: fix hang on fatal error

2022-10-14 Thread Andrew Stubbs
This patch fixes a problem in which fatal errors inside mutex-locked regions (i.e. basically anything in the plugin) will cause it to hang up trying to take the lock to clean everything up. Using abort() instead of exit(1) bypasses the atexit handlers and solves the problem. OK for mainline?

[PATCH] c++ modules: streaming constexpr_fundef [PR101449]

2022-10-14 Thread Patrick Palka via Gcc-patches
IIUC we currently avoid streaming the RESULT_DECL and PARM_DECLs of a constexpr_fundef entry under the assumption that they're just copies of the DECL_RESULT and DECL_ARGUMENTS of the FUNCTION_DECL. Thus we can just make new copies of DECL_RESULT and DECL_ARGUMENTs on stream in rather than separate

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 12:18 PM, Segher Boessenkool > wrote: > > On Fri, Oct 14, 2022 at 12:36:47AM +, Koning, Paul wrote: >> I guess I'll have to look harder to see if it's possible to make LRA handle >> CISC addressing modes like memory indirect, autoincrement, autodecrement, >> and ot

[PATCH] libgcc: Move cfa_how into potential padding in struct frame_state_reg_info

2022-10-14 Thread Florian Weimer via Gcc-patches
On many architectures, there is a padding gap after the how array member, and cfa_how can be moved there. This reduces the size of the struct and the amount of memory that uw_frame_state_for has to clear. There is no measurable performance benefit from this on x86-64 (even though the memset goes

Re: [PATCH] Always enable LRA

2022-10-14 Thread Richard Biener via Gcc-patches
> Am 14.10.2022 um 16:40 schrieb Jeff Law via Gcc-patches > : > >  >> On 10/14/22 06:37, Koning, Paul wrote: >> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: >>> >>> >>> On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/se

[committed] gfortran.dg/c-interop/deferred-character-2.f90: Fix dg-do

2022-10-14 Thread Tobias Burnus
Just spotted this. It did only compile instead of also run and was the only occurrence I could find for 'dg-.*execute'. Committed as https://gcc.gnu.org/r13-3306 Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit besc

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
Hi! On Thu, Oct 13, 2022 at 10:47:20PM -0600, Jeff Law wrote: > On 10/13/22 17:56, Segher Boessenkool wrote: > >h8300 fails during GCC build: > >/home/segher/src/gcc/libgcc/unwind.inc: In function > >'_Unwind_SjLj_RaiseException': > >/home/segher/src/gcc/libgcc/unwind.inc:141:1: error: could not

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 14, 2022, at 10:38 AM, Jeff Law via Gcc-patches > wrote: > > > On 10/14/22 06:37, Koning, Paul wrote: >> >>> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches >>> wrote: >>> >>> >>> On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/s

Re: [PATCH Rust front-end v2 33/37] gccrs: add lang-spec.h

2022-10-14 Thread Iain Buclaw via Gcc-patches
Excerpts from herron.phi...@googlemail.com's message of August 24, 2022 1:59 pm: > From: Philip Herron > > This specifies the extensions of the Rust language. > --- > gcc/rust/lang-specs.h | 26 ++ > 1 file changed, 26 insertions(+) > create mode 100644 gcc/rust/lang-spe

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 03:20:40PM +0900, Takayuki 'January June' Suwa wrote: > On 2022/10/14 8:56, Segher Boessenkool wrote: > > And finally, xtensa does > > /home/segher/src/gcc/libgcc/libgcc2.c:840:1: error: insn does not satisfy > > its constraints: > > 840 | } > > | ^ > > (insn 8 7 9

Re: [PATCH] Always enable LRA

2022-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2022 at 12:36:47AM +, Koning, Paul wrote: > I guess I'll have to look harder to see if it's possible to make LRA handle > CISC addressing modes like memory indirect, autoincrement, autodecrement, and > others that the old reload handles at least somewhat. Ideally LRA should d

Re: [PATCH] Implement range-op entry for __builtin_copysign.

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 05:08:51PM +0200, Aldy Hernandez wrote: > [Jakub, while we're on the subject of signed zeros and copysign, does > this look OK to you?] > > copysign(MAGNITUDE, SIGN) is implemented as the absolute of MAGNITUDE, > with SIGN applied. If the sign of "SIGN" cannot be determine

Re: [PATCH v2] c++: parser - Support for target address spaces in C++

2022-10-14 Thread Jason Merrill via Gcc-patches
On 10/13/22 17:57, Paul Iannetta wrote: On Thu, Oct 13, 2022 at 03:41:16PM -0400, Jason Merrill wrote: On 10/13/22 12:02, Paul Iannetta wrote: On Thu, Oct 13, 2022 at 11:47:42AM -0400, Jason Merrill wrote: On 10/13/22 11:23, Paul Iannetta wrote: On Thu, Oct 13, 2022 at 11:02:24AM -0400, Jason

Re: Handling of main() function for freestanding

2022-10-14 Thread Jason Merrill via Gcc-patches
On 10/14/22 06:04, Arsen Arsenović wrote: On Thursday, 13 October 2022 23:16:02 CEST Jason Merrill wrote: I liked in the previous version that you checked the return type of main when !flag_hosted, here and in c_missing_noreturn_ok_p. Let's bring that back. Ah, right; I forgot about that. Wha

[PATCH] Implement range-op entry for __builtin_copysign.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
[Jakub, while we're on the subject of signed zeros and copysign, does this look OK to you?] copysign(MAGNITUDE, SIGN) is implemented as the absolute of MAGNITUDE, with SIGN applied. If the sign of "SIGN" cannot be determined, we return a range of [-MAGNITUDE, +MAGNITUDE]. gcc/ChangeLog:

Re: [COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 14, 2022 at 5:00 PM Jakub Jelinek wrote: > > On Fri, Oct 14, 2022 at 04:53:13PM +0200, Aldy Hernandez wrote: > > > This looks wrong to me. > > > !HONOR_NANS is different from !HONOR_SIGNED_ZEROS. > > > The former says that either NaNs aren't supported or if they appear, > > > it will b

Re: [COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS.

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 04:53:13PM +0200, Aldy Hernandez wrote: > > This looks wrong to me. > > !HONOR_NANS is different from !HONOR_SIGNED_ZEROS. > > The former says that either NaNs aren't supported or if they appear, > > it will be UB. > > The latter says that either -0.0 doesn't exist, or user

Re: [COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 14, 2022 at 4:33 PM Jakub Jelinek wrote: > > On Fri, Oct 14, 2022 at 04:26:50PM +0200, Aldy Hernandez via Gcc-patches > wrote: > > Similar to what we do for NANs when !HONOR_NANS and Inf when > > flag_finite_math_only, we can remove -0.0 from the range at creation > > time. > > > > We

Re: [PATCH] Always enable LRA

2022-10-14 Thread Jeff Law via Gcc-patches
On 10/14/22 06:37, Koning, Paul wrote: On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches wrote: On 10/13/22 17:56, Segher Boessenkool wrote: h8300 fails during GCC build: /home/segher/src/gcc/libgcc/unwind.inc: In function '_Unwind_SjLj_RaiseException': /home/segher/src/gcc/libgcc/u

Re: [PATCH] Check rvc_normal in real_isdenormal.

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 04:30:47PM +0200, Aldy Hernandez wrote: > [Jakub, thanks for pointing this out. OK?] > > [-Inf, -Inf] is being flushed to [-Inf, -0.0] because real_isdenormal > is being overly pessimistic. It is missing a check for rvc_normal. > This doesn't cause problems in real.cc bec

[committed] libstdc++: Disable all emergency EH pool code if obj-count == 0

2022-10-14 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- For a zero-sized static pool we can completely elide all code for the EH pool. We no longer need to adjust the static buffer size to ensure at least one free_entry can be created in it, because we no longer use a static buffer at all if obj_count ==

[committed] libstdc++: Simplify print_raw function for debug assertions

2022-10-14 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Replace two uses of print_raw where it's clearer to just use fprintf directly. Then the only remaining use of print_raw is as the print_func argument of pretty_print. When called by pretty_print the count is either a positive integer or -1, so w

Re: [COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS.

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 04:26:50PM +0200, Aldy Hernandez via Gcc-patches wrote: > Similar to what we do for NANs when !HONOR_NANS and Inf when > flag_finite_math_only, we can remove -0.0 from the range at creation > time. > > We were kinda sorta doing this because there is a bug in > real_isdenorm

[PATCH] Check rvc_normal in real_isdenormal.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
[Jakub, thanks for pointing this out. OK?] [-Inf, -Inf] is being flushed to [-Inf, -0.0] because real_isdenormal is being overly pessimistic. It is missing a check for rvc_normal. This doesn't cause problems in real.cc because all uses of real_isdenormal are already on the rvc_normal path. The

[COMMITTED] Replace CFN_BUILTIN_SIGNBIT* cases with CASE_FLT_FN.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * gimple-range-op.cc (gimple_range_op_handler::maybe_builtin_call): Replace CFN_BUILTIN_SIGNBIT* cases with CASE_FLT_FN. --- gcc/gimple-range-op.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-ran

[COMMITTED] Drop -0.0 in frange::set() for !HONOR_SIGNED_ZEROS.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
Similar to what we do for NANs when !HONOR_NANS and Inf when flag_finite_math_only, we can remove -0.0 from the range at creation time. We were kinda sorta doing this because there is a bug in real_isdenormal that is causing flush_denormals_to_zero to saturate [x, -0.0] to [x, +0.0] when !HONOR_SI

[COMMITTED] Normalize ranges over the range for both bounds when -ffinite-math-only.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
[-Inf, +Inf] was being chopped correctly for -ffinite-math-only, but [-Inf, -Inf] was not. This was latent because a bug in real_isdenormal is causing us to flush -Inf to zero. gcc/ChangeLog: * value-range.cc (frange::set): Normalize ranges for both bounds. --- gcc/value-range.cc | 4 ++

Re: [COMMITTED] Add cases for CFN_BUILT_IN_SIGNBIT[FL].

2022-10-14 Thread Aldy Hernandez via Gcc-patches
Done. Thanks. Aldy On Fri, Oct 14, 2022 at 12:17 PM Jakub Jelinek wrote: > > On Fri, Oct 14, 2022 at 12:03:16PM +0200, Aldy Hernandez via Gcc-patches > wrote: > > gcc/ChangeLog: > > > > * gimple-range-op.cc > > (gimple_range_op_handler::maybe_builtin_call): Add > > CFN_BUILT_I

Re: [RFC] Add support for vectors in comparisons (like the C++ frontend does)

2022-10-14 Thread Paul Iannetta via Gcc-patches
On Wed, Oct 12, 2022 at 01:18:19AM +0200, Paul Iannetta wrote: > On Mon, Oct 10, 2022 at 11:07:06PM +, Joseph Myers wrote: > > On Mon, 10 Oct 2022, Paul Iannetta via Gcc-patches wrote: > > > > > I have a patch to bring this feature to the C front-end as well, and > > > would like to hear your

[PATCH] [og12] OpenACC: Don't gang-privatize artificial variables

2022-10-14 Thread Julian Brown
This patch prevents compiler-generated artificial variables from being treated as privatization candidates for OpenACC. The rationale is that e.g. "gang-private" variables actually must be shared by each worker and vector spawned within a particular gang, but that sharing is not necessary for any

[PATCH] [og12] amdgcn: Use FLAT addressing for all functions with pointer arguments

2022-10-14 Thread Julian Brown
The GCN backend uses a heuristic to determine whether to use FLAT or GLOBAL addressing in a particular (offload) function: namely, if a function takes a pointer-to-scalar parameter, it is assumed that the pointer may refer to "flat scratch" space, and thus FLAT addressing must be used instead of GL

Re: [PATCH] Always enable LRA

2022-10-14 Thread Koning, Paul via Gcc-patches
> On Oct 13, 2022, at 9:07 PM, Jeff Law via Gcc-patches > wrote: > > > On 10/13/22 17:56, Segher Boessenkool wrote: >> >> h8300 fails during GCC build: >> /home/segher/src/gcc/libgcc/unwind.inc: In function >> '_Unwind_SjLj_RaiseException': >> /home/segher/src/gcc/libgcc/unwind.inc:141:1:

Re: [PATCH] 16/19 modula2 front end: bootstrap and documentation tools

2022-10-14 Thread Gaius Mulley via Gcc-patches
Martin Liška writes: >> This patch set contains the bootstrap linking tool as well as python3 >> scripts to automatically generate texi libraries section of the gm2 >> documentation. In the fullness of time this will be changed to emit >> sphinx. > > Yep, looking forward to it. I'm going to writ

Re: [PATCH] c++ modules: ICE with templated friend and std namespace [PR100134]

2022-10-14 Thread Nathan Sidwell via Gcc-patches
On 10/13/22 11:27, Jason Merrill wrote: On 10/11/22 13:40, Nathan Sidwell wrote: On 10/11/22 11:35, Patrick Palka wrote: IIUC the function depset::hash::add_binding_entity has an assert verifying that if a namespace contains an exported entity, then the namespace must have been opened in the mo

Re: [PATCH] Fix bogus -Wstringop-overflow warning

2022-10-14 Thread Martin Jambor
Hello, On Fri, Oct 14 2022, Martin Liška wrote: > On 10/14/22 08:12, Richard Biener wrote: >> On Fri, Oct 14, 2022 at 12:54 AM Eric Botcazou via Gcc-patches >> wrote: >>> Not a fan as it could potentially hide a real issue, but I don't really have a better solution. >>> >>> Thanks. >>>

Re: [PATCH] middle-end, v3: IFN_ASSUME support [PR106654]

2022-10-14 Thread Richard Biener via Gcc-patches
On Thu, 13 Oct 2022, Jakub Jelinek wrote: > On Wed, Oct 12, 2022 at 11:48:27AM -0400, Jason Merrill wrote: > > > --- gcc/cp/pt.cc.jj 2022-10-10 09:31:21.947480379 +0200 > > > +++ gcc/cp/pt.cc 2022-10-10 09:59:49.299646482 +0200 > > > @@ -21105,6 +21105,8 @@ tsubst_copy_and_build (tree t, >

Re: [PATCH] c++ modules: ICE with dynamic_cast [PR106304]

2022-10-14 Thread Nathan Sidwell via Gcc-patches
On 10/13/22 15:04, Patrick Palka wrote: The FUNCTION_DECL we build for __dynamic_cast has an empty DECL_CONTEXT, but trees_out::tree_node expects all FUNCTION_DECLs to have non-empty DECL_CONTEXT thus we crash when streaming out the dynamic_cast in the below testcase. This patch naively fixes th

Re: [PATCH v2 00/10] [RISC-V] Atomics improvements [PR100265/PR100266]

2022-10-14 Thread Christoph Müllner via Gcc-patches
On Fri, Oct 14, 2022 at 1:15 AM Palmer Dabbelt wrote: > On Thu, 13 Oct 2022 15:39:39 PDT (-0700), gcc-patches@gcc.gnu.org wrote: > > > > On 10/11/22 17:31, Vineet Gupta wrote: > >> > >>> > >>> I expect that the pressure for a proper fix upstream (instead of a > >>> backward compatible compromise)

Re: [PATCH] Fix bogus -Wstringop-overflow warning

2022-10-14 Thread Martin Liška
On 10/14/22 08:12, Richard Biener wrote: > On Fri, Oct 14, 2022 at 12:54 AM Eric Botcazou via Gcc-patches > wrote: >> >>> Not a fan as it could potentially hide a real issue, but I don't really >>> have a better solution. >> >> Thanks. >> >>> I pondered suggesting "access" affect type identity, bu

Re: [COMMITTED] Add cases for CFN_BUILT_IN_SIGNBIT[FL].

2022-10-14 Thread Jakub Jelinek via Gcc-patches
On Fri, Oct 14, 2022 at 12:03:16PM +0200, Aldy Hernandez via Gcc-patches wrote: > gcc/ChangeLog: > > * gimple-range-op.cc > (gimple_range_op_handler::maybe_builtin_call): Add > CFN_BUILT_IN_SIGNBIT[FL]* entries. > --- > gcc/gimple-range-op.cc | 2 ++ > 1 file changed, 2 insertio

Re: [PATCH 1/2] gcov: test switch/break line counts

2022-10-14 Thread Jørgen Kvalsvik via Gcc-patches
On 13/10/2022 13:39, Richard Biener wrote: > On Tue, Oct 11, 2022 at 2:43 PM Jørgen Kvalsvik > wrote: >> >> The coverage support will under some conditions decide to split edges to >> accurately report coverage. By running the test suite with/without this >> edge splitting a small diff shows up, a

Re: Handling of main() function for freestanding

2022-10-14 Thread Arsen Arsenović via Gcc-patches
On Thursday, 13 October 2022 23:16:02 CEST Jason Merrill wrote: > I liked in the previous version that you checked the return type of > main when !flag_hosted, here and in c_missing_noreturn_ok_p. Let's > bring that back. Ah, right; I forgot about that. What do you think of this? Thanks, -- A

[COMMITTED] Add cases for CFN_BUILT_IN_SIGNBIT[FL].

2022-10-14 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * gimple-range-op.cc (gimple_range_op_handler::maybe_builtin_call): Add CFN_BUILT_IN_SIGNBIT[FL]* entries. --- gcc/gimple-range-op.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/gimple-range-op.cc b/gcc/gimple-range-op.cc index bc4389eb2e1..9bd

[SPARC] Fix PR target/107248

2022-10-14 Thread Eric Botcazou via Gcc-patches
This is the infamous PR rtl-optimization/38644 rearing its ugly head for leaf functions on SPARC more than a decade later... Richard E.'s generic solution has never been implemented so let's do as other RISC back-ends did. Tested on SPARC64/Linux, applied on all active branches. 2022-10-14 E

[PATCH] tree-optimization/107254 - check and support live lanes from permutes

2022-10-14 Thread Richard Biener via Gcc-patches
The following fixes an omission from adding SLP permute nodes which is live lanes originating from those. We have to check that we can extract the lane and have to actually code generate them. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimization/107254

Re: [PATCH][RFT] Vectorization of first-order recurrences

2022-10-14 Thread Richard Biener via Gcc-patches
On Fri, 14 Oct 2022, Andrew Stubbs wrote: > On 14/10/2022 08:07, Richard Biener wrote: > > On Tue, 11 Oct 2022, Richard Sandiford wrote: > > > >> Richard Biener writes: > >>> On Mon, 10 Oct 2022, Andrew Stubbs wrote: > On 10/10/2022 12:03, Richard Biener wrote: > > The following picks u

Re: [PATCH][RFT] Vectorization of first-order recurrences

2022-10-14 Thread Andrew Stubbs
On 14/10/2022 08:07, Richard Biener wrote: On Tue, 11 Oct 2022, Richard Sandiford wrote: Richard Biener writes: On Mon, 10 Oct 2022, Andrew Stubbs wrote: On 10/10/2022 12:03, Richard Biener wrote: The following picks up the prototype by Ju-Zhe Zhong for vectorizing first order recurrences.

Re: Adding a new thread model to GCC

2022-10-14 Thread Jonathan Yong via Gcc-patches
On 10/11/22 13:22, LIU Hao wrote: 在 2022-10-10 23:56, LIU Hao 写道: 在 2022-10-04 20:44, LIU Hao 写道: Attached are revised patches. These are exported from trunk. Revised further. The patch for libgfortran has been committed to trunk today, so I include only the other two.    * In the second

[committed] libstdc++: Use markdown in Doxygen comment

2022-10-14 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- This makes the comment easier to read in the source, without altering the Doxygen output. libstdc++-v3/ChangeLog: * include/std/iostream: Use markdown in Doxygen comment. --- libstdc++-v3/include/std/iostream | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

Re: [PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-14 Thread Hongtao Liu via Gcc-patches
This patch tries to add a parameter to generate instruction prefetch instead of data prefetch. Currently, __builtin_prefetch assumes data prefetch only. On Fri, Oct 14, 2022 at 4:39 PM Haochen Jiang via Gcc-patches wrote: > > gcc/ChangeLog: > > * builtins.cc (expand_builtin_prefetch): Han

[PATCH 1/2] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter in expand function. * config/aarch64/aarch64-sve.md: Add default parameter value. * config/aarch64/aarch64.md (prefetch): New define_expand. (*prefetch): Add default paramete

[PATCH 2/2] Support Intel prefetchit0/t1

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect PREFETCHI. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_PREFETCHI_SET, OPTION_MASK_ISA2_PREFETCHI_UNSET): New. (ix86_handle_option): Handle -mprefetchi. *

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
> On 14 Oct 2022, at 09:30, Hongtao Liu wrote: > > On Fri, Oct 14, 2022 at 4:24 PM Iain Sandoe wrote: >> >> >> >>> On 14 Oct 2022, at 09:20, Hongtao Liu wrote: >>> >>> On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches >>> wrote: Hi Haochen > On 14 Oct 2022

[PATCH 0/2] Add a Fourth parameter for prefetch and Support Intel PREFETCHI

2022-10-14 Thread Haochen Jiang via Gcc-patches
Hi all, Sorry for the previous cover-letter stucking and disturbance and this is the right cover letter. These two patches aimed to add Intel PREFETCHI. The information is based on newly released Intel Architecture Instruction Set Extensions and Future Features. The document comes following: ht

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Hongtao Liu via Gcc-patches
> >> I could not see any target-requires changes in the testcases .. hence my > >> question. > >> > > Guess you are looking at compile tests? > > yes, compile tests would need support from the assembler. > > In my understanding, dg-do compile tests don't need assembler support, it just scan dump o

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 14, 2022 at 4:24 PM Iain Sandoe wrote: > > > > > On 14 Oct 2022, at 09:20, Hongtao Liu wrote: > > > > On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches > > wrote: > >> > >> Hi Haochen > >> > >>> On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches > >>> wrote: > >>> >

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
> On 14 Oct 2022, at 09:20, Hongtao Liu wrote: > > On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches > wrote: >> >> Hi Haochen >> >>> On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches >>> wrote: >>> >> >>> These six patches aimed to add Intel Sierra Forest instructions,

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 14, 2022 at 4:14 PM Iain Sandoe via Gcc-patches wrote: > > Hi Haochen > > > On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches > > wrote: > > > > > These six patches aimed to add Intel Sierra Forest instructions, including > > AVX-IFMA, AVX-VNNI0INT8, AVX-NE-CONVERT, CMPccXADD.

[PATCH 1/3] Add a parameter for the builtin function of prefetch to align with LLVM

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * builtins.cc (expand_builtin_prefetch): Handle the fourth parameter in expand function. * config/aarch64/aarch64-sve.md: Add default parameter value. * config/aarch64/aarch64.md (prefetch): New define_expand. (*prefetch): Add default paramete

[PATCH 2/3] Support Intel prefetchit0/t1

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect PREFETCHI. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_PREFETCHI_SET, OPTION_MASK_ISA2_PREFETCHI_UNSET): New. (ix86_handle_option): Handle -mprefetchi. *

Re: [PATCH 0/6] Add Intel Sierra Forest Instructions

2022-10-14 Thread Iain Sandoe via Gcc-patches
Hi Haochen > On 14 Oct 2022, at 08:54, Haochen Jiang via Gcc-patches > wrote: > > These six patches aimed to add Intel Sierra Forest instructions, including > AVX-IFMA, AVX-VNNI0INT8, AVX-NE-CONVERT, CMPccXADD. We also added intrinsic > for vector __bf16 in this series of patch and Sierra Fore

Re: [PATCH] [PR24021] Implement PLUS_EXPR range-op entry for floats.

2022-10-14 Thread Aldy Hernandez via Gcc-patches
On Thu, Oct 13, 2022 at 3:52 PM Toon Moene wrote: > > It was just a comment on the code of the PR ... Ahh... the patch adds support for ranger handling of floating point PLUS_EXPRs in the IL. The PR's testcase is just one of the many things it will be able to solve. Aldy > > Toon. > > On 10/13

[PATCH] Support Intel AMX-FP16 ISA

2022-10-14 Thread Haochen Jiang via Gcc-patches
From: Hongyu Wang Hi all, This patch aimed to add Intel AMX-FP16 ISA according to newly released Intel Architecture Instruction Set Extensions and Future Features. The document comes following: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extension

[PATCH 4/6] Support Intel AVX-NE-CONVERT

2022-10-14 Thread Haochen Jiang via Gcc-patches
From: Kong Lingling gcc/ChangeLog: * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVXNECONVERT_SET, OPTION_MASK_ISA2_AVXNECONVERT_UNSET): New. (ix86_handle_option): Handle -mavxneconvert, unset avxneconvert when avx2 is disabled. * common/co

[PATCH 5/6] Support Intel CMPccXADD

2022-10-14 Thread Haochen Jiang via Gcc-patches
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect cmpccxadd. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_CMPCCXADD_SET, OPTION_MASK_ISA2_CMPCCXADD_UNSET): New. (ix86_handle_option): Handle -mcmpccxadd, unset cmp

[PATCH 2/6] Support Intel AVX-VNNI-INT8

2022-10-14 Thread Haochen Jiang via Gcc-patches
From: Kong Lingling gcc/ChangeLog * common/config/i386/cpuinfo.h (get_available_features): Detect avxvnniint8. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVXVNNIINT8_SET): New. (OPTION_MASK_ISA2_AVXVNNIINT8_UNSET): Ditto. (ix86_handle_op

  1   2   >