[PATCH v1] RISC-V: Add test for FP llceil auto vectorization

2023-10-13 Thread pan2 . li
From: Pan Li The below FP API are supported already by sharing the same standard name, as well as the machine mode. long long llceil (double); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-ll

Re: [PATCH v1] RISC-V: Add test for FP llceil auto vectorization

2023-10-13 Thread juzhe.zh...@rivai.ai
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 15:20 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Add test for FP llceil auto vectorization From: Pan Li The below FP API are supported already by sharing the same standard name, as we

RE: [PATCH v1] RISC-V: Add test for FP llceil auto vectorization

2023-10-13 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Friday, October 13, 2023 3:33 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Add test for FP llceil auto vectorization OK juzhe.zh...@riva

[PATCH v1] RISC-V: Add test for FP iceil auto vectorization

2023-10-13 Thread pan2 . li
From: Pan Li The below FP API are supported already by sharing the same standard name, as well as the machine mode. int iceil (float); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-iceil-0.c:

Re: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization

2023-10-13 Thread juzhe.zh...@rivai.ai
Ok juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 16:06 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization From: Pan Li The below FP API are supported already by sharing the same standard name, as wel

RE: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization

2023-10-13 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Friday, October 13, 2023 4:08 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization Ok juzhe.zh...@rivai

[PATCH v1] RISC-V: Add test for FP ifloor auto vectorization

2023-10-13 Thread pan2 . li
From: Pan Li The below FP API are supported already by sharing the same standard name, as well as the machine mode. int ifloor (float); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-ifloor-0.

Re: [PATCH v1] RISC-V: Add test for FP ifloor auto vectorization

2023-10-13 Thread juzhe.zh...@rivai.ai
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 16:23 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Add test for FP ifloor auto vectorization From: Pan Li The below FP API are supported already by sharing the same standard name, as we

PATCH-1v3, expand] Enable vector mode for compare_by_pieces [PR111449]

2023-10-13 Thread HAO CHEN GUI
Hi, Vector mode instructions are efficient for compare on some targets. This patch enables vector mode for compare_by_pieces. Currently, vector mode is enabled for compare, set and clear. Helper function "qi_vector_p" decides if vector mode is enabled for certain by pieces operation. optabs_check

RE: [PATCH v1] RISC-V: Add test for FP ifloor auto vectorization

2023-10-13 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Friday, October 13, 2023 4:42 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Add test for FP ifloor auto vectorization OK juzhe.zh...@riva

[PATCH v1] RISC-V: Add test for FP llfloor auto vectorization

2023-10-13 Thread pan2 . li
From: Pan Li The below FP API are supported already by sharing the same standard name, as well as the machine mode. long long llfloor (double); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-l

[PATCH] Add support for SLP vectorization of OpenMP SIMD clone calls

2023-10-13 Thread Richard Biener
This adds support for SLP vectorization of OpenMP SIMD clone calls. There's a complication when vectorizing calls involving virtual operands since this is now for the first time not only leafs (loads or stores). With SLP this runs into the issue that placement of the vectorized stmts is not necess

Re: [PATCH 10/11] aarch64: Fix branch-protection error message tests

2023-10-13 Thread Richard Earnshaw (lists)
On 05/09/2023 16:00, Richard Sandiford via Gcc-patches wrote: > Szabolcs Nagy writes: >> Update tests for the new branch-protection parser errors. >> >> gcc/testsuite/ChangeLog: >> >> * gcc.target/aarch64/branch-protection-attr.c: Update. >> * gcc.target/aarch64/branch-protection-option.

Re: [PATCH v1] RISC-V: Add test for FP llfloor auto vectorization

2023-10-13 Thread juzhe.zh...@rivai.ai
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 17:49 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Add test for FP llfloor auto vectorization From: Pan Li The below FP API are supported already by sharing the same standard name, as w

Re: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars

2023-10-13 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 06:46:35PM +0200, Tobias Burnus wrote: > * parse.cc (check_omp_allocate_stmt): Permit procedure pointers > here (rejected later) for less mislreading diagnostic. s/misl/mis/ > libgomp/ChangeLog: > > * libgomp.texi: Fill in something here. > @@ -7220,8

[PATCH v1] RISC-V: Refine run test cases of math autovec

2023-10-13 Thread pan2 . li
From: Pan Li For the run test cases of math autovec, we need a reference value to check if the return value is expected or not. The previous patch leverage hardcode for the reference value but we can leverage the scalar math function instead. For example ceil after autovec. ASSERT (CEIL (Vector

RE: [PATCH v1] RISC-V: Add test for FP llfloor auto vectorization

2023-10-13 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Friday, October 13, 2023 6:31 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Add test for FP llfloor auto vectorization OK juzhe.zh...@riv

Re: [PATCH v1] RISC-V: Refine run test cases of math autovec

2023-10-13 Thread 钟居哲
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-13 19:35 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Refine run test cases of math autovec From: Pan Li For the run test cases of math autovec, we need a reference value to check if the r

Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr69907.c for RVV

2023-10-13 Thread Richard Biener
On Fri, 13 Oct 2023, Juzhe-Zhong wrote: > Like ARM SVE and GCN, add RVV. Adding RVV when SVE or GCN is already there looks obvious to me, these kind of changes are pre-approved. No need for all the noise. Thanks, Richard. > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/bb-slp-pr69907.c: Ad

Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-68.c for RVV

2023-10-13 Thread Richard Biener
On Fri, 13 Oct 2023, Juzhe-Zhong wrote: > Like comment said, this test failed on 64 bytes vector. > Both RVV and GCN has 64 bytes vector. > > So it's more reasonable to use vect512. OK > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/bb-slp-68.c: Use vect512. > > --- > gcc/testsuite/gcc.dg

[PATCH] OMP SIMD inbranch call vectorization for AVX512 style masks

2023-10-13 Thread Richard Biener
The following teaches vectorizable_simd_clone_call to handle integer mode masks. The tricky bit is to second-guess the number of lanes represented by a single mask argument - the following uses simdlen and the number of mask arguments to calculate that, assuming ABIs have them uniform. Similar to

RE: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-68.c for RVV

2023-10-13 Thread Li, Pan2
Committed, thanks Richard. Pan -Original Message- From: Richard Biener Sent: Friday, October 13, 2023 8:00 PM To: Juzhe-Zhong Cc: gcc-patches@gcc.gnu.org; jeffreya...@gmail.com Subject: Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-68.c for RVV On Fri, 13 Oct 2023, Juzhe-Zhong wro

[COMMITTED] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
Technically PR 111622 exposes a bug in GCC 13, but its been papered over on trunk by this: commit 9ea74d235c7e7816b996a17c61288f02ef767985 Author: Richard Biener Date: Thu Sep 14 09:31:23 2023 +0200 tree-optimization/111294 - better DCE after forwprop This removes a lot of dead sta

[COMMITTED] [GCC13] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
There are a lot of dead statements in this testcase which a casts. These were being added to the list of partial equivalences and causing some serious compile time issues. Rangers cache loops through equivalences when its propagating on-entry values, so if the partial equivalence list is very

Re: [COMMITTED] PR tree-optimization/111622 - Do not add partial equivalences with no uses.

2023-10-13 Thread Andrew MacLeod
of course the patch would be handy... On 10/13/23 09:23, Andrew MacLeod wrote: Technically PR 111622 exposes a bug in GCC 13, but its been papered over on trunk by this: commit 9ea74d235c7e7816b996a17c61288f02ef767985 Author: Richard Biener Date:   Thu Sep 14 09:31:23 2023 +0200         tree

Re: [Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars

2023-10-13 Thread Tobias Burnus
On 13.10.23 13:01, Jakub Jelinek wrote: On Tue, Oct 10, 2023 at 06:46:35PM +0200, Tobias Burnus wrote: +++ b/gcc/gimplify.cc @@ -1400,23 +1400,53 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) + else if (errorcount + || (align == NULL_TREE +

Re: [PATCH] genemit: Split insn-emit.cc into ten files.

2023-10-13 Thread Robin Dapp
> Testsuite is unchanged on all but x86 where, strangely, I saw several > illegal instructions in the pch tests. Those were not reproducible > in a second manual test suite run. I'm just running another full > bootstrap and testsuite cycle with the latest trunk. Follow-up on the pch tests. The

RE: [PATCH] genemit: Split insn-emit.cc into ten files.

2023-10-13 Thread Tamar Christina
> -Original Message- > From: Robin Dapp > Sent: Friday, October 13, 2023 4:15 PM > To: gcc-patches > Cc: rdapp@gmail.com; jeffreyalaw ; Tamar > Christina ; rjie...@linux.alibaba.com > Subject: Re: [PATCH] genemit: Split insn-emit.cc into ten files. > > > Testsuite is unchanged on all

Re: [PATCH] genemit: Split insn-emit.cc into ten files.

2023-10-13 Thread Robin Dapp
> Hmm why? The same callback you use to consume the listed arguments > can be used to consume the list can it not? I may be wrong, but from > what I remember the callback is called when main can't consume an > argv value and it's allowed to eat all remaining input? Ah, I see. If that's possible

Re: [PATCH] gimple-match: Do not try UNCOND optimization with COND_LEN.

2023-10-13 Thread Robin Dapp
> Why are the contents of this if statement wrong for COND_LEN? > If the "else" value doesn't matter, then the masked form can use > the "then" value for all elements. I would have expected the same > thing to be true of COND_LEN. Right, that one was overly pessimistic. Removed. > But isn't the

Re: [PATCH v2] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-13 Thread Jeff Law
On 10/12/23 12:28, Kito Cheng wrote: Sorry for the late comment after Jeff say ok, but I guess we may consider add "-fno-schedule-insns -fno-schedule-insns2" to avoid disturbing from schedule like some of our test case in gcc/testsuite/gcc.target/riscv/rvv? It wouldn't be a bad idea to bring m

Re: [PATCH] combine: Fix handling of unsigned constants

2023-10-13 Thread Jeff Law
On 10/6/23 01:45, Stefan Schulze Frielinghaus wrote: If a CONST_INT represents an integer of a mode with fewer bits than in HOST_WIDE_INT, then the integer is sign extended. For those two optimizations touched by this patch, the integers of interest have only the most significant bit set w.r.

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

2023-10-13 Thread Marek Polacek
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 with nested COND_EXPRs.

Continued (Non)mutlib and stub header issue (was Re: [PATCH v2] RISC-V: Use stdint-gcc.h in rvv testsuite)

2023-10-13 Thread Vineet Gupta
Hi Kito, Christoph, Patrick, I've been trying to test a specific non multilib config (rv64-zicond_zfa) and seeing noisy output (compared to a similar multlib build) and it seems there's still a bunch of this header issue (for the rv32 abi headers) in the non-multlib config. e.g. FAIL: gcc.dg

Re: [PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-13 Thread Jerry D
On 10/11/23 12:39 PM, Harald Anlauf wrote: Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict between an internal procedure and a local declaration for the case that the latter is a derived type. Another torture test by Gerhard... ;

Re: [PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-13 Thread Jerry D
On 10/11/23 12:44 PM, Harald Anlauf wrote: Dear All, sorry for attaching the wrong patch - this time it is the correct one! Harald On 10/11/23 21:39, Harald Anlauf wrote: Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict betwee

[PATCH v18 00/40] Optimize type traits performance

2023-10-13 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v18: * Removed all RID values for built-in traits and used cik_trait instead. * Improved to handle the use of non-function-like built-in trait

[PATCH v18 01/40] c++: Sort built-in traits alphabetically

2023-10-13 Thread Ken Matsui
This patch sorts built-in traits alphabetically for better code readability. gcc/cp/ChangeLog: * constraint.cc (diagnose_trait_expr): Sort built-in traits alphabetically. * cp-trait.def: Likewise. * semantics.cc (trait_expr_value): Likewise. (finish_trait_e

[PATCH v18 02/40] c-family, c++: Look up built-in traits through gperf

2023-10-13 Thread Ken Matsui
Since RID_MAX soon reaches 255 and all built-in traits are used approximately once in a C++ translation unit, this patch removes all RID values for built-in traits and uses gperf to look up the specific trait. Rather than holding traits as keywords, we set all trait identifiers as cik_trait, which

[PATCH v18 03/40] c++: Accept the use of non-function-like built-in trait identifiers

2023-10-13 Thread Ken Matsui
This patch accepts the use of non-function-like built-in trait identifiers. Specifically, we check if the subsequent token is '(' for ordinary built-in traits or is '<' only for the special __type_pack_element built-in trait. If the same identifiers are used in other cases, the parser treats them

[PATCH v18 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 v18 07/40] libstdc++: Optimize is_volatile trait performance

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

[PATCH v18 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 v18 05/40] libstdc++: Optimize is_const trait performance

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

[PATCH v18 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 v18 08/40] c++: Implement __is_array built-in trait

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

[PATCH v18 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 v18 12/40] c++: Implement __is_bounded_array built-in trait

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

[PATCH v18 11/40] libstdc++: Optimize is_unbounded_array trait performance

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

[PATCH v18 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 v18 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 v18 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 v18 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 v18 17/40] libstdc++: Optimize is_member_pointer trait performance

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

[PATCH v18 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 v18 18/40] c++: Implement __is_member_function_pointer built-in trait

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

[PATCH v18 21/40] libstdc++: Optimize is_member_object_pointer trait performance

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

[PATCH v18 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 v18 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 v18 23/40] libstdc++: Optimize is_reference trait performance

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

ping: [PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-10-13 Thread Lewis Hyatt
On Tue, Sep 12, 2023 at 04:09:21PM -0400, Lewis Hyatt wrote: > On Tue, Aug 8, 2023 at 5:53 PM Jason Merrill wrote: > > > > On 7/31/23 22:22, Lewis Hyatt via Gcc-patches wrote: > > > `#pragma GCC target' is not currently handled in preprocess-only mode > > > (e.g., > > > when running gcc -E or gcc

[PATCH v18 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 v18 25/40] libstdc++: Optimize is_function trait performance

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

[PATCH v18 26/40] libstdc++: Optimize is_object trait performance

2023-10-13 Thread 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): Likewi

[PATCH v18 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 v18 28/40] libstdc++: Optimize remove_pointer trait performance

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

[PATCH v18 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 v18 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 v18 31/40] c++: Implement __is_arithmetic built-in trait

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

[PATCH v18 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 v18 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 v18 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 v18 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 v18 36/40] libstdc++: Optimize is_unsigned trait performance

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

[PATCH v18 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 v18 38/40] libstdc++: Optimize is_signed trait performance

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

[PATCH v18 39/40] c++: Implement __is_scalar built-in trait

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

[PATCH v18 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

Re: Continued (Non)mutlib and stub header issue (was Re: [PATCH v2] RISC-V: Use stdint-gcc.h in rvv testsuite)

2023-10-13 Thread Kito Cheng
> When looking around, I stumbled upon commit > d0bbecb1c41 "RISC-V: Add riscv_vector.h wrapper in testsuite to > prevent pull in stdint.h from C library" >work > Which seems like a step in a right direction, but how does one ensure > that the wrapper riscv_vector.h (containing stdint-gcc.h) i

[PATCH] c++: fix truncated diagnostic in C++23 [PR111272]

2023-10-13 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- In C++23, since P2448, a constexpr function F that calls a non-constexpr function N is OK as long as we don't actually call F in a constexpr context. So instead of giving an error in maybe_save_constexpr_fundef, we only give an

[PATCH v19 00/40] Optimize type traits performance

2023-10-13 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v19: * Fixed a typo. * Rebased on top of trunk. * Improved clarity of the commit message. Changes in v18: * Removed all RID values for

[PATCH v19 01/40] c++: Sort built-in traits alphabetically

2023-10-13 Thread Ken Matsui
This patch sorts built-in traits alphabetically for better code readability. gcc/cp/ChangeLog: * constraint.cc (diagnose_trait_expr): Sort built-in traits alphabetically. * cp-trait.def: Likewise. * semantics.cc (trait_expr_value): Likewise. (finish_trait_e

[PATCH v19 02/40] c-family, c++: Look up built-in traits through gperf

2023-10-13 Thread Ken Matsui
Since RID_MAX soon reaches 255 and all built-in traits are used approximately once in a C++ translation unit, this patch removes all RID values for built-in traits and uses gperf to look up the specific trait. Rather than holding traits as keywords, we set all trait identifiers as cik_trait, which

[PATCH v19 03/40] c++: Accept the use of built-in trait identifiers

2023-10-13 Thread Ken Matsui
This patch accepts the use of built-in trait identifiers when they are actually not used as traits. Specifically, we check if the subsequent token is '(' for ordinary built-in traits or is '<' only for the special __type_pack_element built-in trait. If those identifiers are used differently, the

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

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

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

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

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

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

[PATCH v19 39/40] c++: Implement __is_scalar built-in trait

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

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

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

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

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

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

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

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

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

[PATCH v19 08/40] c++: Implement __is_array built-in trait

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

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

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

[PATCH v19 12/40] c++: Implement __is_bounded_array built-in trait

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

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

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

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

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

[PATCH v19 31/40] c++: Implement __is_arithmetic built-in trait

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

[PATCH v19 18/40] c++: Implement __is_member_function_pointer built-in trait

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

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

2023-10-13 Thread 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): Likewi

  1   2   >