On Fri, Jun 9, 2023 at 10:54 AM Patrick Palka wrote:
>
> On Sun, 2 Apr 2023, Ken Matsui via Gcc-patches wrote:
>
> > This patch gets std::is_function to dispatch to new built-in trait
> > __is_function.
>
> For std::is_function and other predicate-like type traits, I t
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_<__
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
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
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
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
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
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.
Signed-off-by: Ken Matsui
---
li
Yes, I have fixed them on my side and am waiting for the test results!
Thank you!
On Mon, Jun 12, 2023 at 11:09 AM François Dumont
wrote:
> Same remark for all your alike patches.
>
> On 11/06/2023 04:43, Ken Matsui via Libstdc++ wrote:
> > This patch gets std::is_reference to dispatch to new bu
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_<__
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
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
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
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
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
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): Define this
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_<__
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
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
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
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
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
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
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_<__
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
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
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
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
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
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
On Tue, Jun 13, 2023 at 10:10 PM François Dumont wrote:
>
>
> On 13/06/2023 00:22, Ken Matsui via Libstdc++ wrote:
> > 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_t
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's code. You can find the benchmark code
at this link:
https://github.com/ken-matsui/gcc-benches/blob/main/is_object_benchmark.cc
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
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(+),
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 (is_scalar)
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 commit
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 s
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
> >
>
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
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 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 implementat
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:
>
> https:/
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 (dia
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
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
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_, is_reference<_T
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
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
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
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
---
lib
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_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 Matsui
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 wrot
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
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.
(is_pointer_v
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
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.
(is_pointer_v
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 t
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
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.
(is_pointer_v
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 Mat
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.
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
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
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
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
https://github.com/ken-matsui/gcc-ben
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 (diagnose_tra
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:
> >
> > * includ
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:
> >
> > * inclu
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
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.
>
> https://github.com/ken-matsui/gcc-benches/
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
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
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
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
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
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
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.
Sign
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.
libstdc++-v3/Change
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 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.
Signe
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 (gcn_goacc_get_worker_red_decl
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
---
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
---
g
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 d548dce63f7..347e676e73
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 347e676e737..0b2c
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): Likewi
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 and u
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 _GLIBCXX_NO_
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 (_GLIBCXX_
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 (_GLIBCXX_
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:
Hi,
I conducted a benchmark for remove_pointer as well as is_object. Just
like the is_object benchmark, here is the benchmark code:
https://github.com/ken-matsui/gcc-benches/blob/main/remove_pointer_benchmark.cc
On my computer, using the gcc HEAD of this patch for a release build,
the patch with
Just a quick update, the benchmark code link has been updated and can
now be accessed at
https://github.com/ken-matsui/gcc-benches/blob/main/is_object.cc. I
have also created a report file which can be found at
https://github.com/ken-matsui/gcc-benches/blob/main/is_object.md.
On Thu, Jun 15, 2023
Just a quick update, the benchmark code link has been updated and can
now be accessed at
https://github.com/ken-matsui/gcc-benches/blob/main/remove_pointer.cc.
I have also created a report file which can be found at
https://github.com/ken-matsui/gcc-benches/blob/main/remove_pointer.md.
On Sat, Jun
On Tue, Jun 20, 2023 at 8:22 AM Patrick Palka wrote:
>
> On Sat, 17 Jun 2023, Ken Matsui via Gcc-patches wrote:
>
> > Hi,
> >
> > I conducted a benchmark for remove_pointer as well as is_object. Just
> > like the is_object benchmark, here is the benchmark cod
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
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(+),
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
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
1 - 100 of 437 matches
Mail list logo