[PATCH v19 13/40] libstdc++: Optimize is_bounded_array trait performance

2023-10-13 Thread 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 --- libstdc++

[PATCH v19 24/40] c++: Implement __is_function built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. * seman

[PATCH v19 15/40] libstdc++: Optimize is_scoped_enum trait performance

2023-10-13 Thread Ken Matsui
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. Signed-off-by

[PATCH v19 16/40] c++: Implement __is_member_pointer built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_member_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_POINTE

[PATCH v19 27/40] c++: Implement __remove_pointer built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. gcc/test

[PATCH v19 35/40] c++: Implement __is_unsigned built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * seman

[PATCH v19 30/40] libstdc++: Optimize is_pointer trait performance

2023-10-13 Thread Ken Matsui
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_pointer): Use __is_pointer built-in trait. * include/std/type_traits (is_pointer): Likewise. O

[PATCH v19 20/40] c++: Implement __is_member_object_pointer built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_member_object_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_object_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v19 04/40] c++: Implement __is_const built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * Make-lang.in: Update key positions for gperf, based on automatically computed values. * cp-trait.def: Define __is_const. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h:

[PATCH v19 33/40] libstdc++: Optimize is_fundamental trait performance

2023-10-13 Thread Ken Matsui
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

[PATCH v19 09/40] libstdc++: Optimize is_array trait performance

2023-10-13 Thread 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 --- libstdc++-v3/includ

[PATCH v19 32/40] libstdc++: Optimize is_arithmetic trait performance

2023-10-13 Thread Ken Matsui
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

[PATCH v19 40/40] libstdc++: Optimize is_scalar trait performance

2023-10-13 Thread Ken Matsui
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 --- libstd

[PATCH v19 37/40] c++: Implement __is_signed built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_signed. gcc/cp/ChangeLog: * cp-trait.def: Define __is_signed. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. * semantics.c

[PATCH v19 06/40] c++: Implement __is_volatile built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * seman

[PATCH v19 34/40] libstdc++: Optimize is_compound trait performance

2023-10-13 Thread Ken Matsui
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 --

[PATCH v19 14/40] c++: Implement __is_scoped_enum built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_scoped_enum. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scoped_enum. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM.

[PATCH v19 19/40] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-13 Thread 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.

[PATCH v19 22/40] c++: Implement __is_reference built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * se

[PATCH v19 29/40] c++: Implement __is_pointer built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantic

[PATCH v19 10/40] c++: Implement __is_unbounded_array built-in trait

2023-10-13 Thread Ken Matsui
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unbounded_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNBOUNDED_A

[PATCH] libstdc++: Workaround for LLVM-61763 in ranges

2023-10-13 Thread Benjamin Brock
This is my first time submitting a patch, so my apologies if I'm submitting incorrectly or missing something. Clang is unable to compile parts of libstdc++'s ranges implementation due to LLVM-61763, a Clang frontend compiler bug in handling the declarations of constrained friends. The problem are

[PATCH] Power10: Add options to disable load and store vector pair.

2023-10-13 Thread Michael Meissner
In working on some future patches that involve utilizing vector pair instructions, I wanted to be able to tune my program to enable or disable using the vector pair load or store operations while still keeping the other operations on the vector pair. This patch adds two undocumented tuning options

[PATCH] MATCH: [PR111432] Simplify `a & (x | CST)` to a when we know that (a & ~CST) == 0

2023-10-13 Thread Andrew Pinski
This adds the simplification `a & (x | CST)` to a when we know that `(a & ~CST) == 0`. In a similar fashion as `a & CST` is handle. I looked into handling `a | (x & CST)` but that I don't see any decent simplifications happening. OK? Bootstrapped and tested on x86_linux-gnu with no regressions.

[Committed] RISC-V: Remove redundant iterators.

2023-10-13 Thread Juzhe-Zhong
These iterators are redundant, removed and commmitted. gcc/ChangeLog: * config/riscv/vector-iterators.md: Remove redundant iterators. --- gcc/config/riscv/vector-iterators.md | 110 --- 1 file changed, 110 deletions(-) diff --git a/gcc/config/riscv/vector-iterato

Re: [PATCH v2] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-10-13 Thread Jason Merrill
On 10/10/23 13:20, Marek Polacek wrote: Thanks for looking into this. It's kept me occupied for quite a while. Thanks, nice work. On Tue, Aug 29, 2023 at 03:26:46PM -0400, Jason Merrill wrote: On 8/23/23 15:49, Marek Polacek wrote: +struct A { + int x; + int y = id(x); +}; + +template +c

Re: [PATCH v2] c++: Fix compile-time-hog in cp_fold_immediate_r [PR111660]

2023-10-13 Thread Jason Merrill
On 10/13/23 14:53, Marek Polacek wrote: On Thu, Oct 12, 2023 at 09:41:43PM -0400, Jason Merrill wrote: On 10/12/23 17:04, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- My recent patch introducing cp_fold_immediate_r caused exponential compile time w

<    1   2