[PATCH 3/9] arm: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/arm/linux-eabi.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/arm/unknown-elf.h (STARTFILE_SPEC): Likewise. ---

[PATCH 4/9] ia64: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. There's no maintainer listed for ia64, I'll push this myself as obvious as last part of the series. PR target/55522 * config/ia64/linux.h (ENDFILE_SPEC): Don't add

[PATCH 2/9] alpha: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/alpha/linux.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/alpha/linux.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 1/9] aarch64: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/aarch64/aarch64-elf-raw.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/aarch64/aarch64-freebsd.h

[PATCH 0/9] Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
This is a series completing the fix for PR55522 which got a fix for x86-linux already but left all other targets unfixed (including x86-cygwin, x86-darwin and x86-mingw32). The following series applies a similar change to other specs using crtfastmath.o, the changes are untested. Target

Re: [PATCH 0/9] Don't add crtfastmath.o for -shared

2023-01-13 Thread Hongtao Liu via Gcc-patches
On Fri, Jan 13, 2023 at 4:05 PM Richard Biener via Gcc-patches wrote: > > > This is a series completing the fix for PR55522 which got a fix for > x86-linux already but left all other targets unfixed (including > x86-cygwin, x86-darwin and x86-mingw32). The following series > applies a similar

[PATCH 6/9] mips: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/mips/gnu-user.h (GNU_USER_TARGET_MATHFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/mips/gnu-user.h | 2 +- 1 file changed, 1

[PATCH 7/9] sparc: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/sparc/freebsd.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. * config/sparc/linux.h (ENDFILE_SPEC): Likewise. *

[PATCH 5/9] loongarch: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/loongarch/gnu-user.h (GNU_USER_TARGET_MATHFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/loongarch/gnu-user.h | 2 +- 1 file

[PATCH 8/9] solaris2: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Biener via Gcc-patches
Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/sol2.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. --- gcc/config/sol2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 9/9] Clarify -shared effect on crtfastmath.o

2023-01-13 Thread Richard Biener via Gcc-patches
This rewords the note to not specifically mention crtfastmath.o but FP environment altering by -ffast-math or -Ofast. I'll push this after the target parts are approved. PR target/55522 * doc/invoke.texi (-shared): Clarify effect on -ffast-math and -Ofast FP environment

Re: [PATCH] ipa: silent -Wodr notes with -w

2023-01-13 Thread Martin Liška
PING^3 On 12/22/22 13:15, Martin Liška wrote: PING^2 On 12/9/22 09:27, Martin Liška wrote: PING^1 On 12/2/22 12:27, Martin Liška wrote: If -w is used, warn_odr properly sets *warned = false and so it should be preserved when calling warn_types_mismatch. Noticed that during a LTO reduction

[PATCH] Don't add crtfastmath.o for -shared.

2023-01-13 Thread liuhongt via Gcc-patches
Patches [1] and [2] fixed PR55522 for x86-linux but left all other x86 targets unfixed (x86-cygwin, x86-darwin and x86-mingw32). This patch applies a similar change to other specs using crtfastmath.o. Ok for trunk? [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608528.html [2]

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread juzhe.zhong
Hi, Richard. Would you mind take a look at this patch? This is a proposal patch (We could add more testcase for ARM in the future). But we want to know if this patch is a correct approach to achieve what we want. In RVV (RISC-V Vector), we have a bunch of instructions:

Re: [GCC][PATCH v2] arm: Add cde feature support for Cortex-M55 CPU.

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 31/10/2022 12:38, Srinath Parvathaneni via Gcc-patches wrote: Hi, -Original Message- From: Christophe Lyon Sent: Monday, October 17, 2022 2:30 PM To: Srinath Parvathaneni ; gcc- patc...@gcc.gnu.org Cc: Richard Earnshaw Subject: Re: [GCC][PATCH] arm: Add cde feature support for

[PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread lehua . ding
From: Lehua Ding Hi, When I was adding the new RISC-V auto-vectorization function, I found that converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` is not very easy to handle where `vector-reg1` is a vec_duplicate_expr. For example the bellow gimple IR: ```gimple

[PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-13 Thread lehua . ding
From: Lehua Ding ps: Resend for adjusting the width of each line of text. Hi, When I was adding the new RISC-V auto-vectorization function, I found that converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` is not very easy to handle where `vector-reg1` is a

[committed] testsuite: Add testcase for PR that went latent in GCC 13 [PR107131]

2023-01-13 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is probably latent since r13-3217-gc4d15dddf6b9e. Adding testcase so that it doesn't silently reappear. Tested on x86_64-linux and i686-linux and with GCC 12 where it FAILs, committed to trunk as obvious. 2023-01-13 Jakub Jelinek PR target/107131 *

[PATCH] tree-optimization/108387 - ICE with VN handling of x << C as x * (1<

2023-01-13 Thread Richard Biener via Gcc-patches
The following fixes unexpected simplification of x << C as x * (1<

[pushed] aarch64: Fix DWARF frame register sizes for predicates

2023-01-13 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > Jakub Jelinek writes: >> On Thu, Jan 12, 2023 at 04:50:07PM +, Richard Sandiford wrote: >>> I'm jumping in here without fully understanding the context, so maybe this >>> is exactly your point, but: the SIMD/FP DWARF registers are supposed to be >>> size 8

Re: [PATCH 3/9] arm: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 13/01/2023 08:00, Richard Biener via Gcc-patches wrote: Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/arm/linux-eabi.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared. *

[PATCH] Sync LTO type_for_mode with c-family/

2023-01-13 Thread Richard Biener via Gcc-patches
The following adds _FloatN mode support to the LTO copy of c_common_type_for_mode and also implements the fix for PR94072. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. gcc/lto/ * lto-lang.cc (lto_type_for_mode): Sync with c_common_type_for_mode. ---

[pushed] aarch64: Don't update EH info when folding [PR107209]

2023-01-13 Thread Richard Biener via Gcc-patches
The AArch64 folders tried to update EH info on the fly, bypassing the folder's attempts to remove dead EH edges later. This triggered an ICE when folding a potentially-trapping call to a constant. Thanks to Richard for the patch. Tested on aarch64-linux-gnu & pushed. gcc/ PR

Re: [PATCH 1/9] aarch64: Don't add crtfastmath.o for -shared

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 13/01/2023 07:59, Richard Biener via Gcc-patches wrote: Don't add crtfastmath.o for -shared to avoid altering the FP environment when loading a shared library. PR target/55522 * config/aarch64/aarch64-elf-raw.h (ENDFILE_SPEC): Don't add crtfastmath.o for -shared.

[PATCH] Fix PR rtl-optimization/108274

2023-01-13 Thread Eric Botcazou via Gcc-patches
Hi, unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. Tested on x86-64/Linux, OK for mainline? 2023-01-13 Eric

[committed] C-SKY: Fix patterns' condition for ck802 smart mode.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
Ck802 smart mode should not be treated as ck801. It do only allocate r0-r8 registers like ck801, but support 32-bits intructions. This bug will cause ICE when compiler pr43164.c for ck802 big-endian, /src/gcc/gcc/testsuite/gcc.c-torture/compile/pr43164.c:16:1: error: insn does not satisfy its

[committed] C-SKY: Skip other CPUs if the testcases are only for ck801.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
Refine some testcases for ck801, if the testcase is only for ck801, add the filename prefix "ck801-", and add dg-skip-if to skip other CPUs. gcc/testsuite/ * gcc.target/csky/and3a.c: Rename to ... * gcc.target/csky/ck801-and.c: ... this. * gcc.target/csky/constpool-3.c:

[committed] C-SKY: Fix skip codition for testcase ldbs.c

2023-01-13 Thread Xianmiao Qu via Gcc-patches
gcc/testsuite/ * gcc.target/csky/ldbs.c : Fix exclude-opts, should not be "*". --- gcc/testsuite/gcc.target/csky/ldbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/csky/ldbs.c b/gcc/testsuite/gcc.target/csky/ldbs.c index

Re: [PATCH] Fix PR rtl-optimization/108274

2023-01-13 Thread Richard Biener via Gcc-patches
On Fri, Jan 13, 2023 at 11:50 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > unlike other IPA passes, the ICF pass can be run at -O0 and some testcases > rely on this in the testsuite. Now it effectively creates a tail call so the > DF information needs be updated in this case after

Re: nvptx: Avoid deadlock in 'cuStreamAddCallback' callback, error case (was: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes)

2023-01-13 Thread Chung-Lin Tang via Gcc-patches
Hi Thomas, On 2023/1/12 9:51 PM, Thomas Schwinge wrote: > In my case, 'cuda_callback_wrapper' (expectedly) gets invoked with > 'res != CUDA_SUCCESS' ("an illegal memory access was encountered"). > When we invoke 'GOMP_PLUGIN_fatal', this attempts to shut down the device > (..., which deadlocks);

Re: nvptx: Avoid deadlock in 'cuStreamAddCallback' callback, error case (was: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes)

2023-01-13 Thread Thomas Schwinge
Hi! On 2023-01-13T21:17:43+0800, Chung-Lin Tang wrote: > On 2023/1/12 9:51 PM, Thomas Schwinge wrote: >> In my case, 'cuda_callback_wrapper' (expectedly) gets invoked with >> 'res != CUDA_SUCCESS' ("an illegal memory access was encountered"). >> When we invoke 'GOMP_PLUGIN_fatal', this attempts

Re: [PATCH 1/2] libstdc++: Enable string_view in freestanding

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Tue, 10 Jan 2023 at 16:31, Arsen Arsenović via Libstdc++ wrote: > > Hi Jonathan, > > Jonathan Wakely writes: > > > Sorry for the top post. > > > > -#define __cpp_lib_string_contains 202011L > > +#if _GLIBCXX_HOSTED > > + // This FTM is not hosted as it also implies matching > > support,

Re: [PATCH 2/2] libstdc++: Fix a few !HOSTED test regressions

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Tue, 10 Jan 2023 at 10:03, Arsen Arsenović via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * testsuite/20_util/to_chars/version.cc: Mark hosted-only. > * testsuite/20_util/uses_allocator/lwg3677.cc: Ditto. > * testsuite/20_util/weak_ptr/cons/self_move.cc: Ditto. >

[committed] C-SKY: Define SYSROOT_SUFFIX_SPEC.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
The earlier patch https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575418.html refine the way to generate sysroot suffix, but it can't find the right path for all CPUs. The SYSROOT_SUFFIX_SPEC should be defined to fix it. gcc/ * config/csky/csky-linux-elf.h (SYSROOT_SUFFIX_SPEC):

[committed] C-SKY: Fix float abi option in MULTILIB_DEFAULTS.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
The msoft-float is alias of mfloat-abi=soft, use mfloat-abi=soft in MULTILIB_DEFAULTS to correspond to the option in MULTILIB_OPTIONS, otherwise it will find the wrong path. gcc/ * config/csky/csky.h (MULTILIB_DEFAULTS): Fix float abi option. --- gcc/config/csky/csky.h | 2 +- 1 file

[committed] C-SKY: Add missing builtin defines for soft float abi.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
The builtin defines for soft float abi are: '__csky_soft_float_abi__' and '__CSKY_SOFT_FLOAT_ABI__'. gcc/ * config/csky/csky.cc (csky_cpu_cpp_builtins): Add builtin defines for soft float abi. --- gcc/config/csky/csky.cc | 5 + 1 file changed, 5 insertions(+) diff --git

[committed] C-SKY: Add conditions for ceil etc patterns.

2023-01-13 Thread Xianmiao Qu via Gcc-patches
The ceil etc functions can be only inlined as instruction when they can raise the "inexact" exception. Without the adding conditions, it will cause the "gcc.dg/torture/builtin-fp-int-inexact-c2x.c" etc cases fails. gcc/ * config/csky/csky_insn_fpuv3.md (lsi2): Test

Re: [PATCH] arm: unified syntax for libgcc clear_cache

2023-01-13 Thread Richard Earnshaw via Gcc-patches
I've just noticed that this was never committed. Presumably that's because the patch did not apply cleanly. I've cleaned it up and pushed it now. R. On 30/09/2022 16:30, Seija Kijin via Gcc-patches wrote: Yes, please! On Tue, Sep 6, 2022 at 10:48 AM Kyrylo Tkachov wrote: Hi Seija,

Re: [PATCH] c, c++: Allow ignoring -Winit-self through pragmas [PR105593]

2023-01-13 Thread Marek Polacek via Gcc-patches
On Thu, Jan 12, 2023 at 09:49:56PM -0500, Jason Merrill wrote: > On 1/12/23 19:32, Jakub Jelinek wrote: > > Hi! > > > > As mentioned in the PR, various x86 intrinsics need to return > > an uninitialized vector. Currently they use self initialization > > to avoid -Wuninitialized warnings, which

Re: [committed] libstdc++: Do not include in concurrency headers

2023-01-13 Thread Rainer Orth
Hi Jonathan, > The , , and headers use > std::errc constants, but don't use std::system_error itself. They only > use the __throw_system_error(int) function, which is defined in > . > > By including the header for the errc constants instead of the whole of > we avoid depending on the whole

Re: [PATCH 2/2] Corrected pr25521.c target matching.

2023-01-13 Thread Cupertino Miranda via Gcc-patches
Cupertino Miranda writes: >> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: >>> This commit is a follow up of bugzilla #107181. >>> The commit /a0aafbc/ changed the default implementation of the >>> SELECT_SECTION hook in order to match clang/llvm behaviour w.r.t the >>> placement

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 11, 2023 at 03:18:06PM +0100, Christophe Lyon via Gcc-patches wrote: > While working on enabling DFP for AArch64, I noticed new failures in > gcc.dg/compat/struct-layout-1.exp (t028) which were not actually > caused by DFP types handling. These tests are generated during 'make > check'

[Committed] arm: Add cde feature support for Cortex-M55 CPU.

2023-01-13 Thread Srinath Parvathaneni via Gcc-patches
Hi, This patch adds cde feature (optional) support for Cortex-M55 CPU, please refer [1] for more details. To use this feature we need to specify +cdecpN (e.g. -mcpu=cortex-m55+cdecp), where N is the coprocessor number 0 to 7. Bootstrapped for arm-none-linux-gnueabihf target, regression tested

[PATCH] arm: Make MVE masked stores read memory operand [PR 108177]

2023-01-13 Thread Andre Simoes Dias Vieira via Gcc-patches
Hi, This patch adds the memory operand of MVE masked stores as input operands to mimic the 'partial' writes, to prevent erroneous write-after-write optimizations as described in the PR. Regression tested on arm-none-eabi for armv8.1-m.main+mve.fp. OK for trunk? gcc/ChangeLog: PR

Re: [PATCH 1/2] select .rodata for const volatile variables.

2023-01-13 Thread Cupertino Miranda via Gcc-patches
Richard Biener writes: > On Mon, Dec 5, 2022 at 7:07 PM Jeff Law via Gcc-patches > wrote: >> >> >> >> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: >> > Changed target code to select .rodata section for 'const volatile' >> > defined variables. >> > This change is in the context of

Re: [PATCH] Use cxx11 abi in versioned namespace

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Mon, 5 Dec 2022 at 21:14, François Dumont via Libstdc++ wrote: > > I just rebased this patch. > > All good apart from the to_chars/from_chars symbols issue. > > François > > > On 11/10/22 19:28, François Dumont wrote: > > Hi > > > > Now that pretty printer is fixed (once patch validated)

Re: [committed] libstdc++: Do not include in concurrency headers

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Fri, 13 Jan 2023 at 15:08, Rainer Orth wrote: > > Hi Jonathan, > > > The , , and headers use > > std::errc constants, but don't use std::system_error itself. They only > > use the __throw_system_error(int) function, which is defined in > > . > > > > By including the header for the errc

Re: [PATCH] arm: Split up MVE _Generic associations to prevent type clashes [PR107515]

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 01/12/2022 18:19, Stam Markianos-Wright via Gcc-patches wrote: Hi all, With these previous patches: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606586.html https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606587.html we enabled the MVE overloaded _Generic associations

Re: [committed] libstdc++: Do not include in concurrency headers

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Fri, 13 Jan 2023 at 16:39, Jonathan Wakely wrote: > > On Fri, 13 Jan 2023 at 15:08, Rainer Orth wrote: > > > > Hi Jonathan, > > > > > The , , and headers use > > > std::errc constants, but don't use std::system_error itself. They only > > > use the __throw_system_error(int) function, which is

[PATCH] c, c++, v3: Avoid incorrect shortening of divisions [PR108365]

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 11:58:06AM -0500, Jason Merrill wrote: > LGTM, though we might put that condition in c-common somewhere? So like this then? Just tested on the new testcases, full bootstrap/regtest queued? 2023-01-13 Jakub Jelinek PR c++/108365 * c-common.h

[GCC][PATCH v4] arm: Add pacbti related multilib support for armv8.1-m.main.

2023-01-13 Thread Srinath Parvathaneni via Gcc-patches
Hi, This patch adds the support for pacbti multlilib linking by making "-mbranch-protection=none" as default multilib option for arm-none-eabi target. Eg 1. If the passed command line flags are (without mbranch-protection): a) -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto

[committed] testsuite: Add another testcase from PR107131

2023-01-13 Thread Jakub Jelinek via Gcc-patches
Hi! This one is hand reduced to problematic code from optimized dump that used to be miscompiled during combine starting with r12-303 and fixed with r13-3530 aka PR107172 fix. 2023-01-13 Jakub Jelinek PR target/107131 * gcc.c-torture/execute/pr107131.c: New test. ---

Re: [PATCH] IPA: do not release body if still needed

2023-01-13 Thread Martin Jambor
Hi, sorry for getting to this so late. On Thu, Dec 01 2022, Martin Liška wrote: > Hi. > > Noticed during building of libbackend.a with the LTO partial linking. The testcase is areally nice one, too bad it's probably impossible to get it small enough to be included in the testcase. But it also

Re: [PATCH] c, c++, v2: Avoid incorrect shortening of divisions [PR108365]

2023-01-13 Thread Jason Merrill via Gcc-patches
On 1/12/23 15:31, Jakub Jelinek wrote: On Thu, Jan 12, 2023 at 08:55:32PM +0100, Jakub Jelinek via Gcc-patches wrote: So, the following patch for the NOP_EXPR cases checks just in case that it is from integral type and more importantly checks it is a widening conversion, and then next to it

Re: [PATCH] c++: Avoid some false positive -Wfloat-conversion warnings with extended precision [PR108285]

2023-01-13 Thread Jason Merrill via Gcc-patches
On 1/11/23 04:52, Jakub Jelinek wrote: Hi! On the following testcase trunk emits a false positive warning on ia32. convert_like_internal is there called with type of double and expr EXCESS_PRECISION_EXPR with float type with long double operand 2.L * (long double) x. Now, for the code

Re: [PATCH] Use cxx11 abi in versioned namespace

2023-01-13 Thread Jonathan Wakely via Gcc-patches
On Fri, 13 Jan 2023 at 16:33, Jonathan Wakely wrote: > > On Mon, 5 Dec 2022 at 21:14, François Dumont via Libstdc++ > wrote: > > > > I just rebased this patch. > > > > All good apart from the to_chars/from_chars symbols issue. > > > > François > > > > > > On 11/10/22 19:28, François Dumont

Re: [PATCH] Use cxx11 abi in versioned namespace

2023-01-13 Thread Jonathan Wakely via Gcc-patches
@@ -396,7 +376,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Non-inline namespace for components replaced by alternates in active mode. namespace __cxx1998 { -# if _GLIBCXX_USE_CXX11_ABI +# if _GLIBCXX_USE_CXX11_ABI && ! _GLIBCXX_VERSION_NAMESPACE This should be INLINE not VERSION, right?

Re: [PATCH] gimple-fold.h: Add missing gimple-iterator.h

2023-01-13 Thread Palmer Dabbelt
On Wed, 11 Jan 2023 23:55:15 PST (-0800), richard.guent...@gmail.com wrote: On Thu, Jan 12, 2023 at 2:46 AM Palmer Dabbelt wrote: As of 6f5b06032eb ("Finish gimple_build API enhancement") gimple-fold.h uses some of the declarations from gimple-iterator.h, which causes issues when building

[GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Srinath Parvathaneni via Gcc-patches
Hello, This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo hard-register and also updates the ".save", ".cfi_register", ".cfi_offset", ".cfi_restore" directives accordingly. This patch also adds support to emit ".pacspval" directive when "pac ip, lr, sp" instruction in

Re: [PATCH v2] ipa-cp: Speculatively call specialized functions

2023-01-13 Thread Martin Jambor
Hello, sorry for getting to this quite late. I have only had a quick glance at ipa-cp.cc hunks so far. On Fri, Dec 16 2022, Manolis Tsamis wrote: > The IPA CP pass offers a wide range of optimizations, where most of them > lead to specialized functions that are called from a call site. > This

Re: [OG12][committed] amdgcn, libgomp: custom USM allocator

2023-01-13 Thread Andrew Stubbs
I changed it to use 128-byte alignment to match the GPU cache-lines. Committed to OG12. Andrew On 11/01/2023 18:05, Andrew Stubbs wrote: This patch fixes a runtime issue I encountered with the AMD GCN Unified Shared Memory implementation. We were using regular malloc'd memory configured

[PATCH] IBM zSystems: Fix TARGET_D_CPU_VERSIONS

2023-01-13 Thread Stefan Schulze Frielinghaus via Gcc-patches
In the context of D the interpretation of S390, S390X, and SystemZ is a bit fuzzy. The wording S390X was wrongly deprecated in favour of SystemZ by commit https://github.com/dlang/dlang.org/commit/3b50a4c3faf01c32234d0ef8be5f82915a61c23f Thus, SystemZ is used for 64-bit targets, now, and S390 for

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 05:44:15PM +, Srinath Parvathaneni via Gcc-patches wrote: > Hello, > > This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo > hard-register and also > updates the ".save", ".cfi_register", ".cfi_offset", ".cfi_restore" > directives accordingly. >

Re: [PATCH 2/3] rs6000: Delete PRE_GCC3_DWARF_FRAME_REGISTERS

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Mon, May 06, 2019 at 09:55:50PM +, Segher Boessenkool wrote: > We don't need this. > > > Segher > > > 2019-05-06 Segher Boessenkool > > * config/rs6000/rs6000.h (PRE_GCC3_DWARF_FRAME_REGISTERS): Delete. Why do you think so? This seems to be a clear ABI break to me in the

[PATCH] sched-deps: do not schedule pseudos across calls [PR108117]

2023-01-13 Thread Alexander Monakov
On Fri, 23 Dec 2022, Jose E. Marchesi wrote: > > +1 for trying this FWIW. There's still plenty of time to try an > > alternative solution if there are unexpected performance problems. > > Let me see if Alexander's patch fixes the issue at hand (it must) and > will also do some regression

Re: [PATCH] sched-deps: do not schedule pseudos across calls [PR108117]

2023-01-13 Thread Richard Sandiford via Gcc-patches
Alexander Monakov writes: > On Fri, 23 Dec 2022, Jose E. Marchesi wrote: > >> > +1 for trying this FWIW. There's still plenty of time to try an >> > alternative solution if there are unexpected performance problems. >> >> Let me see if Alexander's patch fixes the issue at hand (it must) and >>

Re: [PATCH] sched-deps: do not schedule pseudos across calls [PR108117]

2023-01-13 Thread Jose E. Marchesi via Gcc-patches
> On Fri, 23 Dec 2022, Jose E. Marchesi wrote: > >> > +1 for trying this FWIW. There's still plenty of time to try an >> > alternative solution if there are unexpected performance problems. >> >> Let me see if Alexander's patch fixes the issue at hand (it must) and >> will also do some

[committed] hppa: Fix support for atomic loads and stores on hppa

2023-01-13 Thread John David Anglin
The following change fixes a number of problems with atomic loads and stores on hppa. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. The TARGET_SOFT_FLOAT case is not tested. It's possible we need additional atomic load support for this case but I think that's unnecessary since hppa

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 13/01/2023 21:58, Richard Earnshaw (lists) via Gcc-patches wrote: On 13/01/2023 18:02, Jakub Jelinek via Gcc-patches wrote: On Fri, Jan 13, 2023 at 05:44:15PM +, Srinath Parvathaneni via Gcc-patches wrote: Hello, This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 09:58:26PM +, Richard Earnshaw (lists) wrote: > > I'm afraid increasing number of DWARF registers is ABI incompatible change. > > E.g. libgcc __frame_state_for function fills in: > > typedef struct frame_state > > { > >void *cfa; > >void *eh_ptr; > >long

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Richard Earnshaw via Gcc-patches
On 13/01/2023 22:25, Richard Earnshaw (lists) via Gcc-patches wrote: On 13/01/2023 22:12, Jakub Jelinek wrote: On Fri, Jan 13, 2023 at 09:58:26PM +, Richard Earnshaw (lists) wrote: > I'm afraid increasing number of DWARF registers is ABI incompatible change. > E.g. libgcc

Re: [PATCH] c, c++, v3: Avoid incorrect shortening of divisions [PR108365]

2023-01-13 Thread Jason Merrill via Gcc-patches
On 1/13/23 12:45, Jakub Jelinek wrote: On Fri, Jan 13, 2023 at 11:58:06AM -0500, Jason Merrill wrote: LGTM, though we might put that condition in c-common somewhere? So like this then? Just tested on the new testcases, full bootstrap/regtest queued? OK.. 2023-01-13 Jakub Jelinek

[PATCH] PR tree-optimization/108359 - Utilize op1 == op2 when invoking range-ops folding.

2023-01-13 Thread Andrew MacLeod via Gcc-patches
fold_range() already invokes wi_fold_in_parts to try to get more refined information. If the subranges are quite small, it will do each individual calculation and combine the results. x * y with x = [1,3] and y = [1,3]  is broken down and we calculate each possibility and we end up with

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Richard Earnshaw (lists) via Gcc-patches
On 13/01/2023 18:02, Jakub Jelinek via Gcc-patches wrote: On Fri, Jan 13, 2023 at 05:44:15PM +, Srinath Parvathaneni via Gcc-patches wrote: Hello, This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo hard-register and also updates the ".save", ".cfi_register",

Re: [PATCH] PR tree-optimization/108359 - Utilize op1 == op2 when invoking range-ops folding.

2023-01-13 Thread Andrew MacLeod via Gcc-patches
On 1/13/23 16:54, Jakub Jelinek wrote: On Fri, Jan 13, 2023 at 04:23:20PM -0500, Andrew MacLeod via Gcc-patches wrote: fold_range() already invokes wi_fold_in_parts to try to get more refined information. If the subranges are quite small, it will do each individual calculation and combine the

[committed] analyzer: add heuristics for switch on enum type [PR105273]

2023-01-13 Thread David Malcolm via Gcc-patches
Assume that switch on an enum doesn't follow an implicit default skipping all cases when all enum values are covered by cases. Fixes various false positives from -Wanalyzer-use-of-uninitialized-value such as this one seen in Doom: p_maputl.c: In function 'P_BoxOnLineSide': p_maputl.c:151:8:

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 04:38:00PM +0100, Jakub Jelinek via Gcc-patches wrote: > I'm seeing > +FAIL: g++.target/aarch64/bitfield-abi-warning-align16-O2.C > scan-assembler-times and\\tw0, w1, 1 10 > +FAIL: g++.target/aarch64/bitfield-abi-warning-align32-O2.C > scan-assembler-times and\\tw0, w1, 1

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 08:25:01PM +0100, Jakub Jelinek via Gcc-patches wrote: > alignment is 256, which is not <= 16 * BITS_PER_UNIT. > type is pst_uniform4 with user alignment of 32 bytes: > struct pst_uniform4 > { > fixed_int32_t a __attribute__((aligned(SVE_BYTES * 2))); > fixed_int32_t

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 10:39:59PM +, Richard Earnshaw wrote: > > > It is.  The new unwinder fortunately doesn't suffer from this (at least I > > > think it doesn't), but in older gccs the unwinder could be split > > > across different > > > objects, having e.g. parts of the unwinder in one

Re: [RFC] Introduce -finline-memset-loops

2023-01-13 Thread Alexandre Oliva via Gcc-patches
Hello, Richard, Thank you for the feedback. On Jan 12, 2023, Richard Biener wrote: > On Tue, Dec 27, 2022 at 5:12 AM Alexandre Oliva via Gcc-patches > wrote: >> This patch extends the memset expansion to start with a loop, so as to >> still take advantage of known alignment even with long

[PATCH v4] c++: Reject UDLs in certain contexts [PR105300]

2023-01-13 Thread Marek Polacek via Gcc-patches
On Sat, Dec 03, 2022 at 02:58:16PM -0500, Jason Merrill wrote: > On 12/2/22 18:58, Marek Polacek wrote: > > On Fri, Nov 18, 2022 at 08:39:10PM -0500, Jason Merrill wrote: > > > On 11/18/22 18:52, Marek Polacek wrote: > > > > +/* Parse a string literal or user defined string literal. > > > > + > >

Re: [PATCH] PR tree-optimization/108359 - Utilize op1 == op2 when invoking range-ops folding.

2023-01-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Jan 13, 2023 at 04:23:20PM -0500, Andrew MacLeod via Gcc-patches wrote: > fold_range() already invokes wi_fold_in_parts to try to get more refined > information. If the subranges are quite small, it will do each individual > calculation and combine the results. > > x * y with x = [1,3]

Re: [RFC] Introduce -finline-memset-loops

2023-01-13 Thread Paul Koning via Gcc-patches
> On Jan 13, 2023, at 8:54 PM, Alexandre Oliva via Gcc-patches > wrote: > > Hello, Richard, > > Thank you for the feedback. > > On Jan 12, 2023, Richard Biener wrote: > >> On Tue, Dec 27, 2022 at 5:12 AM Alexandre Oliva via Gcc-patches >> wrote: > >>> This patch extends the memset

Re: gcc-13/changes.html: Mention -fstrict-flex-arrays and its impact

2023-01-13 Thread Gerald Pfeifer
On Tue, 20 Dec 2022, Qing Zhao via Gcc-patches wrote: > +Treating trailing arrays as flexible array > members Please note that ids must not contain white space. Would you mind following up making this "flexiblearray" or similiar? Thank you, Gerald

[c-family] Small fix for -fdump-ada-spec

2023-01-13 Thread Eric Botcazou via Gcc-patches
This is needed to support the _Float32 and _Float64 types. Tested on x86-64/Linux, applied on the mainline. 2023-01-13 Eric Botcazou c-family/ * c-ada-spec.cc (is_float32): New function. (is_float64): Likewise. (is_float128): Tweak. (dump_ada_node) : Call

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-13 Thread Richard Earnshaw (lists) via Gcc-patches
On 13/01/2023 22:12, Jakub Jelinek wrote: On Fri, Jan 13, 2023 at 09:58:26PM +, Richard Earnshaw (lists) wrote: > I'm afraid increasing number of DWARF registers is ABI incompatible change. > E.g. libgcc __frame_state_for function fills in: > typedef struct frame_state > { >    void *cfa; > 

Re: [RFC] Introduce -finline-memset-loops

2023-01-13 Thread Alexandre Oliva via Gcc-patches
Hello, Paul, On Jan 13, 2023, Paul Koning wrote: >> On Jan 13, 2023, at 8:54 PM, Alexandre Oliva via Gcc-patches >> wrote: >> Target-specific code is great for tight optimizations, but the main >> purpose of this feature is not an optimization. AFAICT it actually >> slows things down in

[PATCH] xtensa: Remove old broken tweak for leaf function

2023-01-13 Thread Takayuki 'January June' Suwa via Gcc-patches
In the before-IRA era, ORDER_REGS_FOR_LOCAL_ALLOC was called for each function in Xtensa, and there was register allocation table reordering for leaf functions to compensate for the poor performance of local-alloc. Today the adjustment hook is still called via its alternative