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:
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.
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:
>>
>>
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.
> >>
> >>
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
>>
>>
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
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
This patch uses _GLIBCXX_HAS_BUILTIN_TRAIT macro instead of
__has_builtin in the type_traits header. This macro supports to toggle
the use of built-in traits in the type_traits header through
_GLIBCXX_NO_BUILTIN_TRAITS macro, without needing to modify the
source code.
libstdc++-v3/ChangeLog:
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 _GLIBCXX_NO_BUILTIN_TRAITS macro, without needing to modify the
source code.
libstdc++-v3/ChangeLog:
* include/bits/c++config
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 _GLIBCXX_NO_BUILTIN_TRAITS macro, without needing to modify the
source code.
libstdc++-v3/ChangeLog:
* include/bits/c++config
On Wed, Jul 19, 2023 at 11:48 AM Patrick Palka wrote:
>
> On Tue, 18 Jul 2023, Ken Matsui via Libstdc++ wrote:
>
> > This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT, which will be used as a
> > flag to toggle built-in traits in the type_traits header. Through this
> > macro function and
On Wed, Jul 19, 2023 at 12:08 AM Richard Biener
wrote:
>
> On Wed, Jul 19, 2023 at 1:34 AM Ken Matsui via Gcc-patches
> wrote:
> >
> > This patch series tweaks predicate macros in tree.h to make the code more
> > readable. TYPE_REF_P is moved to tree.h a
gcc/cp/ChangeLog:
* decl.cc (copy_fn_p): Use TYPE_REF_IS_LVALUE.
* init.cc (maybe_warn_list_ctor): Likewise.
* method.cc (early_check_defaulted_comparison): Likewise.
* pt.cc (maybe_adjust_types_for_deduction): Likewise.
(invalid_nontype_parm_type_p):
This patch defines TYPE_REF_IS_LVALUE to determine if a type is a C++
lvalue reference.
gcc/ChangeLog:
* tree.h (TYPE_REF_IS_LVALUE): Define.
Signed-off-by: Ken Matsui
---
gcc/tree.h | 4
1 file changed, 4 insertions(+)
diff --git a/gcc/tree.h b/gcc/tree.h
index
Since POINTER_TYPE_P was completely replaced by INDIRECT_TYPE_P, it can
be deleted.
gcc/ChangeLog:
* tree.h (POINTER_TYPE_P): Remove.
Signed-off-by: Ken Matsui
---
gcc/tree.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/gcc/tree.h b/gcc/tree.h
index
This patch moves INDIRECT_TYPE_P from cp/cp-tree.h to tree.h to unify
POINTER_TYPE_P in tree.h to INDIRECT_TYPE_P, which are equivalent.
gcc/cp/ChangeLog:
* cp-tree.h (INDIRECT_TYPE_P): Remove.
gcc/ChangeLog:
* tree.h (INDIRECT_TYPE_P): Define.
Signed-off-by: Ken Matsui
---
This patch moves TYPE_PTR_P from cp/cp-tree.h to tree.h to unify
POINTER_TYPE_P in tree.h to INDIRECT_TYPE_P in cp/cp-tree.h, which are
equivalent.
gcc/cp/ChangeLog:
* cp-tree.h (TYPE_PTR_P): Remove.
gcc/ChangeLog:
* tree.h (TYPE_PTR_P): Define.
Signed-off-by: Ken Matsui
---
gcc/ada/ChangeLog:
* gcc-interface/trans.cc (return_slot_opt_for_pure_call_p): Use
TYPE_REF_P.
* gcc-interface/utils2.cc (build_unary_op): Likewise.
gcc/ChangeLog:
* alias.cc (get_alias_set): Use TYPE_REF_P.
* config/gcn/gcn-tree.cc
This patch moves TYPE_REF_P from cp/cp-tree.h to tree.h to simplify the
same code as it and to declare TYPE_REF_IS_LVALUE that determines if a
type is a C++ lvalue reference.
gcc/cp/ChangeLog:
* cp-tree.h (TYPE_REF_P): Remove.
gcc/ChangeLog:
* tree.h (TYPE_REF_P): Define.
This patch series tweaks predicate macros in tree.h to make the code more
readable. TYPE_REF_P is moved to tree.h and used for INDIRECT_TYPE_P and
TYPE_REF_IS_LVALUE. TYPE_PTR_P is also moved to tree.h and used for
INDIRECT_TYPE_P. POINTER_TYPE_P in tree.h is replaced with INDIRECT_TYPE_P
since it
This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT, which will be used as a
flag to toggle built-in traits in the type_traits header. Through this
macro function and _GLIBCXX_NO_BUILTIN_TRAITS macro, we can switch the
use of built-in traits without needing to modify the source code.
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): Use __is_arithmetic
built-in trait.
(is_compound_v): Use is_fundamental_v instead.
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
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:
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.
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
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:
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.
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.
On Mon, Jul 17, 2023 at 11:24 PM Ken Matsui wrote:
>
> Hi,
>
> I took a benchmark for this.
>
>
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
template
struct is_fundamental
: public std::bool_constant<__is_arithmetic(_Tp)
|| std::is_void<_Tp>::value
On Sun, Jul 16, 2023 at 5:41 AM François Dumont wrote:
>
>
> On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote:
> > This patch optimizes the performance of the is_fundamental trait by
> > dispatching to the new __is_arithmetic built-in trait.
> >
> > libstdc++-v3/ChangeLog:
> >
> > *
On Sun, Jul 16, 2023 at 5:32 AM François Dumont wrote:
>
>
> On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote:
> > This patch optimizes the performance of the is_arithmetic trait by
> > dispatching to the new __is_arithmetic built-in trait.
> >
> > libstdc++-v3/ChangeLog:
> >
> > *
On Sun, Jul 16, 2023 at 5:28 AM François Dumont wrote:
>
>
> On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote:
> > This patch implements built-in trait for std::is_arithmetic.
> >
> > gcc/cp/ChangeLog:
> >
> > * cp-trait.def: Define __is_arithmetic.
> > * constraint.cc
Hi,
Here are the benchmarks for this change:
* is_fundamental
https://github.com/ken-matsui/gcc-benches/blob/main/is_fundamental.md#fri-jul-14-091146-pm-pdt-2023
Time: -37.1619%
Peak Memory Usage: -29.4294%
Total Memory Usage: -29.4783%
* is_fundamental_v
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
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:
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.
This patch uses __bool_constant entirely instead of integral_constant
in the type_traits header, specifically for true_type, false_type,
and bool_constant.
libstdc++-v3/ChangeLog:
* include/std/type_traits (true_type): Use __bool_constant
instead.
(false_type): Likewise.
On Fri, Jul 14, 2023 at 3:49 AM Jonathan Wakely wrote:
>
> On Fri, 14 Jul 2023 at 11:48, Jonathan Wakely wrote:
> >
> > On Thu, 13 Jul 2023 at 21:04, Ken Matsui wrote:
> > >
> > > On Thu, Jul 13, 2023 at 2:22 AM Jonathan Wakely
> > > wrote:
> > > >
> > > > On Wed, 12 Jul 2023 at 21:42, Ken
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
built-in trait.
* include/std/type_traits (is_pointer): Likewise. Optimize its
implementation.
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.
On Thu, Jul 13, 2023 at 2:22 AM Jonathan Wakely wrote:
>
> On Wed, 12 Jul 2023 at 21:42, Ken Matsui wrote:
> >
> > On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wakely wrote:
> > >
> > > On Mon, 10 Jul 2023 at 06:51, Ken Matsui via Libstdc++
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > Here is
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
built-in trait.
* include/std/type_traits (is_pointer): Likewise. Optimize its
implementation.
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.
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
built-in trait.
* include/std/type_traits (is_pointer): Likewise. Optimize its
implementation.
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.
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 Memory Usage: -4.48408%
Total Memory Usage: -8.03783%
Sincerely,
Ken Matsui
On Wed, Jul 12, 2023 at 7:39 PM Ken Matsui
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-in traits,
__is_function and __is_reference.
(is_object_v): Likewise.
Signed-off-by: Ken
Hi,
Here is the benchmark result for is_function:
https://github.com/ken-matsui/gcc-benches/blob/main/is_function.md#wed-jul-12-072510-pm-pdt-2023
Time: -21.3748%
Peak Memory Usage: -10.962%
Total Memory Usage: -12.8384%
Sincerely,
Ken Matsui
On Wed, Jul 12, 2023 at 7:40 PM Ken Matsui wrote:
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. Optimize its implementation.
Signed-off-by: Ken Matsui
---
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.
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.
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
---
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
std::is_object was depending on them with disjunction and negation.
__not_<__or_,
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
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.
On Wed, Jul 12, 2023 at 3:20 AM Jonathan Wakely wrote:
>
> On Sun, 9 Jul 2023 at 09:50, Ken Matsui via Libstdc++
> wrote:
> >
> > This patch implements built-in trait for std::is_signed.
> >
> > gcc/cp/ChangeLog:
> >
> > * cp-trait.def: Define __is_signed.
> > * constraint.cc
Also, here is the Kanban board for our GSoC project, which might be
useful for you to manage non-reviewed patches.
https://github.com/users/ken-matsui/projects/1/views/1
On Wed, Jul 12, 2023 at 6:13 PM Ken Matsui wrote:
>
> Hi,
>
> Here is the updated benchmark result for is_pointer:
>
>
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
built-in trait.
* include/std/type_traits (is_pointer): Likewise.
(is_pointer_v): Likewise. Optimize its
Hi,
Here is the updated benchmark result for is_pointer:
https://github.com/ken-matsui/gcc-benches/blob/main/is_pointer.md#wed-jul-12-055654-pm-pdt-2023
Time: -2.79488%
Peak Memory Usage: -2.39379%
Total Memory Usage: -3.39559%
Sincerely,
Ken Matsui
On Wed, Jul 12, 2023 at 6:12 PM Ken Matsui
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.
On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wakely wrote:
>
> On Mon, 10 Jul 2023 at 06:51, Ken Matsui via Libstdc++
> wrote:
> >
> > 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
> >
On Wed, Jul 12, 2023 at 12:23 PM Jonathan Wakely wrote:
>
>
>
> On Wed, 12 Jul 2023, 19:33 Ken Matsui via Libstdc++,
> wrote:
>>
>> On Wed, Jul 12, 2023 at 2:50 AM Jonathan Wakely wrote:
>> >
>> > On Sat, 8 Jul 2023 at 05:47, Ken Matsui via Libstdc++
>> > wrote:
>> > >
>> > > This patch gets
On Wed, Jul 12, 2023 at 11:56 AM Xi Ruoyao wrote:
>
> On Wed, 2023-07-12 at 11:32 -0700, Ken Matsui via Gcc-patches wrote:
> > > conditional on the front-end change being committed first of course
> >
> > Does this mean we want to commit this [2/2] patch before com
On Wed, Jul 12, 2023 at 2:50 AM Jonathan Wakely wrote:
>
> On Sat, 8 Jul 2023 at 05:47, Ken Matsui via Libstdc++
> wrote:
> >
> > This patch gets std::is_scalar to dispatch to new built-in trait
> > __is_scalar.
> >
> > libstdc++-v3/ChangeLog:
> >
> > * include/std/type_traits
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:
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
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.
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:
>
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
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.
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
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
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.
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:
>
>
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
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.
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:
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
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.
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.
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
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
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
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.
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
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.
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
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.
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
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.
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.
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
---
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.
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
---
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.
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):
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
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):
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:
>
>
201 - 300 of 437 matches
Mail list logo