On Thu, May 23, 2024 at 3:15 PM Patrick Palka wrote:
>
> On Sat, 11 May 2024, Ken Matsui wrote:
>
> > This patch optimizes the compilation performance of std::is_const
> > by dispatching to the new __is_const built-in trait.
>
> This patch series LGTM
Thank you!
>
ank.
Signed-off-by: Ken Matsui
---
gcc/cp/semantics.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index 43b175f92fd..df62e2d80db 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -12914,10 +12914
On Mon, May 13, 2024 at 8:19 AM Marek Polacek wrote:
>
> On Sun, May 12, 2024 at 11:48:07PM -0700, Ken Matsui wrote:
> > This patch fixes a compilation error when building GCC using Clang.
> > Since __array_rank is used as a built-in trait name, use rank instead.
>
>
This patch fixes a compilation error when building GCC using Clang.
Since __array_rank is used as a built-in trait name, use rank instead.
PR c++/115061
gcc/cp/ChangeLog:
* semantics.cc (finish_trait_expr): Use rank instead of
__array_rank.
Signed-off-by: Ken Matsui
This patch optimizes the compilation performance of std::decay
by dispatching to the new __decay built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (decay): Use __decay built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 6 ++
1 file
.
(__add_rvalue_reference_helper): Likewise.
Signed-off-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 effa3fbcb75..824cad90a25 100644
--- a/libstdc++-v3
This patch optimizes the compilation performance of std::remove_extent
by dispatching to the new __remove_extent built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_extent): Use __remove_extent
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the compilation performance of
std::remove_all_extents by dispatching to the new
__remove_all_extents built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_all_extents): Use
__remove_all_extents built-in trait.
Signed-off-by: Ken Matsui
This patch optimizes the compilation performance of std::add_pointer
by dispatching to the new __add_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (add_pointer): Use __add_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
This patch optimizes the compilation performance of
std::is_unbounded_array 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
/type_traits (is_pointer): Likewise.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++-
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 66
This patch optimizes the compilation performance of std::is_const
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
/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
Handle the new error from __is_nothrow_invocable.
* testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc:
Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 4
/incomplete_args_neg.cc: Handle
the new error from __is_invocable.
* testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 4
.../testsuite/20_util/is_invocable/incomplete_args_neg.cc
This patch optimizes the compilation performance of std::is_volatile
by dispatching to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile
built-in trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken
This patch optimizes the compilation performance of std::rank
by dispatching to the new __array_rank built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (rank): Use __array_rank built-in
trait.
(rank_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc
.
(__add_lvalue_reference_helper): Likewise.
Signed-off-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 5b74e44d0a6..effa3fbcb75 100644
--- a/libstdc++-v3
On Fri, May 10, 2024 at 1:23 PM Jason Merrill wrote:
>
> On 5/10/24 12:14, Ken Matsui wrote:
> > Removed the redundant check and fixed the flow. Could you please review
> > this
> > again?
>
> Looks good! All the compiler trait patches are OK.
Thank you so much
* g++.dg/ext/is_invocable1.C: New test.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.
On Fri, May 10, 2024 at 8:27 AM Jason Merrill wrote:
>
> On 5/10/24 10:45, Ken Matsui wrote:
> > Fixed the incorrect if condition. Could you please review this again?
> >
> > -- >8 --
> >
> > This patch implements built-in trait for std::is_invocable.
>
ext/is_invocable1.C: New test.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def |
On Fri, May 10, 2024 at 7:20 AM Jason Merrill wrote:
>
> On 5/10/24 07:24, Ken Matsui wrote:
> > Fixed the reference to pointer to class case. Ok for trunk?
> >
> > -- >8 --
> >
> > This patch implements built-in trait for std::is_invocable.
> >
>
le1.C: New test.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp
On Thu, May 9, 2024 at 9:16 AM Jason Merrill wrote:
>
> On 5/8/24 01:04, Ken Matsui wrote:
> > Fixed the reference_wrapper case. I used non_ref_datum_type to avoid
> > potentially multiple build_trait_object calls.
> >
> > -- >8 --
> >
> >
est existence of __is_invocable.
* g++.dg/ext/is_invocable1.C: New test.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
On Tue, May 7, 2024 at 11:36 AM Jason Merrill wrote:
>
> On 5/3/24 16:52, Ken Matsui wrote:
> > Fixed datum reference problem. Ok for trunk?
> >
> > -- >8 --
> >
> > This patch implements built-in trait for std::is_invocable.
> >
> > gcc
Hi Jonathan,
Since __is_const, __is_volatile, and __is_pointer were approved, could
you please review these patches for libstdc++? I guess that you
already reviewed almost equivalent patches, but I wanted to make sure.
Sincerely,
Ken Matsui
On Thu, May 2, 2024 at 1:16 PM Ken Matsui wrote
On Mon, May 6, 2024 at 9:20 AM Jason Merrill wrote:
>
> On 5/6/24 09:25, Ken Matsui wrote:
> > On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui
> > wrote:
> >>
> >> On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote:
> >>>
> >>> On
On Thu, Mar 14, 2024 at 12:57 AM Ken Matsui wrote:
>
> On Fri, Mar 8, 2024 at 8:42 AM Patrick Palka wrote:
> >
> > On Wed, 28 Feb 2024, Ken Matsui wrote:
> >
> > > This patch implements a --num-commits (-n) flag for shorthand for
> > > the range of
On Thu, Mar 14, 2024 at 1:01 AM Ken Matsui wrote:
>
> On Sat, Mar 2, 2024 at 5:04 AM Ken Matsui wrote:
> >
> > This patch adds a warning switch for "#pragma once in main file". The
> > warning option name is Wpragma-once-outside-header, which is the same
est.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-tre
On Fri, May 3, 2024 at 12:38 PM Jason Merrill wrote:
>
> On 5/2/24 23:25, Ken Matsui wrote:
> > Addressed Jason's review comments. Ok for trunk?
> >
> > -- >8 --
> >
> > This patch implements built-in trait for std::is_invocable.
> >
> > gcc
est.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-tre
On Thu, May 2, 2024 at 7:43 PM Jason Merrill wrote:
>
> On 5/2/24 16:47, Ken Matsui wrote:
> > On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote:
> >>
> >> On 5/2/24 16:12, Ken Matsui wrote:
> >>> This patch implements built-in trait for std::
++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-tree.h | 2 +
gcc/cp/method.cc
On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote:
>
> On 5/2/24 16:12, Ken Matsui wrote:
> > This patch implements built-in trait for std::is_invocable.
> >
> > gcc/cp/ChangeLog:
> >
> > * cp-trait.def: Define __is_invocable.
> > * c
On Thu, May 2, 2024 at 1:45 PM Marek Polacek wrote:
>
> On Thu, May 02, 2024 at 04:38:16PM -0400, Jason Merrill wrote:
> > On 5/2/24 16:12, Ken Matsui wrote:
> > > This patch implements built-in trait for std::is_invocable.
> > >
> > > gcc/cp/ChangeLog:
On Thu, May 2, 2024 at 1:38 PM Jason Merrill wrote:
>
> On 5/2/24 16:12, Ken Matsui wrote:
> > This patch implements built-in trait for std::is_invocable.
> >
> > gcc/cp/ChangeLog:
> >
> > * cp-trait.def: Define __is_invocable.
> > * c
:
* g++.dg/ext/has-builtin-1.C: Test existence of __array_rank.
* g++.dg/ext/rank.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 24
++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-tree.h | 2 +
gcc/cp/method.cc
.
* g++.dg/ext/remove_extent.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_extent.C | 16
This patch optimizes the compilation performance of std::rank
by dispatching to the new __array_rank built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (rank): Use __array_rank built-in
trait.
(rank_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc
This patch optimizes the compilation performance of std::is_const
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
This patch optimizes the compilation performance of std::remove_extent
by dispatching to the new __remove_extent built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_extent): Use __remove_extent
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer.
Arrange the order lexically around __is_pointer.
* g++.dg/ext/is_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def
/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
Handle the new error from __is_nothrow_invocable.
* testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc:
Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 4
/incomplete_args_neg.cc: Handle
the new error from __is_invocable.
* testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 4
.../testsuite/20_util/is_invocable/incomplete_args_neg.cc
.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__is_nothrow_invocable.
* g++.dg/ext/is_nothrow_invocable.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 ++
gcc/cp/cp
This patch optimizes the compilation performance of
std::remove_all_extents by dispatching to the new
__remove_all_extents built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_all_extents): Use
__remove_all_extents built-in trait.
Signed-off-by: Ken Matsui
This patch optimizes the compilation performance of
std::is_unbounded_array 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
existence of
__remove_all_extents.
* g++.dg/ext/remove_all_extents.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 3 +++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++
gcc
On Thu, May 2, 2024 at 1:09 PM Jakub Jelinek wrote:
>
> On Thu, May 02, 2024 at 12:52:59PM -0700, Ken Matsui wrote:
> > > This seems to be the prevailing sentiment, so let's continue that way.
> > > Thanks for the input.
> >
> > I actually found that we ha
This patch optimizes the compilation performance of std::add_pointer
by dispatching to the new __add_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (add_pointer): Use __add_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
.
(__add_lvalue_reference_helper): Likewise.
Signed-off-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 5b74e44d0a6..effa3fbcb75 100644
--- a/libstdc++-v3
This patch optimizes the compilation performance of std::is_volatile
by dispatching to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile
built-in trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken
.
(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 ++
gcc/cp/cp-trait.def
: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 12
gcc/testsuite/g++.dg/ext/decay.C | 22 ++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++
4 files changed, 38
.
(__add_rvalue_reference_helper): Likewise.
Signed-off-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 effa3fbcb75..824cad90a25 100644
--- a/libstdc++-v3
existence of
__add_rvalue_reference.
* g++.dg/ext/add_rvalue_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 6 ++
.../g++.dg/ext/add_rvalue_reference.C | 20
This patch optimizes the compilation performance of std::decay
by dispatching to the new __decay built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (decay): Use __decay built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 6 ++
1 file
/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
.
(trait_expr_value): Use object_type_p.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer.
* g++.dg/ext/add_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 36
github.com/ken-matsui/gcc-bench/blob/main/is_const.md#sat-dec-23-090605-am-pst-2023
time: -4.36603%, peak memory: -0.300891%, total memory: -0.247934%
is_const_v:
https://github.com/ken-matsui/gcc-bench/blob/main/is_const_v.md#sat-jun-24-044815-am-pdt-2023
time: -2.86467%, peak memory: -1.0654%
/type_traits (is_pointer): Likewise.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++-
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 66
existence of
__add_lvalue_reference.
* g++.dg/ext/add_lvalue_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 6 ++
.../g++.dg/ext/add_lvalue_reference.C | 21
/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
On Thu, May 2, 2024 at 12:49 PM Jason Merrill wrote:
>
> On 5/2/24 15:36, Iain Sandoe wrote:
> >
> >
> >> On 2 May 2024, at 20:30, Ken Matsui wrote:
> >>
> >> On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote:
> >>>
> >>&
On Thu, May 2, 2024 at 10:54 AM Marek Polacek wrote:
>
> On Thu, May 02, 2024 at 08:37:53PM +0300, Ville Voutilainen wrote:
> > On Thu, 2 May 2024 at 20:25, Ken Matsui wrote:
> > > > There was some discussion of how to name the built-ins back in
> > > > https
On Thu, May 2, 2024 at 12:18 PM Jonathan Wakely wrote:
>
> On Thu, 2 May 2024 at 18:38, Ville Voutilainen
> wrote:
> >
> > On Thu, 2 May 2024 at 20:25, Ken Matsui wrote:
> > > > There was some discussion of how to name the built-ins back in
> > > > h
/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
Handle the new error from __builtin_is_nothrow_invocable.
* testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc:
Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits
/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
or add_pointer, remove_extent, remove_all_extents,
add_lvalue_reference, add_rvalue_reference, decay, rank, is_invocable,
and is_nothrow_invocable. Here are the benchmark results:
is_const:
https://github.com/ken-matsui/gcc-bench/blob/main/is_const.md#sat-dec-23-090605-am-pst-2023
time: -4.36603%, peak mem
This patch optimizes the compilation performance of std::add_pointer
by dispatching to the new __add_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (add_pointer): Use __add_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include
/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
.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_is_nothrow_invocable.
* g++.dg/ext/is_nothrow_invocable.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6
existence of
__add_lvalue_reference.
* g++.dg/ext/add_lvalue_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 6 ++
.../g++.dg/ext/add_lvalue_reference.C | 21
This patch optimizes the compilation performance of
std::is_unbounded_array by dispatching to the new
__builtin_is_unbounded_array trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__builtin_is_unbounded_array trait.
Signed-off-by: Ken Matsui
.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 6 +
gcc/cp/cp-trait.def | 1 +
gcc/cp/cp-tree.h | 2 +
gcc/cp
This patch optimizes the compilation performance of std::remove_extent
by dispatching to the new __remove_extent built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_extent): Use __remove_extent
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3
This patch optimizes the compilation performance of std::decay
by dispatching to the new __decay built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (decay): Use __decay built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 6 ++
1 file
/type_traits (is_pointer): Likewise.
(is_pointer_v): Likewise.
Co-authored-by: Jonathan Wakely
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/bits/cpp_type_traits.h | 31 ++-
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 66
existence of
__add_rvalue_reference.
* g++.dg/ext/add_rvalue_reference.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 6 ++
.../g++.dg/ext/add_rvalue_reference.C | 20
existence of
__remove_all_extents.
* g++.dg/ext/remove_all_extents.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 3 +++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++
gcc
: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 12
gcc/testsuite/g++.dg/ext/decay.C | 22 ++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++
4 files changed, 38
.
(__add_rvalue_reference_helper): Likewise.
Signed-off-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 0ac8c6537c1..ffaf177e511 100644
--- a/libstdc++-v3
This patch optimizes the compilation performance of std::rank
by dispatching to the new __array_rank built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (rank): Use __array_rank built-in
trait.
(rank_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc
:
* g++.dg/ext/has-builtin-1.C: Test existence of __array_rank.
* g++.dg/ext/rank.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 24
This patch optimizes the compilation performance of std::is_const
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
/incomplete_args_neg.cc: Handle
the new error from __builtin_is_invocable.
* testsuite/20_util/is_invocable/incomplete_neg.cc: Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 4
.../testsuite/20_util/is_invocable
.
(finish_trait_expr): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_is_unbounded_array.
* g++.dg/ext/is_unbounded_array.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp
.
(trait_expr_value): Use object_type_p.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __add_pointer.
* g++.dg/ext/add_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 36
This patch optimizes the compilation performance of std::is_volatile
by dispatching to the new __is_volatile built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __is_volatile
built-in trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken
.
* g++.dg/ext/remove_extent.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_extent.C | 16
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer.
Arrange the order lexically around __is_pointer.
* g++.dg/ext/is_pointer.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 ++
gcc/cp/cp-trait.def
.
(__add_lvalue_reference_helper): Likewise.
Signed-off-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 e6edb57a3dc..0ac8c6537c1 100644
--- a/libstdc++-v3
This patch optimizes the compilation performance of
std::remove_all_extents by dispatching to the new
__remove_all_extents built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_all_extents): Use
__remove_all_extents built-in trait.
Signed-off-by: Ken Matsui
On Thu, May 2, 2024 at 10:12 AM Jason Merrill wrote:
>
> On 5/2/24 12:45, Jason Merrill wrote:
> > On 5/2/24 12:20, Ken Matsui wrote:
> >> On Thu, May 2, 2024 at 8:34 AM Ken Matsui
> >> wrote:
> >>>
> >>> On Thu, May 2, 2024 at 8:16 AM P
On Thu, May 2, 2024 at 9:45 AM Jason Merrill wrote:
>
> On 5/2/24 12:20, Ken Matsui wrote:
> > On Thu, May 2, 2024 at 8:34 AM Ken Matsui wrote:
> >>
> >> On Thu, May 2, 2024 at 8:16 AM Patrick Palka wrote:
> >>>
> >>> On Tue, 30 Apr 2024, J
++.dg/ext/decay.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc | 12
gcc/testsuite/g++.dg/ext/decay.C | 22 ++
gcc/testsuite/g++.dg/ext/has-builtin-1.C | 3 +++
4 files
On Thu, May 2, 2024 at 8:34 AM Ken Matsui wrote:
>
> On Thu, May 2, 2024 at 8:16 AM Patrick Palka wrote:
> >
> > On Tue, 30 Apr 2024, Jason Merrill wrote:
> >
> > > On 2/28/24 11:26, Ken Matsui wrote:
> > > > This patch implements built-in trait for
1 - 100 of 1213 matches
Mail list logo