Hi,
I have merged all my patches into a single branch for better
maintainability for me, but I am unable to build GCC. Initially, I
faced an error related to RID_MAX, which was fixed in
https://github.com/ken-matsui/gcc-gsoc23/commit/c32d49bc990acde4d3ec5654ddb81b0a7d081378.
The ICE was caused by
On Wed, Sep 13, 2023 at 9:38 PM Andrew Pinski wrote:
>
> On Wed, Sep 13, 2023 at 9:35 PM Ken Matsui wrote:
> >
> > On Wed, Sep 13, 2023 at 9:23 PM Andrew Pinski wrote:
> > >
> > > On Wed, Sep 13, 2023 at 9:09 PM Ken Matsui via Gcc
> > > wrote:
>
On Wed, Sep 13, 2023 at 9:23 PM Andrew Pinski wrote:
>
> On Wed, Sep 13, 2023 at 9:09 PM Ken Matsui via Gcc wrote:
> >
> > Hi,
> >
> > I have merged all my patches into a single branch for better
> > maintainability for me, but I am unable to build GCC. Ini
Hi,
I am working on the GSoC project, "C++: Implement compiler built-in
traits for the standard library traits". I found the following library
traits that I am not sure if implementing built-in traits brings
reasonable speed up.
* std::is_fundamental
* std::is_arithmetic
* std::is_scalar
*
On Fri, Mar 24, 2023 at 3:06 AM Jonathan Wakely wrote:
>
> On Fri, 24 Mar 2023 at 09:58, Jonathan Wakely wrote:
> >
> > On Fri, 24 Mar 2023 at 07:10, Ken Matsui via Gcc wrote:
> > >
> > > Hi,
> > >
> > > I am working on the GSoC p
Hi,
I am working on the GSoC project, "C++: Implement compiler built-in
traits for the standard library traits".
Built-in trait naming simply adds two underscores (__) to the original
trait name. However, the same names are already in use for some
built-in traits, such as is_void, is_pointer,
On Sat, Mar 25, 2023 at 5:38 AM Marc Glisse wrote:
>
> On Sat, 25 Mar 2023, Ken Matsui via Gcc wrote:
>
> > Built-in trait naming simply adds two underscores (__) to the original
> > trait name. However, the same names are already in use for some
> > built-in traits,
Hi,
My name is Ken Matsui. I am highly interested in contributing to the
project idea, "C++: Implement compiler built-in traits for the
standard library traits." To understand how to implement those traits,
could you please give me some example implementations of the compiler
built-in traits, as
Hi,
My name is Ken Matsui. I am highly interested in contributing to the
project idea, "C++: Implement compiler built-in traits for the
standard library traits." To understand how to implement those traits,
could you please give me some example implementations of the compiler
built-in traits, as
Hi François,
On Wed, Mar 29, 2023 at 10:11 PM François Dumont wrote:
>
> Hi
>
> Do not hesitate to dig into library doc. Especially this page:
>
> https://gcc.gnu.org/onlinedocs/gcc-8.1.0/libstdc++/manual/manual/test.html
>
> You can also find it in your git clone in /libstdc++-v3/doc/html.
>
>
at 10:33 AM François Dumont wrote:
>
>
> On 26/03/2023 04:01, Ken Matsui via Libstdc++ wrote:
> > On Sat, Mar 25, 2023 at 5:38 AM Marc Glisse wrote:
> >> On Sat, 25 Mar 2023, Ken Matsui via Gcc wrote:
> >>
> >>> Built-in trait naming simply adds two
Oooh, thank you for your help!
On Tue, Mar 28, 2023 at 4:25 PM Jonathan Wakely wrote:
>
> On Tue, 28 Mar 2023 at 22:30, Ken Matsui via Libstdc++
> wrote:
> >
> > Hi François,
> >
> > I tried to use `make check-debug`, but my Makefile does not include
> > the target. Could you please tell me how
I see. Thank you for the clarification!
On Thu, Mar 30, 2023 at 5:23 AM Jonathan Wakely wrote:
>
> On Thu, 30 Mar 2023 at 09:33, Ken Matsui wrote:
> >
> > Hi François,
> >
> > On Wed, Mar 29, 2023 at 10:11 PM François Dumont
> > wrote:
> > >
> > > Hi
> > >
> > > Do not hesitate to dig into
at 10:33 AM François Dumont
> > > wrote:
> > > >
> > > >
> > > > On 26/03/2023 04:01, Ken Matsui via Libstdc++ wrote:
> > > > > On Sat, Mar 25, 2023 at 5:38 AM Marc Glisse
> > > > > wrote:
> > > > >> On Sat, 25 Mar 202
On Mon, Mar 27, 2023 at 10:33 AM François Dumont wrote:
>
>
> On 26/03/2023 04:01, Ken Matsui via Libstdc++ wrote:
> > On Sat, Mar 25, 2023 at 5:38 AM Marc Glisse wrote:
> >> On Sat, 25 Mar 2023, Ken Matsui via Gcc wrote:
> >>
> >>> Buil
es with Clang" isn't really relevant here.
>
>
> >
> > On Sat, 25 Mar 2023 at 15:08, Ken Matsui via Gcc wrote:
> >
> > > Hi,
> > >
> > > I am working on the GSoC project, "C++: Implement compiler built-in
> > > traits for the standa
Hi,
I am Ken, an undergraduate student majoring in Computer Science and
minoring in Linguistics (because of my interest in syntax from both
natural and programming languages prospectives) at University of
Washington, Seattle. I am interested in the GSoC project: C++:
Implement compiler built-in
Hi Jan,
My name is Ken Matsui. I am highly interested in contributing to your
GSoC 2024 project idea, "Improve nothrow detection in GCC." To get
started with understanding your project (and, if possible, making
small patches), could you please give me some suggestions on what
files to read (and
Ping for [GSoC][Improve nothrow detection]: Suggestions to get started.
Could you please take a look when you get a chance?
Sincerely,
Ken Matsui
On Wed, Feb 28, 2024 at 8:00 AM Ken Matsui wrote:
>
> Hi Jan,
>
> My name is Ken Matsui. I am highly interested in contributing to your
> GSoC 2024
On Mon, Sep 11, 2023 at 7:51 AM Jonathan Wakely wrote:
>
> On Thu, 31 Aug 2023 at 13:33, Ken Matsui wrote:
> >
> > On Tue, Aug 8, 2023 at 1:23 PM Jonathan Wakely wrote:
> > >
> > >
> > >
> > > On Wed, 19 Jul 2023 at 20:33, Ken Matsui via Libstdc++
> > > wrote:
> > >>
> > >> This patch defines
This patch uses _GLIBCXX_USE_BUILTIN_TRAIT macro instead of __has_builtin in
the type_traits header for traits that have a corresponding fallback
non-built-in implementation. This macro supports to toggle the use of built-in
traits in the type_traits header through
This patch optimizes the performance of the is_member_function_pointer trait
by dispatching to the new __is_member_function_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_member_function_pointer): Use
__is_member_function_pointer built-in trait.
This patch implements built-in trait for
std::is_member_function_pointer.
gcc/cp/ChangeLog:
* cp-trait.def (IS_MEMBER_FUNCTION_POINTER): Define
__is_member_function_pointer.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_MEMBER_FUNCTION_POINTER.
*
This patch series optimizes is_member_function_pointer trait
performance. The first patch implements __is_member_function_pointer
built-in trait. The second patch optimizes is_member_function_pointer
trait performance by using __is_member_function_pointer built-in trait
if available.
The
This patch implements built-in trait for
std::is_unbounded_array.
gcc/cp/ChangeLog:
* cp-trait.def (IS_UNBOUNDED_ARRAY): Define
__is_unbounded_array.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_UNBOUNDED_ARRAY.
* semantics.cc (trait_expr_value):
This patch optimizes the performance of the is_unbounded_array trait
by dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
---
This patch implements built-in trait for
std::is_scoped_enum.
gcc/cp/ChangeLog:
* cp-trait.def (IS_SCOPED_ENUM): Define
__is_scoped_enum.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_SCOPED_ENUM.
* semantics.cc (trait_expr_value): Likewise.
This patch optimizes the performance of the is_scoped_enum trait
by dispatching to the new __is_scoped_enum built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scoped_enum): Use
__is_scoped_enum built-in trait.
(is_scoped_enum_v): Likewise.
This patch series optimizes is_unbounded_array trait
performance. The first patch implements __is_unbounded_array
built-in trait. The second patch optimizes is_unbounded_array
trait performance by using __is_unbounded_array built-in trait
if available.
The performance improvement is shown in the
This patch series optimizes is_scoped_enum trait
performance. The first patch implements __is_scoped_enum
built-in trait. The second patch optimizes is_scoped_enum
trait performance by using __is_scoped_enum built-in trait
if available.
The performance improvement is shown in the following
This patch optimizes the performance of the is_scoped_enum trait
by dispatching to the new __is_scoped_enum built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scoped_enum): Use
__is_scoped_enum built-in trait.
(is_scoped_enum_v): Likewise.
This patch series optimizes type traits performance by implementing
built-in type traits and using them in libstdc++. This patch version
is bumped from the highest version among my separated patches.
Changes in v11:
* Merge all patches into one patch series
* Rebase on top of
This patch sorts built-in identifiers alphabetically for better code
readability.
gcc/cp/ChangeLog:
* constraint.cc (diagnose_trait_expr): Sort built-in identifiers
alphabetically.
* cp-trait.def: Likewise.
* semantics.cc (trait_expr_value): Likewise.
This patch optimizes the performance of the is_unbounded_array trait by
dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
---
This patch implements built-in trait for std::is_scoped_enum.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_scoped_enum.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
This patch implements built-in trait for std::is_member_object_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_member_object_pointer.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_MEMBER_OBJECT_POINTER.
* semantics.cc (trait_expr_value): 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 optimizes the performance of the is_compound trait by dispatching
to the new __is_arithmetic built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_compound): Do not use __not_.
(is_compound_v): Use is_fundamental_v instead.
Signed-off-by: Ken Matsui
This patch optimizes the performance of the is_member_pointer trait
by dispatching to the new __is_member_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_member_pointer): Use __is_member_pointer
built-in trait.
(is_member_pointer_v):
This patch optimizes the performance of the is_member_object_pointer trait
by dispatching to the new __is_member_object_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_member_object_pointer): Use
__is_member_object_pointer built-in trait.
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 optimizes the performance of the is_pointer trait by dispatching to
the new __is_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer
built-in trait.
* include/std/type_traits (is_pointer): Likewise.
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 optimizes the performance of the is_function trait by dispatching
to the new __is_function built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_function): Use __is_function built-in
trait.
(is_function_v): Likewise. Optimize its implementation.
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 implements built-in trait for std::is_scalar. The existent
__is_scalar codes were replaced with __is_scalar_type to avoid unintentional
macro replacement by the new built-in.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_scalar.
* constraint.cc (diagnose_trait_expr):
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 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.
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.
gcc/c-family/ChangeLog:
* c-indentation.h (struct token_indent_info): Make keyword 16 bits
and move this upward to minimize memory fragmentation.
This patch optimizes the performance of the remove_pointer trait 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
---
This patch optimizes the performance of the is_array trait 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
---
This patch optimizes the performance of the is_unsigned trait by dispatching
to the new __is_unsigned built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unsigned): Use __is_unsigned built-in
trait.
(is_unsigned_v): Likewise.
Signed-off-by: Ken Matsui
This patch implements built-in trait for std::is_member_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_member_pointer.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_POINTER.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr):
This patch optimizes the performance of the is_scalar trait by dispatching to
the new __is_scalar built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scalar): Use __is_scalar built-in
trait.
(is_scalar_v): Likewise.
Signed-off-by: Ken Matsui
---
This patch optimizes the performance of the is_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
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 optimizes the performance of the is_const trait by dispatching to
the new __is_const built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_const): Use __is_const built-in trait.
(is_const_v): Likewise.
Signed-off-by: Ken Matsui
---
This patch optimizes the performance of the is_member_function_pointer trait
by dispatching to the new __is_member_function_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_member_function_pointer): Use
__is_member_function_pointer built-in trait.
This patch implements built-in trait for std::is_unbounded_array.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_unbounded_array.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
This patch optimizes the performance of the is_volatile trait 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 Matsui
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 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 optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
This patch optimizes the performance of the is_object trait by dispatching to
the new __is_function and __is_reference built-in traits.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_object): Use __is_function and
__is_reference built-in traits.
(is_object_v):
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 fixes incorrect handling for the new 16-bit rid code. Unsigned
char was previously used for the 8-bit rid code, but unsigned short is now
required.
gcc/c-family/ChangeLog:
* c-common.h (C_SET_RID_CODE): Use unsigned short instead of
unsigned char.
Ref: Initial
This patch implements built-in trait for std::is_member_function_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_member_function_pointer.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_MEMBER_FUNCTION_POINTER.
* semantics.cc (trait_expr_value):
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
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_bounded_array.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_bounded_array.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr):
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.
This patch optimizes the performance of the is_scoped_enum trait
by dispatching to the new __is_scoped_enum built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_scoped_enum): Use
__is_scoped_enum built-in trait.
(is_scoped_enum_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 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 optimizes the performance of the remove_pointer trait 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
---
This patch sorts built-in identifiers alphabetically for better code
readability.
gcc/cp/ChangeLog:
* constraint.cc (diagnose_trait_expr): Sort built-in identifiers
alphabetically.
* cp-trait.def: Likewise.
* semantics.cc (trait_expr_value): Likewise.
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.
On Thu, Sep 14, 2023 at 10:54 AM Joseph Myers wrote:
>
> On Wed, 13 Sep 2023, Ken Matsui via Gcc-patches wrote:
>
> > diff --git a/gcc/c/c-parser.h b/gcc/c/c-parser.h
> > index 545f0f4d9eb..eed6deaf0f8 100644
> > --- a/gcc/c/c-parser.h
> > +++ b/gcc/c/c-pars
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.
For struct token_indent_info, the 8-bit increase does not change the overall
struct size because the 8-bit just consumes 1 byte from 2 bytes of external
This patch implements built-in trait for std::is_scoped_enum.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_scoped_enum.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
This patch optimizes the performance of the is_volatile trait 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 Matsui
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 fixes incorrect handling for the new 16-bit rid code. Unsigned
char was previously used for the 8-bit rid code, but unsigned short is now
required.
gcc/c-family/ChangeLog:
* c-common.h (C_SET_RID_CODE): Use unsigned short instead of
unsigned char.
Ref: Initial
This patch series optimizes type traits performance by implementing
built-in type traits and using them in libstdc++.
Changes in v14:
* Attached the benchmark results of the enum rid change
Changes in v13:
* Fixed ambiguous commit message and comment
Changes in v12:
*
This patch implements built-in trait for std::is_bounded_array.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_bounded_array.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr):
This patch optimizes the performance of the is_pointer trait by dispatching to
the new __is_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer
built-in trait.
* include/std/type_traits (is_pointer): Likewise.
This patch optimizes the performance of the is_signed trait by dispatching to
the new __is_signed built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_signed): Use __is_signed built-in trait.
(is_signed_v): Likewise.
Signed-off-by: Ken Matsui
---
This patch implements built-in trait for std::is_member_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_member_pointer.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_POINTER.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr):
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 implements built-in trait for std::is_member_object_pointer.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_member_object_pointer.
* constraint.cc (diagnose_trait_expr): Handle
CPTK_IS_MEMBER_OBJECT_POINTER.
* semantics.cc (trait_expr_value): Likewise.
This patch optimizes the performance of the is_unbounded_array trait by
dispatching to the new __is_unbounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_unbounded_array_v): Use
__is_unbounded_array built-in trait.
Signed-off-by: Ken Matsui
---
This patch optimizes the performance of the is_bounded_array trait by
dispatching to the new __is_bounded_array built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_bounded_array_v): Use __is_bounded_array
built-in trait.
Signed-off-by: Ken Matsui
---
This patch optimizes the performance of the is_member_function_pointer trait
by dispatching to the new __is_member_function_pointer built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_member_function_pointer): Use
__is_member_function_pointer built-in trait.
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 implements built-in trait for std::is_scalar. The existent
__is_scalar codes were replaced with __is_scalar_type to avoid unintentional
macro replacement by the new built-in.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_scalar.
* constraint.cc (diagnose_trait_expr):
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 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_reference trait by dispatching
to the new __is_reference built-in trait.
libstdc++-v3/ChangeLog:
* include/std/type_traits (is_reference): Use __is_reference built-in
trait.
(is_reference_v): Likewise.
Signed-off-by: Ken
This patch implements built-in trait for std::is_unbounded_array.
gcc/cp/ChangeLog:
* cp-trait.def: Define __is_unbounded_array.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_ARRAY.
* semantics.cc (trait_expr_value): Likewise.
1 - 100 of 471 matches
Mail list logo