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

2023-07-03 Thread Ken Matsui via Gcc-patches
: 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| 31

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

2023-07-03 Thread Ken Matsui via Gcc-patches
: 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| 31

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

[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
): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 0e7a9c9c7f3..9f086992ebc 100644 --- a/libstdc++-v3/include/std

[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
l_constant, which can be mostly shared. That is, the purpose of built-in traits is considered as achieved. Changes in v8 * Updated the commit author to kmat...@gcc.gnu.org considering the expiration of my university's email address. Ken Matsui (6): c++: implement __i

[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

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

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

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

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

2023-07-07 Thread Ken Matsui via Gcc-patches
. 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 780fcc00135..715310f10bf 100644 --- a/libstdc++-v3/include/std/type_traits

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

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

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

2023-07-07 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 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
/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 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

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

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

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

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

2023-07-08 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 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
): Rename to ... (is_signed): ... this. * include/bits/charconv.h: Use is_signed instead. * include/bits/locale_facets.tcc: Likewise. * include/bits/uniform_int_dist.h: Likewise. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3

[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

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

2023-07-09 Thread Ken Matsui via Gcc-patches
. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_arithmetic): Rename to ... (is_arithmetic): ... this. * include/c_global/cmath: Use is_arithmetic instead. * include/c_std/cmath: Likewise. * include/tr1/cmath: Likewise. Signed-off-by: Ken

[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

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

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

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

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

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

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

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

[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

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 cours

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_funda

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

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 tr

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

2023-09-01 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 v5 2/4] libstdc++: Optimize is_arithmetic trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
: 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 0e7a9c9c7f3..7ebbe04c77b 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

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

2023-09-01 Thread Ken Matsui via Gcc-patches
original implementation. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 7ebbe04c77b..cf24de2fcac 100644

[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

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

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

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

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

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

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

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

[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

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

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

[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

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 Lib

[PATCH] libstdc++ Use _GLIBCXX_USE_BUILTIN_TRAIT

2023-09-11 Thread Ken Matsui via Gcc-patches
_GLIBCXX_DO_NOT_USE_BUILTIN_TRAITS macro, without needing to modify the source code. libstdc++-v3/ChangeLog: * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH 0/2] Optimize is_member_function_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
performance improvement is shown in the following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_member_function_pointer_v.md#mon-sep-11-095601-am-pdt-2023 Time: -35.1125% Peak Memory Usage: -25.783% Total Memory Usage: -27.9437% Sincerely, Ken Matsui Ken Matsui (2): c++: Implement

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

2023-09-11 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 677cd934b94..98aeb104653

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

2023-09-11 Thread Ken Matsui via Gcc-patches
. * semantics.cc (trait_expr_value): 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

[PATCH 0/2] Optimize is_unbounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_unbounded_array_v.md#mon-sep-11-030125-pm-pdt-2023 Time: -2.79908% Peak Memory Usage: -1.11666% Total Memory Usage: -2.48356% Ken Matsui (2): c++: Implement __is_unbounded_array built-in trait libstdc++: Optimize

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

2023-09-11 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_unbounded_array. * g++.dg/ext/is_unbounded_array.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc | 3

[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

[PATCH 0/2] Optimize is_scoped_enum trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_scoped_enum_v.md#mon-sep-11-050411-pm-pdt-2023 Time: -32.717% +/- 1.67315% Peak Memory Usage: -17.3805% +/- 0.00931763% Total Memory Usage: -19.0881% +/- 0% Ken Matsui (2): c++: Implement __is_scoped_enum built-in trait libstdc

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

2023-09-11 Thread Ken Matsui via Gcc-patches
. (finish_trait_expr): Likewise. 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

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

2023-09-11 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 677cd934b94..26ae491fa69 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3

[PATCH 0/2] Optimize is_bounded_array trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_bounded_array_v.md#mon-sep-11-072608-pm-pdt-2023 Time: Peak Memory Usage: Total Memory Usage: Ken Matsui (2): c++: Implement __is_bounded_array built-in trait libstdc++: Optimize is_bounded_array trait performance gcc/cp

[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
. (finish_trait_expr): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __is_bounded_array. * g++.dg/ext/is_bounded_array.C: New test. Signed-off-by: Ken Matsui --- gcc/cp/constraint.cc| 3 ++ gcc/cp/cp-trait.def

[PATCH 0/2] Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_member_pointer_v.md#mon-sep-11-092927-pm-pdt-2023 Time: -47.2037% +/- 2.12936% Peak Memory Usage: -39.4183% +/- 0.00217276% Total Memory Usage: -41.9905% +/- 0% Ken Matsui (2): c++: Implement __is_member_pointer built-in trait

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

2023-09-11 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_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 2/2] libstdc++: Optimize is_member_pointer trait performance

2023-09-11 Thread Ken Matsui via Gcc-patches
. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 677cd934b94..69dccfa035d 100644 --- a/libstdc++-v3/include

[PATCH 0/2] Optimize is_member_object_pointer trait performance

2023-09-12 Thread Ken Matsui via Gcc-patches
improvement is shown in the following benchmark: https://github.com/ken-matsui/gsoc23/blob/main/is_member_object_pointer_v.md#tue-sep-12-122433-am-pdt-2023 Time: -48.6199% +/- 2.7422% Peak Memory Usage: -39.3192% +/- 0.00457374% Total Memory Usage: -41.8478% +/- 0% Ken Matsui (2): c++: Implement

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

2023-09-12 Thread Ken Matsui via Gcc-patches
. * semantics.cc (trait_expr_value): Likewise. (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

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

2023-09-12 Thread Ken Matsui via Gcc-patches
. (is_member_object_pointer_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 677cd934b94

[PATCH v11 00/40] Optimize type traits performance

2023-09-13 Thread Ken Matsui via Gcc-patches
trunk * Unify commit message style * Use _GLIBCXX_USE_BUILTIN_TRAIT Ken Matsui (40): c++: Sort built-in identifiers alphabetically c++: Implement __is_const built-in trait libstdc++: Optimize is_const trait performance c++: Implement __is_volatile built-in trait libstdc

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

2023-09-13 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 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
): 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 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

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

2023-09-13 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 v11 19/40] libstdc++: Optimize is_member_function_pointer trait performance

2023-09-13 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 v11 18/40] c++: Implement __is_member_function_pointer built-in trait

2023-09-13 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 v11 38/40] libstdc++: Optimize is_signed trait performance

2023-09-13 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 v11 17/40] c-family: Fix C_SET_RID_CODE to handle 16-bit rid code correctly

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

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

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

2023-09-13 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 v11 26/40] libstdc++: Optimize is_object trait performance

2023-09-13 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 v11 22/40] c++: Implement __is_reference built-in trait

2023-09-13 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 v11 35/40] c++: Implement __is_unsigned built-in trait

2023-09-13 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 v11 10/40] c++: Implement __is_bounded_array built-in trait

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

<    5   6   7   8   9   10   11   12   13   >