[PATCH 2/3] driver: for_each_pass: Pass to callback whether dir is machine-disambiguated

2021-08-17 Thread John Ericson
We will use this in the subsequent diff to control what basenames we search for. In machine-specific subdirectories, we should just look for the original basename, but in machine-agnostic subdirectories, we might additionally look for prefixed disambiguated names, as an alternate method of keeping

[PATCH 1/3] find_a_program: First search with machine prefix

2021-08-17 Thread John Ericson
This matches the behavior of Clang, and makes it easier to work with cross compilers without heeding to hard-code paths at build time. --- gcc/gcc.c | 78 --- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/gcc/gcc.c b/gcc/gcc.c i

[PATCH 3/3] find_a_program: Only search for prefixed paths in undisambiguated dirs

2021-08-17 Thread John Ericson
This means, we might search for: - path/$machine/$version/prog - path/$machine/prog - path/$machine-prog But not - path/$machine/$version/$machine-prog because disambiguating $machine twice is unnecessary. This does mean we less liberal in what we accept than LLVM, but that's OK. The down side

Re: Optional machine prefix for programs in for -B dirs

2021-08-17 Thread John Ericson
OK I have polished off my code in light of previous discussion and will submit it in follow-up emails. As mentioned before, this patch series is on top of the non-behavior-changing cleanup I previously submitted in https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576725.html The first patch

Re: [PATCH] [i386] Add x86 tune to enable v2df vector reduction by paddpd.

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 5:06 PM liuhongt wrote: > > Hi: > This patch add a new x86 tune named X86_TUNE_V2DF_REDUCTION_PREFER_HADDPD > to enable haddpd for v2df vector reduction, the tune is disabled by default. > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} > Ok for trunk? > Pushe

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 18, 2021 at 11:24 AM Hongtao Liu wrote: > > On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches > wrote: > > > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > > wrote: > > > > > > This is an attempt to start moving the x86 backend to use > > > standard

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches wrote: > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > wrote: > > > > This is an attempt to start moving the x86 backend to use > > standard pattern names for [mask_]gather_load and [mask_]scatter_store > > rathe

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 10:43 PM Richard Biener via Gcc-patches wrote: > > On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches > wrote: > > > > This is an attempt to start moving the x86 backend to use > > standard pattern names for [mask_]gather_load and [mask_]scatter_store > > rathe

Re: [PATCH] Adding target hook allows to reject initialization of register

2021-08-17 Thread Jojo R via Gcc-patches
— Jojo 在 2021年8月16日 +0800 PM3:15,Richard Biener ,写道: > On Fri, Aug 13, 2021 at 3:59 AM Jojo R wrote: > > > > > > — Jojo > > 在 2021年8月11日 +0800 PM6:44,Richard Biener ,写道: > > > > On Wed, Aug 11, 2021 at 11:28 AM Richard Sandiford > > wrote: > > > > > > Richard Biener writes: > > > > On Tue, Aug

Re: [PATCH] Revert "Add the member integer_to_sse to processor_cost as a cost simulation for movd/pinsrd. It will be used to calculate the cost of vec_construct."

2021-08-17 Thread Hongtao Liu via Gcc-patches
On Tue, Aug 17, 2021 at 8:56 PM H.J. Lu via Gcc-patches wrote: > > On Tue, Aug 17, 2021 at 5:43 AM liuhongt via Gcc-patches > wrote: > > > > This reverts commit 872da9a6f664a06d73c987aa0cb2e5b830158a10. > > > > PR target/101936 > > PR target/101929 > > > > Bootstrapped and regtested on x86_64-l

[COMMITTED 3/3] Add GORI tracing faciltiies.

2021-08-17 Thread Andrew MacLeod via Gcc-patches
And this final patch provides tracing in the GORI component. This is what I used to find the ABS problem with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101938 The code sequence looked like:     :     a1_8 = -arg1_7(D);     _1 = ABS_EXPR ;     a2_10 = -_1;     if (a1_8 > a2_10)   goto

[COMMITTED 2/3] Change evrp-mode options.

2021-08-17 Thread Andrew MacLeod via Gcc-patches
This patch alters the options for --param=evrp-mode=. It removes the option of tracing when in hybrid mode, and adds some extra discrimination. legacy/ranger/legacy-first/ranger-first are unchanged.  the default is still 'ranger' The modifications are: trace    : enable range tracing in ra

[COMMITTED 1/3] Abstract range tracing routines into a class.

2021-08-17 Thread Andrew MacLeod via Gcc-patches
I originally implemented range tracing as a derived class so I wouldn't mess-up the basic range routines in ranger.  Having tracing enabled this way had its advantages, but also had some disadvantages, such as requiring a different class to be instantiated when we want to turn on tracing. Reg

Re: [PATCH] more warning code refactoring

2021-08-17 Thread Martin Sebor via Gcc-patches
On 8/17/21 2:51 AM, Richard Biener wrote: On Tue, Aug 17, 2021 at 3:52 AM Martin Sebor via Gcc-patches wrote: The attached patch continues with the move of warning code from builtins.c and calls.c into a more suitable home. As before, it is mostly free of functional changes. The one exceptio

Re: [PATCH] Fix incorrect computation in fill_always_executed_in_1

2021-08-17 Thread Segher Boessenkool
Hi! As an aside... On Mon, Aug 16, 2021 at 03:46:12AM -0500, Xiong Hu Luo wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-19.c > --- a/gcc/tree-ssa-loop-im.c > +++ b/gcc/tree-ssa-loop-im.c You can make a saner order for your diffs by putting the testsuite changes after the

Re: [PATCH] configure, jit: Allow for 'make check-gcc-jit'.

2021-08-17 Thread David Malcolm via Gcc-patches
On Tue, 2021-08-17 at 19:59 +0100, Iain Sandoe wrote: > Hi, > > For those of us who habitually build Ada, it’s convenient to > have a way of running individual test suites without invoking > the acats tests… > > being able to do “make check-gcc-jit” from the top level is very > useful when debug

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2021, at 10:04 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Aug 16, 2021, at 11:48 AM, Qing Zhao via Gcc-patches >> wrote: >> From the above IR file after “FRE”, we can see that the major issue with this IR is: The address taken auto variable “alt_

[PATCH v2] libstdc++: improve documentation for bits/stl_function.h [PR51539]

2021-08-17 Thread Krzysztof Żelechowski
PR libstdc++/PR51539 ChangeLog * libstdc++-v3/include/bits/stl_function.h: Improve documentation. diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/ bits/stl_function.h index 073018d522d..a0b84f93d18 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/l

[committed] wwwdocs: Add missing punctuation to elements

2021-08-17 Thread Jonathan Wakely via Gcc-patches
Pushed to wwwdocs as obvious. commit 44d97225cc39f2cfbc3109c6a6473bde3886357a Author: Jonathan Wakely Date: Tue Aug 17 21:30:28 2021 +0100 Add missing punctuation to elements diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html index 0a1b582a..99a1ddb1 100644 --- a/htdocs/bugs/i

[PATCH] libstdc++: improve documentation for bits/stl_function.h [PR51539]

2021-08-17 Thread Krzysztof Żelechowski
PR libstdc++/PR51539 ChangeLog * libstdc++-v3/include/bits/stl_function.h: Improve documentation. diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/ bits/stl_function.h index 073018d522d..a0b84f93d18 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/l

Re: Better memory statistics, take 2

2021-08-17 Thread Thomas Schwinge
Hi! On 2021-08-17T09:27:46-0400, David Malcolm via Gcc-patches wrote: > On Tue, 2021-08-17 at 11:17 +0200, Thomas Schwinge wrote: >> "Turn >> global 'ggc_force_collect' variable into 'force_collect' parameter to >> 'ggc_collect'" > Looks good to me, but bool params can be unclear - maybe introd

Re: [PATCH] Avoid illegal argument to verbose in dg-test callback

2021-08-17 Thread Jonathan Wakely via Gcc-patches
On Tue, 17 Aug 2021 at 20:15, Thomas Schwinge wrote: > > Hi! > > On 2020-04-16T15:21:44+0200, Matthias Kretz wrote: > > If extra_tool_flags starts with a dash, an error like 'ERROR: verbose: > > illegal argument: -march=native -O2 -std=c++17' is printed. This is > > easily fixed by inserting a do

Re: [PATCH] Avoid illegal argument to verbose in dg-test callback

2021-08-17 Thread Thomas Schwinge
Hi! On 2020-04-16T15:21:44+0200, Matthias Kretz wrote: > If extra_tool_flags starts with a dash, an error like 'ERROR: verbose: > illegal argument: -march=native -O2 -std=c++17' is printed. This is > easily fixed by inserting a double dash before the variable. > --- a/libstdc++-v3/testsuite/lib/

[pushed] Objective-C: Default flag_objc_sjlj_exceptions off for NeXT ABI >= 2.

2021-08-17 Thread Iain Sandoe
Hi, This patch from Matt, adjusts the default exception model for all targets that might use NeXT ABI 2 (currently, Darwin had handled this locally). tested on x86_64-darwin, i686-darwin, x86_64-linux, pushed to master, thanks, Iain = Signed-off-by: Matt Jacobson gcc/c-family/ChangeLog:

[pushed] Darwin, libcc1: Handle hosts with mdynamic-no-pic support.

2021-08-17 Thread Iain Sandoe
Hi, The default for building host-side binaries for mdynamic-no-pic hosts is to enable this. However, it is not compatible with dynamic libraries, so must be switched off for libcc1. tested on i686-darwin9, x86_64-darwin, x86_64-linux, pushed to master, thanks, Iain Signed-off-by: Iain Sandoe

[PATCH] configure, jit: Allow for 'make check-gcc-jit'.

2021-08-17 Thread Iain Sandoe
Hi, For those of us who habitually build Ada, it’s convenient to have a way of running individual test suites without invoking the acats tests… being able to do “make check-gcc-jit” from the top level is very useful when debugging jit testsuite issues. one can do "cd gcc ; make check-jit "- but

[pushed] Darwin: Reset section names table at the end of compile.

2021-08-17 Thread Iain Sandoe
Hi, This fixes a fail seen when using JIT on Darwin where we fail to label the start of debug sections properly. This operation is controlled by a vector of tokens that is lazily allocated. For a single use (typical compile) this vector will be reclaimed as GGC. For JIT this is not sufficient s

[pushed] Darwin, X86, config: Adjust 'as' command lines [PR100340].

2021-08-17 Thread Iain Sandoe
Hi, Versions of the assembler using clang from XCode 12.5/12.5.1 have a bug which produces different code layout between debug and non-debug input, leading to a compare fail for default configure parameters. This is a workaround fix to disable the optimisation that is responsible for the bug. te

Re: [PATCH v4] c++: Add gnu::diagnose_as attribute

2021-08-17 Thread Jason Merrill via Gcc-patches
On 7/23/21 4:58 AM, Matthias Kretz wrote: Hi Jason, Hi, thanks for your patience; I've been out on PTO a lot in the last month, and will be again this week. I found a few regressions from the last patch in the meantime. Version 4 of the patch is attached. Questions: 1. I simplified the co

Re: [PATCH, V2 2/3] targhooks: New target hook for CTF/BTF debug info emission

2021-08-17 Thread Indu Bhagat via Gcc-patches
On 8/17/21 1:04 AM, Richard Biener wrote: On Mon, Aug 16, 2021 at 7:39 PM Indu Bhagat wrote: On 8/10/21 4:54 AM, Richard Biener wrote: On Thu, Aug 5, 2021 at 2:52 AM Indu Bhagat via Gcc-patches wrote: This patch adds a new target hook to detect if the CTF container can allow the emission o

Re: [PATCH] Fall back to masked_gather_load/masked_scatter_store

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Aug 2021, Richard Sandiford wrote: > Richard Biener via Gcc-patches writes: > > This adds a fallback to the masked_ variants for gather_load > > and scatter_store if the latter are not available. > > > > Bootstrap / regtest running on x86_64-unknown-linux-gnu. > > LGTM FWIW. I don't

Re: [PATCH] libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]

2021-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 17, 2021 at 08:32:50AM -0700, Jason Merrill wrote: > > We want to remove the latter but not the former one, and > > the patch adds the vaopt_padding_tokens counter for it to control > > how many placemarkers are removed on vaopt_state::END. > > As can be seen in #c1 and #c2 of the PR,

Re: [PATCH] Optimize seed_seq construction

2021-08-17 Thread Jonathan Wakely via Gcc-patches
On Tue, 17 Aug 2021 at 14:40, Antony Polukhin wrote: > > вт, 17 авг. 2021 г. в 16:37, Jonathan Wakely : > <...> > > Thanks, this is a nice improvement. We can avoid tag dispatching to > > make it simpler though: > > > > @@ -3248,6 +3249,9 @@ namespace __detail > > template > > seed_seq::seed

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2021, at 9:50 AM, Qing Zhao via Gcc-patches > wrote: > > > >> On Aug 17, 2021, at 3:29 AM, Richard Biener wrote: >> >> On Mon, 16 Aug 2021, Qing Zhao wrote: >> >>> My current code for expand_DEFERRED_INIT is like the following, could you >>> check and see whether there is a

RE: [PATCH] [MIPS] Hazard barrier return support

2021-08-17 Thread Dragan Mladjenovic via Gcc-patches
> -Original Message- > From: Dragan Mladjenovic > Sent: 16 August 2021 22:40 > To: 'Andrew Pinski' > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] [MIPS] Hazard barrier return support > > > > > -Original Message- > > From: Andrew Pinski [mailto:pins...@gmail.com] > > Sent

Re: [PATCH v2] libstdc++: Fix testsuite for skipping gdb tests on remote/non-native target

2021-08-17 Thread Jonathan Wakely via Gcc-patches
On Mon, 9 Aug 2021 at 12:47, Luc Michel wrote: > > This fixes an incorrect invocation of gdb on remote targets where > DejaGNU would try to run host's gdb in remote target simulator. > gdb-test skips the testing when target is remote or non native but the > gdb version check function does not. > >

Re: [PATCH] c++, v3: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-17 Thread Jason Merrill via Gcc-patches
On 8/17/21 10:55 AM, Jakub Jelinek wrote: On Tue, Aug 17, 2021 at 07:10:28AM -0700, Jason Merrill wrote: Looks good, thanks. I think you didn't see that I also asked for some added comments; OK with those added. Oops, I've indeed missed them, sorry. On Mon, Aug 16, 2021 at 03:57:21PM -0400,

Re: [PATCH] libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]

2021-08-17 Thread Jason Merrill via Gcc-patches
On 8/17/21 4:25 AM, Jakub Jelinek wrote: On Mon, Aug 16, 2021 at 06:07:57PM -0400, Jason Merrill wrote: It is unclear if it would be enough to remove just one or if all padding tokens should be removed. Anyway, e.g. the previous removal of all padding tokens at the end of __VA_OPT__ is undesirab

Re: [PATCH 1/2] analyzer: detect and analyze calls via function pointer (GSoC)

2021-08-17 Thread Ankur Saini via Gcc-patches
Here is the final patch after fixing all the nits mentioned. Successfully bootstrapped and completed regress tests on x86_64-linux-gnu. - - - vfunc.patch Description: Binary data Thanks - Ankur

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 16, 2021, at 11:48 AM, Qing Zhao via Gcc-patches > wrote: > >>> From the above IR file after “FRE”, we can see that the major issue with >>> this IR is: >>> >>> The address taken auto variable “alt_reloc” has been completely replaced by >>> the temporary variable “_1” in all >>> th

Re: Expensive selftests

2021-08-17 Thread Martin Sebor via Gcc-patches
On 8/17/21 12:40 AM, Thomas Schwinge wrote: Hi! On 2021-08-16T14:10:00-0600, Martin Sebor wrote: On 8/16/21 6:44 AM, Thomas Schwinge wrote: [...], to document the current behavior, I propose to "Add more self-tests for 'hash_map' with Value type with non-trivial constructor/destructor", see a

Re: [PATCH] c++, v3: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 17, 2021 at 07:10:28AM -0700, Jason Merrill wrote: > Looks good, thanks. I think you didn't see that I also asked for some added > comments; OK with those added. Oops, I've indeed missed them, sorry. On Mon, Aug 16, 2021 at 03:57:21PM -0400, Jason Merrill wrote: > Add a comment that

Re: [PATCH] Fall back to masked_gather_load/masked_scatter_store

2021-08-17 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > This adds a fallback to the masked_ variants for gather_load > and scatter_store if the latter are not available. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu. LGTM FWIW. I don't know the history behind the TREE_CODE (*mask) != SSA_NAME che

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2021, at 9:45 AM, Richard Biener wrote: > > On Tue, 17 Aug 2021, Qing Zhao wrote: > >> >> >>> On Aug 17, 2021, at 3:43 AM, Richard Biener wrote: >>> >>> On Mon, 16 Aug 2021, Qing Zhao wrote: >>> > On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: >

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2021, at 3:29 AM, Richard Biener wrote: > > On Mon, 16 Aug 2021, Qing Zhao wrote: > >> My current code for expand_DEFERRED_INIT is like the following, could you >> check and see whether there is any issue for it: >> >> #define INIT_PATTERN_VALUE 0xFE >> static void >> expand_DE

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Aug 2021, Qing Zhao wrote: > > > > On Aug 17, 2021, at 3:43 AM, Richard Biener wrote: > > > > On Mon, 16 Aug 2021, Qing Zhao wrote: > > > >> > >> > >>> On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: > >>> > >>> On Thu, 12 Aug 2021, Qing Zhao wrote: > >>> > Hi, Richard

Re: [PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 3:29 PM Richard Biener via Gcc-patches wrote: > > This is an attempt to start moving the x86 backend to use > standard pattern names for [mask_]gather_load and [mask_]scatter_store > rather than using the builtin_{gather,scatter} target hooks. > > I've started with AVX2 gat

[PATCH] Fall back to masked_gather_load/masked_scatter_store

2021-08-17 Thread Richard Biener via Gcc-patches
This adds a fallback to the masked_ variants for gather_load and scatter_store if the latter are not available. Bootstrap / regtest running on x86_64-unknown-linux-gnu. 2021-08-17 Richard Biener * optabs-query.c (supports_vec_gather_load_p): Also check for masked optabs.

Re: [PATCH 8/8] aarch64: Add -mtune=neoverse-512tvb

2021-08-17 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > This patch adds an option to tune for Neoverse cores that have > a total vector bandwidth of 512 bits (4x128 for Advanced SIMD > and a vector-length-dependent equivalent for SVE). This is intended > to be a compromise between tuning aggressively for a single core like

[committed] libstdc++: Optimize std::function move constructor [PR101923]

2021-08-17 Thread Jonathan Wakely via Gcc-patches
PR 101923 points out that the unconditional swap in the std::function move constructor makes it slower than copying an empty std::function. The copy constructor has to check for the empty case before doing anything, and that makes it very fast for the empty case. Adding the same check to the move

Re: [PATCH] c++, v3: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-17 Thread Jason Merrill via Gcc-patches
On 8/17/21 6:44 AM, Jakub Jelinek wrote: On Mon, Aug 16, 2021 at 03:57:21PM -0400, Jason Merrill wrote: +static tree +is_corresponding_member_aggr (location_t loc, tree basetype1, tree membertype1, + tree arg1, tree basetype2, tree membertype2, +

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Qing Zhao via Gcc-patches
> On Aug 17, 2021, at 3:43 AM, Richard Biener wrote: > > On Mon, 16 Aug 2021, Qing Zhao wrote: > >> >> >>> On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: >>> >>> On Thu, 12 Aug 2021, Qing Zhao wrote: >>> Hi, Richard, For RTL expansion of call to .DEFERRED_INIT, I chang

Re: [PATCH] Optimize seed_seq construction

2021-08-17 Thread Antony Polukhin via Gcc-patches
вт, 17 авг. 2021 г. в 16:37, Jonathan Wakely : <...> > Thanks, this is a nice improvement. We can avoid tag dispatching to > make it simpler though: > > @@ -3248,6 +3249,9 @@ namespace __detail > template > seed_seq::seed_seq(_InputIterator __begin, _InputIterator __end) > { > + if _

Re: [PATCH] Optimize seed_seq construction

2021-08-17 Thread Jonathan Wakely via Gcc-patches
On Tue, 17 Aug 2021 at 09:42, Antony Polukhin wrote: > > When std::seed_seq is constructed from random access iterators we can > detect the internal vector size in O(1). Reserving memory for elements > in such cases may avoid multiple memory allocations. > > libstdc++-v3/ChangeLog: > > * in

Re: Fortran: Implement OpenMP 5.1 scope construct (was: Re: openmp: Implement OpenMP 5.1 scope construct)

2021-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 17, 2021 at 02:55:56PM +0200, Tobias Burnus wrote: > On 17.08.21 09:47, Jakub Jelinek wrote: > > This patch implements the OpenMP 5.1 scope construct, which is similar > > to worksharing constructs in many regards, but isn't one of them. > > And the attached patch does the same for For

Re: [PATCH] commit-mklog: Add --co argument.

2021-08-17 Thread Martin Liška
On 8/17/21 3:09 PM, Martin Liška wrote: On 8/17/21 2:59 PM, Martin Liška wrote: with --trailer='Signed-off-by=Mona Lisa Octocat '. This should be of course: --trailer='Co-Authored-By=Mona Lisa Octocat ' Update version where mklog.py skips Co-Authored-By ignoring case. Martin >From 68797b65e

[committed] libstdc++: Test std::seed_seq construction from input iterators

2021-08-17 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/26_numerics/random/seed_seq/cons/range.cc: Check construction from input iterators. Tested powerpc64le-linux. Committed to trunk. commit 20698ec5b681e23fa3404ed0ef78e3367b28e16d Author: Jonathan Wakely Date:

Re: [committed] libstdc++: Add pretty printer for std::error_code and std::error_condition

2021-08-17 Thread Jonathan Wakely via Gcc-patches
On Tue, 17 Aug 2021 at 14:27, Jonathan Wakely wrote: > > Signed-off-by: Jonathan Wakely > > libstdc++-v3/ChangeLog: > > * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define. > (build_libstdcxx_dictionary): Register printer for > std::error_code and std::error_con

Re: Better memory statistics, take 2

2021-08-17 Thread David Malcolm via Gcc-patches
On Tue, 2021-08-17 at 11:17 +0200, Thomas Schwinge wrote: > Hi! > > On 2004-09-02T18:47:01+0200, Jan Hubicka wrote: > > *** ggc-common.c  9 Aug 2004 20:19:29 -   1.88 > > --- ggc-common.c  2 Sep 2004 16:08:50 - > > > + /* When set, ggc_collect will do collection.  */ > > + bo

[committed] libstdc++: Only define basic_string::contains for C++23

2021-08-17 Thread Jonathan Wakely via Gcc-patches
The new contains member of the COW string is defined for non-strict gnu++20 mode as well as for C++23 modes. I think that was left in the committed patch unintentionally. It is inconsistent with the SSO string, and doesn't actually compile because it uses the basic_string_view::contains member whic

[committed] libstdc++: Rename __detail::__not_same_as helper

2021-08-17 Thread Jonathan Wakely via Gcc-patches
This is done to match an editorial change in the working draft, to rename the exposition-only not-same-as helper to different-from. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/ranges_util.h (__not_same_as): Rename to __different_from. * include/

[committed] libstdc++: Add conditional noexcept to std::exchange

2021-08-17 Thread Jonathan Wakely via Gcc-patches
This is not required by the standard, but seems useful. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/std/utility (exchange): Add noexcept-specifier. * testsuite/20_util/exchange/noexcept.cc: New test. Tested powerpc64le-linux. Committed to trunk. commit 42c

[PATCH] move x86 to use gather/scatter internal functions

2021-08-17 Thread Richard Biener via Gcc-patches
This is an attempt to start moving the x86 backend to use standard pattern names for [mask_]gather_load and [mask_]scatter_store rather than using the builtin_{gather,scatter} target hooks. I've started with AVX2 gathers and given x86 only supports masked gather I only implemented mask_gather_load

[committed] libstdc++: Add pretty printer for std::error_code and std::error_condition

2021-08-17 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define. (build_libstdcxx_dictionary): Register printer for std::error_code and std::error_condition. * testsuite/libstdc++-prettyprinters/cxx11.cc: Test

Re: [PATCH] commit-mklog: Add --co argument.

2021-08-17 Thread Martin Liška
On 8/17/21 2:59 PM, Martin Liška wrote: with --trailer='Signed-off-by=Mona Lisa Octocat '. This should be of course: --trailer='Co-Authored-By=Mona Lisa Octocat '

Re: Valgrind '--show-leak-kinds=all'

2021-08-17 Thread Thomas Schwinge
Hi! On 2021-08-06T17:10:36+0200, Richard Biener wrote: > On August 6, 2021 4:09:37 PM GMT+02:00, Thomas Schwinge > wrote: >>I'm working on plugging a memory leak in an entirely different >>compartment of GCC, but also ran into this issue: >> >>On 2021-02-12T08:35:52+0100, Richard Biener via Gcc

[PATCH] commit-mklog: Add --co argument.

2021-08-17 Thread Martin Liška
The argument can be used for addition of Co-Authored-By lines with --trailer='Signed-off-by=Mona Lisa Octocat '. Thoughts? Thanks, Martin contrib/ChangeLog: * gcc-git-customization.sh: Wrap $@ in quotes. * git-commit-mklog.py: Add new argument --co. * mklog.py: Skip the

Fortran: Implement OpenMP 5.1 scope construct (was: Re: openmp: Implement OpenMP 5.1 scope construct)

2021-08-17 Thread Tobias Burnus
On 17.08.21 09:47, Jakub Jelinek wrote: This patch implements the OpenMP 5.1 scope construct, which is similar to worksharing constructs in many regards, but isn't one of them. And the attached patch does the same for Fortran. I took the opportunity to convert some additional C/C++ testcases t

Re: [PATCH] Revert "Add the member integer_to_sse to processor_cost as a cost simulation for movd/pinsrd. It will be used to calculate the cost of vec_construct."

2021-08-17 Thread H.J. Lu via Gcc-patches
On Tue, Aug 17, 2021 at 5:43 AM liuhongt via Gcc-patches wrote: > > This reverts commit 872da9a6f664a06d73c987aa0cb2e5b830158a10. > > PR target/101936 > PR target/101929 > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} > Pushed to master. > I proposed a different approach earlier.

[PATCH] Revert "Add the member integer_to_sse to processor_cost as a cost simulation for movd/pinsrd. It will be used to calculate the cost of vec_construct."

2021-08-17 Thread liuhongt via Gcc-patches
This reverts commit 872da9a6f664a06d73c987aa0cb2e5b830158a10. PR target/101936 PR target/101929 Bootstrapped and regtested on x86_64-linux-gnu{-m32,} Pushed to master. --- gcc/config/i386/i386.c | 6 +- gcc/config/i386/i386.h | 1 - gcc/config/i386/x8

Re: ipa-modref: merge flags when adding escape

2021-08-17 Thread Alexandre Oliva
On Aug 11, 2021, Jan Hubicka wrote: > This is improved patch Thanks for the proper fix! -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply

Re: move unreachable user labels to entry point

2021-08-17 Thread Alexandre Oliva
On Jul 13, 2021, Richard Biener wrote: > The right OMP region suggests something wrt correctness Yeah, as Jakub wrote, we have to choose a block that's in the same region the label belongs to. The proposed patch doesn't change that, it just uses the entry block instead of the previous block, if

Re: don't access cfun in dump_function_to_file

2021-08-17 Thread Alexandre Oliva
On Jul 28, 2021, Richard Biener wrote: > OK. Thanks, I've finally put this in as well. >> * tree-cfg.c (dump_function_to_file): Use fun, not cfun. -- Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Enginee

Re: retain debug stmt order when moving to successors

2021-08-17 Thread Alexandre Oliva
On Jul 28, 2021, Richard Biener wrote: > OK. Thanks, I've finally put this in. Sorry about the delay. > On Wed, Jul 28, 2021 at 10:12 AM Alexandre Oliva wrote: >> * tree-inline.c (maybe_move_debug_stmts_to_successors): Don't >> reverse debug stmts. -- Alexandre Oliva, happy hacker

[PATCH] c++, v3: Implement P0466R5 __cpp_lib_is_layout_compatible compiler helpers [PR101539]

2021-08-17 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 16, 2021 at 03:57:21PM -0400, Jason Merrill wrote: > > +static tree > > +is_corresponding_member_aggr (location_t loc, tree basetype1, tree > > membertype1, > > + tree arg1, tree basetype2, tree membertype2, > > + tree arg2) > > +{ > > +

Re: [PATCH] Improved handling of MULT_EXPR in bit CCP.

2021-08-17 Thread Richard Biener via Gcc-patches
On Mon, Aug 9, 2021 at 10:13 AM Roger Sayle wrote: > > > This patch allows GCC to constant fold (i | (i<<16)) | ((i<<24) | (i<<8)), > where i is an unsigned char, or the equivalent (i*65537) | (i*16777472), to > i*16843009. The trick is to teach tree_nonzero_bits which bits may be > set in the re

[ping][vect-patterns][RFC] Refactor widening patterns to allow internal_fn's

2021-08-17 Thread Joel Hutton via Gcc-patches
Ping. Is there still interest in refactoring vect-patterns to internal_fn's? > -Original Message- > From: Joel Hutton > Sent: 07 June 2021 14:30 > To: gcc-patches@gcc.gnu.org > Cc: Richard Biener ; Richard Sandiford > > Subject: [vect-patterns][RFC] Refactor widening patterns to allow >

Re: Better memory statistics, take 2

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 11:18 AM Thomas Schwinge wrote: > > Hi! > > On 2004-09-02T18:47:01+0200, Jan Hubicka wrote: > > *** ggc-common.c 9 Aug 2004 20:19:29 - 1.88 > > --- ggc-common.c 2 Sep 2004 16:08:50 - > > > + /* When set, ggc_collect will do collection. */ > > + boo

Re: [PATCH] Improved handling of MINUS_EXPR in bit CCP.

2021-08-17 Thread Richard Biener via Gcc-patches
On Thu, Aug 12, 2021 at 11:52 AM Roger Sayle wrote: > > > This patch improves the bit bounds for MINUS_EXPR during tree-ssa's > conditional constant propagation (CCP) pass (and as an added bonus > adds support for POINTER_DIFF_EXPR). > > The pessimistic assumptions made by the current algorithm ar

Re: [PATCH] aarch64: Replace some uses of GET_CODE with RTL predicate macros

2021-08-17 Thread Richard Sandiford via Gcc-patches
Sorry for the slow reply. Alistair Lee via Gcc-patches writes: > Hi all, this patch changed some RTL nodes to appropriate macros in Aarch64.c > backend using a script. Would this be okay for trunk? > > > Also, this is my first contribution, and I do not yet have commit > rights, so if everything

Re: [PATCH] Couple of debug dump improvements to scheduler (no code-gen changes)

2021-08-17 Thread Maxim Kuvyrkov via Gcc-patches
Hi Jeff, I've forgotten to commit these patches when they were approved 2 years ago. They still apply cleanly to the current mainline and I've retested them (bootstrap+regtest) on aarch64-linux-gnu and arm-linux-gnueabihf with no regressions. I'll commit these shortly. Regards, On Fri, 30 Aug

Re: [PR91598] Improve autoprefetcher heuristic in haifa-sched.c

2021-08-17 Thread Maxim Kuvyrkov via Gcc-patches
Hi All, I've forgotten to commit this patch when it was approved 2 years ago. It still applies cleanly to the current mainline and I've retested it (bootstrap+regtest) on aarch64-linux-gnu and arm-linux-gnueabihf with no regressions. I'll commit this shortly. Regards, On Tue, 3 Sept 2019 at 19

Re: [PATCH] Do not enable DT_INIT_ARRAY/DT_FINI_ARRAY on uclinuxfdpiceabi

2021-08-17 Thread Richard Sandiford via Gcc-patches
Christophe LYON via Gcc-patches writes: > ping? > > > On 12/08/2021 17:29, Christophe Lyon via Gcc-patches wrote: >> Commit r12-1328 enabled DT_INIT_ARRAY/DT_FINI_ARRAY for all Linux >> targets, but this does not work for arm-none-uclinuxfdpiceabi: it >> makes all the execution tests fail. >> >> T

[committed] Special case -TYPE_MIN_VALUE for flag_wrapv in operator_abs::op1_range.

2021-08-17 Thread Aldy Hernandez via Gcc-patches
From: Andrew MacLeod With flag_wrapv, -TYPE_MIN_VALUE = TYPE_MIN_VALUE which is unrepresentable. We currently special case this in the ABS folding routine, but are missing similar treatment in operator_abs::op1_range. Tested on x86-64 Linux. Aldy [p.s. Thanks to Andrew for fixing this. --aut

[PATCH] tree-optimization/101868 - avoid PRE of trapping mems across calls

2021-08-17 Thread Richard Biener via Gcc-patches
This backports a fix for the omission of a check of trapping mems when hoisting them across calls that might not return. This was originally done as part of a fix to handle const functions that throw properly. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to the GCC 11 branch. 2021

[PATCH v2] Fix incomplete computation in fill_always_executed_in_1

2021-08-17 Thread Xionghu Luo via Gcc-patches
On 2021/8/17 15:12, Richard Biener wrote: > On Tue, 17 Aug 2021, Xionghu Luo wrote: > >> Hi, >> >> On 2021/8/16 19:46, Richard Biener wrote: >>> On Mon, 16 Aug 2021, Xiong Hu Luo wrote: >>> It seems to me that ALWAYS_EXECUTED_IN is not computed correctly for nested loops. inn_loop is

Re: Better memory statistics, take 2

2021-08-17 Thread Thomas Schwinge
Hi! On 2004-09-02T18:47:01+0200, Jan Hubicka wrote: > *** ggc-common.c 9 Aug 2004 20:19:29 - 1.88 > --- ggc-common.c 2 Sep 2004 16:08:50 - > + /* When set, ggc_collect will do collection. */ > + bool ggc_force_collect; > *** void dump_ggc_loc_statistics (voi

[PATCH] [i386] Add x86 tune to enable v2df vector reduction by paddpd.

2021-08-17 Thread liuhongt via Gcc-patches
Hi: This patch add a new x86 tune named X86_TUNE_V2DF_REDUCTION_PREFER_HADDPD to enable haddpd for v2df vector reduction, the tune is disabled by default. Bootstrapped and regtested on x86_64-linux-gnu{-m32,} Ok for trunk? gcc/ChangeLog: PR target/97147 * config/i386/i386.h

Re: [PATCH 3/3] aarch64: Remove macros for vld4[q]_lane Neon intrinsics

2021-08-17 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch removes macros for vld4[q]_lane Neon intrinsics. This is a > preparatory step before adding new modes for structures of Advanced > SIMD vectors. > > Regression tested and bootstrapped on aarch64-none-linux-gnu - no > issues. > > Ok for master? OK, than

Re: [PATCH 2/3] aarch64: Remove macros for vld3[q]_lane Neon intrinsics

2021-08-17 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch removes macros for vld3[q]_lane Neon intrinsics. This is a > preparatory step before adding new modes for structures of Advanced > SIMD vectors. > > Regression tested and bootstrapped on aarch64-none-linux-gnu - no > issues. > > Ok for master? OK, than

Re: [PATCH 1/3] aarch64: Remove macros for vld2[q]_lane Neon intrinsics

2021-08-17 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > This patch removes macros for vld2[q]_lane Neon intrinsics. This is a > preparatory step before adding new modes for structures of Advanced > SIMD vectors. > > Regression tested and bootstrapped on aarch64-none-linux-gnu - no > issues. > > Ok for master? OK, than

Re: [committed] Introduce selftest::locate_file (v5)

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 9:01 AM Thomas Schwinge wrote: > > Hi! > > On 2016-12-14T21:31:05-0500, David Malcolm wrote: > > On Wed, 2016-12-14 at 15:02 +0100, Bernd Schmidt wrote: > >> On 12/09/2016 08:32 PM, David Malcolm wrote: > >> > Thanks. Unfortunately, applying the "locate_file" patch > >> >

Re: Expensive selftests (was: 'hash_map>')

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 8:40 AM Thomas Schwinge wrote: > > Hi! > > On 2021-08-16T14:10:00-0600, Martin Sebor wrote: > > On 8/16/21 6:44 AM, Thomas Schwinge wrote: > >> [...], to document the current behavior, I propose to > >> "Add more self-tests for 'hash_map' with Value type with non-trivial >

Re: [PATCH] more warning code refactoring

2021-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 17, 2021 at 3:52 AM Martin Sebor via Gcc-patches wrote: > > The attached patch continues with the move of warning code from > builtins.c and calls.c into a more suitable home. As before, it > is mostly free of functional changes. The one exception is that > as pleasant a side-effect,

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Richard Biener via Gcc-patches
On Mon, 16 Aug 2021, Qing Zhao wrote: > > > > On Aug 16, 2021, at 2:40 AM, Richard Biener wrote: > > > > On Thu, 12 Aug 2021, Qing Zhao wrote: > > > >> Hi, Richard, > >> > >> For RTL expansion of call to .DEFERRED_INIT, I changed my code per your > >> suggestions like following: > >> > >>

[PATCH] Use __builtin_trap() for abort() if inhibit_libc

2021-08-17 Thread Sebastian Huber
abort() is used in gcc_assert() and gcc_unreachable() which is used by target libraries such as libgcov.a. This patch changes the abort() definition under certain conditions. If inhibit_libc is defined and abort is not already defined, then abort() is defined to __builtin_trap(). The inhibit_lib

[PATCH] Optimize seed_seq construction

2021-08-17 Thread Antony Polukhin via Gcc-patches
When std::seed_seq is constructed from random access iterators we can detect the internal vector size in O(1). Reserving memory for elements in such cases may avoid multiple memory allocations. libstdc++-v3/ChangeLog: * include/bits/random.tcc: Optimize seed_seq construction. -- Best re

Re: [patch][version 6] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-08-17 Thread Richard Biener via Gcc-patches
On Mon, 16 Aug 2021, Qing Zhao wrote: > My current code for expand_DEFERRED_INIT is like the following, could you > check and see whether there is any issue for it: > > #define INIT_PATTERN_VALUE 0xFE > static void > expand_DEFERRED_INIT (internal_fn, gcall *stmt) > { > tree lhs = gimple_call

Re: [PATCH] libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]

2021-08-17 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 16, 2021 at 06:07:57PM -0400, Jason Merrill wrote: > > It is unclear if it would be enough > > to remove just one or if all padding tokens should be removed. > > Anyway, e.g. the previous removal of all padding tokens at the end of > > __VA_OPT__ is undesirable, as it e.g. eats also the

Re: [Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under -ffast-math on aarch64

2021-08-17 Thread Richard Biener via Gcc-patches
On Mon, Aug 16, 2021 at 8:48 PM Andrew Pinski via Gcc-patches wrote: > > On Mon, Aug 16, 2021 at 9:15 AM Jirui Wu via Gcc-patches > wrote: > > > > Hi all, > > > > This patch generates FRINTZ instruction to optimize type casts. > > > > The changes in this patch covers: > > * Opimization of a FIX_T

  1   2   >