/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
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
/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 | 29 ++
libstdc++-v3/include/std/type_traits| 44 +
2 files changed, 65
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __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 | 1 +
gcc/cp/semantics.cc
.
(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
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
_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
Reviewed-by: Patrick Palka
---
libstdc++-v3/include/std/type_traits | 10 +-
1 file changed, 5 insertions(+), 5
On Thu, Jan 4, 2024 at 2:11 PM Jonathan Wakely wrote:
>
> On Sat, 23 Dec 2023 at 23:06, Ken Matsui wrote:
> >
> > This patch uses _GLIBCXX_USE_BUILTIN_TRAIT macro instead of __has_builtin
> > in the type_traits header for traits that have a corresponding fallback
> &g
On Thu, Jan 4, 2024 at 2:16 PM Patrick Palka wrote:
>
> On Thu, 4 Jan 2024, Patrick Palka wrote:
>
> > On Sat, 23 Dec 2023, Ken Matsui wrote:
> >
> > > This patch optimizes the compilation performance of std::is_pointer
> > > by dispatching
On Thu, Jan 4, 2024 at 2:13 PM Jonathan Wakely wrote:
>
> On Sat, 23 Dec 2023 at 22:07, Ken Matsui wrote:
> >
> > This patch optimizes the compilation performance of std::is_pointer
> > by dispatching to the new __is_pointer built-in trait.
> &
ks
and the instability of the benchmark results. Here are new 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 memory: -0.300891%, total memory: -0.247934%
is_volatile_v:
https://github.com/ken-matsui
/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
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::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
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __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 | 1 +
gcc/cp/semantics.cc
/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
/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
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
On Tue, Oct 24, 2023 at 4:02 AM Jonathan Wakely wrote:
>
>
>
> On Tue, 24 Oct 2023 at 03:16, Ken Matsui wrote:
>>
>> This patch optimizes the compilation performance of std::is_function
>> by dispatching to the new __is_function built-in trait
all paddings affected by the enum rid change.
Changes in v11:
* Merged all patches into one patch series.
* Rebased on top of trunk.
* Unified commit message style.
* Used _GLIBCXX_USE_BUILTIN_TRAIT.
Ken Matsui (23):
c++: Sort built-in traits alphabetically
c-family,
anges in v11:
* Merged all patches into one patch series.
* Rebased on top of trunk.
* Unified commit message style.
* Used _GLIBCXX_USE_BUILTIN_TRAIT.
Ken Matsui (23):
c++: Sort built-in traits alphabetically
c-family, c++: Look up built-in traits via identif
.
(finish_trait_expr): Likewise.
(finish_trait_type): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Sort built-in traits alphabetically.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 68 -
gcc/cp/cp-trait.def
.
(cp_parser_simple_type_specifier): Remove all RID value cases
for built-in traits. Handle type-yielding built-in traits.
Co-authored-by: Patrick Palka
Signed-off-by: Ken Matsui
---
gcc/c-family/c-common.cc | 7 ---
gcc/c-family/c-common.h | 5 --
gcc/cp/cp-objcp-common.cc | 8
p_lexer_peek_trait_type.
(cp_parser_simple_type_specifier): Likewise.
(cp_parser_primary_expression): Call cp_lexer_peek_trait_expr.
Signed-off-by: Ken Matsui
---
gcc/cp/parser.cc | 53 +++-
1 file changed, 34 insertions(+), 19 deletions(-)
diff -
/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
This patch optimizes the compilation performance of std::is_array
by dispatching to the new __is_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_array): Use __is_array built-in
trait.
(is_array_v): Likewise.
Signed-off-by: Ken Matsui
.
(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
This patch optimizes the compilation performance of std::is_bounded_array
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
.
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 | 1 +
gcc/cp
.
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 2a1a0aa80ff..4a5068791af 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b
.
(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
): Likewise.
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 4a5068791af..4ab1d29ff51 100644
--- a/libstdc++-v3
): 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
trait.
(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 4ab1d29ff51
.
(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/constraint.cc | 3
.
(is_member_object_pointer_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include/std/type_traits
index 99ae825301c
/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
: 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 1edd05acb4c..db880d87f60 100644
--- a/libstdc++-v3/include/std/type_traits
+++ b/libstdc++-v3
/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
/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __is_object.
* g++.dg/ext/is_object.C: New test.
Signed-off-by: Ken Matsui
---
gcc/cp/constraint.cc | 3 +++
gcc/cp/cp-trait.def | 1 +
gcc/cp/semantics.cc
implementation. Move
this under is_const_v as this depends on is_const_v.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 23 +--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std/type_traits
b/libstdc++-v3/include
__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
This patch optimizes the compilation performance of std::is_object
by dispatching to the new __is_object built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_object): Use __is_object built-in
trait.
(is_object_v): Likewise.
Signed-off-by: Ken Matsui
This patch optimizes the compilation performance of std::remove_pointer
by dispatching to the new remove_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_pointer): Use __remove_pointer
built-in trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3
On Sun, Dec 10, 2023 at 10:19 AM Jason Merrill wrote:
>
> On 12/7/23 00:11, Ken Matsui wrote:
> > This patch series optimizes type traits compilation performance by
> > implementing built-in type traits and using them in libstdc++.
> >
> > Changes in v26:
> >
On Tue, Sep 19, 2023 at 9:59 AM Jason Merrill wrote:
>
> On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote:
> > Now that RID_MAX has reached 255, we need to update the bit sizes of every
> > use of the enum rid from 8 to 16 to support more keywords.
>
> Sorry to bring t
Ping.
On Sat, Jun 15, 2024 at 10:30 PM 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
> as Clang provides.
>
> PR preprocessor/8980
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!
>
On Thu, Jun 13, 2024 at 5:46 AM Jonathan Wakely wrote:
>
> On 23/05/24 15:15 -0700, Ken Matsui wrote:
> >On Thu, May 23, 2024 at 3:15 PM Patrick Palka wrote:
> >>
> >> On Sat, 11 May 2024, Ken Matsui wrote:
> >>
> >> > This patch optimizes the
On Thu, Jun 13, 2024 at 5:31 AM Jonathan Wakely wrote:
>
> On 11/05/24 02:01 -0700, Ken Matsui wrote:
> >This patch optimizes the compilation performance of std::is_pointer
> >by dispatching to the new __is_pointer built-in trait.
> >
> >libstdc++-v3/ChangeLog
: New test.
* g++.dg/warn/Wpragma-once-outside-header.C: New test.
Signed-off-by: Ken Matsui
---
gcc/c-family/c.opt | 4
gcc/doc/invoke.texi| 10 --
.../g++.dg/warn/Wno-pragma-once-outside-header.C
On Tue, Jun 4, 2024 at 7:54 AM Jason Merrill wrote:
>
> On 3/14/24 04:01, 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
On Thu, Jun 13, 2024 at 7:44 AM Jason Merrill wrote:
>
> On 6/13/24 10:31, 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
> > as Clang.
&
once): Use
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wno-pragma-once-outside-header.C: New test.
* g++.dg/warn/Wpragma-once-outside-header.C: New test.
Signed-off-by: Ken Matsui
---
gcc/c-family/c.opt | 4 +
once): Use
CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wno-pragma-once-outside-header.C: New test.
* g++.dg/warn/Wpragma-once-outside-header.C: New test.
Signed-off-by: Ken Matsui
---
gcc/c-family/c.opt | 4 +
On Tue, Apr 30, 2024 at 1:50 PM Jason Merrill wrote:
>
> On 3/15/24 01:15, Ken Matsui wrote:
> > Added diagnostics for build_invoke.
> >
> > Ok for 15?
>
> Thanks, just a few tweaks needed. Will you have time to make them? Or
> Patrick?
I believe I will have ti
On Tue, Apr 30, 2024 at 2:08 PM Jason Merrill wrote:
>
> On 2/28/24 11:26, Ken Matsui wrote:
> > This patch implements built-in trait for std::rank.
>
> __rank seems too short, maybe __array_rank?
>
> Actually, it occurs to me that perhaps we should have been adding
>
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 std::rank.
> >
> > __rank seems too short, maybe __array_rank?
> >
This patch optimizes the compilation performance of std::is_volatile
by dispatching to the new __builtin_is_volatile trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_volatile): Use __builtin_is_volatile
trait.
(is_volatile_v): Likewise.
Signed-off-by: Ken
.
(__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 4e97e45f130..36ac900605a 100644
--- a/libstdc++-v3
This patch optimizes the compilation performance of std::is_const
by dispatching to the new __builtin_is_const trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __builtin_is_const
trait.
(is_const_v): Likewise.
Signed-off-by: Ken Matsui
.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_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
This patch optimizes the compilation performance of std::rank
by dispatching to the new __builtin_rank trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (rank): Use __builtin_rank trait.
(rank_v): Likewise.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std
.
(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
/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of __builtin_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
/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
.C: Test existence of
__builtin_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
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
.
(trait_expr_value): Use object_type_p.
gcc/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_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
__builtin_remove_extent.
* 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
/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
.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
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_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
: Test existence of
__builtin_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
This patch optimizes the compilation performance of std::decay
by dispatching to the new __builtin_decay trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (decay): Use __builtin_decay trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std/type_traits | 6 ++
1 file
.
(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
This patch optimizes the compilation performance of std::remove_extent
by dispatching to the new __builtin_remove_extent trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_extent): Use
__builtin_remove_extent trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3
/testsuite/ChangeLog:
* g++.dg/ext/has-builtin-1.C: Test existence of
__builtin_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 | 1 +
gcc/cp
/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
.C: Test existence of
__builtin_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
_const:
https://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 m
This patch optimizes the compilation performance of std::add_pointer
by dispatching to the new __builtin_add_pointer trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (add_pointer): Use
__builtin_add_pointer trait.
Signed-off-by: Ken Matsui
---
libstdc++-v3/include/std
This patch optimizes the compilation performance of
std::remove_all_extents by dispatching to the new
__builtin_remove_all_extents trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (remove_all_extents): Use
__builtin_remove_all_extents trait.
Signed-off-by: Ken Matsui
.
(__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 8f756712c63..4e97e45f130 100644
--- a/libstdc++-v3
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
++.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 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
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
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
.
(__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
/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
.
* 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::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
.
(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
.
(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
/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
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
:
* 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::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
601 - 700 of 1225 matches
Mail list logo