[PATCH v19 19/40] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-13 Thread Ken Matsui
. (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 d7f89cf7c06..e1b10240dc2

[PATCH v19 22/40] c++: Implement __is_reference built-in trait

2023-10-13 Thread Ken Matsui
. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/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

[PATCH v19 29/40] c++: Implement __is_pointer built-in trait

2023-10-13 Thread Ken Matsui
. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/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

[PATCH v19 10/40] c++: Implement __is_unbounded_array built-in trait

2023-10-13 Thread Ken Matsui
CPTK_IS_UNBOUNDED_ARRAY. * semantics.cc (trait_expr_value): Likewise. (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

Re: [PATCH v19 02/40] c-family, c++: Look up built-in traits through gperf

2023-10-15 Thread Ken Matsui
On Sun, Oct 15, 2023 at 1:43 PM Patrick Palka wrote: > > On Fri, 13 Oct 2023, Ken Matsui wrote: > > > Since RID_MAX soon reaches 255 and all built-in traits are used > > approximately > > once in a C++ translation unit, this patch removes all RID values for >

Re: [PATCH v19 02/40] c-family, c++: Look up built-in traits through gperf

2023-10-15 Thread Ken Matsui
On Sun, Oct 15, 2023 at 2:50 PM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > On Sun, Oct 15, 2023 at 1:43 PM Patrick Palka wrote: > > > > > > On Fri, 13 Oct 2023, Ken Matsui wrote: > > > > > > > Since RID

[PATCH v20 00/40] Optimize type traits performance

2023-10-15 Thread Ken Matsui
patch series. * Rebased on top of trunk. * Unified commit message style. * Used _GLIBCXX_USE_BUILTIN_TRAIT. Ken Matsui (40): c++: Sort built-in traits alphabetically c-family, c++: Look up built-in traits via identifier node c++: Accept the use of built-in trait

[PATCH v20 01/40] c++: Sort built-in traits alphabetically

2023-10-15 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 v20 36/40] libstdc++: Optimize is_unsigned trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_unsigned trait by dispatching to the new __is_unsigned built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. (is_unsigned_v): Likewise. Signed-off-by: Ken Matsui

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

2023-10-15 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 +-- gcc/cp/cp-tree.h

[PATCH v20 18/40] c++: Implement __is_member_function_pointer built-in trait

2023-10-15 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 v20 03/40] c++: Accept the use of built-in trait identifiers

2023-10-15 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 | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff -

[PATCH v20 15/40] libstdc++: Optimize is_scoped_enum trait performance

2023-10-15 Thread Ken Matsui
-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 d306073a797..7fd29d8d9f2 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH v20 23/40] libstdc++: Optimize is_reference trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_reference trait by dispatching to the new __is_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. (is_reference_v): Likewise. Signed-off-by: Ken

[PATCH v20 30/40] libstdc++: Optimize is_pointer trait performance

2023-10-15 Thread Ken Matsui
. Optimize its implementation. (is_pointer_v): Likewise. Co-authored-by: Jonathan Wakely Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 8 libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 44 insertions(+), 8

[PATCH v20 10/40] c++: Implement __is_unbounded_array built-in trait

2023-10-15 Thread Ken Matsui
): 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 v20 05/40] libstdc++: Optimize is_const trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_const trait 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 --- libstdc++-v3

[PATCH v20 14/40] c++: Implement __is_scoped_enum built-in trait

2023-10-15 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 v20 19/40] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-15 Thread Ken Matsui
. (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 d7f89cf7c06..e1b10240dc2

[PATCH v20 16/40] c++: Implement __is_member_pointer built-in trait

2023-10-15 Thread Ken Matsui
): 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 v20 12/40] c++: Implement __is_bounded_array built-in trait

2023-10-15 Thread Ken Matsui
): 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 | 1

[PATCH v20 39/40] c++: Implement __is_scalar built-in trait

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

[PATCH v20 33/40] libstdc++: Optimize is_fundamental trait performance

2023-10-15 Thread Ken Matsui
original implementation. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index cc466e0f606..88171e1a672 100644

[PATCH v20 11/40] libstdc++: Optimize is_unbounded_array trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_unbounded_array trait 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 v20 06/40] c++: Implement __is_volatile built-in trait

2023-10-15 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 v20 17/40] libstdc++: Optimize is_member_pointer trait performance

2023-10-15 Thread Ken Matsui
. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 7fd29d8d9f2..d7f89cf7c06 100644 --- a/libstdc++-v3/include

[PATCH v20 32/40] libstdc++: Optimize is_arithmetic trait performance

2023-10-15 Thread Ken Matsui
: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13 + 1 file changed, 13 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 3acd843f2f2..cc466e0f606 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH v20 08/40] c++: Implement __is_array built-in trait

2023-10-15 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 v20 09/40] libstdc++: Optimize is_array trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_array trait 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 --- libstdc++-v3

[PATCH v20 34/40] libstdc++: Optimize is_compound trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_compound trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_compound): Do not use __not_. (is_compound_v): Use is_fundamental_v instead. Signed-off-by: Ken Matsui

[PATCH v20 27/40] c++: Implement __remove_pointer built-in trait

2023-10-15 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 v20 25/40] libstdc++: Optimize is_function trait performance

2023-10-15 Thread Ken Matsui
. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 36ad9814047..bd57488824b 100644 --- a/libstdc++-v3/include

[PATCH v20 28/40] libstdc++: Optimize remove_pointer trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the remove_pointer trait 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/include

[PATCH v20 26/40] libstdc++: Optimize is_object trait performance

2023-10-15 Thread Ken Matsui
): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 18 ++ 1 file changed, 18 insertions(+) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index bd57488824b..674d398c075 100644 --- a/libstdc++-v3/include/std

[PATCH v20 13/40] libstdc++: Optimize is_bounded_array trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_bounded_array trait 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 --- libstdc

[PATCH v20 40/40] libstdc++: Optimize is_scalar trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_scalar trait by dispatching to the new __is_scalar built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v20 20/40] c++: Implement __is_member_object_pointer built-in trait

2023-10-15 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 v20 37/40] c++: Implement __is_signed built-in trait

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

[PATCH v20 38/40] libstdc++: Optimize is_signed trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_signed trait by dispatching to the new __is_signed built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_signed): Use __is_signed built-in trait. (is_signed_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3

[PATCH v20 24/40] c++: Implement __is_function built-in trait

2023-10-15 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 v20 31/40] c++: Implement __is_arithmetic built-in trait

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

[PATCH v20 35/40] c++: Implement __is_unsigned built-in trait

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

[PATCH v20 21/40] libstdc++: Optimize is_member_object_pointer trait performance

2023-10-15 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 e1b10240dc2..792213ebfe8

[PATCH v20 22/40] c++: Implement __is_reference built-in trait

2023-10-15 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 v20 04/40] c++: Implement __is_const built-in trait

2023-10-15 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 v20 07/40] libstdc++: Optimize is_volatile trait performance

2023-10-15 Thread Ken Matsui
This patch optimizes the performance of the is_volatile trait 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 Matsui

[PATCH v20 29/40] c++: Implement __is_pointer built-in trait

2023-10-15 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

Re: [PATCH v20 02/40] c-family, c++: Look up built-in traits via identifier node

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 7:55 AM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > Since RID_MAX soon reaches 255 and all built-in traits are used > > approximately > > once in a C++ translation unit, this patch removes all RID values for > >

Re: [PATCH v20 01/40] c++: Sort built-in traits alphabetically

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 8:17 AM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > This patch sorts built-in traits alphabetically for better code > > readability. > > Hmm, I'm not sure if we still want/need this change with this current > a

Re: [PATCH v20 30/40] libstdc++: Optimize is_pointer trait performance

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 9:36 AM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > This patch optimizes the performance of the is_pointer trait by dispatching > > to > > the new __is_pointer built-in trait. > > > > libstdc++-v3/

Re: [PATCH v20 31/40] c++: Implement __is_arithmetic built-in trait

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 10:16 AM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > This patch implements built-in trait for std::is_arithmetic. > > > > gcc/cp/ChangeLog: > > > > * cp-trait.def: Define __is_arithmetic. > &g

Re: [PATCH v20 26/40] libstdc++: Optimize is_object trait performance

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 11:04 AM Patrick Palka wrote: > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > This patch optimizes the performance of the is_object trait by dispatching > > to > > the new __is_function and __is_reference built-in traits. >

Re: [PATCH v20 02/40] c-family, c++: Look up built-in traits via identifier node

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 2:06 PM Patrick Palka wrote: > > On Mon, 16 Oct 2023, Ken Matsui wrote: > > > On Mon, Oct 16, 2023 at 7:55 AM Patrick Palka wrote: > > > > > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > > > > > Since RID

Re: [PATCH v20 01/40] c++: Sort built-in traits alphabetically

2023-10-16 Thread Ken Matsui
On Mon, Oct 16, 2023 at 2:12 PM Patrick Palka wrote: > > On Mon, 16 Oct 2023, Ken Matsui wrote: > > > On Mon, Oct 16, 2023 at 8:17 AM Patrick Palka wrote: > > > > > > On Sun, 15 Oct 2023, Ken Matsui wrote: > > > > > > > This patc

[PATCH v21 00/30] Optimize type traits performance

2023-10-17 Thread Ken Matsui
: * Evaluated 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 (30): c-family, c++: Look up

[PATCH v21 01/30] c-family, c++: Look up built-in traits via identifier node

2023-10-17 Thread Ken Matsui
-by: Ken Matsui --- gcc/c-family/c-common.cc | 7 --- gcc/c-family/c-common.h | 5 -- gcc/cp/cp-objcp-common.cc | 8 +-- gcc/cp/cp-tree.h | 33 --- gcc/cp/lex.cc | 21 +++ gcc/cp/parser.cc | 120 +- 6 files

[PATCH v21 02/30] c++: Accept the use of built-in trait identifiers

2023-10-17 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 | 47 ++- 1 file changed, 30 insertions(+), 17 deletions(-) diff --g

[PATCH v21 24/30] libstdc++: Optimize std::is_function compilation performance

2023-10-17 Thread Ken Matsui
implementation. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 36ad9814047..bd57488824b 100644 --- a/libstdc++-v3

[PATCH v21 03/30] c++: Implement __is_const built-in trait

2023-10-17 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 v21 30/30] libstdc++: Optimize std::is_pointer compilation performance

2023-10-17 Thread Ken Matsui
): Likewise. Optimize its implementation. (is_pointer_v): Likewise. Co-authored-by: Jonathan Wakely Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 8 libstdc++-v3/include/std/type_traits| 44 + 2 files changed, 44

[PATCH v21 08/30] libstdc++: Optimize std::is_array compilation performance

2023-10-17 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 --- libstdc

[PATCH v21 05/30] c++: Implement __is_volatile built-in trait

2023-10-17 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 v21 15/30] c++: Implement __is_member_pointer built-in trait

2023-10-17 Thread Ken Matsui
): 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 v22 02/31] c-family, c++: Look up built-in traits via identifier node

2023-10-17 Thread Ken Matsui
-by: Ken Matsui --- gcc/c-family/c-common.cc | 7 --- gcc/c-family/c-common.h | 5 -- gcc/cp/cp-objcp-common.cc | 8 +-- gcc/cp/cp-tree.h | 33 --- gcc/cp/lex.cc | 21 +++ gcc/cp/parser.cc | 120 +- 6 files

[PATCH v21 20/30] libstdc++: Optimize std::is_member_object_pointer compilation performance

2023-10-17 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 e1b10240dc2

[PATCH v21 13/30] c++: Implement __is_scoped_enum built-in trait

2023-10-17 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 v21 07/30] c++: Implement __is_array built-in trait

2023-10-17 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 v21 04/30] libstdc++: Optimize std::is_const compilation performance

2023-10-17 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 --- libstdc

[PATCH v21 10/30] libstdc++: Optimize std::is_unbounded_array compilation performance

2023-10-17 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 v21 06/30] libstdc++: Optimize std::is_volatile compilation performance

2023-10-17 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 v21 29/30] c++: Implement __is_pointer built-in trait

2023-10-17 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 v22 05/31] libstdc++: Optimize std::is_const compilation performance

2023-10-17 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 --- libstdc

[PATCH v21 09/30] c++: Implement __is_unbounded_array built-in trait

2023-10-17 Thread Ken Matsui
): 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 v21 19/30] c++: Implement __is_member_object_pointer built-in trait

2023-10-17 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 v21 26/30] libstdc++: Optimize std::is_object compilation performance

2023-10-17 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 --- libstdc

[PATCH v21 14/30] libstdc++: Optimize std::is_scoped_enum compilation performance

2023-10-17 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 d306073a797..7fd29d8d9f2 100644 --- a/libstdc++-v3/include/std/type_traits +++ b

[PATCH v21 11/30] c++: Implement __is_bounded_array built-in trait

2023-10-17 Thread Ken Matsui
): 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 | 1

[PATCH v21 27/30] c++: Implement __remove_pointer built-in trait

2023-10-17 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 v22 07/31] libstdc++: Optimize std::is_volatile compilation performance

2023-10-17 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 v22 00/31] Optimize type traits performance

2023-10-17 Thread Ken Matsui
_GLIBCXX_USE_BUILTIN_TRAIT. Ken Matsui (31): c++: Sort built-in traits alphabetically c-family, c++: Look up built-in traits via identifier node c++: Accept the use of built-in trait identifiers c++: Implement __is_const built-in trait libstdc++: Optimize std::is_const compilation performance c

[PATCH v22 27/31] libstdc++: Optimize std::is_object compilation performance

2023-10-17 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 --- libstdc

[PATCH v21 12/30] libstdc++: Optimize std::is_bounded_array compilation performance

2023-10-17 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 v22 12/31] c++: Implement __is_bounded_array built-in trait

2023-10-17 Thread Ken Matsui
): 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 | 1

[PATCH v22 01/31] c++: Sort built-in traits alphabetically

2023-10-17 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 v21 28/30] libstdc++: Optimize std::remove_pointer compilation performance

2023-10-17 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

[PATCH v21 25/30] c++: Implement __is_object built-in trait

2023-10-17 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 v22 06/31] c++: Implement __is_volatile built-in trait

2023-10-17 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 v21 21/30] c++: Implement __is_reference built-in trait

2023-10-17 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 v22 08/31] c++: Implement __is_array built-in trait

2023-10-17 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 v22 21/31] libstdc++: Optimize std::is_member_object_pointer compilation performance

2023-10-17 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 e1b10240dc2

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

2023-10-17 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 | 47 ++- 1 file changed, 30 insertions(+), 17 deletions(-) diff --g

[PATCH v21 22/30] libstdc++: Optimize std::is_reference compilation performance

2023-10-17 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 792213ebfe8..36ad9814047 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH v22 29/31] libstdc++: Optimize std::remove_pointer compilation performance

2023-10-17 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

[PATCH v22 23/31] libstdc++: Optimize std::is_reference compilation performance

2023-10-17 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 792213ebfe8..36ad9814047 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH v22 10/31] c++: Implement __is_unbounded_array built-in trait

2023-10-17 Thread Ken Matsui
): 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 v21 17/30] c++: Implement __is_member_function_pointer built-in trait

2023-10-17 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 v22 14/31] c++: Implement __is_scoped_enum built-in trait

2023-10-17 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 v22 19/31] libstdc++: Optimize std::is_member_function_pointer compilation performance

2023-10-17 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 d7f89cf7c06

[PATCH v21 16/30] libstdc++: Optimize std::is_member_pointer compilation performance

2023-10-17 Thread Ken Matsui
): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 7fd29d8d9f2..d7f89cf7c06 100644 --- a/libstdc++-v3

[PATCH v22 24/31] c++: Implement __is_function built-in trait

2023-10-17 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

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