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

2023-06-24 Thread Ken Matsui via Gcc-patches
Sure. Thank you. On Sat, Jun 24, 2023 at 5:14 AM Xi Ruoyao wrote: > Please use [PATCH v3 1/2] next time, now it's not easy to find the > latest version of the series (I'm not sure if the number "3" is > correct). > > On Sat, 2023-06-24 at 03:38 -0700, Ken Mat

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

2023-06-24 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 v2 2/2] libstdc++: use new built-in trait __is_const

2023-06-24 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. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14 ++ 1 file chang

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

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_const. https://github.com/ken-matsui/gcc-benches/blob/main/is_const.md#sat-jun-24-044815-am-pdt-2023 Time: -2.86467% Peak Memory Usage: -1.0654% Total Memory Usage: -1.62369% On Sat, Jun 24, 2023 at 6:41 AM Ken Matsui wrote: > > This patch implements built-in

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

2023-06-24 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 v2 2/2] libstdc++: use new built-in trait __is_array

2023-06-24 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. (is_array_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed

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

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_array: https://github.com/ken-matsui/gcc-benches/blob/main/is_array.md#sat-jun-24-070630-am-pdt-2023 Time: -15.511% Peak Memory Usage: +0.173923% Total Memory Usage: -6.2037% On Sat, Jun 24, 2023 at 6:54 AM Ken Matsui wrote: > > This patch implements built-in

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

2023-06-24 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 v2 2/2] libstdc++: use new built-in trait __is_volatile

2023-06-24 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. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13

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

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_volatile: https://github.com/ken-matsui/gcc-benches/blob/main/is_volatile.md#sat-jun-24-074036-am-pdt-2023 Time: -2.42335% Peak Memory Usage: -1.07651% Total Memory Usage: -1.62369% On Sat, Jun 24, 2023 at 7:24 AM Ken Matsui wrote: > > This patch implements b

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

2023-06-24 Thread Ken Matsui via Gcc-patches
On Tue, Jun 20, 2023 at 8:32 AM Patrick Palka wrote: > > On Thu, 15 Jun 2023, Ken Matsui via Libstdc++ wrote: > > > Hi, > > > > For those curious about the performance improvements of this patch, I > > conducted a benchmark that instantiates 256k specializations of > > is_object_v based on Patrick

[PATCH] libstdc++: use __is_enum built-in trait

2023-07-02 Thread Ken Matsui via Gcc-patches
This patch replaces is_enum::value with __is_enum built-in trait in the type_traits header. libstdc++-v3/ChangeLog: * include/std/type_traits (__make_unsigned_selector): Use __is_enum built-in trait. (__make_signed_selector): Likewise. (__underlying_type_impl): Lik

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

2023-07-03 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with is_scalar to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * constraint.cc (diagnose_trait_expr): Handl

[PATCH 1/2] c++, libstdc++: implement __is_scalar built-in trait

2023-07-03 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with is_scalar to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * constraint.cc (diagnose_trait_expr): Handl

[PATCH 2/2] libstdc++: use new built-in trait __is_scalar for std::is_scalar

2023-07-03 Thread Ken Matsui via Gcc-patches
This patch gets std::is_scalar to dispatch to new built-in trait __is_scalar. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14

Re: [PATCH 1/2] c++, libstdc++: implement __is_scalar built-in trait

2023-07-03 Thread Ken Matsui via Gcc-patches
Hi, Here is the benchmark result for is_scalar: https://github.com/ken-matsui/gcc-benches/blob/main/is_scalar.md#mon-jul--3-022250-am-pdt-2023 Time: -90.6237% Peak Memory Usage: -78.5155% Total Memory Usage: -82.1901% Sincerely, Ken Matsui On Mon, Jul 3, 2023 at 2:14 AM Ken Matsui wrote: > >

[PATCH v2 1/2] c++, libstdc++: implement __is_scalar built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with is_scalar to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * constraint.cc (diagnose_trait_expr): Handl

[PATCH v2 2/2] libstdc++: use new built-in trait __is_scalar for std::is_scalar

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch gets std::is_scalar to dispatch to new built-in trait __is_scalar. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14

[PATCH v2] libstdc++: use __is_enum built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch replaces is_enum::value with __is_enum built-in trait in the type_traits header. libstdc++-v3/ChangeLog: * include/std/type_traits (__make_unsigned_selector): Use __is_enum built-in trait. (__make_signed_selector): Likewise. (__underlying_type_impl): Lik

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

2023-07-07 Thread Ken Matsui via Gcc-patches
Hi, This patch series gets std::is_object to dispatch to built-in traits and implements the following built-in traits, on which std::object depends. * __is_reference * __is_function * __is_void std::is_object was depending on them with disjunction and negation. __not_<__

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

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

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

2023-07-07 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 v8 4/6] libstdc++: use new built-in trait __is_function for std::is_function

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

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

2023-07-07 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 v8 6/6] libstdc++: make std::is_object dispatch to new built-in traits

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

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

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_void. Since the new built-in name is __is_void, to avoid unintentional macro replacement, this patch also involves the removal of the existing __is_void in helper_functions.h and cpp_type_traits.h and renaming __is_void to is_void in the test fil

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

2023-07-07 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 v3 2/2] libstdc++: use new built-in trait __is_volatile

2023-07-07 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. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13

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

2023-07-07 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 v3 2/2] libstdc++: use new built-in trait __is_array

2023-07-07 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. (is_array_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed

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

2023-07-07 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 v3 2/2] libstdc++: use new built-in trait __is_const

2023-07-07 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. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14 ++ 1 file chang

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

2023-07-07 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 v2 2/2] libstdc++: use new built-in trait __remove_pointer

2023-07-07 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. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 8 +++- 1 file changed, 7 insertions(+),

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

2023-07-07 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 v4 1/2] c++: implement __is_unsigned built-in trait

2023-07-08 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 v4 2/2] libstdc++: use new built-in trait __is_unsigned

2023-07-08 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. (is_unsigned_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13

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

2023-07-08 Thread Ken Matsui via Gcc-patches
Hi, Here is the benchmark result for is_unsigned: https://github.com/ken-matsui/gcc-benches/blob/main/is_unsigned.md#sat-jul--8-041510-am-pdt-2023 Time: -66.908% Peak Memory Usage: -42.5139% Total Memory Usage: -46.3483% Sincerely, Ken Matsui On Sat, Jul 8, 2023 at 4:13 AM Ken Matsui wrote: >

[PATCH 1/2] c++, libstdc++: implement __is_signed built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_signed. gcc/cp/ChangeLog: * cp-trait.def: Define __is_signed. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/C

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

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_signed. 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/include/std/type_traits | 15 ++- 1 file

Re: [PATCH 1/2] c++, libstdc++: implement __is_signed built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
Hi, Here is the benchmark result for is_signed: https://github.com/ken-matsui/gcc-benches/blob/main/is_signed.md#sun-jul--9-014707-am-pdt-2023 Time: -59.439% Peak Memory Usage: -38.5157% Total Memory Usage: -41.687% Sincerely, Ken Matsui On Sun, Jul 9, 2023 at 1:47 AM Ken Matsui wrote: > > Th

[PATCH 1/2] c++, libstdc++: implement __is_arithmetic built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc

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

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_arithmetic. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait. (is_arithmetic_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14

Re: [PATCH 1/2] c++, libstdc++: implement __is_arithmetic built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
Hi, Here is the benchmark result for is_arithmetic: https://github.com/ken-matsui/gcc-benches/blob/main/is_arithmetic.md#sun-jul--9-055758-am-pdt-2023 Time: -55.2631% Peak Memory Usage: -38.7701% Total Memory Usage: -40.5237% Sincerely, Ken Matsui On Sun, Jul 9, 2023 at 5:57 AM Ken Matsui wro

[PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuit

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

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_pointer. libstdc++-v3/ChangeLog: * include/std/type_traits (is_pointer): Use __is_pointer built-in trait. (is_pointer_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 9 - 1

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

2023-07-09 Thread Ken Matsui via Gcc-patches
Oops! Thank you for pointing that out! Sincerely, Ken Matsui On Sun, Jul 9, 2023 at 10:33 PM Daniel Krügler wrote: > > Am Mo., 10. Juli 2023 um 07:24 Uhr schrieb Ken Matsui via Libstdc++ > : > > > > This patch lets libstdc++ use new built-in trait __is_pointer. > > > > libstdc++-v3/ChangeLog: >

[PATCH v2 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuit

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

2023-07-09 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_pointer. libstdc++-v3/ChangeLog: * include/std/type_traits (is_pointer): Use __is_pointer built-in trait. (is_pointer_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 15

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

2023-07-09 Thread Ken Matsui via Gcc-patches
Hi, Here is the benchmark result for is_pointer: https://github.com/ken-matsui/gcc-benches/blob/main/is_pointer.md#sun-jul--9-103948-pm-pdt-2023 Time: -62.1344% Peak Memory Usage: -52.4281% Total Memory Usage: -53.5889% Sincerely, Ken Matsui On Sun, Jul 9, 2023 at 10:38 PM Ken Matsui wrote: >

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

2023-05-12 Thread Ken Matsui via Gcc-patches
It appears that GCC 13 has been released, but I am wondering if there are any issues preventing this patch from being merged yet. Can you provide any information on this? On Sat, Apr 8, 2023 at 2:08 PM Ken Matsui wrote: > > I see. Thank you! > > On Sat, Apr 8, 2023 at 12:52 AM Jonathan Wakely wr

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

2023-05-17 Thread Ken Matsui via Gcc-patches
Thank you! On Wed, May 17, 2023 at 8:53 AM Patrick Palka wrote: > > On Fri, 12 May 2023, Ken Matsui via Libstdc++ wrote: > > > It appears that GCC 13 has been released, but I am wondering if there > > are any issues preventing this patch from being merged yet. Can you > > provide any information

[PATCH] libstdc++: use using instead of typedef for type_traits

2023-05-23 Thread Ken Matsui via Gcc-patches
Since the type_traits header is a C++11 header file, using can be used instead of typedef. This patch provides more readability, especially for long type names. libstdc++-v3/ChangeLog: * include/std/type_traits: Use using instead of typedef --- libstdc++-v3/include/std/type_traits | 158

Re: [PATCH] libstdc++: use using instead of typedef for type_traits

2023-05-25 Thread Ken Matsui via Gcc-patches
On Thu, May 25, 2023 at 11:31 AM Patrick Palka wrote: > > On Tue, May 23, 2023 at 3:42 PM Ken Matsui via Gcc-patches > wrote: > > > > Since the type_traits header is a C++11 header file, using can be used > > instead > > of typedef. This patch provides more read

Re: [PATCH v2] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-08-31 Thread Ken Matsui via Gcc-patches
On Tue, Aug 8, 2023 at 1:23 PM Jonathan Wakely wrote: > > > > On Wed, 19 Jul 2023 at 20:33, Ken Matsui via Libstdc++ > wrote: >> >> This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT macro, which will be used >> as a flag to toggle the use of built-in traits in the type_traits header >> through _GLIB

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-08-31 Thread Ken Matsui via Gcc-patches
On Tue, Aug 8, 2023 at 1:14 PM Jonathan Wakely wrote: > > > > On Tue, 18 Jul 2023 at 07:28, Ken Matsui via Libstdc++ > wrote: >> >> I will eventually work on disjunction to somehow optimize, but in the >> meantime, this might be a better implementation. Of course, my >> benchmark could be wrong.

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-08-31 Thread Ken Matsui via Gcc-patches
On Tue, Aug 8, 2023 at 1:19 PM Jonathan Wakely wrote: > > > > On Tue, 18 Jul 2023 at 07:25, Ken Matsui via Libstdc++ > wrote: >> >> Hi, >> >> I took a benchmark for this. >> >> https://github.com/ken-matsui/gcc-benches/blob/main/is_fundamental-disjunction.md#mon-jul-17-105937-pm-pdt-2023 >> >> t

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-08-31 Thread Ken Matsui via Gcc-patches
On Thu, Aug 31, 2023 at 6:57 AM Ken Matsui wrote: > > On Tue, Aug 8, 2023 at 1:19 PM Jonathan Wakely wrote: > > > > > > > > On Tue, 18 Jul 2023 at 07:25, Ken Matsui via Libstdc++ > > wrote: > >> > >> Hi, > >> > >> I took a benchmark for this. > >> > >> https://github.com/ken-matsui/gcc-benches/

Re: [PATCH v4 4/4] libstdc++: Optimize is_compound trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
On Tue, Aug 8, 2023 at 1:33 PM Jonathan Wakely wrote: > > > > On Tue, 18 Jul 2023 at 08:44, Ken Matsui via Libstdc++ > wrote: >> >> This patch optimizes the performance of the is_compound trait by >> dispatching to the new __is_arithmetic built-in trait. >> >> libstdc++-v3/ChangeLog: >> >>

[PATCH v5 1/4] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc

[PATCH v5 2/4] libstdc++: Optimize is_arithmetic trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait. (is_arithmetic_v): Likewise. Signed-off-by: Ken

[PATCH v5 3/4] libstdc++: Optimize is_fundamental trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in trait. (is_fundamental): Likewise. Optimize the ori

[PATCH v5 4/4] libstdc++: Optimize is_compound trait performance

2023-09-01 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 --

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

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_volatile built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:19 PM Ken Matsui wrote: > > 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 >

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

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_const built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:27 PM Ken Matsui wrote: > > 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. >

[PING][PATCH v10 5/5] libstdc++: Make std::is_object dispatch to new built-in traits

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for std::is_object. Sincerely, Ken Matsui On Wed, Jul 12, 2023 at 7:42 PM Ken Matsui wrote: > > This patch gets std::is_object to dispatch to new built-in traits, > __is_function and __is_reference. > > libstdc++-v3/ChangeLog: > * include/std/type_traits (is_object): Use new built-i

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

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_array built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:24 PM Ken Matsui wrote: > > 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. >

[PING][PATCH v6 2/2] libstdc++: Use new built-in trait __is_pointer

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_pointer built-in. Sincerely, Ken Matsui On Thu, Jul 13, 2023 at 1:49 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_pointer. > > libstdc++-v3/ChangeLog: > > * include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer > bu

[PING][PATCH v2 2/2] libstdc++: Use new built-in trait __is_signed

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_signed built-in. Sincerely, Ken Matsui On Wed, Jul 12, 2023 at 6:45 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_signed. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_signed): Use __is_signed built-in trait. >

Re: [PATCH v5 1/4] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __is_arithmetic built-in. Sincerely, Ken Matsui On Fri, Sep 1, 2023 at 4:25 AM Ken Matsui wrote: > > This patch implements built-in trait for std::is_arithmetic. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_arithmetic. > * constraint.cc (diagnose_trait_expr): Ha

[PING][PATCH v10 3/5] c++: Implement __is_function built-in trait

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __is_function built-in. Sincerely, Ken Matsui On Tue, Aug 22, 2023 at 12:53 PM Patrick Palka wrote: > > On Wed, 12 Jul 2023, Ken Matsui via Libstdc++ wrote: > > > This patch implements built-in trait for std::is_function. > > > > gcc/cp/ChangeLog: > > > > * cp-trait.def: Define _

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

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __is_unsigned built-in. Sincerely, Ken Matsui On Sat, Jul 8, 2023 at 4:25 AM Ken Matsui wrote: > > Hi, > > Here is the benchmark result for is_unsigned: > > https://github.com/ken-matsui/gcc-benches/blob/main/is_unsigned.md#sat-jul--8-041510-am-pdt-2023 > > Time: -66.908% > Peak Memory

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

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __remove_pointer built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:29 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): H

[PING][PATCH v10 2/5] libstdc++: Use new built-in trait __is_reference for std::is_reference

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __is_reference built-in. Sincerely, Ken Matsui On Wed, Jul 12, 2023 at 7:56 PM Ken Matsui wrote: > > Hi, > > Here is the benchmark result for is_reference: > > https://github.com/ken-matsui/gcc-benches/blob/main/is_reference.md#wed-jul-12-074702-pm-pdt-2023 > > Time: -8.15593% > Peak M

[PING][PATCH v2 1/2] c++, libstdc++: implement __is_scalar built-in trait

2023-09-04 Thread Ken Matsui via Gcc-patches
Ping for __is_scalar built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 9:46 PM Ken Matsui wrote: > > This patch implements built-in trait for std::is_scalar. The existent > __is_scalar codes were replaced with is_scalar to avoid unintentional > macro replacement by the new built-in. > >

Re: [PATCH v2] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-09-11 Thread Ken Matsui via Gcc-patches
On Mon, Sep 11, 2023 at 7:51 AM Jonathan Wakely wrote: > > On Thu, 31 Aug 2023 at 13:33, Ken Matsui wrote: > > > > On Tue, Aug 8, 2023 at 1:23 PM Jonathan Wakely wrote: > > > > > > > > > > > > On Wed, 19 Jul 2023 at 20:33, Ken Matsui via Libstdc++ > > > wrote: > > >> > > >> This patch defines

[PATCH] libstdc++ Use _GLIBCXX_USE_BUILTIN_TRAIT

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch uses _GLIBCXX_USE_BUILTIN_TRAIT macro instead of __has_builtin in the type_traits header for traits that have a corresponding fallback non-built-in implementation. This macro supports to toggle the use of built-in traits in the type_traits header through _GLIBCXX_DO_NOT_USE_BUILTIN_TRAIT

[PATCH 0/2] Optimize is_member_function_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_member_function_pointer trait performance. The first patch implements __is_member_function_pointer built-in trait. The second patch optimizes is_member_function_pointer trait performance by using __is_member_function_pointer built-in trait if available. The performan

[PATCH 2/2] libstdc++: Optimize is_member_function_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_function_pointer trait by dispatching to the new __is_member_function_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_function_pointer): Use __is_member_function_pointer built-in trait.

[PATCH 1/2] c++: Implement __is_member_function_pointer built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_member_function_pointer. gcc/cp/ChangeLog: * cp-trait.def (IS_MEMBER_FUNCTION_POINTER): Define __is_member_function_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_FUNCTION_POINTER. * se

[PATCH 0/2] Optimize is_unbounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_unbounded_array trait performance. The first patch implements __is_unbounded_array built-in trait. The second patch optimizes is_unbounded_array trait performance by using __is_unbounded_array built-in trait if available. The performance improvement is shown in the f

[PATCH 1/2] c++: Implement __is_unbounded_array built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def (IS_UNBOUNDED_ARRAY): Define __is_unbounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_ARRAY. * semantics.cc (trait_expr_value): L

[PATCH 2/2] libstdc++: Optimize is_unbounded_array trait performance

2023-09-11 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 --- l

[PATCH 0/2] Optimize is_scoped_enum trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_scoped_enum trait performance. The first patch implements __is_scoped_enum built-in trait. The second patch optimizes is_scoped_enum trait performance by using __is_scoped_enum built-in trait if available. The performance improvement is shown in the following benchma

[PATCH 1/2] c++: Implement __is_scoped_enum built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scoped_enum. gcc/cp/ChangeLog: * cp-trait.def (IS_SCOPED_ENUM): Define __is_scoped_enum. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM. * semantics.cc (trait_expr_value): Likewise.

[PATCH 2/2] libstdc++: Optimize is_scoped_enum trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise. Signed-off-by

[PATCH 0/2] Optimize is_bounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_bounded_array trait performance. The first patch implements __is_bounded_array built-in trait. The second patch optimizes is_bounded_array trait performance by using __is_bounded_array built-in trait if available. The performance improvement is shown in the following

[PATCH 2/2] libstdc++: Optimize is_bounded_array trait performance

2023-09-11 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 1/2] c++: Implement __is_bounded_array built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_bounded_array. gcc/cp/ChangeLog: * cp-trait.def (IS_BOUNDED_ARRAY): Define __is_bounded_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY. * semantics.cc (trait_expr_value): Likewise. (finish

[PATCH 0/2] Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_member_pointer trait performance. The first patch implements __is_member_pointer built-in trait. The second patch optimizes is_member_pointer trait performance by using __is_member_pointer built-in trait if available. The performance improvement is shown in the follo

[PATCH 1/2] c++: Implement __is_member_pointer built-in trait

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_member_pointer. gcc/cp/ChangeLog: * cp-trait.def (IS_MEMBER_POINTER): Define __is_member_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_POINTER. * semantics.cc (trait_expr_value): Likewise. (fi

[PATCH 2/2] libstdc++: Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_pointer trait by dispatching to the new __is_member_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_pointer): Use __is_member_pointer built-in trait. (is_member_pointer_v): Likewise.

[PATCH 0/2] Optimize is_member_object_pointer trait performance

2023-09-12 Thread Ken Matsui via Gcc-patches
This patch series optimizes is_member_object_pointer trait performance. The first patch implements __is_member_object_pointer built-in trait. The second patch optimizes is_member_object_pointer trait performance by using __is_member_object_pointer built-in trait if available. The performance impro

[PATCH 1/2] c++: Implement __is_member_object_pointer built-in trait

2023-09-12 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_member_object_pointer. gcc/cp/ChangeLog: * cp-trait.def (IS_MEMBER_OBJECT_POINTER): Define __is_member_object_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_OBJECT_POINTER. * semantics.

[PATCH 2/2] libstdc++: Optimize is_member_object_pointer trait performance

2023-09-12 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_member_object_pointer trait by dispatching to the new __is_member_object_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_object_pointer): Use __is_member_object_pointer built-in trait. (is_

[PATCH v11 00/40] Optimize type traits performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. This patch version is bumped from the highest version among my separated patches. Changes in v11: * Merge all patches into one patch series * Rebase on top of trun

[PATCH v11 13/40] libstdc++: Optimize is_scoped_enum trait performance

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise. Signed-off-by

[PATCH v11 36/40] libstdc++: Optimize is_unsigned trait performance

2023-09-13 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 v11 37/40] c++, libstdc++: Implement __is_signed built-in trait

2023-09-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_signed. gcc/cp/ChangeLog: * cp-trait.def: Define __is_signed. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/C

[PATCH v11 03/40] libstdc++: Optimize is_const trait performance

2023-09-13 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/includ

<    1   2   3   4   5   >