Re: [PATCH v26 01/13] libstdc++: Optimize std::is_const compilation performance

2024-05-23 Thread Ken Matsui
On Thu, May 23, 2024 at 3:15 PM Patrick Palka wrote: > > On Sat, 11 May 2024, Ken Matsui wrote: > > > This patch optimizes the compilation performance of std::is_const > > by dispatching to the new __is_const built-in trait. > > This patch series LGTM Thank you! >

[COMMITTED] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
ank. Signed-off-by: Ken Matsui --- gcc/cp/semantics.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc index 43b175f92fd..df62e2d80db 100644 --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -12914,10 +12914

Re: [PATCH] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
On Mon, May 13, 2024 at 8:19 AM Marek Polacek wrote: > > On Sun, May 12, 2024 at 11:48:07PM -0700, Ken Matsui wrote: > > This patch fixes a compilation error when building GCC using Clang. > > Since __array_rank is used as a built-in trait name, use rank instead. > >

[PATCH] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
This patch fixes a compilation error when building GCC using Clang. Since __array_rank is used as a built-in trait name, use rank instead. PR c++/115061 gcc/cp/ChangeLog: * semantics.cc (finish_trait_expr): Use rank instead of __array_rank. Signed-off-by: Ken Matsui

[PATCH v26 10/13] libstdc++: Optimize std::decay compilation performance

2024-05-11 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 v26 09/13] libstdc++: Optimize std::add_rvalue_reference compilation performance

2024-05-11 Thread Ken Matsui
. (__add_rvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index effa3fbcb75..824cad90a25 100644 --- a/libstdc++-v3

[PATCH v26 06/13] libstdc++: Optimize std::remove_extent compilation performance

2024-05-11 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 --- libstdc++-v3

[PATCH v26 07/13] libstdc++: Optimize std::remove_all_extents compilation performance

2024-05-11 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 v26 05/13] libstdc++: Optimize std::add_pointer compilation performance

2024-05-11 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 --- libstdc++-v3/include

[PATCH v26 04/13] libstdc++: Optimize std::is_unbounded_array compilation performance

2024-05-11 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 v26 03/13] libstdc++: Optimize std::is_pointer compilation performance

2024-05-11 Thread Ken Matsui
/type_traits (is_pointer): Likewise. (is_pointer_v): Likewise. Co-authored-by: Jonathan Wakely Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++- libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 66

[PATCH v26 01/13] libstdc++: Optimize std::is_const compilation performance

2024-05-11 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 v26 13/13] libstdc++: Optimize std::is_nothrow_invocable compilation performance

2024-05-11 Thread Ken Matsui
/20_util/is_nothrow_invocable/incomplete_args_neg.cc: Handle the new error from __is_nothrow_invocable. * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 4

[PATCH v26 12/13] libstdc++: Optimize std::is_invocable compilation performance

2024-05-11 Thread Ken Matsui
/incomplete_args_neg.cc: Handle the new error from __is_invocable. * testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 4 .../testsuite/20_util/is_invocable/incomplete_args_neg.cc

[PATCH v26 02/13] libstdc++: Optimize std::is_volatile compilation performance

2024-05-11 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 v26 11/13] libstdc++: Optimize std::rank compilation performance

2024-05-11 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 --- libstdc

[PATCH v26 08/13] libstdc++: Optimize std::add_lvalue_reference compilation performance

2024-05-11 Thread Ken Matsui
. (__add_lvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 5b74e44d0a6..effa3fbcb75 100644 --- a/libstdc++-v3

Re: [PATCH v25 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
On Fri, May 10, 2024 at 1:23 PM Jason Merrill wrote: > > On 5/10/24 12:14, Ken Matsui wrote: > > Removed the redundant check and fixed the flow. Could you please review > > this > > again? > > Looks good! All the compiler trait patches are OK. Thank you so much

[PATCH v25 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
* g++.dg/ext/is_invocable1.C: New test. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.

Re: [PATCH v24 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
On Fri, May 10, 2024 at 8:27 AM Jason Merrill wrote: > > On 5/10/24 10:45, Ken Matsui wrote: > > Fixed the incorrect if condition. Could you please review this again? > > > > -- >8 -- > > > > This patch implements built-in trait for std::is_invocable. >

[PATCH v24 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
ext/is_invocable1.C: New test. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def |

Re: [PATCH v23 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
On Fri, May 10, 2024 at 7:20 AM Jason Merrill wrote: > > On 5/10/24 07:24, Ken Matsui wrote: > > Fixed the reference to pointer to class case. Ok for trunk? > > > > -- >8 -- > > > > This patch implements built-in trait for std::is_invocable. > > >

[PATCH v23 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
le1.C: New test. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp

Re: [PATCH v22 20/23] c++: Implement __is_invocable built-in trait

2024-05-10 Thread Ken Matsui
On Thu, May 9, 2024 at 9:16 AM Jason Merrill wrote: > > On 5/8/24 01:04, Ken Matsui wrote: > > Fixed the reference_wrapper case. I used non_ref_datum_type to avoid > > potentially multiple build_trait_object calls. > > > > -- >8 -- > > > >

[PATCH v22 20/23] c++: Implement __is_invocable built-in trait

2024-05-07 Thread Ken Matsui
est existence of __is_invocable. * g++.dg/ext/is_invocable1.C: New test. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 +

Re: [PATCH v21 20/23] c++: Implement __is_invocable built-in trait

2024-05-07 Thread Ken Matsui
On Tue, May 7, 2024 at 11:36 AM Jason Merrill wrote: > > On 5/3/24 16:52, Ken Matsui wrote: > > Fixed datum reference problem. Ok for trunk? > > > > -- >8 -- > > > > This patch implements built-in trait for std::is_invocable. > > > > gcc

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

2024-05-07 Thread Ken Matsui
Hi Jonathan, Since __is_const, __is_volatile, and __is_pointer were approved, could you please review these patches for libstdc++? I guess that you already reviewed almost equivalent patches, but I wanted to make sure. Sincerely, Ken Matsui On Thu, May 2, 2024 at 1:16 PM Ken Matsui wrote

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

2024-05-06 Thread Ken Matsui
On Mon, May 6, 2024 at 9:20 AM Jason Merrill wrote: > > On 5/6/24 09:25, Ken Matsui wrote: > > On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui > > wrote: > >> > >> On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote: > >>> > >>> On

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

2024-05-06 Thread Ken Matsui
On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui wrote: > > On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote: > > > > On Wed, 28 Feb 2024, Ken Matsui wrote: > > > > > This patch implements a --num-commits (-n) flag for shorthand for > > > the range of

Re: [PATCH v2] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-05-06 Thread Ken Matsui
On Thu, Mar 14, 2024 at 1:01 AM Ken Matsui wrote: > > On Sat, Mar 2, 2024 at 5:04 AM Ken Matsui wrote: > > > > This patch adds a warning switch for "#pragma once in main file". The > > warning option name is Wpragma-once-outside-header, which is the same

[PATCH v21 20/23] c++: Implement __is_invocable built-in trait

2024-05-03 Thread Ken Matsui
est. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp/cp-tre

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

2024-05-03 Thread Ken Matsui
On Fri, May 3, 2024 at 12:38 PM Jason Merrill wrote: > > On 5/2/24 23:25, Ken Matsui wrote: > > Addressed Jason's review comments. Ok for trunk? > > > > -- >8 -- > > > > This patch implements built-in trait for std::is_invocable. > > > > gcc

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

2024-05-02 Thread Ken Matsui
est. * g++.dg/ext/is_invocable2.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp/cp-tre

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::

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

2024-05-02 Thread Ken Matsui
++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp/cp-tree.h | 2 + gcc/cp/method.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 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. > > * c

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:

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. > > * c

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

2024-05-02 Thread Ken Matsui
: * g++.dg/ext/has-builtin-1.C: Test existence of __array_rank. * g++.dg/ext/rank.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 24

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

2024-05-02 Thread Ken Matsui
++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp/cp-tree.h | 2 + gcc/cp/method.cc

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

2024-05-02 Thread Ken Matsui
. * g++.dg/ext/remove_extent.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 5 + gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ gcc/testsuite/g++.dg/ext/remove_extent.C | 16

[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 --- libstdc

[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 --- libstdc++-v3

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

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer. Arrange the order lexically around __is_pointer. * g++.dg/ext/is_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def

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

2024-05-02 Thread Ken Matsui
/20_util/is_nothrow_invocable/incomplete_args_neg.cc: Handle the new error from __is_nothrow_invocable. * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 4

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

2024-05-02 Thread Ken Matsui
/incomplete_args_neg.cc: Handle the new error from __is_invocable. * testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 4 .../testsuite/20_util/is_invocable/incomplete_args_neg.cc

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

2024-05-02 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_nothrow_invocable. * g++.dg/ext/is_nothrow_invocable.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 ++ gcc/cp/cp

[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
existence of __remove_all_extents. * g++.dg/ext/remove_all_extents.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 3 +++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ gcc

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 ha

[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 --- libstdc++-v3/include

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

2024-05-02 Thread Ken Matsui
. (__add_lvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 5b74e44d0a6..effa3fbcb75 100644 --- a/libstdc++-v3

[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
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_unbounded_array. * g++.dg/ext/is_unbounded_array.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def

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

2024-05-02 Thread Ken Matsui
: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 12 gcc/testsuite/g++.dg/ext/decay.C | 22 ++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ 4 files changed, 38

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

2024-05-02 Thread Ken Matsui
. (__add_rvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index effa3fbcb75..824cad90a25 100644 --- a/libstdc++-v3

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

2024-05-02 Thread Ken Matsui
existence of __add_rvalue_reference. * g++.dg/ext/add_rvalue_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 6 ++ .../g++.dg/ext/add_rvalue_reference.C | 20

[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
/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_const. * g++.dg/ext/is_const.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 4

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

2024-05-02 Thread Ken Matsui
. (trait_expr_value): Use object_type_p. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer. * g++.dg/ext/add_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 36

[PATCH v18 00/26] Optimize more type traits

2024-05-02 Thread Ken Matsui
github.com/ken-matsui/gcc-bench/blob/main/is_const.md#sat-dec-23-090605-am-pst-2023 time: -4.36603%, peak memory: -0.300891%, total memory: -0.247934% is_const_v: https://github.com/ken-matsui/gcc-bench/blob/main/is_const_v.md#sat-jun-24-044815-am-pdt-2023 time: -2.86467%, peak memory: -1.0654%

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

2024-05-02 Thread Ken Matsui
/type_traits (is_pointer): Likewise. (is_pointer_v): Likewise. Co-authored-by: Jonathan Wakely Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++- libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 66

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

2024-05-02 Thread Ken Matsui
existence of __add_lvalue_reference. * g++.dg/ext/add_lvalue_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 6 ++ .../g++.dg/ext/add_lvalue_reference.C | 21

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

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_volatile. * g++.dg/ext/is_volatile.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc

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: > >>> > >>&

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 > > > > https

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 > > > > h

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

2024-05-02 Thread Ken Matsui
/20_util/is_nothrow_invocable/incomplete_args_neg.cc: Handle the new error from __builtin_is_nothrow_invocable. * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits

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

2024-05-02 Thread Ken Matsui
/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_const. * g++.dg/ext/is_const.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 4

[PATCH v17 00/26] Optimize more type traits

2024-05-02 Thread Ken Matsui
or add_pointer, remove_extent, remove_all_extents, add_lvalue_reference, add_rvalue_reference, decay, rank, is_invocable, and is_nothrow_invocable. Here are the benchmark results: is_const: https://github.com/ken-matsui/gcc-bench/blob/main/is_const.md#sat-dec-23-090605-am-pst-2023 time: -4.36603%, peak mem

[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 --- libstdc++-v3/include

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

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_volatile. * g++.dg/ext/is_volatile.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc

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

2024-05-02 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_is_nothrow_invocable. * g++.dg/ext/is_nothrow_invocable.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6

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

2024-05-02 Thread Ken Matsui
existence of __add_lvalue_reference. * g++.dg/ext/add_lvalue_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 6 ++ .../g++.dg/ext/add_lvalue_reference.C | 21

[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
.C: New test. * g++.dg/ext/is_invocable3.C: New test. * g++.dg/ext/is_invocable4.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 6 + gcc/cp/cp-trait.def | 1 + gcc/cp/cp-tree.h | 2 + gcc/cp

[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 --- libstdc++-v3

[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
/type_traits (is_pointer): Likewise. (is_pointer_v): Likewise. Co-authored-by: Jonathan Wakely Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++- libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 66

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

2024-05-02 Thread Ken Matsui
existence of __add_rvalue_reference. * g++.dg/ext/add_rvalue_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 6 ++ .../g++.dg/ext/add_rvalue_reference.C | 20

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

2024-05-02 Thread Ken Matsui
existence of __remove_all_extents. * g++.dg/ext/remove_all_extents.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 3 +++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ gcc

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

2024-05-02 Thread Ken Matsui
: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 12 gcc/testsuite/g++.dg/ext/decay.C | 22 ++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ 4 files changed, 38

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

2024-05-02 Thread Ken Matsui
. (__add_rvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 0ac8c6537c1..ffaf177e511 100644 --- a/libstdc++-v3

[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 --- libstdc

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

2024-05-02 Thread Ken Matsui
: * g++.dg/ext/has-builtin-1.C: Test existence of __array_rank. * g++.dg/ext/rank.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 24

[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
/incomplete_args_neg.cc: Handle the new error from __builtin_is_invocable. * testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 4 .../testsuite/20_util/is_invocable

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

2024-05-02 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_is_unbounded_array. * g++.dg/ext/is_unbounded_array.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp

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

2024-05-02 Thread Ken Matsui
. (trait_expr_value): Use object_type_p. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer. * g++.dg/ext/add_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 36

[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

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

2024-05-02 Thread Ken Matsui
. * g++.dg/ext/remove_extent.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 5 + gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ gcc/testsuite/g++.dg/ext/remove_extent.C | 16

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

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer. Arrange the order lexically around __is_pointer. * g++.dg/ext/is_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def

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

2024-05-02 Thread Ken Matsui
. (__add_lvalue_reference_helper): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed, 12 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index e6edb57a3dc..0ac8c6537c1 100644 --- a/libstdc++-v3

[PATCH v17 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

Re: Trait built-in naming convention

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 10:12 AM Jason Merrill wrote: > > On 5/2/24 12:45, Jason Merrill wrote: > > On 5/2/24 12:20, Ken Matsui wrote: > >> On Thu, May 2, 2024 at 8:34 AM Ken Matsui > >> wrote: > >>> > >>> On Thu, May 2, 2024 at 8:16 AM P

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 9:45 AM Jason Merrill wrote: > > On 5/2/24 12:20, Ken Matsui wrote: > > On Thu, May 2, 2024 at 8:34 AM Ken Matsui wrote: > >> > >> On Thu, May 2, 2024 at 8:16 AM Patrick Palka wrote: > >>> > >>> On Tue, 30 Apr 2024, J

[PATCH v16 19/26] c++: Implement __builtin_decay trait

2024-05-02 Thread Ken Matsui
++.dg/ext/decay.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 12 gcc/testsuite/g++.dg/ext/decay.C | 22 ++ gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++ 4 files

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

2024-05-02 Thread Ken Matsui
On Thu, May 2, 2024 at 8:34 AM Ken Matsui wrote: > > On Thu, May 2, 2024 at 8:16 AM Patrick Palka wrote: > > > > On Tue, 30 Apr 2024, Jason Merrill wrote: > > > > > On 2/28/24 11:26, Ken Matsui wrote: > > > > This patch implements built-in trait for

  1   2   3   4   5   6   7   8   9   10   >