Re: [PATCH] developer option: -fdump-generic-nodes; initial incorporation

2024-02-28 Thread Richard Biener
On Wed, Feb 28, 2024 at 4:14 PM David Malcolm wrote: > > On Wed, 2024-02-28 at 08:58 +0100, Richard Biener wrote: > > On Tue, Feb 27, 2024 at 10:20 PM Robert Dubner > > wrote: > > > > > > Richard, > > > > > > Thank you very much for your comments. > > > > > > When I set out to create the

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-02-28 Thread Richard Biener
On Wed, 28 Feb 2024, Andre Vieira (lists) wrote: > > > On 27/02/2024 08:47, Richard Biener wrote: > > On Mon, 26 Feb 2024, Andre Vieira (lists) wrote: > > > >> > >> > >> On 05/02/2024 09:56, Richard Biener wrote: > >>> On Thu, 1 Feb 2024, Andre Vieira (lists) wrote: > >>> > > >

Re: [COMMITTED] aarch64: Fix memtag builtins vs GC [PR108174]

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 11:14 PM Andrew Pinski wrote: > > The memtag builtins were being GC'ed away so we end up > with a crash sometimes (maybe even wrong code). > This fixes that issue by adding GTY on the variable/struct > aarch64_memtag_builtin_data. > > Committed as obvious after a

[PATCH] LoongArch: Allow s9 as a register alias

2024-02-28 Thread Xi Ruoyao
The psABI allows using s9 as an alias of r22. gcc/ChangeLog: * config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add s9 as an alias of r22. --- Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk? gcc/config/loongarch/loongarch.h | 1 + 1 file changed, 1

[PATCH] LoongArch: Emit R_LARCH_RELAX for TLS IE with non-extreme code model to allow the IE to LE linker relaxation

2024-02-28 Thread Xi Ruoyao
In Binutils we need to make IE to LE relaxation only allowed when there is an R_LARCH_RELAX after R_LARCH_TLE_IE_PC_{HI20,LO12} so an invalid "partial" relaxation won't happen with the extreme code model. So if we are emitting %ie_pc_{hi20,lo12} in a non-extreme code model, emit an R_LARCH_RELAX

[COMMITTED] aarch64: Fix memtag builtins vs GC [PR108174]

2024-02-28 Thread Andrew Pinski
The memtag builtins were being GC'ed away so we end up with a crash sometimes (maybe even wrong code). This fixes that issue by adding GTY on the variable/struct aarch64_memtag_builtin_data. Committed as obvious after a build/test for aarch64-linux-gnu. PR target/108174 gcc/ChangeLog:

[PATCH v2] testsuite: Add a test case for negating FP vectors containing zeros

2024-02-28 Thread Xi Ruoyao
Recently I've fixed two wrong FP vector negate implementation which caused wrong sign bits in zeros in targets (r14-8786 and r14-8801). To prevent a similar issue from happening again, add a test case. Tested on x86_64 (with SSE2, AVX, AVX2, and AVX512F), AArch64, MIPS (with MSA), LoongArch

[PATCH v2] testsuite: Make pr104992.c irrelated to target vector feature [PR113418]

2024-02-28 Thread Xi Ruoyao
The vect_int_mod target selector is evaluated with the options in DEFAULT_VECTCFLAGS in effect, but these options are not automatically passed to tests out of the vect directories. So this test fails on targets where integer vector modulo operation is supported but requiring an option to enable,

Re: [PATCH v2] LoongArch: Add support for TLS descriptors

2024-02-28 Thread Jinyang He
On 2024-02-29 09:42, mengqinggang wrote: Generate la.tls.desc macro instruction for TLS descriptors model. la.tls.desc expand to pcalau12i $a0, %desc_pc_hi20(a) ld.d $a1, $a0, %desc_ld_pc_lo12(a) addi.d$a0, $a0, %desc_add_pc_lo12(a) jirl $ra, $a1, %desc_call(a)

Re: [PATCH] i386: Guard noreturn no-callee-saved-registers optimization with -mnoreturn-no-callee-saved-registers [PR38534]

2024-02-28 Thread Hongtao Liu
On Wed, Feb 28, 2024 at 4:54 PM Jakub Jelinek wrote: > > Hi! > > Adding Hongtao and Honza into the loop as the ones who acked the original > patch. > > The no_callee_saved_registers by default for noreturn functions change can > break in-process backtrace(3) or backtraces from debugger or other

Re: [PATCH v2] LoongArch: Add support for TLS descriptors

2024-02-28 Thread Xi Ruoyao
On Thu, 2024-02-29 at 14:08 +0800, Xi Ruoyao wrote: > > +  "TARGET_TLS_DESC" > > +  "la.tls.desc\t%0,%1" > > With -mexplicit-relocs=always we should emit %desc_pc_lo12 etc. instead > of la.tls.desc.  As we don't want to add too many code we can just hard > code the 4 instructions here instead of

Re: [PATCH v2] LoongArch: Add support for TLS descriptors

2024-02-28 Thread Xi Ruoyao
On Thu, 2024-02-29 at 09:42 +0800, mengqinggang wrote: > Generate la.tls.desc macro instruction for TLS descriptors model. > > la.tls.desc expand to >   pcalau12i $a0, %desc_pc_hi20(a) >   ld.d  $a1, $a0, %desc_ld_pc_lo12(a) >   addi.d    $a0, $a0, %desc_add_pc_lo12(a) >   jirl  $ra, $a1,

[patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-02-28 Thread Jerry D
The attached patch adds the error checks similar to the first patch previously committed. I noticed a redundancy in some defines MSGLEN and IOMSG_LEN so I consolidated this to one define in io.h. This is just cleanup stuff. I have added test cases for each of the places where UDTIO is done

Re: [PATCH 08/11] rs6000, add tests and documentation for various, built-ins

2024-02-28 Thread Kewen.Lin
Hi, on 2024/2/21 01:57, Carl Love wrote: > > GCC maintainers: > > The patch adds documentation a number of built-ins. > > The patch has been tested on Power 10 with no regressions. > > Please let me know if this patch is acceptable for mainline. Thanks. > > Carl >

Re: [PATCH v3] c++/modules: Support lambdas attached to more places in modules [PR111710]

2024-02-28 Thread Nathaniel Shead
On Wed, Feb 28, 2024 at 12:34:51PM -0500, Jason Merrill wrote: > On 2/27/24 23:12, Nathaniel Shead wrote: > > On Tue, Feb 27, 2024 at 11:59:46AM -0500, Patrick Palka wrote: > > > On Fri, 16 Feb 2024, Nathaniel Shead wrote: > > > > > > > On Tue, Feb 13, 2024 at 07:52:01PM -0500, Jason Merrill

[PATCH gcc] Hurd x86_64: add unwind support for signal trampoline code

2024-02-28 Thread Flavio Cruz
Tested with some simple toy examples where an exception is thrown in the signal handler. libgcc/ChangeLog: * config/i386/gnu-unwind.h: Support unwinding x86_64 signal frames. Signed-off-by: Flavio Cruz --- libgcc/config/i386/gnu-unwind.h | 97 - 1 file

Re: [PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Kito Cheng
Committed with Palmer's suggestions for the commit message, also I plan to back port that to 11, 12 and 13 release branches :) On Thu, Feb 29, 2024 at 4:27 AM Palmer Dabbelt wrote: > > On Wed, 28 Feb 2024 09:36:38 PST (-0800), Patrick O'Neill wrote: > > > > On 2/28/24 07:02, Palmer Dabbelt

Re: [PATCH] Fortran - Error compiling PDT Type-bound Procedures [PR82943/86148/86268]

2024-02-28 Thread Alexander Westbrooks
Hello, I meant to add a link to the commit to the previous email: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=edfe198084338691d0facc86bf8dfa6ede3ca676 Thanks, Alexander Westbrooks On Wed, Feb 28, 2024 at 8:24 PM Alexander Westbrooks wrote: > > Hello, > > I've updated the patch with those

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 5:35 PM Tom Tromey wrote: > > > "Andrew" == Andrew Pinski writes: > > Andrew> I don't know how to update the script server side after it is > Andrew> committed in git. the checker script is located in git though: > > Thanks, I didn't realize it was there. > > Could

[COMMITTED] Add libcc1 to bug components

2024-02-28 Thread Andrew Pinski
As found by Tom Tromey in https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646807.html libcc1 is not listed as bug component even though it is there in bugzilla. This fixes that oversight. Committed as obvious after testing using git gcc-verify on a patch. contrib/ChangeLog: *

Re: [PATCH] Fortran - Error compiling PDT Type-bound Procedures [PR82943/86148/86268]

2024-02-28 Thread Alexander Westbrooks
Hello, I've updated the patch with those changes, ran through the gcc-verify step and fixed up the commit, and then pushed it to the trunk. Thank you for your feedback, and I look forward to working on GFortran. Thanks, Alexander Westbrooks On Wed, Feb 28, 2024 at 1:55 PM Harald Anlauf

[PATCH v2] LoongArch: Add support for TLS descriptors

2024-02-28 Thread mengqinggang
Generate la.tls.desc macro instruction for TLS descriptors model. la.tls.desc expand to pcalau12i $a0, %desc_pc_hi20(a) ld.d $a1, $a0, %desc_ld_pc_lo12(a) addi.d$a0, $a0, %desc_add_pc_lo12(a) jirl $ra, $a1, %desc_call(a) The default is TLS descriptors, but can be configure

RE: [PATCH v2] DSE: Bugfix ICE after allow vector type in get_stored_val

2024-02-28 Thread Li, Pan2
> So it's going to check if V2SF can be tied to DI and V4QI with SI. I > suspect those are going to fail for RISC-V as those aren't tieable. Yes, you are right. Different REG_CLASS are not allowed to be tieable in RISC-V. static bool riscv_modes_tieable_p (machine_mode mode1, machine_mode

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Tom Tromey
> "Andrew" == Andrew Pinski writes: Andrew> I don't know how to update the script server side after it is Andrew> committed in git. the checker script is located in git though: Thanks, I didn't realize it was there. Could you check in your patch? IMO it seems obvious. Tom

RE: Re: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread Li, Pan2
Personally I prefer to remove --param=riscv-autovec-preference=none and only allow mrvv-vector-bits, to avoid tricky(maybe) sematic of none preference. However, let’s wait for a while in case there are some comments from others. Pan From: Kito Cheng Sent: Wednesday, February 28, 2024 10:55 PM

Re: Re: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread juzhe.zh...@rivai.ai
I think it makes more sense to remove the whole --param=riscv-autovec-preference since we should use -fno-tree-vectorize instead of --param=riscv-autovec-preference=none which is more reasonable compile option for users. --param is just a internal testing option that we added before, ideally we

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 3:26 PM Jeff Law wrote: > > > > On 2/28/24 15:57, Tom Tromey wrote: > >> "Jeff" == Jeff Law writes: > > > I could not push this because: > > > > remote: *** ChangeLog format failed: > > remote: *** ERR: invalid PR component in subject: "Fix PR libcc1/113977" > > > > I

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Jeff Law
On 2/28/24 15:57, Tom Tromey wrote: "Jeff" == Jeff Law writes: I could not push this because: remote: *** ChangeLog format failed: remote: *** ERR: invalid PR component in subject: "Fix PR libcc1/113977" I guess this script isn't in sync with the components in bugzilla. I don't know

Re: [PATCH] c++: -Wuninitialized when binding a ref to uninit DM [PR113987]

2024-02-28 Thread Jason Merrill
On 2/22/24 14:28, Marek Polacek wrote: On Thu, Feb 22, 2024 at 08:34:45AM +, Jason Merrill wrote: On 2/20/24 19:15, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This PR asks that our -Wuninitialized for mem-initializers does not warn when

Re: [PING] Re: [PATCH 1/2] c-family: -Waddress-of-packed-member and casts

2024-02-28 Thread Jason Merrill
On 2/22/24 03:51, Torbjorn SVENSSON wrote: Ping! Hmm, I'm somewhat reluctant to backport a significant behavior change like this just to silence a testsuite failure, even though I think the change is correct. Maybe just xfail the tests for GCC 13? Jason On 2024-02-07 17:19, Torbjorn

Re: [PATCH v2] c++: implement [[gnu::non_owning]] [PR110358]

2024-02-28 Thread Jason Merrill
On 2/21/24 19:35, Marek Polacek wrote: On Fri, Jan 26, 2024 at 04:04:35PM -0500, Jason Merrill wrote: On 1/25/24 20:37, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Since -Wdangling-reference has false positives that can't be prevented, we should

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Tom Tromey
> "Jeff" == Jeff Law writes: Jeff> Given this is all libcc1 related and thus primarily of interest to Jeff> gdb, if you're happy with it, then it's OK for the trunk. Thank you. I could not push this because: remote: *** ChangeLog format failed: remote: *** ERR: invalid PR component in

Re: [PATCH] c++: Fix explicit instantiation of const variable templates after earlier implicit instantation [PR113976]

2024-02-28 Thread Jason Merrill
On 2/26/24 12:10, Patrick Palka wrote: On Tue, 20 Feb 2024, Jakub Jelinek wrote: Hi! Already previously instantiated const variable templates had cp_apply_type_quals_to_decl called when they were instantiated, but if they need runtime initialization, their TREE_READONLY flag has been

Re: [PATCH] c++: auto(x) partial substitution [PR110025, PR114138]

2024-02-28 Thread Jason Merrill
On 2/27/24 15:48, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? -- >8 -- In r12-6773-g09845ad7569bac we gave CTAD placeholders a level of 0 and ensured we never replaced them via tsubst. It turns out that autos representing

[PATCH] contrib/gcc-changelog/git_check_commit.py: Implement --num-commits

2024-02-28 Thread Ken Matsui
This patch implements a --num-commits (-n) flag for shorthand for the range of hash~N..hash commits. contrib/ChangeLog: * gcc-changelog/git_check_commit.py: Implement --num-commits. Signed-off-by: Ken Matsui --- contrib/gcc-changelog/git_check_commit.py | 15 +++ 1 file

Re: [PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Palmer Dabbelt
On Wed, 28 Feb 2024 09:36:38 PST (-0800), Patrick O'Neill wrote: On 2/28/24 07:02, Palmer Dabbelt wrote: On Wed, 28 Feb 2024 06:57:53 PST (-0800), jeffreya...@gmail.com wrote: On 2/28/24 05:23, Kito Cheng wrote: atomic_compare_and_swapsi will use lr.w and sc.w to do the atomic operation on

Re: [PATCH V2] rs6000: Don't allow immediate value in the vsx_splat pattern [PR113950]

2024-02-28 Thread Segher Boessenkool
On Wed, Feb 28, 2024 at 11:58:15AM -0600, Peter Bergner wrote: > On 2/28/24 8:31 AM, Segher Boessenkool wrote: > > On Tue, Feb 27, 2024 at 04:50:02PM -0600, Peter Bergner wrote: > >> So it seems you're not NAKing the use of splat_input_operand, but > >> just that it needs more explanation in the

Re: [PATCH] Fortran - Error compiling PDT Type-bound Procedures [PR82943/86148/86268]

2024-02-28 Thread Harald Anlauf
Hi Alex, this is now mostly correct, with the following exceptions: First, you should notice that the formatting of the commit message, when checked using "git gcc-verify", needs minor corrections. You will be guided how to fix this yourself. Second, testcase pdt_37.f03 has an undeclared

[PATCH] OpenMP: warn about iteration var modifications in loop body

2024-02-28 Thread Frederik Harwath
Hi, this patch implements a warning about (some simple cases of direct) modifications of iteration variables in OpenMP loops which are forbidden according to the OpenMP specification. I think this can be helpful, especially for new OpenMP users. I have implemented this after I observed some

[PATCH v14 23/26] c++: Implement __is_invocable built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_invocable. gcc/cp/ChangeLog: * cp-trait.def: Define __is_invocable. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INVOCABLE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

[PATCH v14 26/26] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_nothrow_invocable by dispatching to the new __is_nothrow_invocable built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_nothrow_invocable): Use __is_nothrow_invocable built-in trait. *

[PATCH v14 04/26] libstdc++: Optimize std::is_volatile compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_volatile by dispatching to the new __is_volatile built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken

[PATCH v14 18/26] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_rvalue_reference by dispatching to the new __add_rvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_rvalue_reference): Use __add_rvalue_reference built-in trait.

[PATCH v14 24/26] libstdc++: Optimize std::is_invocable compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_invocable by dispatching to the new __is_invocable built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_invocable): Use __is_invocable built-in trait. *

[PATCH v14 19/26] c++: Implement __decay built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::decay. gcc/cp/ChangeLog: * cp-trait.def: Define __decay. * semantics.cc (finish_trait_type): Handle CPTK_DECAY. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __decay. * g++.dg/ext/decay.C:

[PATCH v14 10/26] libstdc++: Optimize std::add_pointer compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_pointer by dispatching to the new __add_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_pointer): Use __add_pointer built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v14 00/26] Optimize more type traits

2024-02-28 Thread Ken Matsui
Hi, This patch series implements __is_const, __is_volatile, __is_pointer, and __is_unbounded_array built-in traits, which were isolated from my previous patch series "Optimize type traits compilation performance" because they contained performance regression.  I confirmed that this patch series

[PATCH v14 08/26] libstdc++: Optimize std::is_unbounded_array compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_unbounded_array by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui

[PATCH v14 09/26] c++: Implement __add_pointer built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::add_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __add_pointer. * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer.

[PATCH v14 03/26] c++: Implement __is_volatile built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

[PATCH v14 13/26] c++: Implement __remove_all_extents built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::remove_all_extents. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_all_extents. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_ALL_EXTENTS. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v14 22/26] libstdc++: Optimize std::rank compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::rank by dispatching to the new __rank built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (rank): Use __rank built-in trait. (rank_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v14 05/26] c++: Implement __is_pointer built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

[PATCH v14 16/26] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::add_lvalue_reference by dispatching to the new __add_lvalue_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_lvalue_reference): Use __add_lvalue_reference built-in trait.

[PATCH v14 17/26] c++: Implement __add_rvalue_reference built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::add_rvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_rvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_RVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

[PATCH v14 12/26] libstdc++: Optimize std::remove_extent compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_extent by dispatching to the new __remove_extent built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_extent): Use __remove_extent built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v14 11/26] c++: Implement __remove_extent built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::remove_extent. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_extent. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_EXTENT. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of

[PATCH v14 20/26] libstdc++: Optimize std::decay compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::decay by dispatching to the new __decay built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (decay): Use __decay built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v14 15/26] c++: Implement __add_lvalue_reference built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::add_lvalue_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __add_lvalue_reference. * semantics.cc (finish_trait_type): Handle CPTK_ADD_LVALUE_REFERENCE. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test

Re: [PATCH v2 5/5] bpf: renamed coreout.* files to btfext-out.*.

2024-02-28 Thread Cupertino Miranda
Corrected and Pushed. Thanks, Cupertino David Faust writes: > On 2/27/24 11:04, Cupertino Miranda wrote: >> gcc/ChangeLog: >> >> * config.gcc (target_gtfiles): Changes coreout to btfext-out. >> (extra_objs): Changes coreout to btfext-out. >> * config/bpf/coreout.cc: Renamed to

[PATCH v14 14/26] libstdc++: Optimize std::remove_all_extents compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_all_extents by dispatching to the new __remove_all_extents built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_all_extents): Use __remove_all_extents built-in trait. Signed-off-by: Ken Matsui

[PATCH v14 02/26] libstdc++: Optimize std::is_const compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_const by dispatching to the new __is_const built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v14 07/26] c++: Implement __is_unbounded_array built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unbounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_ARRAY. * semantics.cc (trait_expr_value): Likewise.

[PATCH v14 25/26] c++: Implement __is_nothrow_invocable built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_nothrow_invocable. gcc/cp/ChangeLog: * cp-trait.def: Define __is_nothrow_invocable. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_NOTHROW_INVOCABLE. * semantics.cc (trait_expr_value): Likewise.

[PATCH v14 06/26] libstdc++: Optimize std::is_pointer compilation performance

2024-02-28 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_pointer by dispatching to the new __is_pointer built-in trait. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_pointer): Use __is_pointer built-in trait. Optimize its implementation. *

[PATCH v14 21/26] c++: Implement __rank built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::rank. gcc/cp/ChangeLog: * cp-trait.def: Define __rank. * constraint.cc (diagnose_trait_expr): Handle CPTK_RANK. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog:

[PATCH v14 01/26] c++: Implement __is_const built-in trait

2024-02-28 Thread Ken Matsui
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

Re: [PATCH v2 4/5] bpf: implementation of func_info in .BTF.ext.

2024-02-28 Thread Cupertino Miranda
Corrected and Pushed, with the following little change to resolve a warning I missed before, the patch introduced was: diff --git a/gcc/config/bpf/btfext-out.cc b/gcc/config/bpf/btfext-out.cc index 6ebbb54ef73e..00d2501a976b 100644 --- a/gcc/config/bpf/btfext-out.cc +++

Re: [PATCH v2 3/5] bpf: Always emit .BTF.ext section if generating BTF

2024-02-28 Thread Cupertino Miranda
Corrected and Pushed. Thanks, Cupertino David Faust writes: > On 2/27/24 11:04, Cupertino Miranda wrote: >> BPF applications, when generating BTF information should always create a >> .BTF.ext section. >> Current implementation was only creating it when -mco-re option was used. >> This patch

Re: [PATCH v2 2/5] btf: added KIND_FUNC traversal function.

2024-02-28 Thread Cupertino Miranda
Corrected and Pushed. Thanks, Cupertino David Faust writes: > Hi Cupertino, > > Similar to patch 1, please use present tense to match the style of > existing commits, in commit message and in ChangeLog. > > On 2/27/24 11:04, Cupertino Miranda wrote: >> Added a traversal function to traverse

Re: [PATCH v2 1/5] btf: fixed type id in BTF_KIND_FUNC struct data.

2024-02-28 Thread Cupertino Miranda
Corrected and Pushed. Thanks, Cupertino David Faust writes: > Hi Cupertino, > > Just some nits below. Apologies for incoming pedantry. > > On 2/27/24 11:04, Cupertino Miranda wrote: >> This patch correct the aditition of +1 on the type id, which originally >> was done in the wrong location

Re: [PATCH V2] rs6000: Don't allow immediate value in the vsx_splat pattern [PR113950]

2024-02-28 Thread Peter Bergner
On 2/28/24 8:31 AM, Segher Boessenkool wrote: > On Tue, Feb 27, 2024 at 04:50:02PM -0600, Peter Bergner wrote: >> So it seems you're not NAKing the use of splat_input_operand, but >> just that it needs more explanation in the git log entry, correct? > > I NAK the patch. _Of course_ there needs

Re: [PATCH] RISC-V: add option -m(no-)autovec-segment

2024-02-28 Thread Jeff Law
On 2/27/24 13:30, Greg McGary wrote: On 2/27/24 8:25 AM, Jeff Law wrote: On 2/25/24 21:53, Greg McGary wrote: Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments.

Re: [PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Patrick O'Neill
On 2/28/24 07:02, Palmer Dabbelt wrote: On Wed, 28 Feb 2024 06:57:53 PST (-0800), jeffreya...@gmail.com wrote: On 2/28/24 05:23, Kito Cheng wrote: atomic_compare_and_swapsi will use lr.w and sc.w to do the atomic operation on RV64, however lr.w is doing sign extend to DI and compare

Re: [PATCH v3] c++/modules: Support lambdas attached to more places in modules [PR111710]

2024-02-28 Thread Jason Merrill
On 2/27/24 23:12, Nathaniel Shead wrote: On Tue, Feb 27, 2024 at 11:59:46AM -0500, Patrick Palka wrote: On Fri, 16 Feb 2024, Nathaniel Shead wrote: On Tue, Feb 13, 2024 at 07:52:01PM -0500, Jason Merrill wrote: On 2/10/24 17:57, Nathaniel Shead wrote: The fix for PR107398 weakened the

Re: [PATCH v2] DSE: Bugfix ICE after allow vector type in get_stored_val

2024-02-28 Thread Jeff Law
On 2/27/24 21:51, Li, Pan2 wrote: if (!targetm.modes_tieable_p (src_int_mode, src_mode)) return NULL_RTX; if (!targetm.modes_tieable_p (int_mode, mode)) return NULL_RTX; Yes, will return NULL_RTX for in the first if, given src_int_mode is E_DImode while src_mode is

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-02-28 Thread Andre Vieira (lists)
On 27/02/2024 08:47, Richard Biener wrote: On Mon, 26 Feb 2024, Andre Vieira (lists) wrote: On 05/02/2024 09:56, Richard Biener wrote: On Thu, 1 Feb 2024, Andre Vieira (lists) wrote: On 01/02/2024 07:19, Richard Biener wrote: On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: The

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-28 Thread Richard Biener
> Am 28.02.2024 um 16:05 schrieb Jeff Law : > >  > >> On 2/28/24 03:05, Richard Biener wrote: >> >> Untested fix for targets that cannot handle the original IL below. >> I'm not convinced that's the way to go here, is it? Or scrap >> the testcase? Or have a cheap way to say "this target

Re: [PATCH 01/11] rs6000, Fix __builtin_vsx_cmple* args and documentation, builtins

2024-02-28 Thread Carl Love
Kewen: Thanks for the review. From the review, it looks like a few of the built-ins just need to be replaced with an overloaded version of an existing PVPIR documented buit-in. Most of the rest can just be removed. I will work on redoing the patch set accordingly. We can then look at the

Re: [PATCH] developer option: -fdump-generic-nodes; initial incorporation

2024-02-28 Thread David Malcolm
On Wed, 2024-02-28 at 08:58 +0100, Richard Biener wrote: > On Tue, Feb 27, 2024 at 10:20 PM Robert Dubner > wrote: > > > > Richard, > > > > Thank you very much for your comments. > > > > When I set out to create the capability, I had a "specification" in > > mind. > > > > I didn't have a clue

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-28 Thread Jeff Law
On 2/28/24 03:05, Richard Biener wrote: Untested fix for targets that cannot handle the original IL below. I'm not convinced that's the way to go here, is it? Or scrap the testcase? Or have a cheap way to say "this target doesn't support _any_ vec_cond"? Another way, but for stage1 I

[PATCH] ctf: Fix multi-dimentional array types ordering in CTF

2024-02-28 Thread Cupertino Miranda
Hi everyone, In order to facilitate reviewing, I include a copy of the function in this email, since the code structure changes are too hard to analyse in the patch itself. Looking forward to your comments. Regards, Cupertino === Function changes === /* Generate CTF for an ARRAY_TYPE. C

Re: [PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Palmer Dabbelt
On Wed, 28 Feb 2024 06:57:53 PST (-0800), jeffreya...@gmail.com wrote: On 2/28/24 05:23, Kito Cheng wrote: atomic_compare_and_swapsi will use lr.w and sc.w to do the atomic operation on RV64, however lr.w is doing sign extend to DI and compare instruction only have DI mode on RV64, so the

Re: [PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Jeff Law
On 2/28/24 05:23, Kito Cheng wrote: atomic_compare_and_swapsi will use lr.w and sc.w to do the atomic operation on RV64, however lr.w is doing sign extend to DI and compare instruction only have DI mode on RV64, so the expected value should be sign extend before compare as well, so that we

Re: Re: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread Kito Cheng
Hmm, maybe only keep --param=riscv-autovec-preference=none and remove other two if we think that might still useful? But anyway I have no strong opinion to keep that, I mean I am ok to remove whole --param=riscv-autovec-preference. 钟居哲 於 2024年2月28日 週三 21:59 寫道: > I think it makes more sense to

Re: [committed] libstdc++: Fix noexcept on dtors in [PR114152]

2024-02-28 Thread Jonathan Wakely
Oops, sorry, I CC'd the wrong Victor on this patch (you've both reported libstdc++ bugs today and I grabbed the email address from the wrong browser tab). On Wed, 28 Feb 2024 at 14:53, Jonathan Wakely wrote: > > Tested x86_64-linux, pushed to trunk. Backport to gcc-13 to follow. > > -- >8 -- > >

[committed] libstdc++: Fix noexcept on dtors in [PR114152]

2024-02-28 Thread Jonathan Wakely
Tested x86_64-linux, pushed to trunk. Backport to gcc-13 to follow. -- >8 -- The PR points out that the destructors all have incorrect noexcept-specifiers. libstdc++-v3/ChangeLog: PR libstdc++/114152 * include/experimental/scope (scope_exit scope_fail): Make destructor

[committed] libstdc++: Change some URLs in the manual to use https

2024-02-28 Thread Jonathan Wakely
Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/xml/manual/appendix_contributing.xml: Change URLs to use https. * doc/html/manual/*: Regenerate. --- .../doc/html/manual/appendix_contributing.html | 8

[committed] libstdc++: Update outdated docs on contributing

2024-02-28 Thread Jonathan Wakely
Pushed to trunk, but I've just noticed it should be https not http. -- >8 -- We don't want a separate ChangeLog submission now. libstdc++-v3/ChangeLog: * doc/xml/manual/appendix_contributing.xml: Replace outdated info on ChangeLog entries. *

Re: [PATCH V2] rs6000: Don't allow immediate value in the vsx_splat pattern [PR113950]

2024-02-28 Thread Segher Boessenkool
On Tue, Feb 27, 2024 at 04:50:02PM -0600, Peter Bergner wrote: > On 2/27/24 6:40 AM, Segher Boessenkool wrote: > > On Tue, Feb 27, 2024 at 02:02:38AM +0530, jeevitha wrote: > > input_operand allows a lot of things that splat_input_operand does not, > > not just immediate operands. NAK. > > > >

Re: Re: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread 钟居哲
I think it makes more sense to remove --param=riscv-autovec-preference and add -mrvv-vector-bits juzhe.zh...@rivai.ai From: Kito Cheng Date: 2024-02-28 20:56 To: pan2.li CC: gcc-patches; juzhe.zhong; yanzhang.wang; rdapp.gcc; jeffreyalaw Subject: Re: [PATCH v3] RISC-V: Introduce gcc

RE: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread Li, Pan2
Oops, this is more complicated than original expectation. Consider somehow the mrvv-vector-bits (zvl or scalable) decides how we perform the auto-vec. I may have one proposal to combine them together? For example, mrvv-vector-bits=zvl indicates we will auto-vect in fixed-vlmax way, and

[PATCH 2/2] tree-optimization/113831 - revert original fix

2024-02-28 Thread Richard Biener
This reverts the original fix for PR113831 which is better fixed by the PR114121 fix. I've XFAILed instead of removing the PR108355 testcase again. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/113831 PR tree-optimization/108355 *

[PATCH 1/2] tree-optimization/114121 - wrong VN with context sensitive range info

2024-02-28 Thread Richard Biener
When VN ends up exploiting range-info specifying the ao_ref offset and max_size we have to make sure to reflect this in the hashtable entry for the recorded expression. The PR113831 fix handled the case where we can encode this in the operands themselves but this bug shows the issue is more

Re: [PATCH v3] RISC-V: Introduce gcc option mrvv-vector-bits for RVV

2024-02-28 Thread Kito Cheng
Take one more look, I think this option should work and integrate with --param=riscv-autovec-preference= since they have similar jobs but slightly different. We have 3 value for --param=riscv-autovec-preference=: none, scalable and fixed-vlmax -mrvv-vector-bits=scalable is work like

[PATCH] RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64

2024-02-28 Thread Kito Cheng
atomic_compare_and_swapsi will use lr.w and sc.w to do the atomic operation on RV64, however lr.w is doing sign extend to DI and compare instruction only have DI mode on RV64, so the expected value should be sign extend before compare as well, so that we can get right compare result.

Re: [wwwdocs] Add anchor for contrib/gcc-git-customization.sh docs

2024-02-28 Thread Jakub Jelinek
On Wed, Feb 28, 2024 at 11:15:10AM +, Jonathan Wakely wrote: > I'd like to be able to link directly to this part of the page from other > docs. > > OK for wwwdocs? LGTM. > diff --git a/htdocs/gitwrite.html b/htdocs/gitwrite.html > index c89cdb8f..54f8005a 100644 > --- a/htdocs/gitwrite.html

Re: [PATCH 2/2] aarch64: Add support for _BitInt

2024-02-28 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 01:40:09PM +, Andre Vieira (lists) wrote: > Dropped the first patch and dealt with the comments above, hopefully I > didn't miss any this time. > > -- > > This patch adds support for C23's _BitInt for the AArch64 port when > compiling >

[wwwdocs] Add anchor for contrib/gcc-git-customization.sh docs

2024-02-28 Thread Jonathan Wakely
I'd like to be able to link directly to this part of the page from other docs. OK for wwwdocs? --- htdocs/gitwrite.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gitwrite.html b/htdocs/gitwrite.html index c89cdb8f..54f8005a 100644 --- a/htdocs/gitwrite.html +++

[committed] testsuite: XFAIL ssa-sink-18.c also on powerpc64 [PR111462]

2024-02-28 Thread Jakub Jelinek
Hi! powerpc64-linux apparently (not very surprisingly) behaves the same way as powerpc64le-linux and has 4 sunk statements rather than 5, so we should xfail it on powerpc64*-*-* rather than just powerpc64le-*-*. powerpc-linux has 3 sunk statements, but the scan pattern is done for lp64 only as

  1   2   >