[PATCH v2 3/8] c++: Implement __is_volatile built-in trait

2023-12-23 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 v2 4/8] libstdc++: Optimize std::is_volatile compilation performance

2023-12-23 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 v2 6/8] libstdc++: Optimize std::is_pointer compilation performance

2023-12-23 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 | 29 ++ libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 65

[PATCH v2 5/8] c++: Implement __is_pointer built-in trait

2023-12-23 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __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 | 1 + gcc/cp/semantics.cc

[PATCH v2 7/8] c++: Implement __is_unbounded_array built-in trait

2023-12-23 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 v2 8/8] libstdc++: Optimize std::is_unbounded_array compilation performance

2023-12-23 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 v2] libstdc++: Use _GLIBCXX_USE_BUILTIN_TRAIT

2023-12-23 Thread Ken Matsui
_GLIBCXX_DO_NOT_USE_BUILTIN_TRAITS macro, without needing to modify the source code. libstdc++-v3/ChangeLog: * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT. Signed-off-by: Ken Matsui Reviewed-by: Patrick Palka --- libstdc++-v3/include/std/type_traits | 10 +- 1 file changed, 5 insertions(+), 5

Re: [PATCH v2] libstdc++: Use _GLIBCXX_USE_BUILTIN_TRAIT

2024-01-04 Thread Ken Matsui
On Thu, Jan 4, 2024 at 2:11 PM Jonathan Wakely wrote: > > On Sat, 23 Dec 2023 at 23:06, Ken Matsui wrote: > > > > This patch uses _GLIBCXX_USE_BUILTIN_TRAIT macro instead of __has_builtin > > in the type_traits header for traits that have a corresponding fallback > &g

Re: [PATCH v2 6/8] libstdc++: Optimize std::is_pointer compilation performance

2024-01-05 Thread Ken Matsui
On Thu, Jan 4, 2024 at 2:16 PM Patrick Palka wrote: > > On Thu, 4 Jan 2024, Patrick Palka wrote: > > > On Sat, 23 Dec 2023, Ken Matsui wrote: > > > > > This patch optimizes the compilation performance of std::is_pointer > > > by dispatching

Re: [PATCH v2 6/8] libstdc++: Optimize std::is_pointer compilation performance

2024-01-05 Thread Ken Matsui
On Thu, Jan 4, 2024 at 2:13 PM Jonathan Wakely wrote: > > On Sat, 23 Dec 2023 at 22:07, Ken Matsui wrote: > > > > This patch optimizes the compilation performance of std::is_pointer > > by dispatching to the new __is_pointer built-in trait. > &

[PATCH v3 0/8] Optimize more type traits

2024-01-05 Thread Ken Matsui
ks and the instability of the benchmark results. Here are new 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 memory: -0.300891%, total memory: -0.247934% is_volatile_v: https://github.com/ken-matsui

[PATCH v3 3/8] c++: Implement __is_volatile built-in trait

2024-01-05 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 v3 2/8] libstdc++: Optimize std::is_const compilation performance

2024-01-05 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 v3 4/8] libstdc++: Optimize std::is_volatile compilation performance

2024-01-05 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 v3 7/8] c++: Implement __is_unbounded_array built-in trait

2024-01-05 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 v3 5/8] c++: Implement __is_pointer built-in trait

2024-01-05 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __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 | 1 + gcc/cp/semantics.cc

[PATCH v3 6/8] libstdc++: Optimize std::is_pointer compilation performance

2024-01-05 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 v3 1/8] c++: Implement __is_const built-in trait

2024-01-05 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 v3 8/8] libstdc++: Optimize std::is_unbounded_array compilation performance

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

Re: [PATCH v25 25/33] libstdc++: Optimize std::is_function compilation performance

2023-12-06 Thread Ken Matsui
On Tue, Oct 24, 2023 at 4:02 AM Jonathan Wakely wrote: > > > > On Tue, 24 Oct 2023 at 03:16, Ken Matsui wrote: >> >> This patch optimizes the compilation performance of std::is_function >> by dispatching to the new __is_function built-in trait

[PATCH v26 00/23] Optimize type traits compilation performance

2023-12-06 Thread Ken Matsui
all paddings affected by the enum rid change. Changes in v11: * Merged all patches into one patch series. * Rebased on top of trunk. * Unified commit message style. * Used _GLIBCXX_USE_BUILTIN_TRAIT. Ken Matsui (23): c++: Sort built-in traits alphabetically c-family,

[PATCH v26 00/23] Optimize type traits compilation performance

2023-12-06 Thread Ken Matsui
anges in v11: * Merged all patches into one patch series. * Rebased on top of trunk. * Unified commit message style. * Used _GLIBCXX_USE_BUILTIN_TRAIT. Ken Matsui (23): c++: Sort built-in traits alphabetically c-family, c++: Look up built-in traits via identif

[PATCH v26 01/23] c++: Sort built-in traits alphabetically

2023-12-06 Thread Ken Matsui
. (finish_trait_expr): Likewise. (finish_trait_type): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Sort built-in traits alphabetically. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 68 - gcc/cp/cp-trait.def

[PATCH v26 02/23] c-family, c++: Look up built-in traits via identifier node

2023-12-06 Thread Ken Matsui
. (cp_parser_simple_type_specifier): Remove all RID value cases for built-in traits. Handle type-yielding built-in traits. Co-authored-by: Patrick Palka Signed-off-by: Ken Matsui --- gcc/c-family/c-common.cc | 7 --- gcc/c-family/c-common.h | 5 -- gcc/cp/cp-objcp-common.cc | 8

[PATCH v26 03/23] c++: Accept the use of built-in trait identifiers

2023-12-06 Thread Ken Matsui
p_lexer_peek_trait_type. (cp_parser_simple_type_specifier): Likewise. (cp_parser_primary_expression): Call cp_lexer_peek_trait_expr. Signed-off-by: Ken Matsui --- gcc/cp/parser.cc | 53 +++- 1 file changed, 34 insertions(+), 19 deletions(-) diff -

[PATCH v26 04/23] c++: Implement __is_array built-in trait

2023-12-06 Thread Ken Matsui
/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_array. * g++.dg/ext/is_array.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 v26 05/23] libstdc++: Optimize std::is_array compilation performance

2023-12-06 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_array by dispatching to the new __is_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_array): Use __is_array built-in trait. (is_array_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v26 06/23] c++: Implement __is_bounded_array built-in trait

2023-12-06 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_bounded_array. * g++.dg/ext/is_bounded_array.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc| 3 ++ gcc/cp/cp-trait.def

[PATCH v26 07/23] libstdc++: Optimize std::is_bounded_array compilation performance

2023-12-06 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_bounded_array by dispatching to the new __is_bounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_bounded_array_v): Use __is_bounded_array built-in trait. Signed-off-by: Ken Matsui

[PATCH v26 08/23] c++: Implement __is_scoped_enum built-in trait

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

[PATCH v26 09/23] libstdc++: Optimize std::is_scoped_enum compilation performance

2023-12-06 Thread Ken Matsui
. 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 2a1a0aa80ff..4a5068791af 100644 --- a/libstdc++-v3/include/std/type_traits +++ b

[PATCH v26 10/23] c++: Implement __is_member_pointer built-in trait

2023-12-06 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_member_pointer. * g++.dg/ext/is_member_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3 ++ gcc/cp/cp-trait.def

[PATCH v26 11/23] libstdc++: Optimize std::is_member_pointer compilation performance

2023-12-06 Thread Ken Matsui
): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 4a5068791af..4ab1d29ff51 100644 --- a/libstdc++-v3

[PATCH v26 12/23] c++: Implement __is_member_function_pointer built-in trait

2023-12-06 Thread Ken Matsui
): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_member_function_pointer. * g++.dg/ext/is_member_function_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc

[PATCH v26 13/23] libstdc++: Optimize std::is_member_function_pointer compilation performance

2023-12-06 Thread Ken Matsui
trait. (is_member_function_pointer_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 16 1 file changed, 16 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 4ab1d29ff51

[PATCH v26 14/23] c++: Implement __is_member_object_pointer built-in trait

2023-12-06 Thread Ken Matsui
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_member_object_pointer. * g++.dg/ext/is_member_object_pointer.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3

[PATCH v26 15/23] libstdc++: Optimize std::is_member_object_pointer compilation performance

2023-12-06 Thread Ken Matsui
. (is_member_object_pointer_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 99ae825301c

[PATCH v26 16/23] c++: Implement __is_reference built-in trait

2023-12-06 Thread Ken Matsui
/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 v26 17/23] libstdc++: Optimize std::is_reference compilation performance

2023-12-06 Thread Ken Matsui
: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 1edd05acb4c..db880d87f60 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH v26 18/23] c++: Implement __is_function built-in trait

2023-12-06 Thread Ken Matsui
/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 v26 20/23] c++: Implement __is_object built-in trait

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

[PATCH v26 19/23] libstdc++: Optimize std::is_function compilation performance

2023-12-06 Thread Ken Matsui
implementation. Move this under is_const_v as this depends on is_const_v. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include

[PATCH v26 22/23] c++: Implement __remove_pointer built-in trait

2023-12-06 Thread Ken Matsui
__remove_pointer. * g++.dg/ext/remove_pointer.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_pointer.C | 51

[PATCH v26 21/23] libstdc++: Optimize std::is_object compilation performance

2023-12-06 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_object by dispatching to the new __is_object built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use __is_object built-in trait. (is_object_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v26 23/23] libstdc++: Optimize std::remove_pointer compilation performance

2023-12-06 Thread Ken Matsui
This patch optimizes the compilation performance of std::remove_pointer by dispatching to the new remove_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_pointer): Use __remove_pointer built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3

Re: [PATCH v26 00/23] Optimize type traits compilation performance

2023-12-10 Thread Ken Matsui
On Sun, Dec 10, 2023 at 10:19 AM Jason Merrill wrote: > > On 12/7/23 00:11, Ken Matsui wrote: > > This patch series optimizes type traits compilation performance by > > implementing built-in type traits and using them in libstdc++. > > > > Changes in v26: > >

Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-09-19 Thread Ken Matsui
On Tue, Sep 19, 2023 at 9:59 AM Jason Merrill wrote: > > On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote: > > Now that RID_MAX has reached 255, we need to update the bit sizes of every > > use of the enum rid from 8 to 16 to support more keywords. > > Sorry to bring t

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

2024-06-27 Thread Ken Matsui
Ping. On Sat, Jun 15, 2024 at 10:30 PM 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 > as Clang provides. > > PR preprocessor/8980

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

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

2024-06-13 Thread Ken Matsui
On Thu, Jun 13, 2024 at 5:46 AM Jonathan Wakely wrote: > > On 23/05/24 15:15 -0700, Ken Matsui wrote: > >On Thu, May 23, 2024 at 3:15 PM Patrick Palka wrote: > >> > >> On Sat, 11 May 2024, Ken Matsui wrote: > >> > >> > This patch optimizes the

Re: [PATCH v26 03/13] libstdc++: Optimize std::is_pointer compilation performance

2024-06-13 Thread Ken Matsui
On Thu, Jun 13, 2024 at 5:31 AM Jonathan Wakely wrote: > > On 11/05/24 02:01 -0700, Ken Matsui wrote: > >This patch optimizes the compilation performance of std::is_pointer > >by dispatching to the new __is_pointer built-in trait. > > > >libstdc++-v3/ChangeLog

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

2024-06-13 Thread Ken Matsui
: New test. * g++.dg/warn/Wpragma-once-outside-header.C: New test. Signed-off-by: Ken Matsui --- gcc/c-family/c.opt | 4 gcc/doc/invoke.texi| 10 -- .../g++.dg/warn/Wno-pragma-once-outside-header.C

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

2024-06-13 Thread Ken Matsui
On Tue, Jun 4, 2024 at 7:54 AM Jason Merrill wrote: > > On 3/14/24 04:01, 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

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

2024-06-15 Thread Ken Matsui
On Thu, Jun 13, 2024 at 7:44 AM Jason Merrill wrote: > > On 6/13/24 10:31, 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 > > as Clang. &

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

2024-06-15 Thread Ken Matsui
once): Use CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER. gcc/testsuite/ChangeLog: * g++.dg/warn/Wno-pragma-once-outside-header.C: New test. * g++.dg/warn/Wpragma-once-outside-header.C: New test. Signed-off-by: Ken Matsui --- gcc/c-family/c.opt | 4 +

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

2024-06-15 Thread Ken Matsui
once): Use CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER. gcc/testsuite/ChangeLog: * g++.dg/warn/Wno-pragma-once-outside-header.C: New test. * g++.dg/warn/Wpragma-once-outside-header.C: New test. Signed-off-by: Ken Matsui --- gcc/c-family/c.opt | 4 +

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

2024-04-30 Thread Ken Matsui
On Tue, Apr 30, 2024 at 1:50 PM Jason Merrill wrote: > > On 3/15/24 01:15, Ken Matsui wrote: > > Added diagnostics for build_invoke. > > > > Ok for 15? > > Thanks, just a few tweaks needed. Will you have time to make them? Or > Patrick? I believe I will have ti

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

2024-05-02 Thread Ken Matsui
On Tue, Apr 30, 2024 at 2:08 PM Jason Merrill wrote: > > On 2/28/24 11:26, Ken Matsui wrote: > > This patch implements built-in trait for std::rank. > > __rank seems too short, maybe __array_rank? > > Actually, it occurs to me that perhaps we should have been adding >

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

2024-05-02 Thread Ken Matsui
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 std::rank. > > > > __rank seems too short, maybe __array_rank? > >

[PATCH v16 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 __builtin_is_volatile trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __builtin_is_volatile trait. (is_volatile_v): Likewise. Signed-off-by: Ken

[PATCH v16 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 4e97e45f130..36ac900605a 100644 --- a/libstdc++-v3

[PATCH v16 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 __builtin_is_const trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __builtin_is_const trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v16 03/26] c++: Implement __builtin_is_volatile trait

2024-05-02 Thread Ken Matsui
. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_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

[PATCH v16 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 __builtin_rank trait. libstdc++-v3/ChangeLog: * include/std/type_traits (rank): Use __builtin_rank trait. (rank_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std

[PATCH v16 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 v16 21/26] c++: Implement __builtin_rank trait

2024-05-02 Thread Ken Matsui
/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_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 v16 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 v16 15/26] c++: Implement __builtin_add_lvalue_reference trait

2024-05-02 Thread Ken Matsui
.C: Test existence of __builtin_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

[PATCH v16 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 v16 09/26] c++: Implement __builtin_add_pointer 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 __builtin_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

[PATCH v16 11/26] c++: Implement __builtin_remove_extent trait

2024-05-02 Thread Ken Matsui
__builtin_remove_extent. * 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

[PATCH v16 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 v16 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 v16 01/26] c++: Implement __builtin_is_const trait

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_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

[PATCH v16 13/26] c++: Implement __builtin_remove_all_extents trait

2024-05-02 Thread Ken Matsui
: Test existence of __builtin_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

[PATCH v16 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 __builtin_decay trait. libstdc++-v3/ChangeLog: * include/std/type_traits (decay): Use __builtin_decay trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file

[PATCH v16 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 v16 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 __builtin_remove_extent trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_extent): Use __builtin_remove_extent trait. Signed-off-by: Ken Matsui --- libstdc++-v3

[PATCH v16 05/26] c++: Implement __builtin_is_pointer trait

2024-05-02 Thread Ken Matsui
/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __builtin_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 | 1 + gcc/cp

[PATCH v16 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 v16 17/26] c++: Implement __builtin_add_rvalue_reference trait

2024-05-02 Thread Ken Matsui
.C: Test existence of __builtin_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

[PATCH v16 00/26] Optimize more type traits

2024-05-02 Thread Ken Matsui
_const: https://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 m

[PATCH v16 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 __builtin_add_pointer trait. libstdc++-v3/ChangeLog: * include/std/type_traits (add_pointer): Use __builtin_add_pointer trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std

[PATCH v16 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 __builtin_remove_all_extents trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_all_extents): Use __builtin_remove_all_extents trait. Signed-off-by: Ken Matsui

[PATCH v16 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 8f756712c63..4e97e45f130 100644 --- a/libstdc++-v3

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

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

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

[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

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

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