[PATCH 4/4] Flip vectorization to forced SLP

2024-11-15 Thread Richard Biener
The following flips the vectorizer to forced SLP, there is almost no expected fallout at this point, the remains should be target specific cost modeling issues. Bootstrap and regtest on x86_64-unknown-linux-gnu in progress. * params.opt (vect-force-slp): Default to 1. --- gcc/params.opt

Re: [PATCH] aarch64: Use SVE SUBR instruction with Neon modes

2024-11-15 Thread Richard Sandiford
Kyrylo Tkachov writes: >> On 15 Nov 2024, at 10:20, Andrew Pinski wrote: >> >> On Thu, Nov 14, 2024 at 7:50 PM Soumya AR wrote: >>> >>> The SVE SUBR instruction performs a reversed subtract from an immediate. >>> >>> This patches enables the emission of SUBR for Neon modes and avoids the >>>

Re: [PATCH v4 01/23] aarch64: Add -mbranch-protection=gcs option

2024-11-15 Thread Yury Khrustalev
Hi Jonathan, On Thu, Nov 14, 2024 at 08:39:07PM +, Jonathan Wakely wrote: > On 14/11/24 12:36 +, Yury Khrustalev wrote: > > From: Szabolcs Nagy > > > > ... > > > > @@ -28093,7 +28093,7 @@ if test "${enable_standard_branch_protection+set}" > > = set; then : > > enableval=$enable_standa

Re: [PATCH] i386: Rewrite ieee_minmax pattern with if_then_else

2024-11-15 Thread Hongyu Wang
Jakub Jelinek 于2024年11月15日周五 16:20写道: > > On Fri, Nov 15, 2024 at 04:04:55PM +0800, Hongyu Wang wrote: > > Following the discussion in pr116738, the insn for UNSPEC_IEEE_MAXMIN > > actually matches the behavior of if_then_else, so remove the UNSPEC and > > rewrite related pattern with if_then_else

Re: [PATCH 3/3] AArch64: Add SVE vector cost to baseline tuning

2024-11-15 Thread Wilco Dijkstra
Hi Kyrill, > This would make USE_NEW_VECTOR_COSTS effectively the default. > Jennifer has been trying to do that as well and then to remove it (as it > would be always true) but there are some codegen regressions that still > > need to be addressed. Yes, that's the goal - we should use good tun

[PATCH] c++: bogus error with nested lambdas [PR117602]

2024-11-15 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- The error here should also check that we aren't nested in another lambda; in it, at_function_scope_p() will be false. PR c++/117602 gcc/cp/ChangeLog: * parser.cc (cp_parser_lambda_introducer): Check if we're i

Avoid expicit builtion list in tree-ssa-dce

2024-11-15 Thread Jan Hubicka
Hi, while working on -fmalloc-dce I noticed that tree-ssa-dce.cc still has an outdated list of builtions that are known to not read memory that can be replaced by query to fnspec and modref. If I get things right, dce does some dead store removal, but only on those memory object that are non-alias

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jonathan Wakely
On 15/11/24 08:53 -0500, Jason Merrill wrote: On 11/15/24 6:04 AM, Jonathan Wakely wrote: On 14/11/24 23:09 -0500, Jason Merrill wrote: On 10/18/24 9:38 AM, Jason Merrill wrote: Currently this installs the sources under $(gxx_include_dir)/bits/, i.e. /usr/include/c++/15/bits.  So with my -fs

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-11-15 Thread Richard Biener
On Fri, Nov 15, 2024 at 1:45 PM Jan Hubicka wrote: > > > > > The patch only ever skips just one conversion, never a chain of them and > > deliberately so, for the reasons shown in the example. > > > > However, I have just realized that combining pass_through jump functions > > during inlining may

Re: 'I' and 'U' fn spec specifiers

2024-11-15 Thread Jₑₙₛ Gustedt
Hello Richard, On Fri, 15 Nov 2024 15:00:44 +0100 (CET), Richard Biener wrote: > fnspec was originally introduced for PTA, but 'I' and 'U' given the > pointers escape, do not help PTA, as soon as pointers escape all > (most) bets are lost. > > So where and how exactly do you plan to use those?

Re: 'I' and 'U' fn spec specifiers

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Jₑₙₛ Gustedt wrote: > Hello Richard, > > On Fri, 15 Nov 2024 15:00:44 +0100 (CET), Richard Biener wrote: > > > fnspec was originally introduced for PTA, but 'I' and 'U' given the > > pointers escape, do not help PTA, as soon as pointers escape all > > (most) bets are lost. >

[PATCH] tree-optimization/117574 - bougs niter lt-to-ne

2024-11-15 Thread Richard Biener
When trying to change a IV from IV0 < IV1 to IV0' != IV1' we apply fancy adjustments to the may_be_zero condition we compute rather than using the obvious IV0->base >= IV1->base expression (to be able to use > instead of >=?). This doesn't seem to go well. Bootstrapped and tested on x86_64-unknow

Re: [PATCH 3/8] ipa: Skip type conversions in jump function constructions

2024-11-15 Thread Jan Hubicka
> > The patch only ever skips just one conversion, never a chain of them and > deliberately so, for the reasons shown in the example. > > However, I have just realized that combining pass_through jump functions > during inlining may unfortunately have exactly the same effect, so we > indeed need

[PATCH 0/8] aarch64: Add support for new SVE and SME extensions

2024-11-15 Thread Richard Sandiford
This series adds support for: - FEAT_SVE_B16B16 (contains both SVE and SME instructions) - FEAT_SME_B16B16 - FEAT_SME_F16F16 - FEAT_SME2p1 I've bundled them together because they depend on each other and because they need some common preparatory patches. They also depend on https://gcc.gnu.org/p

[PATCH 1/8] aarch64: Rework sme_2mode_function insns

2024-11-15 Thread Richard Sandiford
Many of the SME ZA intrinsics have two type suffixes: one for ZA and one for the vectors. The ZA suffix only conveys an element size, while the vector suffix conveys both an element type and an element size. Internally, the ZA suffix maps to an integer mode; e.g. za32 maps to VNx4SI. For SME2, i

[PATCH COMMITTED] Regenerate gcc/c-family/c.opt.urls

2024-11-15 Thread Florian Weimer
After commit 8833389e90d676baabb35c3e7a021a4f5444a5ba. gcc/c-family/ * c.opt.urls: Regenerate. --- gcc/c-family/c.opt.urls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/c-family/c.opt.urls b/gcc/c-family/c.opt.urls index 3bfe2b86b24..04f8e2ee008 100644 --- a/gcc/c-family/c.

[PATCH] Remove unused vcond{,u,eq} expander infrastructure

2024-11-15 Thread Richard Biener
Now that we no longer exercise vcond{,u,eq} patterns remove unused infrastructure. Bootstrap and regtest running on x86_64-unknown-linux-gnu. * optabs-query.h (get_vcond_icode): Remove. (get_vcond_eq_icode): Likewise. * optabs-tree.h (expand_vec_cond_expr_p): Remove code

Re: [PATCH] Introduce feeble_inline attribute [PR93008]

2024-11-15 Thread Jan Hubicka
> > As I wrote in another mail, the only difference I'm aware of is > > the DECL_NO_INLINE_WARNING_P flag, which is set on bar and not on bar2 > > in this case. That flag is used just for -Winline warning. > > > > int baz (void *); > > > > struct S { > > int foo (int n) { return baz (__builtin_a

[PATCH] rs6000: Remove ISA_3_0_MASKS_IEEE and check P9_VECTOR instead

2024-11-15 Thread Kewen Lin
Hi, When working to get rid of mask bit OPTION_MASK_P8_VECTOR, I noticed that the check on ISA_3_0_MASKS_IEEE is actually to check TARGET_P9_VECTOR, since we check all three mask bits together and p9 vector guarantees p8 vector and vsx should be enabled. So this patch is to adjust this first as p

[PATCH] rs6000: Simplify some conditions or code related to TARGET_DIRECT_MOVE

2024-11-15 Thread Kewen Lin
Hi, When I was making a patch to rework TARGET_P8_VECTOR, I noticed that there are some redundant checks and dead code related to TARGET_DIRECT_MOVE, so I made this patch as one separated preparatory patch, it consists of: - Check either TARGET_DIRECT_MOVE or TARGET_P8_VECTOR only according

Re: [PATCH] ranger, v2: Handle nonnull_if_nonzero attribute [PR117023]

2024-11-15 Thread Jakub Jelinek
On Thu, Nov 14, 2024 at 06:25:49PM +0100, Jakub Jelinek wrote: > On Thu, Nov 14, 2024 at 10:05:05AM -0500, Andrew MacLeod wrote: > > The inferred range mechanism is also initialized using cfun, so again > > introducing a use of cfun shouldnt be an issue. > > > > Something like this ought to work I

[PATCH 2/4] tree-optimization/117605 - SLP with large negative single-element interleaving

2024-11-15 Thread Richard Biener
We fail to demote this to VMAT_ELEMENTWISE and thus run into the three vector permutation limit (and would not consider to use strided loads or gathers). This resolves another bunch of SVE regressions with --param vect-force-slp=1 Bootstrapped and tested on x86_64-unknown-linux-gnu. PR t

Re: [PATCH] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Filip Kastl wrote: > Hi, > > Andi's greedy bit test finding algorithm was reverted. I found a fix for the > problem that caused the revert. I made this patch to reintroduce the greedy > alg into GCC. However I think we should keep the old slow but more powerful > algorithm

Re: [PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Jennifer Schmitz wrote: > > > > On 7 Nov 2024, at 13:47, Richard Biener wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Tue, 5 Nov 2024, Jennifer Schmitz wrote: > > > >> We are working on a patch to improve the codegen for the foll

[PATCH 1/4] tree-optimization/117558 - peeling for gaps and VL vectors

2024-11-15 Thread Richard Biener
The following ensures that peeling a single iteration for gaps is sufficient by enforcing niter masking (partial vector use) given we cannot (always) statically decide when the vector size isn't known. The condition guarding this and thus statically giving a pass in some cases for VL vectors is que

Re: [PATCH 3/3] AArch64: Add SVE vector cost to baseline tuning

2024-11-15 Thread Kyrylo Tkachov
Hi Wilco, > On 14 Nov 2024, at 18:44, Wilco Dijkstra wrote: > > > Add AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS and > AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT > to the baseline tuning since all modern cores use it. Fix the neoverse512tvb > tuning to be > like Neoverse V1/V2. > This would

Re: [PATCH 1/4] tree-optimization/117558 - peeling for gaps and VL vectors

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Richard Sandiford wrote: > Richard Biener writes: > > The following ensures that peeling a single iteration for gaps is > > sufficient by enforcing niter masking (partial vector use) given > > we cannot (always) statically decide when the vector size isn't known. > > The cond

Ping: [PATCH v4 0/3][RFC]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2024-11-15 Thread Qing Zhao
Gentle ping on the middle-end review for this patch. There are two parts of this patch: 1. Diagnostic part (Part 2), which has been reviewed by David; 2. Middle end part (Part 1 and 3), mainly on the copy_history information collection during transformation. Thanks, Qing > On Nov 5, 2024,

Re: [PATCH v2] RISC-V: Improve vsetvl vconfig alignment

2024-11-15 Thread Jeff Law
On 11/15/24 3:25 AM, Robin Dapp wrote: So this is really the biggest question in my mind. When we kicked this around in the patchwork meeting several weeks ago I got the impression Robin had a correctness concern with this code. Robin, do you remember what had you worried? Unfortunately I h

[PATCH] libstdc++: Only call regex_traits::transform_primary() if necessary

2024-11-15 Thread Luca Bacci
This is both a performance optimization and a partial fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98723. This commit fixes the issue for bracket expressions that are not locale-dependant. --- libstdc++-v3/include/bits/regex_compiler.tcc | 11 +++ 1 file changed, 7 insertions(+),

[committed] hppa: Fix typos in 32-bit SFmode peephole2 patterns

2024-11-15 Thread John David Anglin
With this change, we can finally build ardour-8.10.0+ds. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to gcc-13, gcc-14 and trunk. Dave --- hppa: Fix typos in 32-bit SFmode peephole2 patterns 2024-11-15 John David Anglin gcc/ChangeLog: PR target/117564

Re: [RFC PATCH 3/5] vect: Fix dominators when adding a guard to skip the vector loop

2024-11-15 Thread Alex Coplan
On 29/10/2024 13:41, Richard Biener wrote: > On Mon, 28 Oct 2024, Alex Coplan wrote: > > > From: Tamar Christina > > > > The alignment peeling changes exposed a latent missing dominator update > > with early break vectorization, specifically when inserting the vector > > skip edge, since the new

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Florian Weimer
* Andrew Pinski: > On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer wrote: >> >> This is another recent GCC extension whose use is apparently >> difficult to spot in code reviews. >> >> The name of the option is due to Jonathan Wakely. Part of it >> could apply to C++ as well (for labels at the en

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 08:13:28PM +0100, Florian Weimer wrote: > * Andrew Pinski: > > > On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer wrote: > >> > >> This is another recent GCC extension whose use is apparently > >> difficult to spot in code reviews. > >> > >> The name of the option is due to

Re: [PATCH V2 4/11] Change TARGET_POPCNTB to TARGET_POWER5

2024-11-15 Thread Michael Meissner
On Thu, Nov 14, 2024 at 06:26:11PM -0600, Peter Bergner wrote: > On 11/8/24 1:49 PM, Michael Meissner wrote: > > As part of the architecture flags patches, this patch changes the use of > > TARGET_POPCNTB to TARGET_POWER5. The POPCNTB instruction was added in ISA > > 2.02 > > (power5). > > I lik

Re: [PATCH] libstdc++: Avoid unneeded calls to regex_traits::transform_primary()

2024-11-15 Thread Luca Bacci
Please, scratch that. I have now sent an updated patch using git send-email: https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668988.html Sorry for the noise! :-) Best regards, Luca Il giorno ven 15 nov 2024 alle ore 16:55 Luca Bacci ha scritto: > See https://gcc.gnu.org/bugzilla/show_b

Re: [PATCH] ranger, v2: Handle nonnull_if_nonzero attribute [PR117023]

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 11:13:55AM -0500, Andrew MacLeod wrote: > > On 11/15/24 04:36, Jakub Jelinek wrote: > > On Thu, Nov 14, 2024 at 06:25:49PM +0100, Jakub Jelinek wrote: > > > On Thu, Nov 14, 2024 at 10:05:05AM -0500, Andrew MacLeod wrote: > > > > The inferred range mechanism is also initiali

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jonathan Wakely
On 15/11/24 11:43 -0500, Jason Merrill wrote: On 11/15/24 10:21 AM, Jonathan Wakely wrote: On Fri, 15 Nov 2024 at 15:20, Jonathan Wakely wrote: On Fri, 15 Nov 2024 at 15:12, Jason Merrill wrote: On 11/15/24 9:20 AM, Jonathan Wakely wrote: On 15/11/24 08:53 -0500, Jason Merrill wrote: On

Re: [PATCH]AArch64 Suppress default options when march or mcpu used is not affected by it.

2024-11-15 Thread Andrew Pinski
On Fri, Nov 15, 2024 at 6:30 AM Tamar Christina wrote: > > Hi All, > > This patch makes it so that when you use any of the Cortex-A53 errata > workarounds but have specified an -march or -mcpu we know is not affected by > it > that we suppress the errata workaround. > > This is a driver only patc

Re: [Bug tree-optimization/109429] [PATCH v2] ivopts: fixed complexities

2024-11-15 Thread Aleksandar Rakic
A kind remind/ping on the patch. Kind regards, Aleksandar Rakić From: Aleksandar Rakic Sent: Thursday, October 31, 2024 12:46 PM To: richard.guent...@gmail.com Cc: gcc-patches@gcc.gnu.org; Djordje Todorovic; Jovan Dmitrovic Subject: Re: [Bug tree-optimiza

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Jan Hubicka
> > On 11/15/24 10:19, Jan Hubicka wrote: > > > I have seen this happen when the result of the intersection is an empty > > > set (one of the few comments in value-range.h actually describes an > > > undefined range as an "empty range"). I have only seen this happen when > > > the edge has been r

[PATCH] libstdc++: Avoid unneeded calls to regex_traits::transform_primary()

2024-11-15 Thread Luca Bacci
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98723 From bf651c78c6ad4fedd0fe6cec3d7953cbf0a4f03a Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Fri, 15 Nov 2024 16:32:14 +0100 Subject: [PATCH] Avoid unneeded calls to regex_traits::transform_primary() To: gcc-patches@gcc.gnu.org This is both

[PATCH v1 0/4] Add SEH, stack unwinding and C++ exceptions

2024-11-15 Thread Evgeny Karpov
Hello, This patch series adds SEH, stack unwinding and C++ exceptions implementation to the aarch64-w64-mingw32 target. The patch series is based on "[PATCH v3 0/8] SMALL code model fixes, optimization fixes, LTO, and minimal C++ enablement" patch series, which should be merged next week. https:/

Re: [PATCH] ranger, v2: Handle nonnull_if_nonzero attribute [PR117023]

2024-11-15 Thread Andrew MacLeod
Unfortunately that broke bootstrap. https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668554.html https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668699.html https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668700.html https://gcc.gnu.org/pipermail/gcc-patches/2024-November/66

[PATCH] c: Fix ICE when forming composite type for two structures / unions [PR117548]

2024-11-15 Thread Martin Uecker
Bootstrapped and regression tested on x86_64. c: Fix ICE when forming composite type for two structures / unions [PR117548] When forming the composite type from two tagged type, we need to find the original type for a typedecl to get the correct tag. PR c/117

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Martin Jambor
Hi, On Fri, Nov 15 2024, Jan Hubicka wrote: >> >> On 11/15/24 10:19, Jan Hubicka wrote: >> > > I have seen this happen when the result of the intersection is an empty >> > > set (one of the few comments in value-range.h actually describes an >> > > undefined range as an "empty range"). I have on

[PATCH v1 1/4] aarch64: Bypass some warnings in MinGW

2024-11-15 Thread Evgeny Karpov
The patch bypasses missing prototypes warnings in MinGW until it is fixed. libgcc/ChangeLog: * config/aarch64/t-mingw: Update. --- libgcc/config/aarch64/t-mingw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/config/aarch64/t-mingw b/libgcc/config/aarch64/t-min

[PATCH v4 0/1] C: Support Function multiversioning in the C front end

2024-11-15 Thread alfie.richards
From: Alfie Richards Hi Joseph and all, I worked through Josephs feedback, and as I fixed certain issues I came to the conclusion he was correct that a rethink was required. I reworked this to only have the one FMV binding for each function set which gets replaced with the dispatched symbol dec

[PATCH v4 1/1] C: Support Function multiversioning in the C front end

2024-11-15 Thread alfie.richards
This patch adds support for `target_version` function multiversioning to the C frontend, specifically intended for enabling this for Aarch64 targets. The functionality and behavior matches the CPP frontend. Which is to say it is not ACLE compliant, as I have another patch achieving this. The maj

Re: [PATCH] Fix test failures for enum-alias-{1,2,3} on arm-eabi [PR117419]

2024-11-15 Thread Martin Uecker
Richard, ok for trunk then? Am Freitag, dem 15.11.2024 um 02:11 -0300 schrieb Thiago Jung Bauermann: > Hello, > > Martin Uecker writes: > > > I added a max element as suggested by Richard to force > > the type to an int. > > > > Regression tested on x86_64 but needs testing on arm-eabi. > >

Re: [PATCH] c: Fix ICE when forming composite type for two structures / unions [PR117548]

2024-11-15 Thread Joseph Myers
On Fri, 15 Nov 2024, Martin Uecker wrote: > Bootstrapped and regression tested on x86_64. > > > c: Fix ICE when forming composite type for two structures / unions > [PR117548] > > When forming the composite type from two tagged type, we need to find the > original type for a ty

[PATCH v4 08/10] OpenMP: Fortran support for metadirectives and dynamic selectors

2024-11-15 Thread Sandra Loosemore
gcc/fortran/ChangeLog PR middle-end/112779 PR middle-end/113904 * decl.cc (gfc_match_end): Handle COMP_OMP_BEGIN_METADIRECTIVE and COMP_OMP_METADRIECTIVE. * dump-parse-tree.cc (show_omp_node): Handle EXEC_OMP_METADIRECTIVE. (show_code_node): Likewise.

[PATCH v4 07/10] OpenMP: Shared metadirective/dynamic selector tests for C and C++

2024-11-15 Thread Sandra Loosemore
gcc/testsuite/ChangeLog * c-c++-common/gomp/attrs-metadirective-1.c: New. * c-c++-common/gomp/attrs-metadirective-2.c: New. * c-c++-common/gomp/attrs-metadirective-3.c: New. * c-c++-common/gomp/attrs-metadirective-4.c: New. * c-c++-common/gomp/attrs-metadirec

[PATCH v4 02/10] OpenMP: Re-work and extend context selector resolution

2024-11-15 Thread Sandra Loosemore
This patch reimplements the middle-end support for "declare variant" and extends the resolution mechanism to also handle metadirectives (PR112779). It also adds partial support for dynamic selectors (PR113904) and fixes a selector scoring bug reported as PR114596. I hope this rewrite also improve

[PATCH] c++: handle misspelled concepts and missing #include

2024-11-15 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/cp/ChangeLog: * name-lookup.cc (suggest_alternative_in_explicit_scope): Gracefully handle non-namespaces, such as scoped enums. * parser.cc (cp_parser_name_lookup_error): Provide a name

[PATCH v4 10/10] OpenMP: Update documentation of metadirective implementation status.

2024-11-15 Thread Sandra Loosemore
libgomp/ChangeLog * libgomp.texi (OpenMP 5.0): Mark metadirective and declare variant as implemented. (OpenMP 5.1): Mark target_device as supported. Add changed interaction between declare target and OpenMP context and dynamic selector support. (OpenM

[PATCH v4 03/10] OpenMP: Remove dead code from declare variant reimplementation

2024-11-15 Thread Sandra Loosemore
After reimplementing late resolution of "declare variant", the declare_variant_alt and calls_declare_variant_alt flags on struct cgraph_node are no longer used by anything. For the purposes of marking functions that need late resolution, the has_omp_variant_constructs flag has replaced calls_decla

[PATCH v4 05/10] OpenMP: Add C support for metadirectives and dynamic selectors.

2024-11-15 Thread Sandra Loosemore
Additional shared C/C++ testcases are included in a subsequent patch in this series. gcc/c-family/ChangeLog PR middle-end/112779 PR middle-end/113904 * c-common.h (enum c_omp_directive_kind): Add C_OMP_DIR_META. (c_omp_expand_variant_construct): Declare. * c

[PATCH v2 2/2] testsuite: i386: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but this test relies on unprototyped functions. Follow Joseph's advice in that commit and tweak the test accordingly. gcc/testsuite/ChangeLog: * gcc.target/i386/pr66891.c: Pass -std=gnu17. --- OK for trunk? v2 fixes the commit me

[PATCH v2 1/3] cfgexpand: Factor out getting the stack decl index

2024-11-15 Thread Andrew Pinski
This is the first patch in improving this code. Since there are a few places which get the index and they check the same thing, let's factor that out into one function. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * cfgexpand.cc (INVALID_STACK_INDEX): New defined.

Re: [RFC] PR81358: Enable automatic linking of libatomic

2024-11-15 Thread Xi Ruoyao
On Sat, 2024-11-16 at 03:44 +, Prathamesh Kulkarni wrote: > diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in > index 9798e7c09e9..62cd5e0a76b 100644 > --- a/libatomic/Makefile.in > +++ b/libatomic/Makefile.in > @@ -1,7 +1,7 @@ > -# Makefile.in generated by automake 1.15.1 from Makefil

[PATCH v4 01/10] OpenMP: New tree nodes for metadirective and dynamic selector support.

2024-11-15 Thread Sandra Loosemore
This patch adds basic support for three new tree node types that will be used in subsequent patches to support OpenMP metadirectives and dynamic selectors. OMP_METADIRECTIVE is the internal representation of parsed OpenMP metadirective constructs. It's produced by the front ends and is expanded d

[PATCH v4 00/10] OpenMP: Implement metadirective and dynamic selectors

2024-11-15 Thread Sandra Loosemore
This is yet another revised version of the patch set for metadirective and dynamic selector support, along with "declare variant" fixes/improvements, incorporating comments received on the last posted version in July: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657841.html The current ver

[PATCH v4 04/10] OpenMP: Robustify C front end handling of attribute-syntax pragmas

2024-11-15 Thread Sandra Loosemore
Presently, the code to handle OpenMP attribute-syntax pragmas in the C front end assumes nothing else is messing with redirecting parser->tokens, and makes no provision for restoring it from anything other than parser->tokens_buf when the buffer allocated for the pragma is exhausted. Adding suppor

[PATCH] testsuite: rename plugins from .c to .cc

2024-11-15 Thread David Malcolm
In r12-6650-g5c69acb32329d4 we updated our sources from .c to .cc since for some time GCC has been implemented in C++, not C. GCC plugins are also implemented in C++, not C, but the plugins in our testsuite still have .c extensions. Rename the plugin implementation files in the testsuite from .c

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-15 Thread Jonathan Wakely
On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: > > While working on fancy pointer support for the linked lists I noticed > they didn't have any debug assertions. This adds the obvious non-empty > assertions to front(), back(), pop_front() and pop_back(). > > For the pop members, adding an as

[PATCH V4 0/5] Add more user friendly TARGET_ names for PowerPC

2024-11-15 Thread Michael Meissner
Peter Bergner asked me to reorganize my V3 patch that separates the architecture bits (set via -mcpu=) compared to the ISA bits that are based on options. Here is the beginning of the V3 patch for reference: https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668643.html As Peter has suggest

[PATCH v4 09/10] OpenMP: Update "declare target"/OpenMP context interaction

2024-11-15 Thread Sandra Loosemore
The code and test case previously implemented the OpenMP 5.0 spec, which said in section 2.3.1: "For functions within a declare target block, the target trait is added to the beginning of the set..." In OpenMP 5.1, this was changed to "For device routines, the target trait is added to the beginni

[PATCH v4 06/10] OpenMP: C++ support for metadirectives and dynamic selectors.

2024-11-15 Thread Sandra Loosemore
Additional shared C/C++ testcases are included in a subsequent patch in this series. gcc/cp/ChangeLog PR middle-end/112779 PR middle-end/113904 * cp-tree.h (struct saved_scope): Add new field x_processing_omp_trait_property_expr. (processing_omp_trait_proper

[PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-11-15 Thread Andrew Pinski
After fixing loop-im to do the correct overflow rewriting for pointer types too. We end up with code like: ``` _9 = (unsigned long) &g; _84 = _9 + 18446744073709551615; _11 = _42 + _84; _44 = (signed char *) _11; ... *_44 = 10; g ={v} {CLOBBER(eos)}; ... n[0] = &f; *_44 = 8; g ={v} {CLOBBER(eos)};

[PATCH v2 3/3] cfgexpand: Handle integral vector types and constructors for scope conflicts [PR105769]

2024-11-15 Thread Andrew Pinski
This is an expansion of the last patch to also track pointers via vector types and the constructor that are used with vector types. In this case we had: ``` _15 = (long unsigned int) &bias; _10 = (long unsigned int) &cov_jn; _12 = {_10, _15}; ... MEM[(struct vec *)&cov_jn] ={v} {CLOBBER(bob)}; bi

<    1   2