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

2023-10-17 Thread Robin Dapp
> Natively, things seem fine, but for cross, I get failures on a few > targets (hppa2.0-unknown-linux-gnu, hppa64-unknown-linux-gnu). > > With ./configure --host=x86_64-pc-linux-gnu > --target=hppa2.0-unknown-linux-gnu --build=x86_64-pc-linux-gnu && make > -j$(nproc), I get a bunch of stuff like:

[PATCH] RISC-V: Enable more tests for dynamic LMUL and bug fix[PR111832]

2023-10-17 Thread Juzhe-Zhong
Last time, Robin has mentioned that dynamic LMUL will cause ICE in SPEC: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629992.html which is caused by assertion FAIL. When we enable more currents in rvv.exp with dynamic LMUL, such issue can be reproduced and has a PR: https://gcc.gnu.o

[patch] fortran/intrinsic.texi: Improve SIGNAL intrinsic entry (was: [patch] fortran/intrinsic.texi: Add 'passed by value' to signal handler)

2023-10-17 Thread Tobias Burnus
Hi Harald, On 16.10.23 20:31, Harald Anlauf wrote: Hi Tobias, Am 16.10.23 um 19:11 schrieb Tobias Burnus: OK for mainline? I think the patch qualifies as obvious. While at it, you might consider removing the comment a few lines below the place you are changing, @c TODO: What should the int

[PATCH] wide-int-print: Don't print large numbers hexadecimally for print_dec{,s,u}

2023-10-17 Thread Jakub Jelinek
Hi! The following patch implements printing of wide_int/widest_int numbers decimally when asked for that using print_dec{,s,u}, even if they have precision larger than 64 and get_len () above 1 (right now we printed them hexadecimally and even negative numbers as huge positive hexadecimal). In or

Re: [PATCH v8] tree-ssa-sink: Improve code sinking pass

2023-10-17 Thread Richard Biener
On Thu, Oct 12, 2023 at 10:42 AM Ajit Agarwal wrote: > > This patch improves code sinking pass to sink statements before call to reduce > register pressure. > Review comments are incorporated. Synced and modified with latest trunk > sources. > > For example : > > void bar(); > int j; > void foo(i

Re: [PATCH] PR 91865: Avoid ZERO_EXTEND of ZERO_EXTEND in make_compound_operation.

2023-10-17 Thread Richard Biener
On Mon, Oct 16, 2023 at 9:27 PM Jeff Law wrote: > > > > On 10/15/23 03:49, Roger Sayle wrote: > > > > Hi Jeff, > > Thanks for the speedy review(s). > > > >> From: Jeff Law > >> Sent: 15 October 2023 00:03 > >> To: Roger Sayle ; gcc-patches@gcc.gnu.org > >> Subject: Re: [PATCH] PR 91865: Avoid ZER

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

2023-10-17 Thread Richard Biener
On Mon, Oct 16, 2023 at 11:59 PM Richard Sandiford wrote: > > Robin Dapp writes: > >> 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 > >> th

Re: [PATCH v8] tree-ssa-sink: Improve code sinking pass

2023-10-17 Thread Ajit Agarwal
Hello Richard: On 17/10/23 2:03 pm, Richard Biener wrote: > On Thu, Oct 12, 2023 at 10:42 AM Ajit Agarwal wrote: >> >> This patch improves code sinking pass to sink statements before call to >> reduce >> register pressure. >> Review comments are incorporated. Synced and modified with latest trun

Re: [PATCH v8] tree-ssa-sink: Improve code sinking pass

2023-10-17 Thread Richard Biener
On Tue, Oct 17, 2023 at 10:53 AM Ajit Agarwal wrote: > > Hello Richard: > > On 17/10/23 2:03 pm, Richard Biener wrote: > > On Thu, Oct 12, 2023 at 10:42 AM Ajit Agarwal > > wrote: > >> > >> This patch improves code sinking pass to sink statements before call to > >> reduce > >> register pressur

Re: [PATCH 02/11] Handle epilogues that contain jumps

2023-10-17 Thread Richard Biener
On Thu, Oct 12, 2023 at 10:15 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Aug 22, 2023 at 12:42 PM Szabolcs Nagy via Gcc-patches > > wrote: > >> > >> From: Richard Sandiford > >> > >> The prologue/epilogue pass allows the prologue sequence > >> to contain jumps. The sequ

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

2023-10-17 Thread Richard Biener
On Sat, Oct 14, 2023 at 2:57 AM Andrew Pinski wrote: > > 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. > >

[avr,committed] Implement fma, fmal.

2023-10-17 Thread Georg-Johann Lay
This commit implements fma and fmal which were missing from LibF7. Johann -- LibF7: Implement fma / fmal. libgcc/config/avr/libf7/ * libf7.h (F7_SIZEOF): New macro. * libf7-asm.sx: Use F7_SIZEOF instead of magic number "10". (F7MOD_D_fma_, __fma): New module and functio

[PATCH] RISC-V: Fix failed testcase when use -cmodel=medany

2023-10-17 Thread Lehua Ding
This little path fix a failed testcase when use -cmodel=medany. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/cpymem-1.c: Split check. --- gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-1.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/tests

Re: [PATCH] RISC-V: Fix failed testcase when use -cmodel=medany

2023-10-17 Thread juzhe.zh...@rivai.ai
OK juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-10-17 17:57 To: gcc-patches CC: juzhe.zhong; kito.cheng; rdapp.gcc; palmer; jeffreyalaw; lehua.ding Subject: [PATCH] RISC-V: Fix failed testcase when use -cmodel=medany This little path fix a failed testcase when use -cmodel=medany. gcc/tes

Re: [PATCH] RISC-V: Fix failed testcase when use -cmodel=medany

2023-10-17 Thread Lehua Ding
Committed, thanks Juzhe. On 2023/10/17 17:58, juzhe.zh...@rivai.ai wrote: OK juzhe.zh...@rivai.ai *From:* Lehua Ding *Date:* 2023-10-17 17:57 *To:* gcc-patches

Re: Check that passes do not forget to define profile

2023-10-17 Thread Andre Vieira (lists)
So OK to commit this? This patch makes sure the profile_count information is initialized for the new bb created in move_sese_region_to_fn. gcc/ChangeLog: * tree-cfg.cc (move_sese_region_to_fn): Initialize profile_count for new basic block. Bootstrapped and regression tested o

[PATCH] c++: Add missing auto_diagnostic_groups to constexpr.cc

2023-10-17 Thread Nathaniel Shead
Marek pointed out in another patch of mine [1] that I was missing an auto_diagnostic_group to correctly associate informative notes with their errors in structured error outputs. This patch goes through constexpr.cc to correct this in other locations which seem to have the same issue. [1]: https:/

[PATCH v21 00/30] Optimize type traits performance

2023-10-17 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v21: * Used _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin in cpp_type_traits.h. * Added const char* name to struct cp_trait, and loop over

[PATCH v21 01/30] c-family, c++: Look up built-in traits via identifier node

2023-10-17 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 the identifier node to look up the specific trait. Rather than holding traits as keywords, we set all trait identifiers as ci

[PATCH v21 02/30] c++: Accept the use of built-in trait identifiers

2023-10-17 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 V2 00/14] Refactor and cleanup vsetvl pass

2023-10-17 Thread Lehua Ding
This patch refactors and cleanups the vsetvl pass in order to make the code easier to modify and understand. This patch does several things: 1. Introducing a virtual CFG for vsetvl infos and Phase 1, 2 and 3 only maintain and modify this virtual CFG. Phase 4 performs insertion, modification and

[PATCH V2 01/14] RISC-V: P1: Refactor avl_info/vl_vtype_info/vector_insn_info

2023-10-17 Thread Lehua Ding
This sub-patch combine avl_info/vl_vtype_info/vector_insn_info to a single class vsetvl_info. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (avl_info::avl_info): Removed. (avl_info::single_source_equal_p): Ditto. (avl_info::multiple_source_equal_p): Ditto. (avl_inf

[PATCH V2 03/14] RISC-V: P3: Refactor vector_infos_manager

2023-10-17 Thread Lehua Ding
This sub-patch refactor vector_infos_manager to a pre_vsetvl class which is responsible for the entire lazy vsetvl jobs. There is no need to introduce a separate vsetvl infos manager, because vsetvl infos are modified by the optimization code. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc

[PATCH V2 05/14] RISC-V: P5: combine phase 1 and 2

2023-10-17 Thread Lehua Ding
This sub-patch combine phase 1 and 2 to use the new demand system and delay the insert of vsetvl insn into phase 4. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): New. (pass_vsetvl::compute_local_backward_infos): Removed. (pass_vsetvl:

[PATCH V2 02/14] RISC-V: P2: Refactor and cleanup demand system

2023-10-17 Thread Lehua Ding
This sub-patch refactor the demand system. I split the demand information into three parts. They are sew and lmul related (sew_lmul_demand_type), tail and mask policy related (policy_demand_type) and avl related (avl_demand_type). Then we define three interfaces avaiable_with, compatible_with and m

[PATCH V2 04/14] RISC-V: P4: move method from pass_vsetvl to pre_vsetvl

2023-10-17 Thread Lehua Ding
This sub-patch remove the method about optimize vsetvl infos into class pre_vsetvl. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::get_vector_info): Removed. (pass_vsetvl::get_block_info): Removed. (pass_vsetvl::update_vector_info): Removed. (pass_vset

[PATCH V2 07/14] RISC-V: P7: Move earliest fuse and lcm code to pre_vsetvl class

2023-10-17 Thread Lehua Ding
This patch adjust move the code phase 2 and 3 from pass_vsetvl to pre_vsetvl class. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::earliest_fuse_vsetvl_info): New. (pre_vsetvl::pre_global_vsetvl_info): New. (pass_vsetvl::prune_expressions): Removed. (p

[PATCH v21 24/30] libstdc++: Optimize std::is_function compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_function 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 implement

[PATCH v21 03/30] c++: Implement __is_const built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuite/Chan

[PATCH v21 30/30] libstdc++: Optimize std::is_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_pointer 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): Like

[PATCH V2 06/14] RISC-V: P6: Add computing reaching definition data flow

2023-10-17 Thread Lehua Ding
This sub-patch add some helper functions for computing reaching defintion data and three computational functions for different object. These three functions are used by phase 2 and 3. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (bitmap_union_of_preds_with_entry): New. (compute_r

[PATCH v21 08/30] libstdc++: Optimize std::is_array compilation performance

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

[PATCH v21 05/30] c++: Implement __is_volatile built-in trait

2023-10-17 Thread 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. gcc/tests

[PATCH V2 09/14] RISC-V: P9: Cleanup post optimize phase

2023-10-17 Thread Lehua Ding
This sub-patch deletes partial post optimize code(which implement in the main phase) and move the remain cleanup code to pre_vsetvl class. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::cleaup): New. (pre_vsetvl::remove_avl_operand): New. (pre_vsetvl::remove_un

[PATCH v21 15/30] c++: Implement __is_member_pointer built-in trait

2023-10-17 Thread 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): Li

[PATCH V2 12/14] RISC-V: P12: Delete riscv-vsetvl.h

2023-10-17 Thread Lehua Ding
This sub-patch delete the unused header file riscv-vsetvl.h since we no need export any function. gcc/ChangeLog: * config/riscv/t-riscv: Removed riscv-vsetvl.h * config/riscv/riscv-vsetvl.h: Removed. --- gcc/config/riscv/riscv-vsetvl.h | 59 - gcc

[PATCH V2 08/14] RISC-V: P8: Unified insert and delete of vsetvl insn into Phase 4

2023-10-17 Thread Lehua Ding
This sub-patch move the modification of rtl codes from pass_vsetvl into pre_vsetvl class. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): New. (pass_vsetvl::can_refine_vsetvl_p): Removed. (pass_vsetvl::refine_vsetvls): Removed. (pass_vsetvl

[PATCH v22 02/31] c-family, c++: Look up built-in traits via identifier node

2023-10-17 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 the identifier node to look up the specific trait. Rather than holding traits as keywords, we set all trait identifiers as ci

[PATCH v21 20/30] libstdc++: Optimize std::is_member_object_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_object_pointer 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.

[PATCH v21 13/30] c++: Implement __is_scoped_enum built-in trait

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

[PATCH v21 07/30] c++: Implement __is_array built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuite/Chan

[PATCH v21 04/30] libstdc++: Optimize std::is_const compilation performance

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

[PATCH v21 10/30] libstdc++: Optimize std::is_unbounded_array compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_unbounded_array by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui

[PATCH v21 06/30] libstdc++: Optimize std::is_volatile compilation performance

2023-10-17 Thread 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 Ma

[PATCH V2 11/14] RISC-V: P11: Adjust vector_block_info to vsetvl_block_info class

2023-10-17 Thread Lehua Ding
This sub-patch adjust vector_block_info codes and rename to vsetvl_block_info. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (class vsetvl_block_info): New. * config/riscv/riscv-vsetvl.h (struct vector_block_info): Removed. --- gcc/config/riscv/riscv-vsetvl.cc | 55 +

[PATCH v21 29/30] c++: Implement __is_pointer built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuit

[PATCH v22 05/31] libstdc++: Optimize std::is_const compilation performance

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

[PATCH v21 09/30] c++: Implement __is_unbounded_array built-in trait

2023-10-17 Thread Ken Matsui
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. (finish_trait_expr):

[PATCH V2 10/14] RISC-V: P10: Cleanup helper functions

2023-10-17 Thread Lehua Ding
This sub-patch delete unused helper functions and reorganize the position of the remain functions. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (debug): Removed. (enum vsetvl_type): Moved. (enum emit_type): Moved. (vlmax_avl_p): Removed. (vlmul_to_str): Mo

[PATCH v21 19/30] c++: Implement __is_member_object_pointer built-in trait

2023-10-17 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. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_OBJECT_POINTER. * semantics.cc (trait_expr_value): Likewise.

[PATCH v21 26/30] libstdc++: Optimize std::is_object compilation performance

2023-10-17 Thread Ken Matsui
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 --- libstdc+

[PATCH v21 14/30] libstdc++: Optimize std::is_scoped_enum compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_scoped_enum 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

[PATCH v21 11/30] c++: Implement __is_bounded_array built-in trait

2023-10-17 Thread Ken Matsui
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): Likew

[PATCH V2 14/14] RISC-V: P14: Adjust and add testcases

2023-10-17 Thread Lehua Ding
This sub-patch adjust some testcases and add some bugfix testcases. PR target/111037 PR target/111234 PR target/111725 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/scalar_move-1.c: Adjust. * gcc.target/riscv/rvv/vsetvl/avl_single-23.c: Adjust.

[PATCH v21 27/30] c++: Implement __remove_pointer built-in trait

2023-10-17 Thread 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 __remove_poin

[PATCH v22 07/31] libstdc++: Optimize std::is_volatile compilation performance

2023-10-17 Thread 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 Ma

[PATCH v22 00/31] Optimize type traits performance

2023-10-17 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v22: * Included a missing patch in v21. Changes in v21: * Used _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin in cpp_type_traits.h.

[PATCH v22 27/31] libstdc++: Optimize std::is_object compilation performance

2023-10-17 Thread Ken Matsui
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 --- libstdc+

[PATCH v21 12/30] libstdc++: Optimize std::is_bounded_array compilation performance

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

[PATCH v22 12/31] c++: Implement __is_bounded_array built-in trait

2023-10-17 Thread Ken Matsui
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): Likew

[PATCH V2 13/14] RISC-V: P13: Reorganize functions used to modify RTL

2023-10-17 Thread Lehua Ding
This sub-patch reoriganize the functions that used to modify RTL. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (has_no_uses): Moved. (validate_change_or_fail): Moved. (gen_vsetvl_pat): Removed. (emit_vsetvl_insn): Removed. (eliminate_insn): Removed.

[PATCH v22 01/31] c++: Sort built-in traits alphabetically

2023-10-17 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 v21 28/30] libstdc++: Optimize std::remove_pointer compilation performance

2023-10-17 Thread 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/i

[PATCH v21 25/30] c++: Implement __is_object built-in trait

2023-10-17 Thread Ken Matsui
This patch implements built-in trait for std::is_object. gcc/cp/ChangeLog: * cp-trait.def: Define __is_object. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_OBJECT. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/C

[PATCH v22 06/31] c++: Implement __is_volatile built-in trait

2023-10-17 Thread 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. gcc/tests

[PATCH v21 21/30] c++: Implement __is_reference built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/te

[PATCH v22 08/31] c++: Implement __is_array built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuite/Chan

[PATCH v22 21/31] libstdc++: Optimize std::is_member_object_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_object_pointer 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.

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

2023-10-17 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 v21 22/30] libstdc++: Optimize std::is_reference compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_reference 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: K

[PATCH v22 29/31] libstdc++: Optimize std::remove_pointer compilation performance

2023-10-17 Thread 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/i

[PATCH v22 23/31] libstdc++: Optimize std::is_reference compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_reference 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: K

[PATCH v22 10/31] c++: Implement __is_unbounded_array built-in trait

2023-10-17 Thread Ken Matsui
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. (finish_trait_expr):

[PATCH v21 17/30] c++: Implement __is_member_function_pointer built-in trait

2023-10-17 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. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_FUNCTION_POINTER. * semantics.cc (trait_expr_value): Likewi

[PATCH v22 14/31] c++: Implement __is_scoped_enum built-in trait

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

[PATCH v22 19/31] libstdc++: Optimize std::is_member_function_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_function_pointer 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 trai

[PATCH v21 16/30] libstdc++: Optimize std::is_member_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_pointer 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): Li

[PATCH v22 24/31] c++: Implement __is_function built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/tests

[PATCH v22 16/31] c++: Implement __is_member_pointer built-in trait

2023-10-17 Thread 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): Li

[PATCH v21 23/30] c++: Implement __is_function built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/tests

[PATCH v22 30/31] c++: Implement __is_pointer built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuit

[PATCH v22 26/31] c++: Implement __is_object built-in trait

2023-10-17 Thread Ken Matsui
This patch implements built-in trait for std::is_object. gcc/cp/ChangeLog: * cp-trait.def: Define __is_object. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_OBJECT. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/C

[PATCH v21 18/30] libstdc++: Optimize std::is_member_function_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_function_pointer 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 trai

[PATCH v22 18/31] c++: Implement __is_member_function_pointer built-in trait

2023-10-17 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. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_FUNCTION_POINTER. * semantics.cc (trait_expr_value): Likewi

[PATCH v22 09/31] libstdc++: Optimize std::is_array compilation performance

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

[PATCH v22 13/31] libstdc++: Optimize std::is_bounded_array compilation performance

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

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

2023-10-17 Thread Robin Dapp
>> I don't know much about valueisation either :) But it does feel >> like we're working around the lack of a LEN form of COND_EXPR. >> In other words, it seems odd that we can do: >> >> IFN_COND_LEN_ADD (mask, a, 0, b, len, bias) >> >> but we can't do: >> >> IFN_COND_LEN (mask, a, b, len, bia

[PATCH v22 04/31] c++: Implement __is_const built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/testsuite/Chan

[PATCH v22 25/31] libstdc++: Optimize std::is_function compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_function 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 implement

[PATCH v22 15/31] libstdc++: Optimize std::is_scoped_enum compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_scoped_enum 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

[PATCH v22 20/31] c++: Implement __is_member_object_pointer built-in trait

2023-10-17 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. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_MEMBER_OBJECT_POINTER. * semantics.cc (trait_expr_value): Likewise.

[PATCH v22 17/31] libstdc++: Optimize std::is_member_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_member_pointer 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): Li

[PATCH v22 22/31] c++: Implement __is_reference built-in trait

2023-10-17 Thread Ken Matsui
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. gcc/te

[PATCH v22 28/31] c++: Implement __remove_pointer built-in trait

2023-10-17 Thread 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 __remove_poin

[PATCH v22 11/31] libstdc++: Optimize std::is_unbounded_array compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_unbounded_array by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui

[PATCH v22 31/31] libstdc++: Optimize std::is_pointer compilation performance

2023-10-17 Thread Ken Matsui
This patch optimizes the compilation performance of std::is_pointer 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): Like

Re: [PATCH] wide-int-print: Don't print large numbers hexadecimally for print_dec{,s,u}

2023-10-17 Thread Richard Biener
On Tue, 17 Oct 2023, Jakub Jelinek wrote: > Hi! > > The following patch implements printing of wide_int/widest_int numbers > decimally when asked for that using print_dec{,s,u}, even if they have > precision larger than 64 and get_len () above 1 (right now we printed > them hexadecimally and even

[PATCH] tree-optimization/111846 - put simd-clone-info into SLP tree

2023-10-17 Thread Richard Biener
The following avoids bogously re-using the simd-clone-info we currently hang off stmt_info from two different SLP contexts where a different number of lanes should have chosen a different best simdclone. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/111

[x86 PATCH] PR 106245: Split (x<<31)>>31 as -(x&1) in i386.md

2023-10-17 Thread Roger Sayle
This patch is the backend piece of a solution to PRs 101955 and 106245, that adds a define_insn_and_split to the i386 backend, to perform sign extension of a single (least significant) bit using AND $1 then NEG. Previously, (x<<31)>>31 would be generated as sall$31, %eax // 3 b

Re: [PATCH] openmp: Add support for the 'indirect' clause in C/C++

2023-10-17 Thread Tobias Burnus
Hi Kwok, hi Jakub, hi all, some first comments based on both playing around and reading the patch - and some generic comments to any patch reader. In general, the patch looks good. I just observe: * There is an issue with [[omp::decl(...)]]' * () - there is a C/C++ inconsistency in what is e

  1   2   >