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

2024-05-02 Thread Ken Matsui
Addressed Jason's review comments. Ok for trunk? -- >8 -- 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

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 7:43 PM Jason Merrill wrote: > > On 5/2/24 16:47, Ken Matsui wrote: > > On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote: > >> > >> On 5/2/24 16:12, Ken Matsui wrote: > >>> This patch implements built-in trait for std::is_invocable. > >>> > >>> gcc/cp/ChangeLog: > >>> >

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

2024-05-02 Thread Jason Merrill
On 5/2/24 16:47, Ken Matsui wrote: On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote: On 5/2/24 16:12, Ken Matsui wrote: This patch implements built-in trait for std::is_invocable. gcc/cp/ChangeLog: * cp-trait.def: Define __is_invocable. * constraint.cc

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

2024-05-02 Thread Jason Merrill
On 5/2/24 22:09, Ken Matsui wrote: This patch implements built-in trait for std::is_invocable. Looks like this doesn't address my review comments on v18, only Marek's? gcc/cp/ChangeLog: * cp-trait.def: Define __is_invocable. * constraint.cc (diagnose_trait_expr): Handle

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

2024-05-02 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.

RE: [PATCH v3] DSE: Fix ICE after allow vector type in get_stored_val

2024-05-02 Thread Li, Pan2
Try to invoke validate_subreg directly in v4 as below. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650596.html Pan -Original Message- From: Li, Pan2 Sent: Tuesday, April 30, 2024 7:36 PM To: gcc-patches@gcc.gnu.org Cc: jeffreya...@gmail.com; juzhe.zh...@rivai.ai;

[PATCH v4] DSE: Fix ICE after allow vector type in get_stored_val

2024-05-02 Thread pan2 . li
From: Pan Li We allowed vector type for get_stored_val when read is less than or equal to store in previous. Unfortunately, the valididate_subreg treats the vector type's size is less than vector register as invalid. Then we will have ICE here. This patch would like to fix it by filter-out

RE: [PATCH v3] Internal-fn: Introduce new internal function SAT_ADD

2024-05-02 Thread Li, Pan2
> No, The isel would only be for the scalar, The vectorizer will still use the > vect_pattern. > It needs to so we can cost the operation correctly, and in some cases > depending on how > the saturation is described you are unable the vectorize. The pattern allows > us to catch > these cases

[Backport] ifcvt: Don't lower bitfields with non-constant offsets [PR 111882]

2024-05-02 Thread Richard Ball
Hi, Requesting permission to backport: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=24cf1f600b8ad34c68a51f48884e72d01f729893 to gcc-13 in order to fix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111882 Applies cleanly and with no regressions. Thanks, Richard

[committed][RISC-V] Fix nearbyint failure on rv32 and formatting nits

2024-05-02 Thread Jeff Law
The CI system tripped an execution failure for rv32 with the ceil/round patch. The fundamental problem is the FP->INT step in these sequences requires the input size to match the output size. The output size was based on rv32/rv64. Meaning that we'd try to do DF->SI->DF. That doesn't

Re: [committed] [RISC-V] Improve floor, ceil & related operations for RISC-V

2024-05-02 Thread Jeff Law
On 5/1/24 12:44 PM, Patrick O'Neill wrote: FAIL: gcc.target/riscv/rvv/autovec/unop/math-nearbyint-run-2.c execution test on rv32gcv newlib/linux. So the issue here is the code tried to handle DFmode inputs for rv32 by converting to a SImode integer. That's not a good idea on multiple

[PATCH] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-02 Thread Andrew Pinski
In C++ sometimes you have a deconstructor function which is "empty", like for an example with unions or with arrays. The front-end might not know it is empty either so this should be done on during optimization.o To implement it I added it to DCE where we mark if a statement is necessary or

[wwwdocs] Add znver5 to GCC 14 changes

2024-05-02 Thread Martin Jambor
Hello, based on input from AMD, I'd like to commit the following to the wwwdocs repo to point out new support for Zen 5 based AMD CPUs in GCC 14? Is it OK? Any suggestions, comments or questions? Thanks, Martin diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index

Re: [COMMITTED] Remove obsolete Solaris 11.3 support

2024-05-02 Thread Ian Lance Taylor
On Thu, May 2, 2024 at 7:06 AM Rainer Orth wrote: > > * libgo configure.ac and Makefile.am can now expect HAVE_STAT_TIMESPEC > to be true and libgo_cv_lib_setcontext_clobbers_tls doesn't apply any > longer. Any change would have to go upstream first and I don't know > about Ian's policy

[PATCH 2/3] Improve DECL_EXPR printing in .original [PR23872]

2024-05-02 Thread Andrew Pinski
Right now we don't print that a DECL_EXPR and we get basically double output of the decls and it looks confusing. This fixes that. for the simple example: `void foo () { int result = 0;}` This gives: ``` { int result = 0; DECL_EXPR; } ``` Bootstrapped and tested on x86_64-linux-gnu with no

[PATCH 3/3] Add parentheses around DECL_INIT for .original [PR23872]

2024-05-02 Thread Andrew Pinski
When we have : `void f (int y, int z) { int x = ( z++,y); }` This would have printed the decl's initializer without parentheses which can confusion if you think that is defining another variable rather than the compound expression. This adds parenthese around DECL_INIT if it was a COMPOUND_EXPR.

[PATCH 1/3] Fix printing COMPOUND_EXPR in .original [PR23872]

2024-05-02 Thread Andrew Pinski
Starting with the merge of the openmp branch into the trunk (r0-73077-g953ff28998b59b), COMPOUND_EXPR started to be printed as `expr; , expr` which is wrong. This was due to the wrong conversion of dumping_stmts into `!(flags & TDF_SLIM)`. That is wrong as we are not dumping stmts at this point

Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-05-02 Thread Martin Jambor
Hi, On Wed, May 01 2024, Gerald Pfeifer wrote: > On Tue, 30 Apr 2024, Martin Jambor wrote: >> +Pragma GCC Target now affects preprocessor >> symbols > > Note the id: should be "gcc-target-pragma", though I even suggest to > simplify and say "target-pragma". > >> +The behavior of pragma GCC

Re: [PATCH] libgm2: re-generate with autoreconf

2024-05-02 Thread Christophe Lyon
On Thu, 2 May 2024 at 15:47, Gaius Mulley wrote: > > Simon Marchi writes: > > > > > I don't have access to the gcc repo, so could you please push the patch > > on my behalf? > > all done - many thanks for the patch! > Great, I think we now have to update autoregen.py on the buildbot so that it

Re: [PATCH] libgfortran: Fix up the autoreconf warnings.

2024-05-02 Thread Christophe Lyon
On Thu, 2 May 2024 at 23:13, FX Coudert wrote: > > > libgfortran/ChangeLog: > > * Makefile.am: Use sub-dirs, amend recipies accordingly. > > * Makefile.in: Regenerate. > > Thanks Iain, I’ve tested it both with and without maintainer mode, and > regenerated files with no issue. I can also confirm

Gcc

2024-05-02 Thread Sophia Taylor
Hi Gcc, I'm checking in to see whether you're interested in getting the list of Distribution/Members List. *Harlan County Chamber of Commerce 2024 (Kentucky, USA) *1000+ Contacts I'm waiting for your response so I can let you know the Price and additional information. Warm regards,

Re: [PATCH] libgfortran: Fix up the autoreconf warnings.

2024-05-02 Thread FX Coudert
> libgfortran/ChangeLog: > * Makefile.am: Use sub-dirs, amend recipies accordingly. > * Makefile.in: Regenerate. Thanks Iain, I’ve tested it both with and without maintainer mode, and regenerated files with no issue. I can also confirm that the many autoreconf warnings that plagued libgfortran

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote: > > On 5/2/24 16:12, Ken Matsui wrote: > > 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

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 1:45 PM Marek Polacek wrote: > > On Thu, May 02, 2024 at 04:38:16PM -0400, Jason Merrill wrote: > > On 5/2/24 16:12, Ken Matsui wrote: > > > This patch implements built-in trait for std::is_invocable. > > > > > > gcc/cp/ChangeLog: > > > > > > * cp-trait.def: Define

[PATCH v2 1/3] docs: rtl: document GET_MODE_INNER

2024-05-02 Thread Vineet Gupta
gcc/ChangeLog * doc/rtl.texi: Add entry for GET_MODE_INNER. Signed-off-by: Vineet Gupta --- gcc/doc/rtl.texi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 8ea6588cb71f..aa10b5235b53 100644 --- a/gcc/doc/rtl.texi +++

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote: > > On 5/2/24 16:12, Ken Matsui wrote: > > 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

Re: [PATCH 3/3] combine: initialize a local var

2024-05-02 Thread Vineet Gupta
On 5/2/24 13:38, Jeff Law wrote: > > On 5/2/24 12:59 PM, Vineet Gupta wrote: >> This is no logic change (but technically still a functional change). >> >> Ran into this when stepping thru combine code. >> @newpat has some random garbage for a bit until it is actually set. >> With the fix it

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

2024-05-02 Thread Jason Merrill
On 5/2/24 16:12, Ken Matsui wrote: 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.

Re: [PATCH 3/3] combine: initialize a local var

2024-05-02 Thread Jeff Law
On 5/2/24 12:59 PM, Vineet Gupta wrote: This is no logic change (but technically still a functional change). Ran into this when stepping thru combine code. @newpat has some random garbage for a bit until it is actually set. With the fix it remains 0 until actually set. gcc/ChangeLog:

Re: [PATCH 2/3] RISC-V: miscll comment fixes [NFC]

2024-05-02 Thread Jeff Law
On 5/2/24 12:59 PM, Vineet Gupta wrote: gcc/ChangeLog: * config/riscv/riscv.cc: Comment updates. * config/riscv/riscv.h: Ditto. OK jeff

Re: [PATCH 1/3] docs: rtl: document GET_MODE_INNER

2024-05-02 Thread Jeff Law
On 5/2/24 12:59 PM, Vineet Gupta wrote: gcc/ChangeLog * doc/rtl.texi: Add entry for GET_MODE_INNER. Signed-off-by: Vineet Gupta --- gcc/doc/rtl.texi | 4 1 file changed, 4 insertions(+) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 8ea6588cb71f..f1643f41dfc6 100644

[PATCH v18 21/26] c++: Implement __array_rank built-in trait

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

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

2024-05-02 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 v18 11/26] c++: Implement __remove_extent built-in trait

2024-05-02 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 v18 22/26] libstdc++: Optimize std::rank compilation performance

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

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

2024-05-02 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 v18 12/26] libstdc++: Optimize std::remove_extent compilation performance

2024-05-02 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 v18 05/26] c++: Implement __is_pointer built-in trait

2024-05-02 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 v18 26/26] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-05-02 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 v18 24/26] libstdc++: Optimize std::is_invocable compilation performance

2024-05-02 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 v18 25/26] c++: Implement __is_nothrow_invocable built-in trait

2024-05-02 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 v18 14/26] libstdc++: Optimize std::remove_all_extents compilation performance

2024-05-02 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 v18 08/26] libstdc++: Optimize std::is_unbounded_array compilation performance

2024-05-02 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 v18 13/26] c++: Implement __remove_all_extents built-in trait

2024-05-02 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

Re: Trait built-in naming convention

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 1:09 PM Jakub Jelinek wrote: > > On Thu, May 02, 2024 at 12:52:59PM -0700, Ken Matsui wrote: > > > This seems to be the prevailing sentiment, so let's continue that way. > > > Thanks for the input. > > > > I actually found that we have two built-in type traits prefixed with

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

2024-05-02 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 v18 16/26] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-05-02 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 v18 04/26] libstdc++: Optimize std::is_volatile compilation performance

2024-05-02 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 v18 07/26] c++: Implement __is_unbounded_array built-in trait

2024-05-02 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 v18 19/26] c++: Implement __decay built-in trait

2024-05-02 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 v18 18/26] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-05-02 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 v18 17/26] c++: Implement __add_rvalue_reference built-in trait

2024-05-02 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 v18 20/26] libstdc++: Optimize std::decay compilation performance

2024-05-02 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 v18 01/26] c++: Implement __is_const built-in trait

2024-05-02 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.

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

2024-05-02 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. (object_type_p): New function. (referenceable_type_p): Likewise.

[PATCH v18 00/26] Optimize more type traits

2024-05-02 Thread Ken Matsui
Changes from v17: * Replaced __builtin with __ for is_unbounded_array, is_invocable, and is_nothrow_invocable. Changes from v16: * Replaced __builtin with __ for built-in trais other than is_unbounded_array, is_invocable, and is_nothrow_invocable. * Renamed __rank to __array_rank. Changes from

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

2024-05-02 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 v18 15/26] c++: Implement __add_lvalue_reference built-in trait

2024-05-02 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

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

2024-05-02 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.

Re: Trait built-in naming convention

2024-05-02 Thread Jakub Jelinek
On Thu, May 02, 2024 at 12:52:59PM -0700, Ken Matsui wrote: > > This seems to be the prevailing sentiment, so let's continue that way. > > Thanks for the input. > > I actually found that we have two built-in type traits prefixed with > __builtin: __builtin_is_corresponding_member and That is a

Re: [RFA][RISC-V] Improve constant synthesis for constants with 2 bits set

2024-05-02 Thread Jeff Law
On 5/2/24 11:28 AM, Palmer Dabbelt wrote: What's the "A" that you're requesting? Review/Approval :-) Build and regression tested on rv64gc.  OK for the trunk? The CI picked up some Zbb-subsuming targets too.  There's some minor comments, but Reviewed-by: Palmer Dabbelt Acked-by:

Re: Trait built-in naming convention

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 12:49 PM Jason Merrill wrote: > > On 5/2/24 15:36, Iain Sandoe wrote: > > > > > >> On 2 May 2024, at 20:30, Ken Matsui wrote: > >> > >> On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote: > >>> > >>> On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote: >

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

2024-05-02 Thread Jason Merrill
On 5/2/24 14:42, Ken Matsui wrote: This patch implements built-in trait for std::is_pointer. OK. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise.

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

2024-05-02 Thread Jason Merrill
On 5/2/24 14:42, Ken Matsui wrote: This patch implements built-in trait for std::is_const. OK. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise.

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

2024-05-02 Thread Jason Merrill
On 5/2/24 14:42, Ken Matsui wrote: This patch implements built-in trait for std::is_volatile. OK. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * semantics.cc (trait_expr_value): Likewise.

Re: Trait built-in naming convention

2024-05-02 Thread Jason Merrill
On 5/2/24 15:36, Iain Sandoe wrote: On 2 May 2024, at 20:30, Ken Matsui wrote: On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote: On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote: On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: There was some discussion of how to

Re: [PATCH] jit: Ensure ssize_t is defined.

2024-05-02 Thread FX Coudert
I’d like to ping the patch at https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644134.html The original proposal by Iain was: diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 235cab053e0..db4f27a48bf 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -21,6 +21,9 @@

[PATCH] Implement _Float16 to bfloat16 conversion with float32

2024-05-02 Thread H.J. Lu
Since bfloat16 isn't a subset nor superset of _Float16, implement _Float16 to bfloat16 conversion with _Float16 -> float32 -> bfloat16. gcc/ PR middle-end/114907 * expr.cc (convert_mode_scalar): Implement _Float16 to bfloat16 conversion with float32 conversions.

Re: Trait built-in naming convention

2024-05-02 Thread Iain Sandoe
> On 2 May 2024, at 20:30, Ken Matsui wrote: > > On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote: >> >> On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote: >>> On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: > There was some discussion of how to name the built-ins

Re: Trait built-in naming convention

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote: > > On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote: > > On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: > > > > There was some discussion of how to name the built-ins back in > > > >

Re: Trait built-in naming convention

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 12:18 PM Jonathan Wakely wrote: > > On Thu, 2 May 2024 at 18:38, Ville Voutilainen > wrote: > > > > On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: > > > > There was some discussion of how to name the built-ins back in > > > >

Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-05-02 Thread Björn Schäpers
Am 28.04.2024 um 20:16 schrieb Ian Lance Taylor: On Thu, Apr 25, 2024 at 1:15 PM Björn Schäpers wrote: Attached is the combined version of the two patches, only implementing the variant with the tlhelp32 API. Tested on x86 and x86_64 windows. Kind regards, Björn. A friendly ping.

Re: Trait built-in naming convention

2024-05-02 Thread Jonathan Wakely
On Thu, 2 May 2024 at 18:38, Ville Voutilainen wrote: > > On Thu, 2 May 2024 at 20:25, Ken Matsui wrote: > > > There was some discussion of how to name the built-ins back in > > > https://gcc.gnu.org/pipermail/gcc-patches/2007-March/thread.html#212171 > > > but __builtin wasn't discussed. > > >

[PATCH 0/3] Miscll fixlets

2024-05-02 Thread Vineet Gupta
Hi, Spring cleaning of a really old branch. stage1 might be the right time to get them in. Thx, -Vineet Vineet Gupta (3): docs: rtl: document GET_MODE_INNER RISC-V: miscll comment fixes [NFC] combine: initialize a local var gcc/combine.cc| 2 +- gcc/config/riscv/riscv.cc | 6

[PATCH 3/3] combine: initialize a local var

2024-05-02 Thread Vineet Gupta
This is no logic change (but technically still a functional change). Ran into this when stepping thru combine code. @newpat has some random garbage for a bit until it is actually set. With the fix it remains 0 until actually set. gcc/ChangeLog: * combine.cc (try_combine): Initialize

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

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

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

2024-05-02 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.

[PATCH v17 00/26] Optimize more type traits

2024-05-02 Thread Ken Matsui
Changes from v16: * Replaced __builtin with __ for built-in trais other than is_unbounded_array, is_invocable, and is_nothrow_invocable. * Renamed __rank to __array_rank. Changes from v15: * Rebased on top of trunk * Fixed build_invoke * Implemented object_type_p & referenceable_type_p *

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

2024-05-02 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 1/3] docs: rtl: document GET_MODE_INNER

2024-05-02 Thread Vineet Gupta
gcc/ChangeLog * doc/rtl.texi: Add entry for GET_MODE_INNER. Signed-off-by: Vineet Gupta --- gcc/doc/rtl.texi | 4 1 file changed, 4 insertions(+) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 8ea6588cb71f..f1643f41dfc6 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi

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

2024-05-02 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 2/3] RISC-V: miscll comment fixes [NFC]

2024-05-02 Thread Vineet Gupta
gcc/ChangeLog: * config/riscv/riscv.cc: Comment updates. * config/riscv/riscv.h: Ditto. Signed-off-by: Vineet Gupta --- gcc/config/riscv/riscv.cc | 6 -- gcc/config/riscv/riscv.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v17 25/26] c++: Implement __builtin_is_nothrow_invocable trait

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

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

2024-05-02 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

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

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

[PATCH v17 23/26] c++: Implement __builtin_is_invocable trait

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

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

2024-05-02 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 v17 20/26] libstdc++: Optimize std::decay compilation performance

2024-05-02 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 v17 06/26] libstdc++: Optimize std::is_pointer compilation performance

2024-05-02 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 v17 17/26] c++: Implement __add_rvalue_reference built-in trait

2024-05-02 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 v17 13/26] c++: Implement __remove_all_extents built-in trait

2024-05-02 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 v17 19/26] c++: Implement __decay built-in trait

2024-05-02 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 v17 18/26] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-05-02 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 v17 22/26] libstdc++: Optimize std::rank compilation performance

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

[PATCH v17 21/26] c++: Implement __array_rank built-in trait

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

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

2024-05-02 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 v17 24/26] libstdc++: Optimize std::is_invocable compilation performance

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

[PATCH v17 07/26] c++: Implement __builtin_is_unbounded_array trait

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

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

2024-05-02 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. (object_type_p): New function. (referenceable_type_p): Likewise.

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

2024-05-02 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

  1   2   >