[PATCH v13 11/40] libstdc++: Optimize is_bounded_array trait performance

2023-09-14 Thread Ken Matsui via Gcc-patches
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 v13 34/40] libstdc++: Optimize is_compound trait performance

2023-09-14 Thread Ken Matsui via Gcc-patches
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 v13 02/40] c++: Implement __is_const built-in trait

2023-09-14 Thread Ken Matsui via Gcc-patches
/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 v13 26/40] libstdc++: Optimize is_object trait performance

2023-09-14 Thread Ken Matsui via Gcc-patches
): 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 v13 20/40] c++: Implement __is_member_object_pointer built-in trait

2023-09-14 Thread Ken Matsui via Gcc-patches
. (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 v13 39/40] c++, libstdc++: Implement __is_scalar built-in trait

2023-09-14 Thread Ken Matsui via Gcc-patches
/valarray_array.h: Likewise. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc| 3 ++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 4 +++ gcc/testsuite/g++.dg/ext/has-builtin-1.C| 3 ++ gcc/testsuite/g++.dg/ext/is_scalar.C

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

2023-09-14 Thread Ken Matsui via Gcc-patches
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

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

2023-09-15 Thread Ken Matsui via Gcc-patches
On Thu, Sep 14, 2023 at 10:54 AM Joseph Myers wrote: > > On Wed, 13 Sep 2023, Ken Matsui via Gcc-patches wrote: > > > diff --git a/gcc/c/c-parser.h b/gcc/c/c-parser.h > > index 545f0f4d9eb..eed6deaf0f8 100644 > > --- a/gcc/c/c-parser.h > > +++ b/gcc/c/c-pars

[PATCH v14 04/40] c++: Implement __is_volatile built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/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 v14 17/40] c-family: Fix C_SET_RID_CODE to handle 16-bit rid code correctly

2023-09-15 Thread Ken Matsui via Gcc-patches
discussion: https://gcc.gnu.org/pipermail/gcc/2023-September/242460.html Code provided by Andrew: https://gcc.gnu.org/pipermail/gcc/2023-September/242461.html Co-authored-by: Andrew Pinski Signed-off-by: Ken Matsui --- gcc/c-family/c-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v14 12/40] c++: Implement __is_scoped_enum built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
. 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 v14 05/40] libstdc++: Optimize is_volatile trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-09-15 Thread Ken Matsui via Gcc-patches
information about the benchmark results, please refer to the following link. https://github.com/ken-matsui/gsoc23/blob/main/reports/gcc-build gcc/c-family/ChangeLog: * c-indentation.h (struct token_indent_info): Make keyword 16 bits. gcc/c/ChangeLog: * c-parser.cc (c_parse_init): Handle

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

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 08/40] c++: Implement __is_unbounded_array built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
): 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 v14 25/40] libstdc++: Optimize is_function trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
. 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 v14 26/40] libstdc++: Optimize is_object trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
): 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 v14 37/40] c++, libstdc++: Implement __is_signed built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
): Rename to ... (__is_signed_type): ... this. * include/bits/charconv.h: Use __is_signed_type instead. * include/bits/locale_facets.tcc: Likewise. * include/bits/uniform_int_dist.h: Likewise. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc

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

2023-09-15 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 v14 32/40] libstdc++: Optimize is_arithmetic trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
: 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 v14 13/40] libstdc++: Optimize is_scoped_enum trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
-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 v14 02/40] c++: Implement __is_const built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/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 v14 40/40] libstdc++: Optimize is_scalar trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 22/40] c++: Implement __is_reference built-in trait

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

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 15/40] libstdc++: Optimize is_member_pointer trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
. 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 v14 21/40] libstdc++: Optimize is_member_object_pointer trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
. (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 v14 33/40] libstdc++: Optimize is_fundamental trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 31/40] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/ChangeLog: * include/bits/cpp_type_traits.h (__is_arithmetic): Rename to ... (__is_arith): ... this. * include/c_global/cmath: Use __is_arith instead. * include/c_std/cmath: Likewise. * include/tr1/cmath: Likewise. Signed-off-by: Ken Matsui --- gcc/cp

[PATCH v14 29/40] c++, libstdc++: Implement __is_pointer built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/pr57107.C: Likewise. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_pointer): Rename to ... (__is_ptr): ... this. * include/bits/deque.tcc: Use __is_ptr instead. * include/bits/stl_algobase.h: Likewise. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc

[PATCH v14 39/40] c++, libstdc++: Implement __is_scalar built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/valarray_array.h: Likewise. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc| 3 ++ gcc/cp/cp-trait.def | 1 + gcc/cp/semantics.cc | 4 +++ gcc/testsuite/g++.dg/ext/has-builtin-1.C| 3 ++ gcc/testsuite/g++.dg/ext/is_scalar.C

[PATCH v14 11/40] libstdc++: Optimize is_bounded_array trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 09/40] libstdc++: Optimize is_unbounded_array trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 38/40] libstdc++: Optimize is_signed trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 14/40] c++: Implement __is_member_pointer built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
): 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 v14 27/40] c++: Implement __remove_pointer built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
__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 v14 20/40] c++: Implement __is_member_object_pointer built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
. (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 v14 00/40] Optimize type traits performance

2023-09-15 Thread Ken Matsui via Gcc-patches
: * 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 (40): c++: Sort built-in identifiers

[PATCH v14 10/40] c++: Implement __is_bounded_array built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
): 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 v14 30/40] libstdc++: Optimize is_pointer trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
. 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 v14 34/40] libstdc++: Optimize is_compound trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 18/40] c++: Implement __is_member_function_pointer built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
): 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 v14 07/40] libstdc++: Optimize is_array trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 03/40] libstdc++: Optimize is_const trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 35/40] c++: Implement __is_unsigned built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/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 v14 06/40] c++: Implement __is_array built-in trait

2023-09-15 Thread Ken Matsui via Gcc-patches
/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 v14 28/40] libstdc++: Optimize remove_pointer trait performance

2023-09-15 Thread Ken Matsui via Gcc-patches
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 v14 01/40] c++: Sort built-in identifiers alphabetically

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

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

2023-09-15 Thread Ken Matsui via Gcc-patches
. (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] c++: implement __is_reference built-in trait

2023-03-18 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def (names_builtin_p): Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Change

[PATCH] libstdc++: use new built-in trait __is_reference

2023-03-18 Thread Ken Matsui via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2bd607a8b8f..18408d8ceb6 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/incl

Re: [PATCH] c++: implement __is_reference built-in trait

2023-03-19 Thread Ken Matsui via Gcc-patches
* cp-trait.def (names_builtin_p): Define __is_reference. This changelog should be the following. * cp-trait.def: Define __is_reference. I am sorry for the confusion. On Sat, Mar 18, 2023 at 9:07 PM Ken Matsui wrote: > > This patch implements built-in trait for std::is_reference. >

[PATCH] c++: implement __remove_pointer built-in trait

2023-03-19 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer. * g++.dg/ext/remove

[PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-19 Thread Ken Matsui via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __remove_pointer built-in trait. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2bd607a8b8f..cba98091aad 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/i

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
I see. Thank you! On Mon, Mar 20, 2023 at 12:26 AM Xi Ruoyao wrote: > > You need to CC libstd...@gcc.gnu.org for any patches touching libstdc++. > > On Sat, 2023-03-18 at 21:21 -0700, Ken Matsui via Gcc-patches wrote: > > libstdc++-v3/ChangeLog: > > > > * include

Re: [PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-20 Thread Ken Matsui via Gcc-patches
CCing libstd...@gcc.gnu.org. On Sun, Mar 19, 2023 at 7:53 PM Ken Matsui wrote: > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_reference): Use __remove_pointer built-in trait. > > --- > diff --git a/libstdc++-v3/include/std/type_traits > b/libstdc++-v3

[PATCH] c++: implement __add_pointer built-in trait

2023-03-20 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::add_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __add_pointer. * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer. * g++.dg/ext/add_pointer.C: New

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
e, > the code fails to build. Oooh, this one! [PATCH 3/7] - the third patch in a series of seven patches I totally missed that. Thank you! On Mon, Mar 20, 2023 at 12:51 AM Xi Ruoyao wrote: > > On Mon, 2023-03-20 at 00:30 -0700, Ken Matsui wrote: > > I see. Thank you! > &g

Re: [PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-20 Thread Ken Matsui via Gcc-patches
struct __add_pointer_helper On Mon, Mar 20, 2023 at 12:57 AM Jonathan Wakely wrote: > > > > On Mon, 20 Mar 2023, 07:32 Ken Matsui via Libstdc++, > wrote: >> >> CCing libstd...@gcc.gnu.org. >> >> On Sun, Mar 19, 2023 at 7:53 PM Ken Matsui wrote:

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
Thank you! On Mon, Mar 20, 2023 at 1:07 AM Xi Ruoyao wrote: > > On Mon, 2023-03-20 at 01:03 -0700, Ken Matsui wrote: > > Oops, I assumed those were my email... Thank you for your heads up and > > your comments! > > > > > Bad ChangeLog format. You should h

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
, Xi Ruoyao via Libstdc++ > wrote: > > > > On Mon, 2023-03-20 at 01:03 -0700, Ken Matsui wrote: > > > Oops, I assumed those were my email... Thank you for your heads up and > > > your comments! > > > > > > > Bad ChangeLog format. You sho

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

2023-03-20 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/te

[PATCH 2/2] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/include/

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
It looks like I was able to use git send-email. The new patches became a series, so I couldn't figure out how to associate them with this email and another email. Please disregard this email. On Mon, Mar 20, 2023 at 2:56 AM Ken Matsui wrote: > > > Does it actually make compilation

Re: [PATCH] c++: implement __is_reference built-in trait

2023-03-20 Thread Ken Matsui via Gcc-patches
I created new patches which is a series, but I couldn't figure out how to associate them with this email and another email. Please disregard this email. On Sun, Mar 19, 2023 at 1:19 PM Ken Matsui wrote: > > * cp-trait.def (names_builtin_p): Define __is_reference. > > This change

Re: [PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-20 Thread Ken Matsui via Gcc-patches
Thank you! On Mon, Mar 20, 2023 at 2:12 AM Jonathan Wakely wrote: > On Mon, 20 Mar 2023 at 08:08, Ken Matsui > wrote: > > > > Ooh... Thank you for pointing that out! > > > > > The helper doesn't need to be defined for the case where we don't use >

Re: [PATCH] libstdc++: use new built-in trait __is_reference

2023-03-20 Thread Ken Matsui via Gcc-patches
Thank you so much for taking the benchmark! This is a great improvement than I thought. In GCC contributions, do I need to benchmark (and report) every built-in trait I implement? On Mon, Mar 20, 2023 at 8:24 AM Patrick Palka wrote: > On Mon, Mar 20, 2023 at 5:56 AM Ken Matsui >

[PATCH 1/2] c++: implement __remove_pointer built-in trait

2023-03-20 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __remove_poin

[PATCH 2/2] libstdc++: use new built-in trait __remove_pointer

2023-03-20 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __remove_pointer. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_pointer): Use __remove_pointer built-in trait. --- libstdc++-v3/include/std/type_traits | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff -

Re: [PATCH] c++: implement __remove_pointer built-in trait

2023-03-20 Thread Ken Matsui via Gcc-patches
Please disregard this email. On Sun, Mar 19, 2023 at 1:21 PM Ken Matsui wrote: > This patch implements built-in trait for std::remove_pointer. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __remove_pointer. > * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER.

Re: [PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-20 Thread Ken Matsui via Gcc-patches
Please disregard this email. On Mon, Mar 20, 2023 at 6:26 AM Ken Matsui wrote: > Thank you! > > On Mon, Mar 20, 2023 at 2:12 AM Jonathan Wakely > wrote: > >> On Mon, 20 Mar 2023 at 08:08, Ken Matsui >> wrote: >> > >> > Ooh... Thank you for poin

Re: [PATCH] c++: implement __add_pointer built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
Please disregard this patch. On Mon, Mar 20, 2023 at 12:44 AM Ken Matsui wrote: > This patch implements built-in trait for std::add_pointer. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __add_pointer. > * semantics.cc (finish_trait_type): Handle CPTK_ADD_POINTER. > >

[PATCH 2/2] libstdc++: use new built-in trait __add_const

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __add_const. libstdc++-v3/ChangeLog: * include/std/type_traits (add_const): Use __add_const built-in trait. --- libstdc++-v3/include/std/type_traits | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libstdc++-v3/include/std/type_tr

[PATCH 1/2] c++: implement __add_const built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::add_const. gcc/cp/ChangeLog: * cp-trait.def: Define __add_const. * semantics.cc (finish_trait_type): Handle CPTK_ADD_CONST. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __add_const. * g++.d

Re: [PATCH 2/2] libstdc++: use new built-in trait __add_const

2023-03-21 Thread Ken Matsui via Gcc-patches
I want to implement and then come back here. Thank you all for your help. On Tue, Mar 21, 2023 at 4:25 AM Jonathan Wakely wrote: > > > On Tue, 21 Mar 2023 at 11:21, Marc Glisse via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> On Tue, 21 Mar 2023, Ken

[PATCH 1/2] c++: implement __is_function built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH 2/2] libstdc++: use new built-in trait __is_function

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_function. libstdc++-v3/ChangeLog: * include/std/type_traits (is_function): Use __is_function built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/include/std

[PATCH 1/2] c++: implement __is_unsigned built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH 2/2] libstdc++: use new built-in trait __is_unsigned

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_unsigned. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/include/std

Re: [PATCH 2/2] libstdc++: use new built-in trait __is_unsigned

2023-03-21 Thread Ken Matsui via Gcc-patches
I see. Thank you! On Tue, Mar 21, 2023 at 9:44 AM Jonathan Wakely wrote: > > > On Tue, 21 Mar 2023 at 16:41, Ken Matsui via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> This patch lets libstdc++ use new built-in trait __is_unsigned. >> >> libstdc++-v3

[PATCH v2 1/2] c++: implement __is_unsigned built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v2 2/2] libstdc++: use new built-in trait __is_unsigned

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_unsigned. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/incl

[PATCH 1/2] c++: implement __is_array built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

[PATCH 2/2] libstdc++: use new built-in trait __is_array

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_array. libstdc++-v3/ChangeLog: * include/std/type_traits (is_array): Use __is_array built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/include/std/type_trai

[PATCH 1/2] c++: implement __is_const built-in trait

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

[PATCH 2/2] libstdc++: use new built-in trait __is_const

2023-03-21 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_const. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/include/std/type_trai

Re: [PATCH v2 1/2] c++: implement __is_unsigned built-in trait

2023-03-22 Thread Ken Matsui via Gcc-patches
It seems I missed including Jonathan in the new patch. Could you please take a look? On Tue, Mar 21, 2023 at 10:07 AM Ken Matsui wrote: > > This patch implements built-in trait for std::is_unsigned. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_unsigned. >

[PATCH 1/2] c++: implement __is_volatile built-in trait

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH 2/2] libstdc++: use new built-in trait __is_volatile

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_volatile. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/incl

[PATCH v2 1/2] c++: implement __is_unsigned built-in trait

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v2 2/2] libstdc++: use new built-in trait __is_unsigned

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_unsigned. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/incl

[PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-22 Thread Ken Matsui via Gcc-patches
In the type_traits header, both integral_constant and __bool_constant are used. This patch unifies those usages into __bool_constant. libstdc++-v3/ChangeLog: * include/std/type_traits: Use __bool_constant instead of integral_constant. --- libstdc++-v3/include/std/type_traits | 32

Re: [PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-23 Thread Ken Matsui via Gcc-patches
patches. I would prefer to choose the more common and lightweight way. Sincerely, Ken Matsui On Thu, Mar 23, 2023 at 2:28 AM Jonathan Wakely wrote: > > > > On Thu, 23 Mar 2023 at 02:06, Ken Matsui via Libstdc++ > wrote: >> >> In the type_traits header, both integral_c

Re: [PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-23 Thread Ken Matsui via Gcc-patches
On Thu, Mar 23, 2023 at 3:46 AM Ville Voutilainen wrote: > > On Thu, 23 Mar 2023 at 12:18, Ken Matsui via Libstdc++ > wrote: > > > > Thank you so much for your review! > > > > This is my first time contributing to GCC, so I do not have a GCC > > copyrig

Re: [PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-23 Thread Ken Matsui via Gcc-patches
On Thu, Mar 23, 2023 at 3:56 AM Ville Voutilainen wrote: > > On Thu, 23 Mar 2023 at 12:53, Ken Matsui wrote: > > > > DCO sign-off is indeed more light-weight, and sure, it's becoming more > > > common > > > since it's relatively new as an option. &g

[PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-23 Thread Ken Matsui via Gcc-patches
In the type_traits header, both integral_constant and __bool_constant are used. This patch unifies those usages into __bool_constant. libstdc++-v3/ChangeLog: * include/std/type_traits: Use __bool_constant instead of integral_constant. Signed-off-by: Ken Matsui --- libstdc++-v3

[PATCH 00/10] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-03-25 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. Ken Matsui (10): c++: implement __is_reference built-in trait libstdc++: use new built-in trait __is_reference for std::is_reference c++: implement __is_function built-in trait libstd

[PATCH 02/10] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-03-25 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. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file

[PATCH 01/10] c++: implement __is_reference built-in trait

2023-03-25 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 06/10] libstdc++: remove unused __is_void in cpp_type_traits.h

2023-03-25 Thread Ken Matsui via Gcc-patches
This patch removes unused __is_void defined in cpp_type_traits.h libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_void): Remove unused __is_void. Signed-off-by: Ken Matsui --- libstdc++-v3/include/bits/cpp_type_traits.h | 15 --- 1 file changed, 15 deletions

<    7   8   9   10   11   12   13   >