[PATCH] optabs: Fix widening optabs for vec-mode -> scalar-mode [PR116926]

2025-02-03 Thread Andrew Pinski
r15-4317-ga6f4404689f12 tried to add support for widending optabs for vec-mode -> scalar-mode but it misunderstood how FOR_EACH_MODE worked, the limit in this case is not inclusive. Which means setting limit to from, would cause the loop not be executed at all. This fixes by setting the limit to be

Re: [PATCH] rtl-optimization/117611 - ICE in simplify_shift_const_1

2025-02-03 Thread Richard Biener
On Mon, 3 Feb 2025, Jakub Jelinek wrote: > On Mon, Feb 03, 2025 at 03:30:41PM +0100, Richard Biener wrote: > > The following checks we have a scalar int shift mode before > > enforcing it. As AVR shows the mode can be a signed _Accum mode > > as well. > > > > Bootstrap and regtest pending on x86

[PATCH v2] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-02-03 Thread Monk Chiang
According to Section 3.4.2, Vector Register Grouping, in the RISC-V Vector Specification, the rule for LMUL is LMUL >= SEW/ELEN gcc/ChangeLog: * config/riscv/riscv-v.cc: Add restrict for insert LMUL. config/riscv/riscv-vector-builtins-types.def: Use RVV_REQUIRE_ELEN_64 to c

Re: [PATCH] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-02-03 Thread Kito Cheng
cc Robin an Ju-Zhe On Tue, Feb 4, 2025 at 3:16 PM Monk Chiang wrote: > > According to Section 3.4.2, Vector Register Grouping, in the RISC-V > Vector Specification, the rule for LMUL is LMUL >= SEW/ELEN > --- > gcc/config/riscv/riscv-v.cc | 8 +- > gcc/config/riscv/riscv-vect

[PATCH] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-02-03 Thread Monk Chiang
According to Section 3.4.2, Vector Register Grouping, in the RISC-V Vector Specification, the rule for LMUL is LMUL >= SEW/ELEN --- gcc/config/riscv/riscv-v.cc | 8 +- gcc/config/riscv/riscv-vector-switch.def | 84 ++--- .../gcc.target/riscv/rvv/autovec/pr111391-2

RE: [PATCH]middle-end: delay checking for alignment to load [PR118464]

2025-02-03 Thread Tamar Christina
Looks like a last minute change I made accidentally blocked SVE. Fixed and re-sending: Hi All, This fixes two PRs on Early break vectorization by delaying the safety checks to vectorizable_load when the VF, VMAT and vectype are all known. This patch does add two new restrictions: 1. On LOAD_LA

Re: [PATCH] RTEMS: Add Cortex-M33 multilib

2025-02-03 Thread Sebastian Huber
- Am 4. Feb 2025 um 4:15 schrieb Sebastian Huber sebastian.hu...@embedded-brains.de: > Enable use of Armv8-M instruction set. > > Account for CVE-2021-35465 mitigation [PR102035]. The > -mfix-cmse-cve-2021-35465 enabled by default, if -mcpu=cortex-m33 is > used. > > gcc/ > > * confi

[PATCH] RTEMS: Add Cortex-M33 multilib

2025-02-03 Thread Sebastian Huber
Enable use of Armv8-M instruction set. Account for CVE-2021-35465 mitigation [PR102035]. The -mfix-cmse-cve-2021-35465 enabled by default, if -mcpu=cortex-m33 is used. gcc/ * config/arm/t-rtems: Add Cortex-M33 multilib. --- gcc/config/arm/t-rtems | 5 +++-- 1 file changed, 3 insertions

Re: [PING, PATCH] fortran: fix -MT/-MQ adding additional target [PR47485]

2025-02-03 Thread Vincent Vanlaer
On 4/02/2025 01:42, Jerry D wrote: On 2/3/25 2:14 PM, Vincent Vanlaer wrote: Hi all, Gentle ping for the patch below: https://gcc.gnu.org/pipermail/ fortran/2024-December/061467.html Best wishes, Vincent On 30/12/2024 00:19, Vincent Vanlaer wrote: The -MT and -MQ options should replace

Re: [PING, PATCH] fortran: fix -MT/-MQ adding additional target [PR47485]

2025-02-03 Thread Jerry D
On 2/3/25 2:14 PM, Vincent Vanlaer wrote: Hi all, Gentle ping for the patch below: https://gcc.gnu.org/pipermail/ fortran/2024-December/061467.html Best wishes, Vincent On 30/12/2024 00:19, Vincent Vanlaer wrote: The -MT and -MQ options should replace the default target in the generated dep

Re: [PATCH] c++: Improve contracts support in modules [PR108205]

2025-02-03 Thread Nathaniel Shead
On Mon, Feb 03, 2025 at 06:57:14PM -0500, Jason Merrill wrote: > On 2/1/25 7:03 AM, Nathaniel Shead wrote: > > Regtested on x86_64-pc-linux-gnu (so far just "dg.exp=contract* > > modules.exp=contract*"), OK for trunk if full bootstrap+regtest passes? > > > > -- >8 -- > > > > Modules makes some as

Re: [PATCH v2] c++: Don't merge friend declarations that specify default arguments [PR118319]

2025-02-03 Thread Jason Merrill
On 1/31/25 11:12 AM, Simon Martin wrote: Hi Jason, On 31 Jan 2025, at 16:29, Jason Merrill wrote: On 1/31/25 9:52 AM, Simon Martin wrote: Hi Jason, On 9 Jan 2025, at 22:55, Jason Merrill wrote: On 1/9/25 8:25 AM, Simon Martin wrote: We segfault upon the following invalid code === cut her

Re: [PATCH v11] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2025-02-03 Thread Jason Merrill
On 1/31/25 12:11 PM, Simon Martin wrote: Hi Jason, On 27 Jan 2025, at 16:49, Jason Merrill wrote: On 1/27/25 10:41 AM, Simon Martin wrote: Hi Jason, On 17 Jan 2025, at 23:33, Jason Merrill wrote: On 1/17/25 9:52 AM, Simon Martin wrote: Hi Jason, On 16 Jan 2025, at 22:49, Jason Merrill wr

Re: [PATCH] c++: bogus -Wvexing-parse with trailing-return-type [PR118718]

2025-02-03 Thread Jason Merrill
On 1/31/25 4:21 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. -- >8 -- This warning should not warn for auto f1 () -> auto; because that cannot be confused with initializing a variable. PR c++/118718 gcc/cp/ChangeLog: * parse

Re: [PATCH] c++: Improve contracts support in modules [PR108205]

2025-02-03 Thread Jason Merrill
On 2/1/25 7:03 AM, Nathaniel Shead wrote: Regtested on x86_64-pc-linux-gnu (so far just "dg.exp=contract* modules.exp=contract*"), OK for trunk if full bootstrap+regtest passes? -- >8 -- Modules makes some assumptions about types that currently aren't fulfilled by the types created in contracts

Re: [PATCH v2] c++: auto in trailing-return-type in parameter [PR117778]

2025-02-03 Thread Jason Merrill
On 1/31/25 4:23 PM, Marek Polacek wrote: On Fri, Jan 31, 2025 at 09:34:52AM -0500, Jason Merrill wrote: On 1/30/25 5:24 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- This PR describes a few issues, both ICE and rejects-valid, but ultimately t

Re: [PATCH] c++: Modularise start_cleanup_fn [PR98893]

2025-02-03 Thread Jason Merrill
On 2/1/25 5:29 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- 'start_cleanup_fn' is not currently viable in modules, due to generating functions relying on the 'start_cleanup_cnt' counter which is reset to 0 with each new TU. This me

Re: [PATCH v2] c++: Add tree walk case to reach A pack from B in ...B> [PR118265]

2025-02-03 Thread Jason Merrill
On 2/2/25 5:26 PM, A J Ryan Solutions Ltd wrote: This version has all the updates as per feedback from version 1. It makes a minor correction to the code styling, reformats the commit message and moves the test into the cpp1z directory. In addition I've updated the test to conform with c++17 for

Re: [PATCH] c++/79786 - bougs invocation of DATA_ABI_ALIGNMENT macro

2025-02-03 Thread Jason Merrill
On 2/3/25 7:38 AM, Jakub Jelinek wrote: On Mon, Feb 03, 2025 at 11:33:38AM +0100, Richard Biener wrote: The first argument is supposed to be a type, not a decl. Bootstrap & regtest running on x86_64-unknown-linux-gnu. OK? PR c++/79786 gcc/cp/ * rtti.cc (emit_tinfo_decl): Fix D

Re: [PATCH v2] c++: Properly detect calls to digest_init in build_vec_init [PR114619]

2025-02-03 Thread Jason Merrill
On 2/3/25 8:29 AM, Simon Martin wrote: Hi Jason, On 16 Jan 2025, at 23:28, Jason Merrill wrote: On 10/19/24 5:09 AM, Simon Martin wrote: We currently ICE in checking mode with cxx_dialect < 17 on the following valid code === cut here === struct X { X(const X&) {} }; extern X x; void foo

Re: [PATCH] c++: Fix up pedwarn for capturing structured bindings in lambdas [PR118719]

2025-02-03 Thread Jason Merrill
On 2/2/25 5:14 AM, Jakub Jelinek wrote: Hi! As mentioned in the PR, this pedwarni is desirable for the implicit or explicit capturing of structured bindings in C++17, but in the case of init-captures the initializer is just some expression and that can include structured bindings. So, the follo

Re: [PING, PATCH] fortran: fix -MT/-MQ adding additional target [PR47485]

2025-02-03 Thread Vincent Vanlaer
Hi all, Gentle ping for the patch below: https://gcc.gnu.org/pipermail/fortran/2024-December/061467.html Best wishes, Vincent On 30/12/2024 00:19, Vincent Vanlaer wrote: The -MT and -MQ options should replace the default target in the generated dependency file. deps_add_target needs to be ca

Re: [PATCH v3] c++, coroutines: Fix awaiter var creation [PR116506].

2025-02-03 Thread Jason Merrill
On 12/9/24 7:53 PM, Jason Merrill wrote: On 12/9/24 1:52 PM, Iain Sandoe wrote: On 9 Dec 2024, at 17:41, Jason Merrill wrote: On 10/31/24 4:40 AM, Iain Sandoe wrote: This version tested on x86_64-darwin,linux, powerpc64-linux, on folly and by Sam on wider codebases, Why don't you need a va

[PATCH] c++: ICE on invalid 'tor with =default [PR118304]

2025-02-03 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- In this PR we crash in maybe_delete_defaulted_fn because the switch doesn't expect a cfk_constructor/_destructor. But we can get there: struct A { *A() = default; }; is invalid due to the void/void* mismatch, so we ge

[pushed] c++: coroutines and range for [PR118491]

2025-02-03 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The implementation of extended range-for temporaries in r15-3840 confused coroutines, because await_statement_walker and the like get confused by the EXPR_STMT into thinking that the whole for-loop is a single expression statement and try to

Re: [PATCH] Fortran: different character lengths in array constructor [PR93289]

2025-02-03 Thread Harald Anlauf
Am 03.02.25 um 19:31 schrieb Jerry D: On 2/3/25 2:49 AM, Richard Sandiford wrote: Steve Kargl writes: On Sat, Feb 01, 2025 at 09:49:17PM +0100, Harald Anlauf wrote: Am 01.02.25 um 21:03 schrieb Steve Kargl: On Sat, Feb 01, 2025 at 07:25:51PM +0100, Harald Anlauf wrote: the attached patch d

Re: [patch, fortran] Add modular exponentiation for unsigned

2025-02-03 Thread Jerry D
On 2/3/25 11:55 AM, Thomas Koenig wrote: Hello world, with the following patch to the failing test case diff --git a/gcc/testsuite/gfortran.dg/unsigned_15.f90 b/gcc/testsuite/ gfortran.dg/unsigned_15.f90 index da4ccd2dc17..80a7a54e380 100644 --- a/gcc/testsuite/gfortran.dg/unsigned_15.f90 +++

Re: [PATCH] IBM zSystems: Do not use @PLT with larl

2025-02-03 Thread Andreas Krebbel
gcc/ChangeLog: * config/s390/s390.cc (print_operand): Remove the no longer necessary 31-bit and weak symbol handling. * config/s390/s390.md (*movdi_64): Do not use @PLT with larl. (*movsi_larl): Likewise. (main_base_64): Likewise. (reload_base_64):

[committed] i386: Fix and improve TARGET_INDIRECT_BRANCH_REGISTER handling some more

2025-02-03 Thread Uros Bizjak
gcc/ChangeLog: * config/i386/i386.md (*sibcall_pop_memory): Disable for TARGET_INDIRECT_BRANCH_REGISTER * config/i386/predicates.md (call_insn_operand): Enable when "satisfies_constraint_Bw (op)" is true, instead of open-coding constraint here. (sibcall_insn_operand): Ditto

[PATCH] IBM zSystems: Do not use @PLT with larl

2025-02-03 Thread Ilya Leoshkevich
Bootstrapped and regtested on s390x-redhat-linux. Ok for master? Commit 0990d93dd8a4 ("IBM Z: Use @PLT symbols for local functions in 64-bit mode") made GCC call both static and non-static functions and load both static and non-static function addresses with the @PLT suffix. This made it diffic

Re: [patch, fortran] Add modular exponentiation for unsigned

2025-02-03 Thread Thomas Koenig
Hello world, with the following patch to the failing test case diff --git a/gcc/testsuite/gfortran.dg/unsigned_15.f90 b/gcc/testsuite/gfortran.dg/unsigned_15.f90 index da4ccd2dc17..80a7a54e380 100644 --- a/gcc/testsuite/gfortran.dg/unsigned_15.f90 +++ b/gcc/testsuite/gfortran.dg/unsigned_15.f9

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Peter Bergner
On 2/3/25 7:14 AM, Jeff Law wrote: > On 2/3/25 2:31 AM, H.J. Lu wrote: >> I believe the original patch should be reverted. Then my patch isn't needed. > > That patch had significant improvements across the board for RISC-V. > I wouldn't want to see it reverted without a strong explanation of why i

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Peter Bergner
On 2/3/25 3:44 AM, Richard Biener wrote: > On Mon, Feb 3, 2025 at 10:32 AM H.J. Lu wrote: >> I believe the original patch should be reverted. Then my patch isn't needed. > > I'm OK with that, but it's not my call. I do wonder why the contributor did > not > address any of the fallout. Maybe h

Re: [PATCH] Fortran: different character lengths in array constructor [PR93289]

2025-02-03 Thread Jerry D
On 2/3/25 2:49 AM, Richard Sandiford wrote: Steve Kargl writes: On Sat, Feb 01, 2025 at 09:49:17PM +0100, Harald Anlauf wrote: Am 01.02.25 um 21:03 schrieb Steve Kargl: On Sat, Feb 01, 2025 at 07:25:51PM +0100, Harald Anlauf wrote: the attached patch downgrades different constant character

Re: [PATCH v1 08/16] Add get_clone_versions function.

2025-02-03 Thread Richard Sandiford
Alfie Richards writes: > This is a reimplementation of get_target_clone_attr_len, > get_attr_str, and separate_attrs using string_slice and auto_vec to make > memory management and use simpler. > > gcc/c-family/ChangeLog: > > * c-attribs.cc (handle_target_clones_attribute): Change to use >

Re: [PATCH v1 07/16] Add version of make_attribute supporting string_slice.

2025-02-03 Thread Richard Sandiford
Alfie Richards writes: > gcc/ChangeLog: > > * attribs.cc (make_attribute): New function overload. > * attribs.h (make_attribute): New function overload. > --- > gcc/attribs.cc | 19 ++- > gcc/attribs.h | 1 + > 2 files changed, 19 insertions(+), 1 deletion(-) > > dif

Re: [PATCH v1 06/16] Change function versions to be implicitly ordered.

2025-02-03 Thread Richard Sandiford
Alfie Richards writes: > This changes function version structures to maintain the default version > as the first declaration in the linked data structures by giving priority > to the set containing the default when constructing the structure. > > This allows for removing logic for moving the defau

[committed] hppa: Revise various millicode insn patterns to use match_operand

2025-02-03 Thread John David Anglin
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Revise various millicode insn patterns to use match_operand LRA does not correctly support hard-register input operands that are clobbered. This is needed to support millicode calls on hppa. The operand

Re: [PATCH v1 05/16] Update is_function_default_version to work with target_version.

2025-02-03 Thread Richard Sandiford
Alfie Richards writes: > Notably this respects target_version semantics where an unannotated > function can be the default version. > > gcc/ChangeLog: > > * attribs.cc (is_function_default_version): Add target_version logic. Generally looks good to me, but: > --- > gcc/attribs.cc | 28 +++

RE: [PATCH 4/4] vect: Fix scale_profile_for_vect_loop for multiple exits [PR117790]

2025-02-03 Thread Tamar Christina
Ping > -Original Message- > From: Tamar Christina > Sent: Friday, January 24, 2025 9:18 AM > To: Alex Coplan ; gcc-patches@gcc.gnu.org > Cc: Richard Biener ; Jan Hubicka > Subject: RE: [PATCH 4/4] vect: Fix scale_profile_for_vect_loop for multiple > exits > [PR117790] > > ping > > > --

Re: [PATCH 0/61] Improve Mips target

2025-02-03 Thread Richard Biener
On Mon, Feb 3, 2025 at 11:34 AM Richard Sandiford wrote: > > Richard Biener writes: > > On Fri, Jan 31, 2025 at 6:18 PM Aleksandar Rakic > > wrote: > >> > >> This patch series improves the support for the mips64r6 target in GCC, > >> includes the enhancements to the general bug fixes and contain

RE: [PATCH 3/4] vect: Ensure profile consistency when adding epilog guard [PR117790]

2025-02-03 Thread Tamar Christina
Ping > -Original Message- > From: Tamar Christina > Sent: Friday, January 24, 2025 9:18 AM > To: Alex Coplan ; gcc-patches@gcc.gnu.org > Cc: Richard Biener ; Jan Hubicka > Subject: RE: [PATCH 3/4] vect: Ensure profile consistency when adding epilog > guard [PR117790] > > ping > > >

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Michael Matz
Hello, On Mon, 3 Feb 2025, H.J. Lu wrote: > Author: Surya Kumari Jangala > Date: Tue Jun 25 08:37:49 2024 -0500 > > ira: Scale save/restore costs of callee save registers with block > frequency > > scales the cost of saving/restoring a callee-save hard register in epilogue > and prologu

[PATCH]middle-end: delay checking for alignment to load [PR118464]

2025-02-03 Thread Tamar Christina
Hi All, This fixes two PRs on Early break vectorization by delaying the safety checks to vectorizable_load when the VF, VMAT and vectype are all known. This patch does add two new restrictions: 1. On LOAD_LANES targets, where the buffer size is known, we reject uneven group sizes, as they are

RE: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of multi-exit loops [PR117790]

2025-02-03 Thread Tamar Christina
Ping > -Original Message- > From: Tamar Christina > Sent: Friday, January 24, 2025 9:18 AM > To: Alex Coplan ; gcc-patches@gcc.gnu.org > Cc: Richard Biener ; Jan Hubicka > Subject: RE: [PATCH 2/4] cfgloopmanip: Add infrastructure for scaling of > multi-exit > loops [PR117790] > > ping >

RE: [PATCH 1/4] vect: Set counts of early break exit blocks correctly [PR117790]

2025-02-03 Thread Tamar Christina
Ping > -Original Message- > From: Tamar Christina > Sent: Friday, January 24, 2025 9:17 AM > To: Alex Coplan ; 'gcc-patches@gcc.gnu.org' patc...@gcc.gnu.org> > Cc: 'Richard Biener' ; 'Jan Hubicka' > Subject: RE: [PATCH 1/4] vect: Set counts of early break exit blocks correctly > [PR11779

Re: [PATCH] rtl-optimization/117611 - ICE in simplify_shift_const_1

2025-02-03 Thread Jakub Jelinek
On Mon, Feb 03, 2025 at 03:30:41PM +0100, Richard Biener wrote: > The following checks we have a scalar int shift mode before > enforcing it. As AVR shows the mode can be a signed _Accum mode > as well. > > Bootstrap and regtest pending on x86_64-unknown-linux-gnu. > > OK if that succeeds? > >

[PATCH] rtl-optimization/117611 - ICE in simplify_shift_const_1

2025-02-03 Thread Richard Biener
The following checks we have a scalar int shift mode before enforcing it. As AVR shows the mode can be a signed _Accum mode as well. Bootstrap and regtest pending on x86_64-unknown-linux-gnu. OK if that succeeds? Thanks, Richard. PR rtl-optimization/117611 * combine.cc (simplif

[PATCH] lto/113207 - fix free_lang_data_in_type

2025-02-03 Thread Richard Biener
When we process function types we strip volatile and const qualifiers after building a simplified type variant (which preserves those). The qualified type handling of both isn't really compatible, so avoid bad interaction by swapping this, first dropping const/volatile qualifiers and then building

Re: [PATCH] c++: Fix up pedwarn for capturing structured bindings in lambdas [PR118719]

2025-02-03 Thread Marek Polacek
On Sun, Feb 02, 2025 at 11:14:55AM +0100, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, this pedwarni is desirable for the implicit or > explicit capturing of structured bindings in C++17, but in the case of > init-captures the initializer is just some expression and that can include > st

[PATCH v2] c++: Properly detect calls to digest_init in build_vec_init [PR114619]

2025-02-03 Thread Simon Martin
Hi Jason, On 16 Jan 2025, at 23:28, Jason Merrill wrote: > On 10/19/24 5:09 AM, Simon Martin wrote: >> We currently ICE in checking mode with cxx_dialect < 17 on the >> following >> valid code >> >> === cut here === >> struct X { >>X(const X&) {} >> }; >> extern X x; >> void foo () { >>n

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Jan Hubicka
> > I don't think we should add a new target hook unless it's providing > > genuinely new information about the target. Hooking into the RA to > > brute-force a particular heuristic makes it harder to improve the RA > > in future. > > > > There are already hooks that provide the costs of the relev

[PATCH v1 16/16] Remove FMV beta warning.

2025-02-03 Thread Alfie Richards
This patch removes the warning for target_version and target_clones in aarch64 as it is now spec compliant. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_process_target_version_attr): Remove warning. gcc/testsuite/ChangeLog: * g++.target/aarch64/mv-1.C: Remove opt

[PATCH v1 08/16] Add get_clone_versions function.

2025-02-03 Thread Alfie Richards
This is a reimplementation of get_target_clone_attr_len, get_attr_str, and separate_attrs using string_slice and auto_vec to make memory management and use simpler. gcc/c-family/ChangeLog: * c-attribs.cc (handle_target_clones_attribute): Change to use get_clone_versions. gcc/Cha

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Jeff Law
On 2/2/25 11:09 AM, Thomas Koenig wrote: Hi, I sent https://gcc.gnu.org/pipermail/fortran/2025-February/061670.html to gcc-patches also, as normal, but got back an e-mail that it was too large. and that a moderator would look at it. Maybe the limits can be increased a bit, sometimes patches

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Jeff Law
On 2/3/25 2:31 AM, H.J. Lu wrote: IMO at this point a new target hook should preserve existing behavior by default or alternatively the original patch should be reverted as causing regressions and a new patch introducing the target hook should be installed in next stage1. I believe the ori

[PATCH v1 14/16] Change target_version semantics to follow ACLE specification.

2025-02-03 Thread Alfie Richards
This changes behavior of target_clones and target_version attributes to be inline with what is specified in the Arm C Language Extension. Notably this changes the scope and signature of multiversioned functions to that of the default version, and changes the resolver to be created at the implemen

[PATCH v1 12/16] Refactor FMV name mangling.

2025-02-03 Thread Alfie Richards
This patch is an overhaul of how FMV name mangling works. Previously mangling logic was duplicated in several places across both target specific and independent code. This patch changes this such that all mangling is done in targetm.mangle_decl_assembler_name (including for the dispatched symbol a

[PATCH v1 03/16] Add string_slice class.

2025-02-03 Thread Alfie Richards
The string_slice inherits from array_slice and is used to refer to a substring of an array that is memory managed elsewhere without modifying the underlying array. For example, this is useful in cases such as when needing to refer to a substring of an attribute in the syntax tree. This commit al

[PATCH v1 01/16] Add PowerPC FMV symbol tests.

2025-02-03 Thread Alfie Richards
This tests the mangling of function assembly names when annotated with target_clones attributes. gcc/testsuite/ChangeLog: * g++.target/powerpc/mvc-symbols1.C: New test. * g++.target/powerpc/mvc-symbols2.C: New test. * g++.target/powerpc/mvc-symbols3.C: New test. *

[PATCH v1 15/16] Support mixing of target_clones and target_version for aarch64.

2025-02-03 Thread Alfie Richards
This patch adds support for the combination of target_clones and target_version in the definition of a versioned function. This patch changes is_function_default_version to consider a function declaration annotated with target_clones containing default to be a default version. It also changes the

[PATCH v1 04/16] Remove unecessary `record` argument from maybe_version_functions.

2025-02-03 Thread Alfie Richards
The `record` argument in maybe_version_function was intended to allow controlling recording the relationship of versions. However, it only exercised this if both input funcitons were already marked as versioned, and this same logic is repeated in maybe_version_function itself so the argument is un

[PATCH v1 10/16] Add dispatcher_resolver_function and is_target_clone to cgraph_node.

2025-02-03 Thread Alfie Richards
These flags are used to make sure mangling is done correctly. gcc/ChangeLog: * cgraph.h (struct cgraph_node): Add dispatcher_resolver_function and is_target_clone. --- gcc/cgraph.h | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/

[PATCH v1 09/16] Add assembler_name to cgraph_function_version_info.

2025-02-03 Thread Alfie Richards
This adds the assembler_name member to cgraph_function_version_info to store the base assembler name for the function to be mangled. This is used in later patches for refactoring FMV mangling. gcc/c/ChangeLog: * c-decl.cc (start_decl): Record assembler_name. (start_function): Rec

[PATCH v1 06/16] Change function versions to be implicitly ordered.

2025-02-03 Thread Alfie Richards
This changes function version structures to maintain the default version as the first declaration in the linked data structures by giving priority to the set containing the default when constructing the structure. This allows for removing logic for moving the default to the first position which w

[PATCH v1 05/16] Update is_function_default_version to work with target_version.

2025-02-03 Thread Alfie Richards
Notably this respects target_version semantics where an unannotated function can be the default version. gcc/ChangeLog: * attribs.cc (is_function_default_version): Add target_version logic. --- gcc/attribs.cc | 28 1 file changed, 20 insertions(+), 8 deletio

[PATCH v1 11/16] Add clone_identifier function.

2025-02-03 Thread Alfie Richards
This is similar to clone_function_name and its siblings but takes an identifier tree node rather than a function declaration. This is to be used in conjunction with the identifier node stored in cgraph_function_version_info::assembler_name to mangle FMV functions in later patches. gcc/ChangeLog:

[PATCH v1 13/16] Remove unused target_clone parsing code.

2025-02-03 Thread Alfie Richards
This removes the target_clone parsing code that was replaced with get_clone_versions. gcc/ChangeLog: * multiple_target.cc (get_attr_str): Removed. (separate_attrs): Removed. * tree.cc (get_target_clone_attr_len): Removed. * tree.h (get_target_clone_attr_len): Remo

[PATCH v1 02/16] Add x86 FMV symbol tests

2025-02-03 Thread Alfie Richards
This is for testing the x86 mangling of FMV versioned function assembly names. gcc/testsuite/ChangeLog: * g++.target/i386/mv-symbols1.C: New test. * g++.target/i386/mv-symbols2.C: New test. * g++.target/i386/mv-symbols3.C: New test. * g++.target/i386/mv-symbols4.C

[PATCH v1 07/16] Add version of make_attribute supporting string_slice.

2025-02-03 Thread Alfie Richards
gcc/ChangeLog: * attribs.cc (make_attribute): New function overload. * attribs.h (make_attribute): New function overload. --- gcc/attribs.cc | 19 ++- gcc/attribs.h | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gcc/attribs.cc b/gcc/attrib

[PATCH v1 04/16] Remove unnecessary `record` argument from maybe_version_functions.

2025-02-03 Thread Alfie Richards
The `record` argument in maybe_version_function was intended to allow controlling recording the relationship of versions. However, it only exercised this if both input functions were already marked as versioned, and this same logic is repeated in maybe_version_function itself so the argument is un

[RFC][PATCH v1 00/16] FMV refactor and ACLE compliance.

2025-02-03 Thread Alfie Richards
Hello, This patch series intends to changes the behavior of targets with TARGET_HAS_FMV_TARGET_ATTRIBUTE set to false (ie. uses target_version attributes for FMV as opposed to target attributes) to follow the behavior specified in the Arm C Language Extension. There is significant refactoring to

Re: [PATCH] ira: Cap callee-saved register cost scale to 300

2025-02-03 Thread Jan Hubicka
> > > > #define REG_FREQ_FROM_BB(bb) ((optimize_function_for_size_p (cfun) > > > > \ > > > > || !cfun->cfg->count_max.initialized_p > > > > ()) \ > > > > ? REG_FREQ_MAX > > > > \ > > > >

Re: [PATCH] ira: Cap callee-saved register cost scale to 300

2025-02-03 Thread Jan Hubicka
> On Mon, Feb 3, 2025 at 5:21 PM Richard Biener > wrote: > > > > On Sun, Feb 2, 2025 at 9:29 AM H.J. Lu wrote: > > > > > > On Sun, Feb 2, 2025 at 4:20 PM Richard Biener > > > wrote: > > > > > > > > > > > > > > > > > Am 02.02.2025 um 08:59 schrieb H.J. Lu : > > > > > > > > > > On Sun, Feb 2, 202

Re: [PATCH] c++/79786 - bougs invocation of DATA_ABI_ALIGNMENT macro

2025-02-03 Thread Jakub Jelinek
On Mon, Feb 03, 2025 at 11:33:38AM +0100, Richard Biener wrote: > The first argument is supposed to be a type, not a decl. > > Bootstrap & regtest running on x86_64-unknown-linux-gnu. > > OK? > > PR c++/79786 > gcc/cp/ > * rtti.cc (emit_tinfo_decl): Fix DATA_ABI_ALIGNMENT invocation.

Re: [PATCH] RX: Restrict displacement ranges in "Q" constraint

2025-02-03 Thread Yoshinori Sato
On Thu, 30 Jan 2025 00:11:01 +0900, Jeff Law wrote: > > > > On 1/29/25 3:47 AM, Yoshinori Sato wrote: > > When using the "Q" constraint in the inline assembler, the displacement > > value > > could exceed the range specified by the instruction. > > To avoid this issue, a displacement range chec

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread H.J. Lu
On Mon, Feb 3, 2025 at 6:29 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Mon, Feb 3, 2025 at 7:23 AM H.J. Lu wrote: > >> > >> commit 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b > >> Author: Surya Kumari Jangala > >> Date: Tue Jun 25 08:37:49 2024 -0500 > >> > >> ira: Scale s

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Jakub Jelinek
On Mon, Feb 03, 2025 at 10:55:10AM +, Jonathan Wakely via Gcc wrote: > On Mon, 3 Feb 2025 at 10:27, Marc Poulhiès wrote: > > > > I usually look at the queue a few times a day (working day)... So at least > > in my case, I may not be very active during the weekends (even less so this > > weeke

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Jonathan Wakely
On Mon, 3 Feb 2025 at 10:27, Marc Poulhiès wrote: > > I usually look at the queue a few times a day (working day)... So at least in > my case, I may not be very active during the weekends (even less so this > weekend)... > As for unlocking too-big patches, I happen to accept the ones that are >

Re: [PATCH] Fortran: different character lengths in array constructor [PR93289]

2025-02-03 Thread Richard Sandiford
Steve Kargl writes: > On Sat, Feb 01, 2025 at 09:49:17PM +0100, Harald Anlauf wrote: >> Am 01.02.25 um 21:03 schrieb Steve Kargl: >> > On Sat, Feb 01, 2025 at 07:25:51PM +0100, Harald Anlauf wrote: >> > > >> > > the attached patch downgrades different constant character lengths in an >> > > array

Re: [PATCH 0/61] Improve Mips target

2025-02-03 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jan 31, 2025 at 6:18 PM Aleksandar Rakic > wrote: >> >> This patch series improves the support for the mips64r6 target in GCC, >> includes the enhancements to the general bug fixes and contains other >> MIPS ISA and processor enablement. >> >> These patches are ch

[PATCH] c++/79786 - bougs invocation of DATA_ABI_ALIGNMENT macro

2025-02-03 Thread Richard Biener
The first argument is supposed to be a type, not a decl. Bootstrap & regtest running on x86_64-unknown-linux-gnu. OK? PR c++/79786 gcc/cp/ * rtti.cc (emit_tinfo_decl): Fix DATA_ABI_ALIGNMENT invocation. --- gcc/cp/rtti.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Richard Sandiford
Richard Biener writes: > On Mon, Feb 3, 2025 at 7:23 AM H.J. Lu wrote: >> >> commit 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b >> Author: Surya Kumari Jangala >> Date: Tue Jun 25 08:37:49 2024 -0500 >> >> ira: Scale save/restore costs of callee save registers with block >> frequency >> >> s

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Marc Poulhiès
February 3, 2025 at 11:02 AM, "Mark Wielaard" mailto:m...@klomp.org?to=%22Mark%20Wielaard%22%20%3Cmark%40klomp.org%3E > wrote: > > (Does anybody actually look at the messages, as promised in the e-mail?= > > > I think it is done multiple times each day. The current moderators are > Jeff and Marc,

[PATCH] tree-optimization/118717 - store commoning vs. abnormals

2025-02-03 Thread Richard Biener
When we sink common stores in cselim or the sink pass we have to make sure to not introduce overlapping lifetimes for abnormals used in the ref. The easiest is to avoid sinking stmts which reference abnormals at all which is what the following does. Bootstrapped and tested on x86_64-unknown-linux

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Mark Wielaard
Hi Thomas, On Sun, Feb 02, 2025 at 07:09:14PM +0100, Thomas Koenig via Gcc wrote: > I sent https://gcc.gnu.org/pipermail/fortran/2025-February/061670.html > to gcc-patches also, as normal, but got back an e-mail that it > was too large. and that a moderator would look at it. I think that was done

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Andreas Schwab
On Feb 02 2025, Thomas Koenig wrote: > I sent https://gcc.gnu.org/pipermail/fortran/2025-February/061670.html > to gcc-patches also, as normal, but got back an e-mail that it > was too large. and that a moderator would look at it. The mail has been accepted anyway: https://gcc.gnu.org/pipermail/g

Re: [PATCH 31/61] Improve aligned straight line memcpy

2025-02-03 Thread Jakub Jelinek
On Mon, Feb 03, 2025 at 10:36:15AM +0100, Richard Biener wrote: > > --- a/gcc/config/mips/mips.cc > > +++ b/gcc/config/mips/mips.cc > > @@ -9631,7 +9631,13 @@ mips_expand_block_move (rtx dest, rtx src, rtx > > length, rtx alignment) > > { > >if (ISA_HAS_COPY) > > return mips

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Richard Biener
On Mon, Feb 3, 2025 at 10:32 AM H.J. Lu wrote: > > On Mon, Feb 3, 2025 at 5:27 PM Richard Biener > wrote: > > > > On Mon, Feb 3, 2025 at 7:23 AM H.J. Lu wrote: > > > > > > commit 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b > > > Author: Surya Kumari Jangala > > > Date: Tue Jun 25 08:37:49 2024 -

Re: [PATCH 61/61] Fix pr54240

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 7:18 PM Aleksandar Rakic wrote: > > From: Chao-ying Fu OK > gcc/testsuite/ > * gcc.target/mips/pr54240.c: Scan phiopt2. > > Cherry-picked 02dd052d4822ca187af075f1fb5301c954844144 > from https://github.com/MIPS/gcc > > Signed-off-by: Chao-ying Fu > Signed-off-by:

Re: [PATCH 55/61] Performance drop in mips-img-linux-gnu-gcc 7.x

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 7:10 PM Aleksandar Rakic wrote: > > From: Mihailo Stojanovic This looks like a target specific hack, this should be addressed generally instead of opening up gcse internals to a target hook. This should also at least come with a testcase. > gcc/ > * config/mips/

Re: [PATCH 43/61] Disable ssa-dom-cse-2.c for MIPS lp64

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 6:57 PM Aleksandar Rakic wrote: > > From: Matthew Fortune > > The optimisation to reduce the result to constant 28 still happens > but only much later in combine. OK. > gcc/testsuite/ > * gcc.dg/tree-ssa/ssa-dom-cse-2.c: Do not check output for > MIPS lp6

Re: [PATCH 31/61] Improve aligned straight line memcpy

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 6:37 PM Aleksandar Rakic wrote: > > From: Robert Suchanek > > Cherry-picked 4194c529fade9b3106d118cac63b71bc8b13f7be > from https://github.com/MIPS/gcc This (and some other of the patches) lack the appropriate ChangeLog entry embedded in the commit message. > Signed-off-

Re: [PATCH 02/61] Add shadow-map for n32 ABI

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 6:31 PM Aleksandar Rakic wrote: > > From: Faraz Shahbazker This should go to libsanitizer upstream. > libsanitizer: > * asan/asan_mapping.h (ASAN_SHADOW_OFFSET_CONST): Set correct > offset for n32 ABI. > > Cherry-picked 12ec4fc5c3a19e6304b58775db182089294

Re: [PATCH] ira: Cap callee-saved register cost scale to 300

2025-02-03 Thread H.J. Lu
On Mon, Feb 3, 2025 at 5:21 PM Richard Biener wrote: > > On Sun, Feb 2, 2025 at 9:29 AM H.J. Lu wrote: > > > > On Sun, Feb 2, 2025 at 4:20 PM Richard Biener > > wrote: > > > > > > > > > > > > > Am 02.02.2025 um 08:59 schrieb H.J. Lu : > > > > > > > > On Sun, Feb 2, 2025 at 3:33 PM Richard Biene

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread H.J. Lu
On Mon, Feb 3, 2025 at 5:27 PM Richard Biener wrote: > > On Mon, Feb 3, 2025 at 7:23 AM H.J. Lu wrote: > > > > commit 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b > > Author: Surya Kumari Jangala > > Date: Tue Jun 25 08:37:49 2024 -0500 > > > > ira: Scale save/restore costs of callee save regi

Re: [PATCH 0/61] Improve Mips target

2025-02-03 Thread Richard Biener
On Fri, Jan 31, 2025 at 6:18 PM Aleksandar Rakic wrote: > > This patch series improves the support for the mips64r6 target in GCC, > includes the enhancements to the general bug fixes and contains other > MIPS ISA and processor enablement. > > These patches are cherry-picked from the mips_rel/11_2

Re: Patch held up in gcc-patches due to size

2025-02-03 Thread Richard Biener
On Mon, Feb 3, 2025 at 9:55 AM Jonathan Wakely wrote: > > > > On Sun, 2 Feb 2025, 18:10 Thomas Koenig via Gcc, wrote: >> >> Hi, >> >> I sent https://gcc.gnu.org/pipermail/fortran/2025-February/061670.html >> to gcc-patches also, as normal, but got back an e-mail that it >> was too large. and that

Re: [PATCH v2] ira: Add a target hook for callee-saved register cost scale

2025-02-03 Thread Richard Biener
On Mon, Feb 3, 2025 at 7:23 AM H.J. Lu wrote: > > commit 3b9b8d6cfdf59337f4b7ce10ce92a98044b2657b > Author: Surya Kumari Jangala > Date: Tue Jun 25 08:37:49 2024 -0500 > > ira: Scale save/restore costs of callee save registers with block > frequency > > scales the cost of saving/restoring

Re: [PATCH] ira: Cap callee-saved register cost scale to 300

2025-02-03 Thread Richard Biener
On Sun, Feb 2, 2025 at 9:29 AM H.J. Lu wrote: > > On Sun, Feb 2, 2025 at 4:20 PM Richard Biener > wrote: > > > > > > > > > Am 02.02.2025 um 08:59 schrieb H.J. Lu : > > > > > > On Sun, Feb 2, 2025 at 3:33 PM Richard Biener > > > wrote: > > >> > > >> > > >> > > Am 02.02.2025 um 08:00 schrieb

  1   2   >