Re: [3/3][aarch64] Add support for vec_widen_shift pattern

2020-11-13 Thread Richard Biener
On Thu, 12 Nov 2020, Joel Hutton wrote: > Hi all, > > This patch adds support in the aarch64 backend for the vec_widen_shift > vect-pattern and makes a minor mid-end fix to support it. > > All 3 patches together bootstrapped and regression tested on aarch64. > > Ok for stage 1? diff --git a/g

Re: Detect EAF flags in ipa-modref

2020-11-13 Thread Richard Biener
On Tue, 10 Nov 2020, Jan Hubicka wrote: > Hi, > here is updaed patch. > > Honza > > Bootstrapped/regtested x86_64-linux, OK (after the fnspec fixes)? OK. Thanks, Richard. > > 2020-11-10 Jan Hubicka > > * gimple.c: Include ipa-modref-tree.h and ipa-modref.h. > (gimple_call_arg

[00/23] Make fwprop use an on-the-side RTL SSA representation

2020-11-13 Thread Richard Sandiford via Gcc-patches
Just after GCC 10 stage 1 closed (oops), I posted a patch to add a new combine pass. One of its main aims was to allow instructions to move around where necessary in order to make a combination possible. It also tried to parallelise instructions that use the same resource. That pass contained its

[01/23] vec: Silence clang warning

2020-11-13 Thread Richard Sandiford via Gcc-patches
I noticed during compatibility testing that clang warns that this operator won't be implicitly const in C++14 onwards. gcc/ * vec.h (vnull::operator vec): Make const. --- gcc/vec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/vec.h b/gcc/vec.h index 14d77e87342.

[03/23] reginfo: Add a global_reg_set

2020-11-13 Thread Richard Sandiford via Gcc-patches
A later patch wants to use the set of global registers as a HARD_REG_SET rather than a bool/char array. Most other arrays already have a HARD_REG_SET counterpart, but this one didn't. gcc/ * hard-reg-set.h (global_reg_set): Declare. * reginfo.c (global_reg_set): New variable.

[02/23] rtlanal: Remove noop_move_p REG_EQUAL condition

2020-11-13 Thread Richard Sandiford via Gcc-patches
noop_move_p currently keeps any instruction that has a REG_EQUAL note, on the basis that the equality might be useful in future. But this creates a perverse incentive not to add potentially-useful REG_EQUAL notes, in case they prevent an instruction from later being removed as dead. The condition

[04/23] Move iterator_range to a new iterator-utils.h file

2020-11-13 Thread Richard Sandiford via Gcc-patches
A later patch will add more iterator-related utilities. Rather than putting them all directly in coretypes.h, it seemed better to add a new header file, here called "iterator-utils.h". This preliminary patch moves the existing iterator_range class there too. I used the same copyright date range

[05/23] Add more iterator utilities

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds some more iterator helper classes. They really fall into two groups, but there didn't seem much value in separating them: - A later patch has a class hierarchy of the form: Base +- Derived1 +- Derived2 A class wants to store an array A1 of Derived1 pointers an

[07/23] Add a class that multiplexes two pointer types

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds a pointer_mux class that provides similar functionality to: union { T1 *a; T2 *b; }; ... bool is_b_rather_than_a; except that the is_b_rather_than_a tag is stored in the low bit of the pointer. See the comments in the patch for a comparison between the two approaches

[06/23] Add an RAII class for managing obstacks

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds an RAII class for managing the lifetimes of objects on an obstack. See the comments in the patch for more details and example usage. gcc/ * obstack-utils.h: New file. --- gcc/obstack-utils.h | 86 + 1 file changed, 86 insertions

[08/23] Add an alternative splay tree implementation

2020-11-13 Thread Richard Sandiford via Gcc-patches
We already have two splay tree implementations: the old C one in libiberty and a templated reimplementation of it in typed-splay-tree.h. However, they have some drawbacks: - They hard-code the assumption that nodes should have both a key and a value, which isn't always true. - They use the two-

[09/23] Add a cut-down version of std::span (array_slice)

2020-11-13 Thread Richard Sandiford via Gcc-patches
A later patch wants to be able to pass around subarray views of an existing array. The standard class to do that is std::span, but it's a C++20 thing. This patch just adds a cut-down version of it. The intention is just to provide what's currently needed. gcc/ * vec.h (array_slice): New

[11/23] Split update_cfg_for_uncondjump out of combine

2020-11-13 Thread Richard Sandiford via Gcc-patches
Later patches want to reuse combine's update_cfg_for_uncondjump, so this patch makes it a public cfgrtl.c function. gcc/ * cfgrtl.h (update_cfg_for_uncondjump): Declare. * combine.c (update_cfg_for_uncondjump): Move to... * cfgrtl.c: ...here. --- gcc/cfgrtl.c | 47 +++

[10/23] Tweak the way that is_a is implemented

2020-11-13 Thread Richard Sandiford via Gcc-patches
At the moment, class hierarchies that use is_a are expected to define specialisations like: template <> template <> inline bool is_a_helper ::test (symtab_node *p) { return p->type == SYMTAB_FUNCTION; } But this doesn't scale well to larger hierarchies, because it only defines ::t

[12/23] Export print-rtl.c:print_insn_with_notes

2020-11-13 Thread Richard Sandiford via Gcc-patches
Later patches want to use print_insn_with_notes (printing to a pretty_printer). This patch exports it from print-rtl.c. The non-notes version is already public. gcc/ * print-rtl.h (print_insn_with_notes): Declare. * print-rtl.c (print_insn_with_notes): Make non-static --- gcc/pr

[13/23] recog: Split out a register_asm_p function

2020-11-13 Thread Richard Sandiford via Gcc-patches
verify_changes has a test for whether a particular hard register is a user-defined register asm. A later patch needs to test the same thing, so this patch splits it out into a helper. gcc/ * rtl.h (register_asm_p): Declare. * recog.c (verify_changes): Split out the test for whethe

Re: [PATCH V2] Clean up loop-closed PHIs after loop finalize

2020-11-13 Thread Richard Biener
On Wed, 11 Nov 2020, Jiufu Guo wrote: > > Thanks a lot for the sugguestion from previous mails. > The patch was updated accordingly. > > This updated patch propagates loop-closed PHIs them out after > loop_optimizer_finalize under a new introduced flag. At some cases, > to clean up loop-closed

[14/23] simplify-rtx: Put simplify routines into a class

2020-11-13 Thread Richard Sandiford via Gcc-patches
One of the recurring warts of RTL is that multiplication by a power of 2 is represented as a MULT inside a MEM but as an ASHIFT outside a MEM. It would obviously be better if we didn't have this kind of context sensitivity, but it would be difficult to remove. Currently the simplify-rtx.c routine

[15/23] recog: Add a validate_change_xveclen function

2020-11-13 Thread Richard Sandiford via Gcc-patches
A later patch wants to be able to use the validate_change machinery to reduce the XVECLEN of a PARALLEL. This should be more efficient than allocating a separate PARALLEL at a possibly distant memory location, especially since the new PARALLEL would be garbage rtl if the new pattern turns out not

[16/23] recog: Add a way of temporarily undoing changes

2020-11-13 Thread Richard Sandiford via Gcc-patches
In some cases, it can be convenient to roll back the changes that have been made by validate_change to see how things looked before, then reroll the changes. For example, this makes it possible to defer calculating the cost of an instruction until we know that the result is actually needed. It ca

[17/23] recog: Add a class for propagating into insns

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds yet another way of propagating into an instruction and simplifying the result. (The net effect of the series is to keep the total number of propagation approaches the same though, since a later patch removes the fwprop.c routines.) One of the drawbacks of the validate_replace_* ro

[18/23] recog: Add an RAII class for undoing insn changes

2020-11-13 Thread Richard Sandiford via Gcc-patches
When using validate_change to make a group of changes, you have to remember to cancel them if something goes wrong. This patch adds an RAII class to make that easier. See the comments in the patch for details and examples. gcc/ * recog.h (insn_change_watermark): New class. --- gcc/recog

[19/23] rtlanal: Add some new helper classes

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds some classes for gathering the list of registers and memory that are read and written by an instruction, along with various properties about the accesses. In some ways it's similar to the information that DF collects for registers, but extended to memory. The main reason for using

[21/23] doc: Add documentation for rtl-ssa

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds some documentation to rtl.texi about the SSA form. It only really describes the high-level structure -- I think for API-level stuff it's better to rely on function comments instead. gcc/ * doc/rtl.texi (RTL SSA): New node. --- gcc/doc/rtl.texi | 787 +++

[20/23] rtlanal: Add simple_regno_set

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch adds a routine for finding a “simple” SET for a register definition. See the comment in the patch for details. gcc/ * rtl.h (simple_regno_set): Declare. * rtlanal.c (simple_regno_set): New function. --- gcc/rtl.h | 1 + gcc/rtlanal.c | 33 +

[PATCH 23/23] fwprop: Rewrite to use RTL SSA

2020-11-13 Thread Richard Sandiford via Gcc-patches
This patch rewrites fwprop.c to use the RTL SSA framework. It tries as far as possible to mimic the old behaviour, even in caes where that doesn't fit naturally with the new framework. I've added ??? comments to mark those places, but I think “fixing” them should be done separately to make bisect

[r10-9014 Regression] FAIL: std/ranges/iota/96042.cc (test for excess errors) on Linux/x86_64

2020-11-13 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 8eb9a45e87bdb81cb44948c651edee846c622a0f is the first bad commit commit 8eb9a45e87bdb81cb44948c651edee846c622a0f Author: Jonathan Wakely Date: Wed Aug 19 16:27:25 2020 +0100 libstdc++: Make __int128 meet integer-class requirements [PR 96042] caused FAIL: std/ranges/iota/

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-13 Thread Richard Biener via Gcc-patches
On Thu, Mar 12, 2020 at 1:41 AM J.W. Jagersma via Gcc-patches wrote: > > The following patch extends the generation of exception handling > information, so that it is possible to catch exceptions thrown from > volatile asm statements, when -fnon-call-exceptions is enabled. Parts > of the gcc code

Re: [PATCH v3 1/2] generate EH info for volatile asm statements (PR93981)

2020-11-13 Thread Richard Biener via Gcc-patches
On Thu, Nov 12, 2020 at 4:53 PM Jeff Law via Gcc-patches wrote: > > > On 3/11/20 6:38 PM, J.W. Jagersma via Gcc-patches wrote: > > The following patch extends the generation of exception handling > > information, so that it is possible to catch exceptions thrown from > > volatile asm statements, w

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Richard Biener via Gcc-patches
On Thu, Nov 12, 2020 at 8:55 PM Vladimir Makarov via Gcc-patches wrote: > >The following patch implements asm goto with outputs. Kernel > developers several times expressed wish to have this feature. Asm > goto with outputs was implemented in LLVM recently. This new feature > was presented o

Re: Fix gimple_expr_code?

2020-11-13 Thread Richard Biener via Gcc-patches
On Thu, Nov 12, 2020 at 10:12 PM Andrew MacLeod wrote: > On 11/12/20 3:53 PM, Richard Biener wrote: > > On November 12, 2020 9:43:52 PM GMT+01:00, Andrew MacLeod via > Gcc-patches wrote: > >> So I spent some time tracking down a ranger issue, and in the end, it > >> boiled down to the range-op h

Re: [gcc r9-8794] aarch64: Clear canary value after stack_protect_test [PR96191]

2020-11-13 Thread Richard Sandiford via Gcc-patches
Sebastian Pop writes: > Hi, > > On Fri, Aug 7, 2020 at 6:18 AM Richard Sandiford wrote: >> >> https://gcc.gnu.org/g:5380912a17ea09a8996720fb62b1a70c16c8f9f2 >> >> commit r9-8794-g5380912a17ea09a8996720fb62b1a70c16c8f9f2 >> Author: Richard Sandiford >> Date: Fri Aug 7 12:17:37 2020 +0100 > > co

Re: [PATCH] rs6000: Don't split constant operator add before reload, move to temp register for future optimization

2020-11-13 Thread Xionghu Luo via Gcc-patches
Hi, On 2020/10/27 05:10, Segher Boessenkool wrote: > On Wed, Oct 21, 2020 at 03:25:29AM -0500, Xionghu Luo wrote: >> Don't split code from add3 for SDI to allow a later pass to split. > > This is very problematic. > >> This allows later logic to hoist out constant load in add instructions. > >

RE: Enable MOVDIRI, MOVDIR64B, CLDEMOTE and WAITPKG for march=tremont

2020-11-13 Thread Cui, Lili via Gcc-patches
Hi Uros, This patch is to correct previous patch, PREFETCHW should be both in march=broadwell and march=Silvermont, but I move PREFETCHW from march=broadwell to march=silvermont in previous patch, sorry for that. Bootstrap is ok, and no regressions for i386/x86-64 testsuite. OK for master? [P

Re: [PATCH] Put absolute address jump table in data.rel.ro.local if targets support relocations

2020-11-13 Thread Richard Sandiford via Gcc-patches
Hi, Sorry for the slow reply. Just one minor nit: HAO CHEN GUI writes: > diff --git a/gcc/varasm.c b/gcc/varasm.c > index ea0b59cf44a..40502049b61 100644 > --- a/gcc/varasm.c > +++ b/gcc/varasm.c > @@ -727,12 +727,26 @@ switch_to_other_text_partition (void) >switch_to_section (current_funct

Re: Enable MOVDIRI, MOVDIR64B, CLDEMOTE and WAITPKG for march=tremont

2020-11-13 Thread Uros Bizjak via Gcc-patches
On Fri, Nov 13, 2020 at 10:18 AM Cui, Lili wrote: > > Hi Uros, > > This patch is to correct previous patch, > PREFETCHW should be both in march=broadwell and march=Silvermont, > but I move PREFETCHW from march=broadwell to march=silvermont in previous > patch, sorry for that. > > Bootstrap is ok,

Re: [1/3][aarch64] Add aarch64 support for vec_widen_add, vec_widen_sub patterns

2020-11-13 Thread Richard Sandiford via Gcc-patches
Joel Hutton via Gcc-patches writes: > Hi all, > > This patch adds backend patterns for vec_widen_add, vec_widen_sub on aarch64. > > All 3 patches together bootstrapped and regression tested on aarch64. > > Ok for stage 1? > > gcc/ChangeLog: > > 2020-11-12  Joel Hutton   > >         * config/aarch6

Re: [3/3][aarch64] Add support for vec_widen_shift pattern

2020-11-13 Thread Richard Sandiford via Gcc-patches
Joel Hutton via Gcc-patches writes: > Hi all, > > This patch adds support in the aarch64 backend for the vec_widen_shift > vect-pattern and makes a minor mid-end fix to support it. > > All 3 patches together bootstrapped and regression tested on aarch64. > > Ok for stage 1? > > gcc/ChangeLog: > >

RE: [PATCH] aarch64: Make use of RTL predicates

2020-11-13 Thread Kyrylo Tkachov via Gcc-patches
Hi Andrea, > -Original Message- > From: Andrea Corallo > Sent: 10 November 2020 13:26 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; nd > Subject: [PATCH] aarch64: Make use of RTL predicates > > Hi all, > > I'd like to propose this patch to make use of RTL pr

[PATCH] remove almost all users of gimple_expr_code

2020-11-13 Thread Richard Biener
This replaces the old-school gimple_expr_code with more selective functions throughout the compiler, in all cases making the code shorter or more clear. Bootstrapped / tested on x86_64-unknown-linux-gnu, pushed. 2020-11-13 Richard Biener * cfgexpand.c (gimple_assign_rhs_to_tree): Use

RE: [PATCH] aarch64: Add backend support for expanding __builtin_memset

2020-11-13 Thread Sudakshina Das via Gcc-patches
Hi Richard > -Original Message- > From: Richard Sandiford > Sent: 11 November 2020 17:52 > To: Sudakshina Das > Cc: Wilco Dijkstra ; gcc-patches@gcc.gnu.org; > Kyrylo Tkachov ; Richard Earnshaw > > Subject: Re: [PATCH] aarch64: Add backend support for expanding > __builtin_memset > > S

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 12/11/20 23:49 +, Jonathan Wakely wrote: To poll a std::future to see if it's ready you have to call one of the timed waiting functions. The most obvious way is wait_for(0s) but this was previously very inefficient because it would turn the relative timeout to an absolute one by calling sy

Re: [PATCH] aarch64: Make use of RTL predicates

2020-11-13 Thread Richard Sandiford via Gcc-patches
Andrea Corallo via Gcc-patches writes: > Hi all, > > I'd like to propose this patch to make use of RTL predicates into the > AArch64 back-end where possible. Nice cleanup :-) > Bootstrapped and regtested on aarch64-unknown-linux-gnu. > > Okay for trunk? OK, thanks. Richard

[PATCH] libstdc++: Fix error shown during Solaris build

2020-11-13 Thread Jonathan Wakely via Gcc-patches
Currently this is shown when building libstdc++ on Solaris: -lrt: open: No such file or directory The error comes from the make_sunver.pl script which tries to open each of its arguments. The arguments are passed by this make rule: perl ${glibcxx_srcdir}/scripts/make_exports.pl \

Re: [PATCH] libstdc++: Fix error shown during Solaris build

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 11:07 +, Jonathan Wakely wrote: Currently this is shown when building libstdc++ on Solaris: -lrt: open: No such file or directory The error comes from the make_sunver.pl script which tries to open each of its arguments. The arguments are passed by this make rule: perl $

Re: [PATCH] libstdc++: Fix error shown during Solaris build

2020-11-13 Thread Iain Sandoe via Gcc-patches
Jonathan Wakely wrote: On 13/11/20 11:07 +, Jonathan Wakely wrote: Currently this is shown when building libstdc++ on Solaris: -lrt: open: No such file or directory The error comes from the make_sunver.pl script which tries to open each of its arguments. The arguments are passed by this

[PATCH] tree-optimization/97812 - fix range query in VRP assert discovery

2020-11-13 Thread Richard Biener
This makes sure to properly extend the input range before seeing whether it fits the target. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2020-11-13 Richard Biener PR tree-optimization/97812 * tree-vrp.c (register_edge_assert_for_2): Extend the range ac

Re: [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-13 Thread Jozef Lawrynowicz
On Thu, Nov 12, 2020 at 02:41:52PM -0800, H.J. Lu wrote: > diff --git a/gcc/varasm.c b/gcc/varasm.c > index 435c7b348a5..c48ef9692ee 100644 > --- a/gcc/varasm.c > +++ b/gcc/varasm.c > @@ -289,6 +289,10 @@ get_section (const char *name, unsigned int flags, tree > decl, >slot = section_htab->fin

[committed] [OG10] Backport OpenMP 5.0 features from master

2020-11-13 Thread Kwok Cheung Yeung
Hello I have backported a couple of patches related to OpenMP 5.0 features from master to the devel/omp/gcc-10 branch. These are: 8949b985dbaf07d433bd57d2883e1e5414f20e75: openmp: Add support for the omp_get_supported_active_levels runtime library routine 445567b22a3c535be0b1861b393e9a0b050

Re: [2/3][vect] Add widening add, subtract vect patterns

2020-11-13 Thread Richard Sandiford via Gcc-patches
[ There was a discussion on irc about how easy it would be to support internal functions and tree codes at the same time, so the agreement was to go for tree codes for now with a promise to convert the widening-related code to use internal functions for GCC 12. ] Like Richard said, the new p

[pushed] doc : Fix build error from r11-4972.

2020-11-13 Thread Iain Sandoe
(aonther re-send, no sign of the message on patches archive) Hi As reported on irc, some tex tools don’t like @r{} commands being split. For the record, I tried a number of things to wrap the line: 1/ putting the @r{} on the line after the @item that didn't work - the (Objective-C and Object

Re: [PATCH] aarch64: Make use of RTL predicates

2020-11-13 Thread Andrea Corallo via Gcc-patches
Kyrylo Tkachov via Gcc-patches writes: > Hi Andrea, > >> -Original Message- >> From: Andrea Corallo >> Sent: 10 November 2020 13:26 >> To: gcc-patches@gcc.gnu.org >> Cc: Kyrylo Tkachov ; Richard Earnshaw >> ; nd >> Subject: [PATCH] aarch64: Make use of RTL predicates >> >> Hi all, >>

[PATCH][pushed] clang: fix -Wmisleading-indentation warning.

2020-11-13 Thread Martin Liška
gcc/c-family/c-attribs.c:4698:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] gcc/c-family/ChangeLog: * c-attribs.c (build_attr_access_from_parms): Format properly. --- gcc/c-family/c-attribs.c | 2 +- 1 file changed, 1 insertio

[RS6000] Use LIB2_SIDITI_CONV_FUNCS in place of ppc64-fp.c

2020-11-13 Thread Alan Modra via Gcc-patches
This patch retires ppc64-fp.c in favour of using "LIB2_SIDITI_CONV_FUNCS = yes", which is a lot better solution than having a copy of selected libgcc2.c functions. So for powerpc64-linux we see these changes in libgcc files (plus corresponding _s.o variants). +_fixdfti.o +_fixsfti.o +_fixtfti.o +_

[PATCH v2, OpenMP 5, C++] Implement implicit mapping of this[:1] (PR92120)

2020-11-13 Thread Chung-Lin Tang
Hi Jakub, there was a first version of this patch here: https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554087.html The attached patch here is a v2 version that adds implementation of this part in the this[:1] functionality description in the OpenMP 5.0 spec: "if the [member] variable

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-11-13 Thread Eduard-Mihai Burtescu
Hi everyone, Apologies again for the delay on my end, the past few weeks have been hectic and exhausting. The changes look good and pass the testing I was doing for my version of the patch. Feel free to commit Nikhil's latest patch for us. Thanks, - Eddy B. On Fri, Nov 13, 2020, at 08:42, Nik

Re: [22/32] miscelaneous c++ bits

2020-11-13 Thread Nathan Sidwell
On 11/3/20 4:16 PM, Nathan Sidwell wrote: This is probably the messiest diff. Let's break this diff apart a bit more, for digestibility. Here's the MODULE_VECTOR piece. This is a sparse array used for name lookup. A namespace symbol table entry may contain one of these, which holds the bi

V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-13 Thread H.J. Lu via Gcc-patches
On Fri, Nov 13, 2020 at 3:36 AM Jozef Lawrynowicz wrote: > > On Thu, Nov 12, 2020 at 02:41:52PM -0800, H.J. Lu wrote: > > diff --git a/gcc/varasm.c b/gcc/varasm.c > > index 435c7b348a5..c48ef9692ee 100644 > > --- a/gcc/varasm.c > > +++ b/gcc/varasm.c > > @@ -289,6 +289,10 @@ get_section (const cha

Re: [22.2/32] module flags

2020-11-13 Thread Nathan Sidwell
Here are the pieces of patch 22 that add new flag bits to tree nodes and lang_decl structs, along with a new global indicating what fragment of a module we may be processing. be aware that header-units, although part of the Global Module, are treated as-if they are named modules but with some

[committed] d: Explicitly determine which built-in copysign function to call.

2020-11-13 Thread Iain Buclaw via Gcc-patches
Hi, For some targets, mathfn_built_in returns NULL as copysign is not implicitly available, causing an ICE. Now copysign is explicitly requested when expanding the intrinsic. Bootstrapped and regression tested on x86_64-linux-gnu and x86_64-freebsd. Committed to mainline. As this fixes an ICE,

[committed] libphobos: Update libtool version to 2:0:0

2020-11-13 Thread Iain Buclaw via Gcc-patches
Hi, This patch bumps the libphobos soname to 2:0:0 so that the library is not to conflict with gcc-10. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- libphobos/ChangeLog: * configure: Regenerate. * configure.ac (libtool_VERSI

[committed] d: Fix ICE in finish_thunk (PR97644)

2020-11-13 Thread Iain Buclaw via Gcc-patches
Hi, Because this what the upstream reference compiler did, thunks for the D front-end were associated with the class definition, so were forced code-gen even if the target function was extern. This has now been changed so there are now only generated if there is a function definition, fixing the

[PING][PATCH] d: Add dragonflybsd support for D compiler and runtime

2020-11-13 Thread Iain Buclaw via Gcc-patches
Ping. CTFE math fixes have been committed to mainline in r11-4980. Excerpts from Iain Buclaw's message of October 29, 2020 3:22 pm: > Hi, > > This patch adds the necessary version conditions and configure rules in > place to allow building the D compiler on DragonFlyBSD. > > Running the testsui

[PATCH] improve VN PHI hashing

2020-11-13 Thread Richard Biener
This reduces the number of collisions for PHIs in the VN hashtable by always hashing the number of predecessors and separately hashing the block number when we never merge PHIs from different blocks. This improves collisions seen for the PR69609 testcase dramatically. Bootstrapped and tested on x

Re: [22.2/32] module flags

2020-11-13 Thread Richard Biener via Gcc-patches
On Fri, Nov 13, 2020 at 3:04 PM Nathan Sidwell wrote: > > Here are the pieces of patch 22 that add new flag bits to tree nodes and > lang_decl structs, along with a new global indicating what fragment of a > module we may be processing. > > be aware that header-units, although part of the Global M

Re: [PING][PATCH] d: Add dragonflybsd support for D compiler and runtime

2020-11-13 Thread Richard Biener via Gcc-patches
On Fri, Nov 13, 2020 at 3:18 PM Iain Buclaw via Gcc-patches wrote: > > Ping. > > CTFE math fixes have been committed to mainline in r11-4980. OK. > Excerpts from Iain Buclaw's message of October 29, 2020 3:22 pm: > > Hi, > > > > This patch adds the necessary version conditions and configure rule

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 4:00 a.m., Richard Biener wrote: On Thu, Nov 12, 2020 at 8:55 PM Vladimir Makarov via Gcc-patches wrote: The following patch implements asm goto with outputs. Kernel developers several times expressed wish to have this feature. Asm goto with outputs was implemented in LLVM

[PATCH] Cleanup range of address calculations.

2020-11-13 Thread Andrew MacLeod via Gcc-patches
There were some slight differences between when ranger would get non-zero for &expr and what EVRP was getting. Ive extracted the bits from vrp_stmt_computes_nonzero required and now the 2 versions should be aligned. Ive also renamed the function from the previously cryptic range_of_non_trivial

[committed] arm: Make use of RTL predicates

2020-11-13 Thread Andrea Corallo via Gcc-patches
Hi all, this is to fix missing uses of RTL predicates in the arm backend. Regtested and bootstraped on arm-linux-gnueabihf. Commited into master as 156edf21fab as pre-approved [1]. Andrea [1] >From 156edf21fab7dd5891c72d

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
On the contrary, as a user of GCC I would much prefer a consistent behavior for #pragma region based purely on GCC version. IE, so you can tell people: "just update to GCC X.Y and those warnings will go away" rather than: "update to GCC X.Y and pass some new flags - but make sure not

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread David Malcolm via Gcc-patches
On Fri, 2020-11-13 at 09:57 -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go away" > r

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 09:57:31AM -0500, Austin Morton via Gcc-patches wrote: > On the contrary, as a user of GCC I would much prefer a consistent > behavior for #pragma region based purely on GCC version. > > IE, so you can tell people: > "just update to GCC X.Y and those warnings will go aw

Re: [PATCH] c++: Don't form a templated TARGET_EXPR in finish_compound_literal

2020-11-13 Thread Patrick Palka via Gcc-patches
On Thu, 12 Nov 2020, Jason Merrill wrote: > On 11/12/20 1:27 PM, Patrick Palka wrote: > > The atom_cache in normalize_atom relies on the assumption that two > > equivalent (templated) trees (in the sense of cp_tree_equal) must use > > the same template parameters (according to find_template_parame

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Uros Bizjak via Gcc-patches
Hello! >The following patch implements asm goto with outputs. Kernel > developers several times expressed wish to have this feature. Asm > goto with outputs was implemented in LLVM recently. This new feature > was presented on 2020 linux plumbers conference > (https://linuxplumbersconf.org/e

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 13, 2020 at 04:51:09PM +0100, Uros Bizjak via Gcc-patches wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c > @@ -0,0 +1,14 @@ > +/* Check that LRA really puts output reloads for p4 in two successors blocks > */ > +/* { dg-do compile { target x86_64-*-* } }

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2020-11-13 Thread Jose E. Marchesi via Gcc-patches
> PING^7 on the following patch proposed 8 months ago for gcc11: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542198.html > > > The deadline for gcc11 stage 1 is approaching. The pinged patch is > one that has been se

Re: [22.2/32] module flags

2020-11-13 Thread Nathan Sidwell
On 11/13/20 9:27 AM, Richard Biener wrote: On Fri, Nov 13, 2020 at 3:04 PM Nathan Sidwell wrote: struct GTY(()) lang_decl_base { - /* Larger than necessary for faster access. */ - ENUM_BITFIELD(lang_decl_selector) selector : 16; + ENUM_BITFIELD(lang_decl_selector) selector : 3; ... +

[PATCH][pushed] testsuite: move expected error location

2020-11-13 Thread Martin Liška
Hello. One obvious fix of expected error location. Martin gcc/testsuite/ChangeLog: PR testsuite/97788 * g++.dg/ubsan/pr61272.C: Move expected error location. --- gcc/testsuite/g++.dg/ubsan/pr61272.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/te

Re: [1/3][aarch64] Add aarch64 support for vec_widen_add, vec_widen_sub patterns

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed the comment. > There are ways in which we could reduce the amount of cut-&-paste here, > but I guess everything is a trade-off between clarity and compactness. > One extreme is to write them all out explicitly, another extreme would > be to hav

[PATCH] Add 3 new EVRP testcases.

2020-11-13 Thread Andrew MacLeod via Gcc-patches
This patch adds 3 new evrp testcases which test some enhanced ranger functionality in EVRP. I pulled them from the old rvrp testsuite that was created when the ranger project was first started, and they are things EVRP didn't use to get. Andrew commit 0d1189b4e618517b62f938a94c722123cc0

Re: [PATCH] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
On 2020-11-13 10:51 a.m., Uros Bizjak wrote: diff --git a/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c new file mode 100644 index 000..8685ca2a1cb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/asmgoto-4.c @@ -0,0 +1,14 @@ +/

[PATCH] gcov: Add -fprofile-info-section support

2020-11-13 Thread Sebastian Huber
Register the profile information in the specified section instead of using a constructor/destructor. A pointer to the profile information generated by -fprofile-arcs or -ftest-coverage is placed in the specified section for each translation unit. This option disables the profile information regis

Re: [2/3][vect] Add widening add, subtract vect patterns

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed all the comments. > Like Richard said, the new patterns need to be documented in md.texi > and the new tree codes need to be documented in generic.texi. Done. > While we're using tree codes, I think we need to make the naming > consistent wit

Re: [3/3][aarch64] Add support for vec_widen_shift pattern

2020-11-13 Thread Joel Hutton via Gcc-patches
Tests are still running, but I believe I've addressed all the comments. > > +#include > > + > > SVE targets will need a: > > #pragma GCC target "+nosve" > > here, since we'll generate different code for SVE. Fixed. > > +/* { dg-final { scan-assembler-times "shll\t" 1} } */ > > +/* { dg-final

Re: [Patch 0/X] HWASAN v4

2020-11-13 Thread Matthew Malcomson via Gcc-patches
Hi there, Thanks for the heads-up. As it turns out the most recent `libhwasan` crashes when displaying an address on the stack in Linux. I'm currently working on getting it fixed here https://reviews.llvm.org/D91344#2393371 . If this hwasan patch series gets approved and if that patch goes in w

Re: [Patch 0/X] HWASAN v4

2020-11-13 Thread Martin Liška
On 11/13/20 5:57 PM, Matthew Malcomson wrote: Hi there, Thanks for the heads-up. As it turns out the most recent `libhwasan` crashes when displaying an address on the stack in Linux. Hello. What a bad luck. I'm currently working on getting it fixed here https://reviews.llvm.org/D91344#23

Re: [committed] libstdc++: Optimise std::future::wait_for and fix futex polling

2020-11-13 Thread Jonathan Wakely via Gcc-patches
On 13/11/20 11:02 +, Jonathan Wakely wrote: On 12/11/20 23:49 +, Jonathan Wakely wrote: To poll a std::future to see if it's ready you have to call one of the timed waiting functions. The most obvious way is wait_for(0s) but this was previously very inefficient because it would turn the

[PATCH] ipa-cp: One more safe_add (PR 97816)

2020-11-13 Thread Martin Jambor
Hi, The new behavior of safe_add triggered an ICE because of one use where it had not been used instead of a simple addition. I'll fix it with the following obvious patch so that periodic benchmarkers can continue working because a proper fix (see below) will need a review. The testcase showed m

Re: [PATCH][c++] Do not warn about unused macros while processing #pragma GCC optimize

2020-11-13 Thread Jeff Law via Gcc-patches
On 8/5/19 7:53 PM, Piotr H. Dabrowski wrote: > Fixes c++/91318. > > libcpp/ChangeLog: > > 2019-08-06 Piotr Henryk Dabrowski > > PR c++/91318 > * include/cpplib.h: Added cpp_define_unused(), > cpp_define_formatted_unused() > * directives.c: Likewise. > > gcc/c-family/ChangeLo

[PATCH] c++: Predefine __STDCPP_THREADS__ in the compiler if thread model is not single

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch predefines __STDCPP_THREADS__ macro to 1 if c++11 or later and thread model (e.g. printed by gcc -v) is not single. There are two targets not handled by this patch, those that define THREAD_MODEL_SPEC. In one case - QNX - it looks just like a mistake to me, instead of sett

Re: [PATCH] ipa-cp: One more safe_add (PR 97816)

2020-11-13 Thread Jan Hubicka
> Hi, > > The new behavior of safe_add triggered an ICE because of one use where > it had not been used instead of a simple addition. I'll fix it with the > following obvious patch so that periodic benchmarkers can continue > working because a proper fix (see below) will need a review. > > The t

Re: [PATCH PR93334][GCC11]Refine data dependence of two refs storing the same constant with the same bytes

2020-11-13 Thread Jeff Law via Gcc-patches
On 1/29/20 6:52 AM, bin.cheng wrote: > Hi, > > As discussed in the PR, this simple patch refines data dependence of two write > references storing the same constant with the same bytes. It simply detects > the case with some restrictions and treats it as no dependence. For now the > added inter

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> But in that case the pragma shouldn't be ignored, but instead checked > against the various requirements. E.g. that region is followed by a single > optional name (are there any requirements on what name can be, can it be > just a single token, can it be C/C++ keyword, etc.), guess ignore all th

[PATCH] testsuite: guality/redeclaration1.C test workaround

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! Apparently older GDB versions didn't handle this test right and so while it has been properly printing 42 on line 14 (e.g. on x86_64), it issued a weird error on line 17 (and because it didn't print any value, guality testsuite wasn't marking it as FAIL). That has been apparently fixed in GDB

Improve handling of memory operands in ipa-icf 3/4

2020-11-13 Thread Jan Hubicka
Hi, this patch is based on Maritn's patch https://gcc.gnu.org/legacy-ml/gcc-patches/2019-11/msg02633.html however based on new code that track and compare memory accesses so it can be implemented correctly. As shown here https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558773.html the most

Re: [PATCH v2] c: Silently ignore pragma region [PR85487]

2020-11-13 Thread Austin Morton via Gcc-patches
> How much does this pragma get used "in the wild"? A quick search on github for "#pragma region" comes back with 170k C++ results and searching for "#pragma" comes back with 38M C++ results Possibly not the best metric, but we can "conclude" roughly 0.45% of open source C++ code files on github

[PATCH] dwarf2: Emit DW_TAG_unspecified_parameters even in late DWARF [PR97599]

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! Aldy's PR71855 fix avoided emitting multiple redundant DW_TAG_unspecified_parameters sub-DIEs of a single DIE by restricting it to early dwarf only. That unfortunately means if we need to emit another DIE for the function (whether it is for LTO, or e.g. because of IPA cloning), we don't emit

[committed] openmp: Support allocate for C/C++ array section reductions

2020-11-13 Thread Jakub Jelinek via Gcc-patches
Hi! This adds allocate clause support for array section reductions. Furthermore, it fixes one bug that would cause inscan reductions with allocate to be rejected by C, and for now just ignores allocate for inscan/task reductions, that will need slightly more work. Bootstrapped/regtested on x86_64

[COMMITTED] Implementation of asm goto outputs

2020-11-13 Thread Vladimir Makarov via Gcc-patches
The original patch has been modified according to the reviewers comments and the following patch has been committed. commit e3b3b59683c1e7d31a9d313dd97394abebf644be Author: Vladimir N. Makarov Date: Fri Nov 13 12:45:59 2020 -0500 [PATCH] Implementation of asm goto outputs gcc/

Re: [PATCH] testsuite: guality/redeclaration1.C test workaround

2020-11-13 Thread Jeff Law via Gcc-patches
On 11/13/20 10:37 AM, Jakub Jelinek via Gcc-patches wrote: > Hi! > > Apparently older GDB versions didn't handle this test right and so while > it has been properly printing 42 on line 14 (e.g. on x86_64), it issued > a weird error on line 17 (and because it didn't print any value, guality > test

  1   2   >