[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 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)};

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] 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

[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 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 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 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.

[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

[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 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 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 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 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 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 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 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 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

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

[RFC] PR81358: Enable automatic linking of libatomic

2024-11-15 Thread Prathamesh Kulkarni
Hi, The attached patch attempts to enable automatic linking of libatomic, and makes the following changes: (1) Introduces a new driver option -f[no]-link-libatomic, which is enabled by default. (2) Adds new dependencies in toplevel Makefile.def so libatomic is built before other target libraries

[PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pass -Wold-style-function-definition.

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

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pass -Wno-old-style-definition. * gcc.dg/graphi

Re: [PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
> On 16 Nov 2024, at 03:28, Jeff Law wrote: > >  > >> On 11/15/24 8:16 PM, Sam James wrote: >> r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these >> tests now trigger -Wold-style-function-definition. Follow Joseph's advice >> in that commit and tweak the tests accordingly.

Re: [PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Jeff Law
On 11/15/24 8:16 PM, Sam James wrote: r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pas

[PATCH] RISC-V:Support N32(32-bit ABI on 64-bit ISA) in riscv

2024-11-15 Thread Liao Shihua
RISC-V N32 ABI means using 32-bit ABI on 64-bit ISA, the discussion in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/381 . At this moment, N32 is supported batemental toolchain. Three OpenSource RTOS using this feature and have been merged in upstream. You can see them in EasyXem (A

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

2024-11-15 Thread Sam James
... with s/-function// and the commit message and ChangeLogs fixed, of course.

[PATCH 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 now triggers -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the test accordingly. gcc/testsuite/ChangeLog: * gcc.target/i386/pr66891.c: Pass -Wold-style-function-definition. --- OK i

Re: [PATCH v3] forwprop: Try to merge two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
On Thu, Nov 14, 2024 at 3:55 PM Christoph Müllner wrote: > > On Thu, Nov 14, 2024 at 3:07 PM Richard Biener wrote: > > > > On Thu, 14 Nov 2024, Christoph Müllner wrote: > > > > > This extends forwprop by yet another VEC_PERM optimization: > > > It attempts to merge two isomorphic vector sequences

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

2024-11-15 Thread Jonathan Wakely
On Sat, 16 Nov 2024, 01:21 Jonathan Wakely, wrote: > 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(), po

[committed] libstdc++: Use -C option to run recursive make in sub-directories

2024-11-15 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * Makefile.am: Use $(MAKE) -C dir instead of cd dir && $(MAKE). * Makefile.in: Regenerate. --- We require GNU Make, so this is always supported. Tested x86_64-linux. Pushed to trunk. libstdc++-v3/Makefile.am | 4 ++-- libstdc++-v3/Makefile.in | 4 ++-- 2

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

2024-11-15 Thread Jonathan Wakely
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 assertion to the underlying function that erases a member means it

Re: [RFC 3/9] aarch64: add new insn definition for st2g

2024-11-15 Thread Indu Bhagat
On 11/13/24 3:02 PM, Richard Sandiford wrote: Indu Bhagat writes: Store Allocation Tags (st2g) is an Armv8.5-A memory tagging (MTE) instruction. It stores an allocation tag to two tag granules of memory. TBD: - Not too sure what is the best way to generate the st2g yet; A subsequent pa

[PATCH 1/2] c++: print z candidate count and number them

2024-11-15 Thread David Malcolm
This patch is a followup to: "c++: use diagnostic nesting [PR116253]" Following Sy Brand's UX suggestions in P2429R0 for example 1, this patch tweaks print_z_candidates to add a note about the number of candidates, and adds a candidate number to each one. Various examples of output can be seen

[PATCH] c++: fix colorization in print_conversion_rejection

2024-11-15 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. gcc/cp/ChangeLog: * call.cc (print_conversion_rejection): When we're using the location of the param in the decl, match the color in the quoted source to that of %qI in the message. Signed-off-by: David Malcolm

[PATCH] c++: tweak colorization of incompatible declspecs

2024-11-15 Thread David Malcolm
Introduce a helper function for complaining about "signed unsigned" and "short long". Add colorization there so that e.g. the 'signed' and 'unsigned' are given consisten contrasting colors in both the message and the quoted source. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. g

[PATCH 2/2] diagnostics: suppress "note: " prefix in nested diagnostics [PR116253]

2024-11-15 Thread David Malcolm
This patch is a followup to: "c++: use diagnostic nesting [PR116253]" This patch tweaks how text output with experimental-nesting=yes prints nested diagnostics, by omitting the leading "note: " from nested notes. This reduces the amount of visual cruft the user has to ignore when reading C++ te

[r15-5324 Regression] FAIL: gcc.dg/tree-ssa/pr117093.c (test for excess errors) on Linux/x86_64

2024-11-15 Thread haochen.jiang
On Linux/x86_64, c83e2d47574fd9a21f257e0f0d7e350c3f1b0618 is the first bad commit commit c83e2d47574fd9a21f257e0f0d7e350c3f1b0618 Author: Jennifer Schmitz Date: Mon Nov 4 07:56:09 2024 -0800 match.pd: Fold vec_perm with view_convert caused FAIL: gcc.dg/tree-ssa/pr117093.c (test for exces

[PATCH v5] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
This extends forwprop by yet another VEC_PERM optimization: It attempts to blend two isomorphic vector sequences by using the redundancy in the lane utilization in these sequences. This redundancy in lane utilization comes from the way how specific scalar statements end up vectorized: two VEC_PERMs

[committed] c: Default to -std=gnu23

2024-11-15 Thread Joseph Myers
Change the default language version for C compilation from -std=gnu17 to -std=gnu23. A few tests are updated to remove local definitions of bool, true and false (where making such an unconditional test change seemed to make more sense than changing the test conditionally earlier or building it wit

Re: [PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Joseph Myers
On Sat, 16 Nov 2024, Florian Weimer wrote: > +@opindex Wdeprecated-non-prototype > +@opindex Wno-deprecated-non-prototype > +@item -Wdeprecated-non-prototype @r{(C and Objective-C only)} > +Warn if a function declarated with an empty parameter list @samp{()} is > +called with one or more arguments

Re: [PATCH RFC] libcpp, libstdc++: add __has_import builtin

2024-11-15 Thread Ville Voutilainen
On Sat, 16 Nov 2024 at 01:12, Jason Merrill wrote: > > Does this seem like an interesting direction? > > -- 8< -- > > A problem with coexistence of module std and the library headers is that > import and then #include tends to break (PR99000). But even with that > fixed, it might be useful to be

[PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Florian Weimer
This warning covers the C23 incompibilities resulting from using () as parameter lists in function declarations. The warning name comes from Clang. The implementation is not perfect because GCC treats these two declarations as equivalent: void f (); void f (not_a_type); This is a bit confus

Re: [PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-11-15 Thread Martin Jambor
Hi, On Thu, Nov 07 2024, Aldy Hernandez wrote: > Jan Hubicka writes: > >>> > 2024-11-01 Martin Jambor >>> > >>> > * ipa-prop.cc (ipa_compute_jump_functions_for_edge): When creating >>> > value-range jump functions from pointer type constant zero, do so >>> > as if it wa

[PATCH RFC] libcpp, libstdc++: add __has_import builtin

2024-11-15 Thread Jason Merrill
Does this seem like an interesting direction? -- 8< -- A problem with coexistence of module std and the library headers is that import and then #include tends to break (PR99000). But even with that fixed, it might be useful to be able to test whether a module has been imported. So, this patch i

Re: [PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
On Fri, Nov 15, 2024 at 10:41 PM Andrew Pinski wrote: > > On Fri, Nov 15, 2024 at 1:30 PM Christoph Müllner > wrote: > > > > This extends forwprop by yet another VEC_PERM optimization: > > It attempts to blend two isomorphic vector sequences by using the > > redundancy in the lane utilization in

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

Re: [PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Andrew Pinski
On Fri, Nov 15, 2024 at 1:30 PM Christoph Müllner wrote: > > This extends forwprop by yet another VEC_PERM optimization: > It attempts to blend two isomorphic vector sequences by using the > redundancy in the lane utilization in these sequences. > This redundancy in lane utilization comes from the

[PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
This extends forwprop by yet another VEC_PERM optimization: It attempts to blend two isomorphic vector sequences by using the redundancy in the lane utilization in these sequences. This redundancy in lane utilization comes from the way how specific scalar statements end up vectorized: two VEC_PERMs

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

2024-11-15 Thread Florian Weimer
* 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 n

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] 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: [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]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: [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] Add new hardreg PRE pass

2024-11-15 Thread Andrew Carlotti
On Tue, Nov 12, 2024 at 10:42:50PM +, Richard Sandiford wrote: > Sorry for the slow review. I think Jeff's much better placed to comment > on this than I am, but here's a stab. Mostly it looks really good to me > FWIW. > > Andrew Carlotti writes: > > This pass is used to optimise assignment

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

2024-11-15 Thread Evgeny Karpov
From 69ce2026b10711b32595d58e23f92f54e6c718c2 Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Fri, 15 Nov 2024 13:14:18 +0100 Subject: [PATCH v1 4/4] aarch64: Add SEH, stack unwinding and C++ exceptions This patch reuses the existing SEH, stack unwinding and C++ exceptions from ix86 and implem

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

2024-11-15 Thread 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 end of a compound > statemen

[PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Florian Weimer
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 end of a compound statement). gcc/c-family/ * c-opts.cc (c_common_post_options): Ini

[PATCH v1 3/4] Rename SEH functions for reuse in AArch64

2024-11-15 Thread Evgeny Karpov
From 4274d1126a1aa60d16dca1cbf7dde1c5ee344bf7 Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Fri, 15 Nov 2024 13:36:41 +0100 Subject: [PATCH v1 3/4] Rename SEH functions for reuse in AArch64 This patch renames functions related to SEH functionality. These functions will be reused in the aarch

[PATCH v1 3/4] Rename SEH functions for reuse in AArch64

2024-11-15 Thread Evgeny Karpov
v1-0003-Rename-SEH-functions-for-reuse-in-AArch64.patch Description: v1-0003-Rename-SEH-functions-for-reuse-in-AArch64.patch

[PATCH v1 2/4] aarch64: Add stdcall and cdecl attributes

2024-11-15 Thread Evgeny Karpov
This patch adds stdcall and cdecl attributes, which might be used for DLL export/import in MinGW. gcc/ChangeLog: * config/aarch64/aarch64.cc: Update. --- gcc/config/aarch64/aarch64.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64

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] 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

[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

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

2024-11-15 Thread Jennifer Schmitz
> On 15 Nov 2024, at 12:05, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > 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 >>

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

[PATCH] Introduce -flto-partition=locality

2024-11-15 Thread Kyrylo Tkachov
Hi all, This is a patch submission following-up from the RFC at: https://gcc.gnu.org/pipermail/gcc/2024-November/245076.html The patch is rebased and retested against current trunk, some debugging code removed, comments improved and some fixes added as I've we've done more testing. --

Re: [PATCH v4 4/7] OpenMP: C++ front-end support for dispatch + adjust_args

2024-11-15 Thread Tobias Burnus
Hi PA, * I believe that all prep + middle end patches are approved and ready to go * Pending for C and C++ are the three patches, attached to the email I am hereby replying to - for the C and the C++ front end and the common C/C++ testcases. → Those 3 patches LGTM - thanks! Related but not

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] 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. > >

[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

[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

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: [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

[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

[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(+),

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

2024-11-15 Thread Andrew MacLeod
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 initialized using cfun, so again introducing a use of cfun shouldnt be an issue. Somethi

[PATCH] Add -f{,no-}assume-sane-operators-new-delete{,={0,1,2}} options [PR110137]

2024-11-15 Thread Jakub Jelinek
Hi! The following patch adds a new tristate option for optimizations related to replaceable global operators new/delete. The option isn't called -fassume-sane-operator-new (which clang++ implements), because 1) clang++ option means something different; initially it was an option to add malloc a

[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

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

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

2024-11-15 Thread Andrew MacLeod
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 redirected to builtin_unre

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 v2] RISC-V: Tie MUL and DIV masks to the M extension

2024-11-15 Thread Dimitar Dimitrov
When configuring GCC for RV32EC with: ./configure \ --target=riscv32-none-elf \ --with-multilib-generator="rv32ec-ilp32e--" \ --with-abi=ilp32e \ --with-arch=rv32ec Then the build fails becaus

[PATCH 2/3] libstdc++: Stop using _Self typedefs in std::list iterators

2024-11-15 Thread Jonathan Wakely
We can just use the injected-class-name instead of defining a new name. That seems simpler. libstdc++-v3/ChangeLog: * include/bits/stl_list.h (_List_iterator): Remove _Self typedef and just use injected-class-name instead. (_List_const_iterator): Likewise. --- Tested x86_

[PATCH 3/3] libstdc++: Add fancy pointer support to std::list [PR57272]

2024-11-15 Thread Jonathan Wakely
Currently std::list uses raw pointers to connect its nodes, which is non-conforming. We should use the allocator's pointer type everywhere that a "pointer" is needed. Because the existing types like _List_node are part of the ABI now, we can't change them. To support nodes that are connected by fa

[PATCH 1/3] libstdc++: Refactor std::list::size() for cxx11 ABI

2024-11-15 Thread Jonathan Wakely
Remove some preprocessor conditionals by moving the _M_size member for the cxx11 ABI into a new base class, which is empty for the gcc4-compat ABI. Move some unused members that are only retained for ABI compatibility to the end of _List_base and add an explanatory comment. Stop using list::_M_nod

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

2024-11-15 Thread Jonathan Wakely
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 11/15/24 6:04 AM, Jonathan Wakely wrote: > > >>> On 14/11/24 23:09 -0500, J

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

2024-11-15 Thread Jonathan Wakely
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 11/15/24 6:04 AM, Jonathan Wakely wrote: > >>> On 14/11/24 23:09 -0500, Jason Merrill wrote: > > Since bits/stdc++.h also intends to inc

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

2024-11-15 Thread Jan Hubicka
> > 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 redirected to builtin_unreachable because, the has > been

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

2024-11-15 Thread Martin Jambor
Hi, On Tue, Nov 05 2024, Jan Hubicka wrote: >> Hi, >> >> when inlining (during the analysis phase) a call graph edge, we update >> all pass-through jump functions corresponding to edges going out of >> the newly inlined function to be relative to the function into which >> we are inlining or to e

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

2024-11-15 Thread Jason Merrill
On 11/15/24 9:20 AM, Jonathan Wakely wrote: 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: Since bits/stdc++.h also intends to include the whole standard library, I include it rather than duplicate it. 

[PATCH v2 1/5] vect: Force alignment peeling to vectorize more early break loops

2024-11-15 Thread Alex Coplan
Hi, This is a v2 which hopefully addresses the feedback for v1 of the 1/5 patch, originally posted here: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/48.html As mentioned on IRC, it will need follow-up work to fix up latent profile issues, but that can be done during stage 3. We wi

Re: [PATCH 1/3] AArch64: Add baseline tune

2024-11-15 Thread Kyrylo Tkachov
> On 14 Nov 2024, at 18:40, Wilco Dijkstra wrote: > > > Cleanup the extra tune defines by introducing AARCH64_EXTRA_TUNE_BASE as a > common base supported by all modern cores. Initially set it to > AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. No change in generated code. > > Passes regress & boo

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

2024-11-15 Thread Kyrylo Tkachov
> On 15 Nov 2024, at 12:33, Wilco Dijkstra wrote: > > 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

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

2024-11-15 Thread Tamar Christina
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 patch as the linker invocation needs to be changed as well. The linker and c

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. >

  1   2   >