Re: [1/3] Add support for target_version attribute

2023-10-19 Thread Richard Biener
On Wed, 18 Oct 2023, Andrew Carlotti wrote: > This patch adds support for the "target_version" attribute to the middle > end and the C++ frontend, which will be used to implement function > multiversioning in the aarch64 backend. > > Note that C++ is currently the only frontend which supports > m

Re: [PATCH 0/8] omp: Replace simd_clone_subparts with TYPE_VECTOR_SUBPARTS

2023-10-19 Thread Richard Biener
On Wed, 18 Oct 2023, Andre Vieira (lists) wrote: > > Refactor simd clone handling code ahead of support for poly simdlen. OK. Richard. > gcc/ChangeLog: > > * omp-simd-clone.cc (simd_clone_subparts): Remove. > (simd_clone_init_simd_arrays): Replace simd_clone_supbarts with >

Re: [PATCH] Avoid compile time hog on vect_peel_nonlinear_iv_init for nonlinear induction vec_step_op_mul when iteration count is too big.

2023-10-19 Thread Richard Biener
On Thu, Oct 19, 2023 at 8:16 AM liuhongt wrote: > > >So the bugs were not fixed without this hunk? IIRC in the audit > >trail we concluded the value is always positive ... (but of course > >a large unsigned value can appear negative if you test it this way?) > No, I added this incase in the futur

[PATCH] return edge in make_eh_edges

2023-10-19 Thread Alexandre Oliva
The need to initialize edge probabilities has made make_eh_edges undesirably hard to use. I suppose we don't want make_eh_edges to initialize the probability of the newly-added edge itself, so that the caller takes care of it, but identifying the added edge in need of adjustments is inefficient

Re: [PATCH v4 0/6] Add Loongson SX/ASX instruction support to LoongArch target.

2023-10-19 Thread chenglulu
在 2023/8/20 下午4:25, Xi Ruoyao 写道: On Thu, 2023-08-17 at 15:20 +0800, Chenghui Pan wrote: Seems ARMv8-A only guarantees to preserve low 64-bit value of NEON/floating-point register value. I'm not sure that I modify the testcase in the right way and maybe we need more investigations. Any ideas o

Re: [PATCH][_Hashtable] Fix merge

2023-10-19 Thread Jonathan Wakely
On Thursday, 19 October 2023, François Dumont wrote: > libstdc++: [_Hashtable] Do not reuse untrusted cached hash code > > On merge reuse merged node cached hash code only if we are on the same type of > hash and this hash is stateless. Usage of function pointers or std::function as > hash functor

[PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-19 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 V3 02/11] RISC-V: P2: Refactor and cleanup demand system

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (incompatible_avl_p): Removed. (different_sew_p): Removed. (different_lmul_p): Removed. (different_ratio_p): Removed. (different_tail_policy_p): Removed. (different_mask_policy_p): Removed. (possi

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

2023-10-19 Thread Lehua Ding
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_vsetvl::update_block_info): Removed. (pass_vsetvl::simple_vsetvl): Removed.

[PATCH V3 01/11] RISC-V: P1: Refactor avl_info/vl_vtype_info/vector_insn_info/vector_block_info

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (avl_info::avl_info): Removed. (avl_info::single_source_equal_p): Removed. (avl_info::multiple_source_equal_p): Removed. (avl_info::operator=): Removed. (avl_info::operator==): Removed. (avl_info::operato

[PATCH V3 03/11] RISC-V: P3: Refactor vector_infos_manager

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (vector_infos_manager::vector_infos_manager): Removed. (vector_infos_manager::create_expr): Removed. (class pre_vsetvl): New class. (vector_infos_manager::get_expr_id): Removed. (vector_infos_manager::all_same_r

[PATCH V3 05/11] RISC-V: P5: Combine phase 1 and 2

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): New. (pass_vsetvl::compute_local_backward_infos): Removed. (pass_vsetvl::need_vsetvl): Removed. (pass_vsetvl::transfer_before): Removed. (pass_vsetvl::transfer_after): Remov

[PATCH V3 08/11] RISC-V: P8: Refactor emit-vsetvl phase and delete post optimization

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): New. (pre_vsetvl::cleaup): New. (pre_vsetvl::remove_avl_operand): New. (pre_vsetvl::remove_unused_dest_operand): New. (pass_vsetvl::get_vsetvl_at_end): Removed. (local_avl_compa

[PATCH V3 09/11] RISC-V: P9: Cleanup and reorganize helper functions

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (debug): Removed. (bitmap_union_of_preds_with_entry): New. (compute_reaching_defintion): New. (vlmax_avl_p): New. (enum vsetvl_type): Moved. (enum emit_type): Moved. (vlmul_to_str): Moved.

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

2023-10-19 Thread Lehua Ding
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. (pass_vsetvl::compute_local_properties): Removed. (pass_vsetvl::earliest_fusion

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

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::compute_avl_def_data): New. (pre_vsetvl::compute_vsetvl_def_data): New. (pre_vsetvl::compute_lcm_local_properties): New. --- gcc/config/riscv/riscv-vsetvl.cc | 395 +++ 1 file changed,

[PATCH V3 11/11] RISC-V: P11: Adjust and add testcases

2023-10-19 Thread Lehua Ding
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. * gcc.target/riscv/rvv/vsetvl/avl_single-46.c: Adjust. *

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-19 Thread Robin Dapp
Hi Lehua, thanks for the extensive rework. I'm going to let Juzhe handle the review since it's his pass and he knows it best. Delegated it to him in patchwork. Regards Robin

[PATCH V3 10/11] RISC-V: P10: Delete riscv-vsetvl.h and adjust riscv-vsetvl.def

2023-10-19 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/riscv-vsetvl.def (DEF_INCOMPATIBLE_COND): Removed. (DEF_SEW_LMUL_RULE): New. (DEF_SEW_LMUL_FUSE_RULE): Removed. (DEF_POLICY_RULE): New. (DEF_UNAVAILABLE_COND): Removed. (DEF_AVL_RULE): New. (sew_lmul): New.

Re: [PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-19 Thread HAO CHEN GUI
Kewen & David, Thanks for your comments. 在 2023/10/17 10:19, Kewen.Lin 写道: > I think David raised a good question, it sounds to me that the current > handling simply consider that if MOVE_MAX_PIECES is set to 16, the > required operations for this optimization on TImode are always available, > b

Re: [PATCH V2 00/14] Refactor and cleanup vsetvl pass

2023-10-19 Thread Lehua Ding
Hi Partick, Thank you so much for the details. I have send a V3 patchs here: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633529.html Can you use the new patchs to run the gcc testsuite again? I have fix some fails and fix the last patch of v2([PATCH V2 14/14]) which cannot apply no

Re: [PATCH V2] RISC-V: Fix failed hoist in LICM of vmv.v.x instruction

2023-10-19 Thread Robin Dapp
Hi Juzhe, as discussed off-list this approach generally makes sense to me so the patch LGTM once the vsetvl rework is upstream and settled. Independently, we still need to understand why the more complex broadcast pattern is not hoisted out of the loop. Regards Robin

[PATCH] c-family: Enable -fpermissive for C and ObjC

2023-10-19 Thread Florian Weimer
Future changes will treat some C front end warnings similar to -Wnarrowing. There are no new tests because there are no such C warnings yet. The existing test suite covers the -std=gnu89 -pedantic-errors corner cases (which should not turn on -fpermissive). gcc/ * doc/invoke.texi (Warni

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-19 Thread Lehua Ding
Okay, thanks anyway. On 2023/10/19 16:38, Robin Dapp wrote: Hi Lehua, thanks for the extensive rework. I'm going to let Juzhe handle the review since it's his pass and he knows it best. Delegated it to him in patchwork. Regards Robin -- Best, Lehua (RiVAI) lehua.d...@rivai.ai

Re: [PATCH] x86: Correct ISA enabled for clients since Arrow Lake

2023-10-19 Thread Hongtao Liu
On Wed, Oct 18, 2023 at 4:10 PM Haochen Jiang wrote: > > Hi all, > > I just found that since ISAs enabled on Sierra Forest changed, clients since > Arrow Lake will wrongly enable ENQCMD according to the current code. > > To avoid messing up again in the future, I changed the dependency on how ISAs

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-19 Thread 钟居哲
LGTM now. But wait for Patrick CI testing. Hi, @Patrick. Could you apply this patch and trigger CI in your github so that we can see the full running result. Issues ・ patrick-rivos/riscv-gnu-toolchain ・ GitHub juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-10-19 16:33 To: gcc-patches CC:

Re: Re: [PATCH V2] RISC-V: Fix failed hoist in LICM of vmv.v.x instruction

2023-10-19 Thread 钟居哲
May be it is COST issue of RVV instruction ? /* TODO: We set RVV instruction cost as 1 by default. Cost Model need to be well analyzed and supported in the future. */ if (riscv_v_ext_mode_p (mode)) { *total = COSTS_N_INSNS (1); return true; } Since all RVV instruction

[committed] amdgcn: deprecate Fiji device and multilib

2023-10-19 Thread Andrew Stubbs
The build has been failing for the last few days because LLVM removed support for the HSACOv3 binary metadata format, which we were still using for the Fiji multilib. The LLVM commit has now been reverted (thank you Pierre van Houtryve), but it's only a temporary repreive. This patch removes

Re: [PATCH] return edge in make_eh_edges

2023-10-19 Thread Richard Biener
On Thu, Oct 19, 2023 at 9:59 AM Alexandre Oliva wrote: > > > The need to initialize edge probabilities has made make_eh_edges > undesirably hard to use. I suppose we don't want make_eh_edges to > initialize the probability of the newly-added edge itself, so that the > caller takes care of it, but

Enable top-level recursive 'autoreconf' (was: Hints on reconfiguring GCC)

2023-10-19 Thread Thomas Schwinge
Hi! On 2023-10-18T15:42:18+0100, R jd <3246251196r...@gmail.com> wrote: > I guess I can ask, why there is not a recursive approach for configuring > GCC. e.g. AC_SUBDIRS in the top level? ('AC_CONFIG_SUBDIRS' you mean.) You know, often it just takes someone to ask the right questions... ;-) Wh

[PATCH] wwwdocs: gcc-14: mark amdgcn fiji deprecated

2023-10-19 Thread Andrew Stubbs
OK to commit? Andrewgcc-14: mark amdgcn fiji deprecated diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index c817dde4..91ab8132 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -178,6 +178,16 @@ a work-in-progress. +AMD Radeon (GCN) + + +

Re: Enable top-level recursive 'autoreconf'

2023-10-19 Thread Andreas Schwab
On Okt 19 2023, Thomas Schwinge wrote: > Hi! > > On 2023-10-18T15:42:18+0100, R jd <3246251196r...@gmail.com> wrote: >> I guess I can ask, why there is not a recursive approach for configuring >> GCC. e.g. AC_SUBDIRS in the top level? > > ('AC_CONFIG_SUBDIRS' you mean.) You know, often it just ta

Re: [PATCH] wwwdocs: gcc-14: mark amdgcn fiji deprecated

2023-10-19 Thread Tobias Burnus
On 19.10.23 11:49, Andrew Stubbs wrote: OK to commit? (I think as maintainer you don't need approval - but of course comments by others can be helpful; I hope mine are. Additionally, Gerald (CCed) helps with keeping the webpages in good shape (thanks!).) gcc-14: mark amdgcn fiji deprecated d

Re: Enable top-level recursive 'autoreconf'

2023-10-19 Thread Thomas Schwinge
Hi! On 2023-10-19T11:57:33+0200, Andreas Schwab wrote: > On Okt 19 2023, Thomas Schwinge wrote: >> On 2023-10-18T15:42:18+0100, R jd <3246251196r...@gmail.com> wrote: >>> I guess I can ask, why there is not a recursive approach for configuring >>> GCC. e.g. AC_SUBDIRS in the top level? >> >> ('AC

Re: [PATCH 1/2] arm: Use deltas for Arm switch tables

2023-10-19 Thread Richard Earnshaw
On 28/09/2023 14:26, Richard Ball wrote: For normal optimization for the Arm state in gcc we get an uncompressed table of jump targets. This is in the middle of the text segment far larger than necessary, especially at -Os. This patch compresses the table to use deltas in a similar manner to T

Re: [PATCH 2/2] arm: move the switch tables for Arm to the RO data section.

2023-10-19 Thread Richard Earnshaw
On 28/09/2023 14:29, Richard Ball wrote: Follow up patch to arm: Use deltas for Arm switch tables This patch moves the switch tables for Arm from the .text section into the .rodata section. gcc/ChangeLog: * config/arm/aout.h: Change to use the Lrtx label. * config/arm/arm.h (

Re: [PATCH] Fix PR ada/111813 (Inconsistent limit in Ada.Calendar.Formatting)

2023-10-19 Thread Simon Wright
Pierre-Marie, I’ve CC’d you hoping you’re an appropriate person to ping on this one. If not, who would be for this sort of change? I should have said, tested by - add test case, make -C gcc check-gnat: error reported - make -C gcc gnatlib_and_tools; make install - make -C gcc check-gnat: no error

[PATCH 1/2] Refactor x86 vectorized gather path

2023-10-19 Thread Richard Biener
The following moves the builtin decl gather vectorization path along the internal function and emulated gather vectorization paths, simplifying the existing function down to generating the call and required conversions to the actual argument types. This thereby exposes the unique support of two ti

[PATCH 2/2] tree-optimization/111131 - SLP for non-IFN gathers

2023-10-19 Thread Richard Biener
The following implements SLP vectorization support for gathers without relying on IFNs being pattern detected (and supported by the target). That includes support for emulated gathers but also the legacy x86 builtin path. Bootstrapped and tested on x86_64-unknown-linux-gnu, will push. Richard.

Re: gcc 13.2 is missing warnings?

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 07:39:43AM -0400, Eric Sokolowsky via Gcc wrote: > I am using gcc 13.2 on Fedora 38. Consider the following program. > > #include > int main(int argc, char **argv) > { > printf("Enter a number: "); > int num = 0; > scanf("%d", &num); > > switch (num) >

Re: [PATCH 4/8] vect: don't allow fully masked loops with non-masked simd clones [PR 110485]

2023-10-19 Thread Richard Biener
On Wed, 18 Oct 2023, Andre Vieira (lists) wrote: > Rebased on top of trunk, minor change to check if loop_vinfo since we now do > some slp vectorization for simd_clones. > > I assume the previous OK still holds. Ack. > On 30/08/2023 13:54, Richard Biener wrote: > > On Wed, 30 Aug 2023, Andre Vi

Re: [Patch 3/8] vect: Fix vect_get_smallest_scalar_type for simd clones

2023-10-19 Thread Richard Biener
On Wed, 18 Oct 2023, Andre Vieira (lists) wrote: > Made it a local function and changed prototype according to comments. > > Is this OK? OK. > gcc/ChangeLog: > * tree-vect-data-refs.cc (vect_get_smallest_scalar_type): Special > case > simd clone calls and only use types that

Re: [PATCH] libcpp: testsuite: Add test for fixed _Pragma bug [PR82335]

2023-10-19 Thread Marek Polacek
On Wed, Oct 18, 2023 at 05:03:57PM -0400, Lewis Hyatt wrote: > May I please ping this one, and/or, is it something straightforward > enough I can just commit it as obvious? Thanks! > https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631814.html Please go ahead and apply the patch, thanks. So

Re: [PATCH] Fix PR ada/111813 (Inconsistent limit in Ada.Calendar.Formatting)

2023-10-19 Thread Arnaud Charlet
Hi Simon, > Pierre-Marie, I’ve CC’d you hoping you’re an appropriate person to ping on > this one. > If not, who would be for this sort of change? > > I should have said, tested by > - add test case, make -C gcc check-gnat: error reported > - make -C gcc gnatlib_and_tools; make install > - make

Re: [PATCH 5/8] vect: Use inbranch simdclones in masked loops

2023-10-19 Thread Richard Biener
On Wed, 18 Oct 2023, Andre Vieira (lists) wrote: > Rebased, needs review. + tree parm_type = NULL_TREE; + if(i < args.length()) + { space before ( +/* Return SSA name of the result of the conversion of OPERAND into type TYPE. + The conversion statement is inserted at GSI. */

Re: [PATCH v2] gcc: Introduce -fhardened

2023-10-19 Thread Richard Biener
On Wed, Oct 11, 2023 at 10:48 PM Marek Polacek wrote: > > On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: > > On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: > > > On Fri, Sep 15, 2023 at 5:09 PM Marek Polacek via Gcc-patches > > > wrote: > > > > > > > > Bootstrappe

[PATCH]middle-end: don't create LC-SSA PHI variables for PHI nodes who dominate loop

2023-10-19 Thread Tamar Christina
Hi All, As the testcase shows, when a PHI node dominates the loop there is no new definition inside the loop. As such there would be no PHI nodes to update. When we maintain LCSSA form we create an intermediate node in between the two loops to thread alongt the value. However later on when we u

Re: [PATCH]middle-end: don't create LC-SSA PHI variables for PHI nodes who dominate loop

2023-10-19 Thread Richard Biener
On Thu, 19 Oct 2023, Tamar Christina wrote: > Hi All, > > As the testcase shows, when a PHI node dominates the loop there is no new > definition inside the loop. As such there would be no PHI nodes to update. > > When we maintain LCSSA form we create an intermediate node in between the two > lo

Re: [PATCH v2] gcc: Introduce -fhardened

2023-10-19 Thread Sam James
Richard Biener writes: > On Wed, Oct 11, 2023 at 10:48 PM Marek Polacek wrote: >> >> On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: >> > On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: >> > > On Fri, Sep 15, 2023 at 5:09 PM Marek Polacek via Gcc-patches >> > >

Re: [PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-19 Thread Marek Polacek
On Wed, Oct 18, 2023 at 05:15:42PM -0400, Lewis Hyatt wrote: > Hello- > > The PR points out that my fix for PR53431 was incomplete and did not handle > -Wunknown-pragmas. This is a one-line fix to correct that, is it OK for > trunk and for GCC 13 backport please? bootstrap + regtest all languages

[PATCH] AArch64: Improve immediate generation

2023-10-19 Thread Wilco Dijkstra
Further improve immediate generation by adding support for 2-instruction MOV/EOR bitmask immediates. This reduces the number of 3/4-instruction immediates in SPECCPU2017 by ~2%. Passes regress, OK for commit? gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_internal_mov_immediate)

[PATCH] AArch64: Cleanup memset expansion

2023-10-19 Thread Wilco Dijkstra
Cleanup memset implementation. Similar to memcpy/memmove, use an offset and bytes throughout. Simplify the complex calculations when optimizing for size by using a fixed limit. Passes regress/bootstrap, OK for commit? gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_progress_poin

Re: [PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-19 Thread Lewis Hyatt
On Thu, Oct 19, 2023 at 8:43 AM Marek Polacek wrote: > > On Wed, Oct 18, 2023 at 05:15:42PM -0400, Lewis Hyatt wrote: > > Hello- > > > > The PR points out that my fix for PR53431 was incomplete and did not handle > > -Wunknown-pragmas. This is a one-line fix to correct that, is it OK for > > trunk

Re: [PATCH] c++: Make -Wunknown-pragmas controllable by #pragma GCC diagnostic [PR89038]

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 09:07:36AM -0400, Lewis Hyatt wrote: > On Thu, Oct 19, 2023 at 8:43 AM Marek Polacek wrote: > > > > On Wed, Oct 18, 2023 at 05:15:42PM -0400, Lewis Hyatt wrote: > > > Hello- > > > > > > The PR points out that my fix for PR53431 was incomplete and did not > > > handle > > >

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

2023-10-19 Thread Patrick Palka
On Tue, 17 Oct 2023, Marek Polacek wrote: > On Tue, Oct 17, 2023 at 04:49:52PM -0400, Jason Merrill wrote: > > On 10/16/23 20:39, Marek Polacek wrote: > > > On Sat, Oct 14, 2023 at 01:13:22AM -0400, Jason Merrill wrote: > > > > On 10/13/23 14:53, Marek Polacek wrote: > > > > > On Thu, Oct 12, 2023

[PATCH 0/3] [GCC] arm: vld1_types_xN ACLE intrinsics

2023-10-19 Thread Ezra.Sitorus
Add xN variants of vld1_types intrinsic for AArch32.

[PATCH 3/3] [GCC] arm: vld1_types_x4 ACLE intrinsics

2023-10-19 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vld1 intrinsic for AArch32. This patch adds the _x4 variants of the vld1 intrinsic. The previous vld1_x4 has been updated to vld1q_x4 to take into account that it works with 4-word-length types. v

[PATCH 1/3] [GCC] arm: vld1_types_x2 ACLE intrinsics

2023-10-19 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vld1 intrinsic for AArch32. This patch adds the _x2 variants of the vld1 intrinsic. Tests use xN so that the latter variants (_x3, _x4) could be added. The previous vld1_x2 has been updated to vld1

[PATCH 2/3] [GCC] arm: vld1_types_x3 ACLE intrinsics

2023-10-19 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vld1 intrinsic for AArch32. This patch adds the _x3 variants of the vld1 intrinsic. The previous vld1_x3 has been updated to vld1q_x3 to take into account that it works with 4-word-length types. v

[RFC] Add function attribute: null_terminated_string_arg(PARAM_IDX)

2023-10-19 Thread David Malcolm
This patch adds a new function attribute to GCC for marking that an argument is expected to be a null-terminated string. For example, consider: void test_a (const char *p) __attribute__((null_terminated_string_arg (1))); which would indicate to humans and compilers that argument 1 of "test

[PATCH 1/5] LoongArch: Add enum-style -mexplicit-relocs= option

2023-10-19 Thread Xi Ruoyao
To take a better balance between scheduling and relaxation when -flto is enabled, add three-way -mexplicit-relocs={auto,none,always} options. The old -mexplicit-relocs and -mno-explicit-relocs options are still supported, they are mapped to -mexplicit-relocs=always and -mexplicit-relocs=none. The

[PATCH 3/5] LoongArch: Use explicit relocs for TLS access with -mexplicit-relocs=auto

2023-10-19 Thread Xi Ruoyao
The linker does not know how to relax TLS access for LoongArch, so let's emit machine instructions with explicit relocs for TLS. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_explicit_relocs_p): Return true for TLS symbol types if -mexplicit-relocs=auto. (loong

[PATCH 5/5] LoongArch: Document -mexplicit-relocs={auto,none,always}

2023-10-19 Thread Xi Ruoyao
gcc/ChangeLog: * doc/invoke.texi (-mexplicit-relocs=style): Document. (-mexplicit-relocs): Document as an alias of -mexplicit-relocs=always. (-mno-explicit-relocs): Document as an alias of -mexplicit-relocs=none. (-mcmodel=extreme): Mention -mexplici

[PATCH 0/5] LoongArch: Better balance between relaxation and scheduling

2023-10-19 Thread Xi Ruoyao
For relaxation we are now generating assembler macros for symbolic addresses everywhere, but this is limiting scheduling and there are known situations where the relaxation cannot improve the code. 1. When we are performing LTO during a final link and the linker plugin is used, la.global won't be

[PATCH 2/5] LoongArch: Use explicit relocs for GOT access when -mexplicit-relocs=auto and LTO during a final link with linker plugin

2023-10-19 Thread Xi Ruoyao
If we are performing LTO for a final link and linker plugin is enabled, then we are sure any GOT access may resolve to a symbol out of the link unit (otherwise the linker plugin will tell us the symbol should be resolved locally and we'll use PC-relative access instead). Produce machine instructio

[PATCH 4/5] LoongArch: Use explicit relocs for addresses only used for one load or store with -mexplicit-relocs=auto and -mcmodel={normal, medium}

2023-10-19 Thread Xi Ruoyao
In these cases, if we use explicit relocs, we end up with 2 instructions: pcalau12it0, %pc_hi20(x) ld.d t0, t0, %pc_lo12(x) If we use la.local pseudo-op, in the best scenario (x is in +/- 2MiB range) we still have 2 instructions: pcaddi t0, %pcrel_20(x) ld.d

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

2023-10-19 Thread Jason Merrill
On 10/19/23 09:39, Patrick Palka wrote: On Tue, 17 Oct 2023, Marek Polacek wrote: On Tue, Oct 17, 2023 at 04:49:52PM -0400, Jason Merrill wrote: On 10/16/23 20:39, Marek Polacek wrote: On Sat, Oct 14, 2023 at 01:13:22AM -0400, Jason Merrill wrote: On 10/13/23 14:53, Marek Polacek wrote: On

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

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 09:39:27AM -0400, Patrick Palka wrote: > On Tue, 17 Oct 2023, Marek Polacek wrote: > > > On Tue, Oct 17, 2023 at 04:49:52PM -0400, Jason Merrill wrote: > > > On 10/16/23 20:39, Marek Polacek wrote: > > > > - if (cxx_dialect > cxx17) > > > > -cp_fold_immediate_r (stmt_p

Re: [RFC] Add function attribute: null_terminated_string_arg(PARAM_IDX)

2023-10-19 Thread Andreas Schwab
On Okt 19 2023, David Malcolm wrote: > +void > +region_model:: > +check_one_function_attr_null_terminated_string_arg (const gcall *call, > + tree callee_fndecl, > + region_model_context *ctxt, > +

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

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 10:06:01AM -0400, Jason Merrill wrote: > On 10/19/23 09:39, Patrick Palka wrote: > > On Tue, 17 Oct 2023, Marek Polacek wrote: > > > > > On Tue, Oct 17, 2023 at 04:49:52PM -0400, Jason Merrill wrote: > > > > On 10/16/23 20:39, Marek Polacek wrote: > > > > > On Sat, Oct 14,

Re: [PATCH 2/1] c++: more non-static memfn call dependence cleanup [PR106086]

2023-10-19 Thread Jason Merrill
On 10/12/23 14:49, Patrick Palka wrote: On Tue, 26 Sep 2023, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- This follow-up patch removes some more repetition of the type-dependent On second thought there's no good reason to spli

[COMMITTED] ada: Simplify "not Present" with "No"

2023-10-19 Thread Marc Poulhiès
From: Piotr Trojanek gcc/ada/ * exp_aggr.adb (Expand_Container_Aggregate): Simplify with "No". Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb i

[COMMITTED] ada: Seize opportunity to reuse List_Length

2023-10-19 Thread Marc Poulhiès
From: Ronan Desplanques This patch is intended as a readability improvement. It doesn't change the behavior of the compiler. gcc/ada/ * sem_ch3.adb (Constrain_Array): Replace manual list length computation by call to List_Length. Tested on x86_64-pc-linux-gnu, committed on mast

[COMMITTED] ada: Document gnatbind -Q switch

2023-10-19 Thread Marc Poulhiès
From: Patrick Bernardi Add documentation for the -Q gnatbind switch in GNAT User's Guide and improve gnatbind's help output for the switch to emphasize that it adds the requested number of stacks to the secondary stack pool generated by the binder. gcc/ada/ * bindusg.adb (Display): Make

[COMMITTED] ada: Add pragma Annotate for GNATcheck exemptions

2023-10-19 Thread Marc Poulhiès
From: Sheri Bernstein Exempt the GNATcheck rule "Unassigned_OUT_Parameters" with the rationale "the OUT parameter is assigned by component". gcc/ada/ * libgnat/s-imguti.adb (Set_Decimal_Digits): Add pragma to exempt Unassigned_OUT_Parameters. (Set_Floating_Invalid_Value)

[COMMITTED] ada: Refactor code to remove GNATcheck violation

2023-10-19 Thread Marc Poulhiès
From: Sheri Bernstein Rewrite for loop containing an exit (which violates GNATcheck rule Exits_From_Conditional_Loops), to use a while loop which contains the exit criteria in its condition. Also, move special case of first time through loop, to come before loop. gcc/ada/ * libgnat/s-im

Re: [PATCH 06/11] haifa-sched: Allow for NOTE_INSN_DELETED at start of epilogue

2023-10-19 Thread Jeff Law
On 10/17/23 14:48, Alex Coplan wrote: haifa-sched.cc:remove_notes asserts that it lands on a real (non-note) insn after advancing past NOTE_INSN_EPILOGUE_BEG, but with the upcoming post-RA aarch64 load pair pass enabled, we can land on NOTE_INSN_DELETED. This patch adjusts remove_notes to rem

[PATCH v2 11/11] aarch64: Add new load/store pair fusion pass

2023-10-19 Thread Alex Coplan
Hi, This v2 fixes a significant compile-time hog in the original patch for the pass posted here: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633355.html Having seen a large compile-time regression when turning on the early ldp pass, compiling 502.gcc_r from SPEC CPU 2017, I found that

Re: [PATCH 2/1] c++: more non-static memfn call dependence cleanup [PR106086]

2023-10-19 Thread Patrick Palka
On Thu, 19 Oct 2023, Jason Merrill wrote: > On 10/12/23 14:49, Patrick Palka wrote: > > On Tue, 26 Sep 2023, Patrick Palka wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK > > > for trunk? > > > > > > -- >8 -- > > > > > > This follow-up patch removes some mo

[PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jason Merrill
A recent question led me to look at this file again, and it occurred to me that it could use to offer more guidance. OK for trunk? -- 8< -- gcc/ChangeLog: * ABOUT-GCC-NLS: Add usage guidance. --- gcc/ABOUT-GCC-NLS | 13 + 1 file changed, 13 insertions(+) diff --git a/gcc/A

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

2023-10-19 Thread Jeff Law
On 10/17/23 03:19, Richard Biener wrote: 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 j

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

2023-10-19 Thread Jeff Law
On 10/14/23 16:14, Roger Sayle wrote: This patch is my proposed solution to PR rtl-optimization/91865. Normally RTX simplification canonicalizes a ZERO_EXTEND of a ZERO_EXTEND to a single ZERO_EXTEND, but as shown in this PR it is possible for combine's make_compound_operation to unintentiona

Re: [PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:11:30AM -0400, Jason Merrill wrote: > A recent question led me to look at this file again, and it occurred to me > that > it could use to offer more guidance. OK for trunk? > > -- 8< -- > > gcc/ChangeLog: > > * ABOUT-GCC-NLS: Add usage guidance. > --- > gcc/AB

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

2023-10-19 Thread Jeff Law
On 10/17/23 01:04, Robin Dapp wrote: 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),

[pushed] c++: use G_ instead of _

2023-10-19 Thread Jason Merrill
Tested with make po/gcc.pot to see that the strings are still there (though in a different place, now with the gcc-internal-format tag). Applying to trunk. -- 8< -- Since these strings are passed to error_at, they should be marked for translation with G_, like other diagnostic messages, rather t

[PATCH] c: [PR104822] Don't warn about converting NULL to different sso endian

2023-10-19 Thread Andrew Pinski
In a similar way we don't warn about NULL pointer constant conversion to a different named address we should not warn to a different sso endian either. This adds the simple check. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR c/104822 gcc/c/ChangeLog: * c-t

[PATCH] c: [PR100532] Fix ICE when an agrgument was an error mark

2023-10-19 Thread Andrew Pinski
In the case of convert_argument, we would return the same expression back rather than error_mark_node after the error message about trying to convert to an incomplete type. This causes issues in the gimplfier trying to see if another conversion is needed. The code here dates back to before the rev

Re: [pushed] c++: use G_ instead of _

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:31:58AM -0400, Jason Merrill wrote: > --- a/gcc/cp/decl.cc > +++ b/gcc/cp/decl.cc > @@ -3607,8 +3607,8 @@ identify_goto (tree decl, location_t loc, const > location_t *locus, > { >bool complained > = emit_diagnostic (diag_kind, loc, 0, > -de

Re: [PATCH] c: [PR104822] Don't warn about converting NULL to different sso endian

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 08:37:31AM -0700, Andrew Pinski wrote: > In a similar way we don't warn about NULL pointer constant conversion to > a different named address we should not warn to a different sso endian > either. > This adds the simple check. > > Bootstrapped and tested on x86_64-linux-gnu

[PATCH RFA] diagnostic: rename new permerror overloads

2023-10-19 Thread Jason Merrill
OK for trunk? -- 8< -- While checking another change, I noticed that the new permerror overloads break gettext with "permerror used incompatibly as both --keyword=permerror:2 --flag=permerror:2:gcc-internal-format and --keyword=permerror:3 --flag=permerror:3:gcc-internal-format". So let's chan

Re: [PATCH RFA] diagnostic: rename new permerror overloads

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 11:45:01AM -0400, Jason Merrill wrote: > OK for trunk? > > -- 8< -- > > While checking another change, I noticed that the new permerror overloads > break gettext with "permerror used incompatibly as both > --keyword=permerror:2 --flag=permerror:2:gcc-internal-format and >

Re: [PATCH] c: [PR100532] Fix ICE when an agrgument was an error mark

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 03:38:57PM +, Andrew Pinski wrote: > In the case of convert_argument, we would return the same expression > back rather than error_mark_node after the error message about > trying to convert to an incomplete type. This causes issues in > the gimplfier trying to see if an

[patch,libgcc,contrib]: Add some auto-generated files deps to gcc_update.

2023-10-19 Thread Georg-Johann Lay
This patch adds two deps to gcc_update files_and_dependencies for two auto-generated headers from avr libgcc. Ok for master? Johann -- Add dependencies for some auto-generated files from avr-libgcc. / * contrib/gcc_update (files_and_dependencies): Add dependencies for: libgcc/

Re: [1/3] Add support for target_version attribute

2023-10-19 Thread Andrew Carlotti
On Thu, Oct 19, 2023 at 07:04:09AM +, Richard Biener wrote: > On Wed, 18 Oct 2023, Andrew Carlotti wrote: > > > This patch adds support for the "target_version" attribute to the middle > > end and the C++ frontend, which will be used to implement function > > multiversioning in the aarch64 bac

Re: [PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jason Merrill
On 10/19/23 11:21, Jakub Jelinek wrote: On Thu, Oct 19, 2023 at 11:11:30AM -0400, Jason Merrill wrote: A recent question led me to look at this file again, and it occurred to me that it could use to offer more guidance. OK for trunk? -- 8< -- gcc/ChangeLog: * ABOUT-GCC-NLS: Add usage

Re: [PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 12:13:55PM -0400, Jason Merrill wrote: > How about this? > > In general, use no markup for strings that are the immediate format string > argument of a diagnostic function. Use G_("str") for strings that will be > used as the format string for a diagnostic but are e.g.

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

2023-10-19 Thread Jason Merrill
On 10/19/23 10:14, Marek Polacek wrote: On Thu, Oct 19, 2023 at 10:06:01AM -0400, Jason Merrill wrote: On 10/19/23 09:39, Patrick Palka wrote: On Tue, 17 Oct 2023, Marek Polacek wrote: On Tue, Oct 17, 2023 at 04:49:52PM -0400, Jason Merrill wrote: On 10/16/23 20:39, Marek Polacek wrote: On

Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-10-19 Thread Jeff Law
On 10/18/23 03:35, Thomas Schwinge wrote: Is this (case variants) maybe something that has changed in DejaGnu at some point in time? (I have not checked.) No idea :-) I suggest that we adapt all remaining upper-case instances in GCC, similar to your change. And/or, as applicable, recogn

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

2023-10-19 Thread Marek Polacek
On Thu, Oct 19, 2023 at 12:32:49PM -0400, Jason Merrill wrote: > On 10/19/23 10:14, Marek Polacek wrote: > > On Thu, Oct 19, 2023 at 10:06:01AM -0400, Jason Merrill wrote: > > > On 10/19/23 09:39, Patrick Palka wrote: > > > > On Tue, 17 Oct 2023, Marek Polacek wrote: > > > > > > > > > On Tue, Oct

Re: [x86 PATCH] PR target/110511: Fix reg allocation for widening multiplications.

2023-10-19 Thread Uros Bizjak
On Tue, Oct 17, 2023 at 9:05 PM Roger Sayle wrote: > > > This patch contains clean-ups of the widening multiplication patterns in > i386.md, and provides variants of the existing highpart multiplication > peephole2 transformations (that tidy up register allocation after > reload), and thereby fixe

  1   2   >