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

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

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

[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

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

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

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 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 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 v20 23/26] c++: Implement __is_invocable built-in trait

2024-05-02 Thread Ken Matsui
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/c

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

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

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 hash

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

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

[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 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 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 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 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 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 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 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 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 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] c++: Avoid using __array_rank as a variable name [PR115061]

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

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. > > I th

[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 v5] gcc, libcpp: Add warning switch for "#pragma once in main file" [PR89808]

2024-10-08 Thread Ken Matsui
On Tuesday, October 8th, 2024 at 11:21 AM, Marek Polacek wrote: > > > On Mon, Oct 07, 2024 at 11:16:20PM +0000, Ken Matsui wrote: > > > On Monday, October 7th, 2024 at 4:41 PM, Marek Polacek pola...@redhat.com > > wrote: > > > > > On Sat, Jun 1

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

2024-10-09 Thread Ken Matsui
On Wednesday, October 9th, 2024 at 4:27 AM, Jiang, Haochen wrote: > > > > From: Andreas Schwab sch...@suse.de > > > Sent: Wednesday, October 9, 2024 2:04 PM > > > > ../../libcpp/directives.cc: In function 'void do_pragma_once(cpp_reader*)': > > ../../libcpp/directives.cc:2078:20: error: unkn

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

2024-10-07 Thread Ken Matsui
On Monday, October 7th, 2024 at 4:41 PM, Marek Polacek wrote: > > > On Sat, Jun 15, 2024 at 10:30:35PM -0700, Ken Matsui wrote: > > > This patch adds a warning switch for "#pragma once in main file". The > > warning option name is Wpragma-once-outside-head

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

2024-10-04 Thread Ken Matsui
Ping for -Wno-pragma-once-outside-header. On Thursday, June 27th, 2024 at 11:00 AM, Ken Matsui wrote: > > > Ping. > > > On Sat, Jun 15, 2024 at 10:30 PM Ken Matsui kmat...@gcc.gnu.org wrote: > > > This patch adds a warning switch for "#pragma once in ma

Re: [PATCH v3 4/6] libstdc++: use new built-in trait __is_function for std::is_function

2023-06-09 Thread Ken Matsui via Gcc-patches
On Fri, Jun 9, 2023 at 10:54 AM Patrick Palka wrote: > > On Sun, 2 Apr 2023, Ken Matsui via Gcc-patches wrote: > > > This patch gets std::is_function to dispatch to new built-in trait > > __is_function. > > For std::is_function and other predicate-like type traits, I t

[PATCH v4 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-06-10 Thread Ken Matsui via Gcc-patches
l_constant, which can be mostly shared. That is, the purpose of built-in traits is considered as achieved. Changes in v4 * Used built-in traits for the corresponding predicate-like type traits. Ken Matsui (6): c++: implement __is_reference built-in trait libstdc++: use new built-in tra

[PATCH v4 1/6] c++: implement __is_reference built-in trait

2023-06-10 Thread Ken Matsui via Gcc-patches
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_reference. * g++.dg/ext/is_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc

[PATCH v4 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-06-10 Thread Ken Matsui via Gcc-patches
This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. (is_reference_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std

[PATCH v4 3/6] c++: implement __is_function built-in trait

2023-06-10 Thread Ken Matsui via Gcc-patches
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_function. * g++.dg/ext/is_function.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc

[PATCH v4 5/6] c++, libstdc++: implement __is_void built-in trait

2023-06-10 Thread Ken Matsui via Gcc-patches
/cpp_type_traits.h (__is_void): Remove unused __is_void. * include/std/type_traits (is_void_v): Use __is_void built-in trait. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def | 1 + gcc/cp

[PATCH v4 4/6] libstdc++: use new built-in trait __is_function for std::is_function

2023-06-10 Thread Ken Matsui via Gcc-patches
This patch gets std::is_function to dispatch to new built-in trait __is_function. libstdc++-v3/ChangeLog: * include/std/type_traits (is_function): Use __is_function built-in trait. (is_function_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std

[PATCH v4 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-06-10 Thread Ken Matsui via Gcc-patches
This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_reference, and __is_void. Signed-off-by: Ken Matsui

Re: [PATCH v4 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-06-12 Thread Ken Matsui via Gcc-patches
Yes, I have fixed them on my side and am waiting for the test results! Thank you! On Mon, Jun 12, 2023 at 11:09 AM François Dumont wrote: > Same remark for all your alike patches. > > On 11/06/2023 04:43, Ken Matsui via Libstdc++ wrote: > > This patch gets std::is_reference to

[PATCH v5 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-06-12 Thread Ken Matsui via Gcc-patches
l_constant, which can be mostly shared. That is, the purpose of built-in traits is considered as achieved. Changes in v5 * Wrap predicate-like type traits in #if. Ken Matsui (6): c++: implement __is_reference built-in trait libstdc++: use new built-in trait __is_reference for

[PATCH v5 1/6] c++: implement __is_reference built-in trait

2023-06-12 Thread Ken Matsui via Gcc-patches
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_reference. * g++.dg/ext/is_reference.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 +++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc

[PATCH v5 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-06-12 Thread Ken Matsui via Gcc-patches
This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. (is_reference_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std

<    3   4   5   6   7   8   9   10   11   12   >