Re: [PATCH 1/6] Modify gcc driver for parallel compilation

2020-08-24 Thread Richard Biener via Gcc-patches
On Mon, Aug 24, 2020 at 8:06 PM Giuliano Belinassi wrote: > > Hi, Richi. > > On 08/24, Richard Biener wrote: > > On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi > > wrote: > > > > > > Update the driver for parallel compilation. This process work as > > > follows: > > > > > > When calling gcc,

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 10:43 PM Qing Zhao wrote: > > > > > On Aug 24, 2020, at 3:20 PM, Segher Boessenkool > > wrote: > > > > Hi! > > > > On Mon, Aug 24, 2020 at 01:02:03PM -0500, Qing Zhao wrote: > >>> On Aug 24, 2020, at 12:49 PM, Segher Boessenkool > >>> wrote: > >>> On Wed, Aug 19, 2020 a

[PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Mark Eggleston
Second attempt, this time with the correct attachment. OK to commit and backport? [PATCH] Fortran  : ICE for division by zero in declaration PR95882 A length expression containing a divide by zero in a character declaration will result in an ICE if the constant is anymore complicated that a con

Re: [PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Mark Eggleston
On 25/08/2020 07:13, Mark Eggleston wrote: On 24/08/2020 17:42, Thomas Koenig wrote: Hi Mark, OK to commit and backport? The test cases mentioned in the ChangeLog are not in the patch, instead there is the test case for PR 96624. Could you correct that? Whoops, yes I'll fix that. It is

Re: [PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Mark Eggleston
On 24/08/2020 17:42, Thomas Koenig wrote: Hi Mark, OK to commit and backport? The test cases mentioned in the ChangeLog are not in the patch, instead there is the test case for PR 96624. Could you correct that? Whoops, yes I'll fix that. Best regards Thomas -- https://www.codethi

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Aldy Hernandez via Gcc-patches
Attached is another revision of this patch with the new helper function you suggested.  Is this version okay to commit? I don't actually have the ability to grant check-in in this area. I just figured that implementing some of these suggestions might make it more palatable to reviewers who do

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Alexandre Oliva
On Aug 24, 2020, Richard Biener wrote: > since the option is quite elaborate on what (sub-)set of regs is > supposed to be cleared I'm not sure an implementation not involving > any target hook is possible? I don't think this follows. Machine-independent code has a pretty good notion of what re

Re: [PATCH 0/3] Power10 PCREL_OPT support

2020-08-24 Thread Bill Schmidt via Gcc-patches
On 8/24/20 11:01 PM, Michael Meissner wrote: On Sat, Aug 22, 2020 at 07:05:51PM -0500, Bill Schmidt wrote: What is necessary in order to allow this optimization to occur earlier is to make this hidden dependency explicit.  When the relocation is inserted, we have to change the "pld" instruction

Re: [PATCH 0/3] Power10 PCREL_OPT support

2020-08-24 Thread Michael Meissner via Gcc-patches
I forgot to mention that comparing the three tests of placement of the PCREL_OPT pass: Having the pass after sched2 generated the same number of PCREL_OPT relocations as having the pass immediately after reload. But having the pass just before sched2 resulted in some more PCREL_OPT relocations.

Re: [PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Alexandre Oliva
On Aug 24, 2020, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:54PM +0200, Mark Wielaard wrote: >> DWARF5 makes it possible to read loclists tables without consulting >> the debuginfo tree by introducing a table header. Adding location views >> breaks this (at least for binutils and elfuti

Re: [PATCH 0/3] Power10 PCREL_OPT support

2020-08-24 Thread Michael Meissner via Gcc-patches
On Sat, Aug 22, 2020 at 07:05:51PM -0500, Bill Schmidt wrote: > What is necessary in order to allow this optimization to occur > earlier is to make this hidden dependency explicit.  When the > relocation is inserted, we have to change the "pld" instruction to > have a specific clobber of (in this c

Re: [PATCH 0/3] Power10 PCREL_OPT support

2020-08-24 Thread Michael Meissner via Gcc-patches
On Thu, Aug 20, 2020 at 06:33:29PM -0500, Segher Boessenkool wrote: > > These patches allow the load of the address to not be physically adjacent to > > the actual load or store, which should allow for better code. > > Why is that? That is not what it does anyway? /confused It does allow that.

RE: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-08-24 Thread xiezhiheng
> -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Friday, August 21, 2020 5:02 PM > To: xiezhiheng > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions > emitted at -O3 Cut... > Loo

[PATCH] libstdc++: Add more C++20 additions to

2020-08-24 Thread Patrick Palka via Gcc-patches
This patch adds the C++20 calendar types and their methods as defined in [time.cal] (modulo the parsing/printing support). This patch also implements [time.hms] and [time.12], and a few more bits of [time.clock]. The remaining C++20 additions to from P0355 and P1466 depend on [time.zone] and , s

Re: [PATCH v2] c++: Implement P1009: Array size deduction in new-expressions.

2020-08-24 Thread Jason Merrill via Gcc-patches
On 8/24/20 5:44 PM, Marek Polacek wrote: On Fri, Aug 21, 2020 at 05:04:43PM -0400, Jason Merrill wrote: On 8/20/20 4:22 PM, Marek Polacek wrote: @@ -3917,6 +3926,47 @@ build_new (location_t loc, vec **placement, tree type, return error_mark_node; } + /* P1009: Array size deduc

[PATCH] fix a typo in rtl.def

2020-08-24 Thread Wei Wentao
Hi, This patch fix a typo in rtl.def. Regards! Weiwt --- gcc/rtl.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rtl.def b/gcc/rtl.def index 9754333eafb..7ec94a95105 100644 --- a/gcc/rtl.def +++ b/gcc/rtl.def @@ -380,7 +380,7 @@ DEF_RTL_EXPR(PC, "pc", "", RTX_OBJ)

Re: [PATCH] c++: Fix up ptr.~PTR () handling [PR96721]

2020-08-24 Thread Jason Merrill via Gcc-patches
On 8/24/20 5:34 PM, Jakub Jelinek wrote: Hi! The following testcase is miscompiled, because build_trivial_dtor_call handles the case when instance is a pointer by adding a clobber to what the pointer points to (which is desirable e.g. for delete) rather than the pointer itself. That is I think

Re: [PATCH] Check calls before loop unrolling

2020-08-24 Thread Jiufu Guo via Gcc-patches
On 2020-08-24 19:16, Jan Hubicka wrote: On Thu, Aug 20, 2020 at 6:35 AM guojiufu via Gcc-patches wrote: > > Hi, > > This patch is checking the _average_ number of calls which is the > summary of call numbers multiply the possibility of the call maybe > executed. The _average_ number could be a

Re: [PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

2020-08-24 Thread Alexandre Oliva
On Aug 24, 2020, Jonathan Wakely wrote: >>> OK for trunk, thanks. >> Given the approval and the lack of significant changes, I'll put this in >> unless there are objections in the next 48 hours. Thanks for the review! > Thanks. There's a new FAIL due to a bad merge. Erhm... Weird, I don't re

Re: [PATCH v3] libgcc: Use `-fasynchronous-unwind-tables' for LIB2_DIVMOD_FUNCS

2020-08-24 Thread Kito Cheng via Gcc-patches
Hi Maciej: Thanks for your patch, I tried to compile all target libraries with -O0 and got link error as you describe, it's really confusing about the error message, __pthread_mutex_lock and __pthread_mutex_unlock are undefined, it turns out the root cause is the __umoddi3 called _Unwind_Resume an

Re: [PATCH] middle-end: Simplify (sign_extend:HI (truncate:QI (ashiftrt:HI X 8)))

2020-08-24 Thread Jeff Law via Gcc-patches
On Sun, 2020-07-19 at 10:42 +0100, Roger Sayle wrote: > The combination of several my recent nvptx patches has revealed an > interesting RTL optimization opportunity. This patch to simplify-rtx.c > simplifies (sign_extend:HI (truncate:QI (?shiftrt:HI x 8))) to just > (ashiftrt:HI x 8), as the inne

Re: [PING][PATCH] tilepro: Update generator file to define IN_TARGET_CODE in target file.

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-17 at 09:58 +0200, Iain Buclaw via Gcc-patches wrote: > Ping. > > On 31/05/2020 12:48, Iain Buclaw wrote: > > Hi, > > > > The target files tilegx/mul-tables.c and tilepri/mul-tables.c were > > updated in SVN r255743, but the generator file that produces them > > wasn't, so it was

Re: [PING][PATCH 6/6] contrib: Add OPT-enable-obsolete to tile*-*-*

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-17 at 09:59 +0200, Iain Buclaw via Gcc-patches wrote: > Ping. > > On 31/05/2020 12:20, Iain Buclaw wrote: > > The tile*-*-* targets were marked as obsolete in SVN r259724. > > > > OK? > > > > Regards > > Iain > > > > --- > > contrib/ChangeLog: > > > > * config-list.mk (LIST

Re: [PATCH] middle-end: Simplify popcount/parity of bswap/rotate.

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 17:52 +0100, Roger Sayle wrote: > This simple patch to match.pd optimizes away bit permutation > operations, specifically bswap and rotate, in calls to popcount and > parity. Although this patch has been developed and tested on LP64, > it relies on there being no truncations

Re: [PATCH] middle-end: PR tree-optimization/21137: STRIP_NOPS avoids missed optimization.

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 17:55 +0100, Roger Sayle wrote: > PR tree-optimization/21137 is now an old enhancement request pointing out > that an optimization I added back in 2006, to optimize "((x>>31)&64) != 0" > as "x < 0", doesn't fire in the presence of unanticipated type conversions. > The fix is t

Re: [PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 17:07 +0200, Martin Jambor wrote: > Hi, > > I must admit I was quite surprised to see that SRA does not disqualify > an aggregate from any transformations when it encounters an offset for > which get_ref_base_and_extent returns a negative offset. It may not > matter too much

Re: [PATCH] match.pd: Simplify copysign (x, -x) to -x [PR96715]

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 23:39 +0200, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The following patch implements an optimization suggested in the PR, > copysign(x,-x) can be optimized into -x (even without -ffast-math, > should work fine even for signed zeros and infinities or nans). > > Bootstra

Re: [PATCH] MIPS: Fix __builtin_longjmp (PR 64242)

2020-08-24 Thread Jeff Law via Gcc-patches
On Sun, 2020-07-12 at 14:27 +0800, Paul Hua wrote: > From 589dbe8a1c2397bfafefa4e84abe5ec6e6798928 Mon Sep 17 00:00:00 2001 > From: Andrew Pinski > Date: Wed, 12 Feb 2020 11:42:57 + > Subject: [PATCH] MIPS: Fix __builtin_longjmp (PR 64242) > > The problem here is mips has its own builtin_long

Re: std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))

2020-08-24 Thread Andrew MacLeod via Gcc-patches
On 8/24/20 5:53 PM, Jeff Law wrote: On Wed, 2020-08-05 at 17:41 +0200, Aldy Hernandez wrote: On 8/5/20 5:09 PM, Martin Jambor wrote: On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote: [...] * ipa-cp changes from vec to std::vec. We are using std::vec to ensure constructors are run,

Re: std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))

2020-08-24 Thread Jeff Law via Gcc-patches
On Wed, 2020-08-05 at 17:41 +0200, Aldy Hernandez wrote: > On 8/5/20 5:09 PM, Martin Jambor wrote: > > > On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote: > > > > [...] > > > > > * ipa-cp changes from vec to std::vec. > > > > > > We are using std::vec to ensure constructors are run, wh

Re: [PATCH v2] c++: Implement P1009: Array size deduction in new-expressions.

2020-08-24 Thread Marek Polacek via Gcc-patches
On Fri, Aug 21, 2020 at 05:04:43PM -0400, Jason Merrill wrote: > On 8/20/20 4:22 PM, Marek Polacek wrote: > > @@ -3917,6 +3926,47 @@ build_new (location_t loc, vec > > **placement, tree type, > > return error_mark_node; > > } > > + /* P1009: Array size deduction in new-expressions.

[PATCH] match.pd: Simplify copysign (x, -x) to -x [PR96715]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements an optimization suggested in the PR, copysign(x,-x) can be optimized into -x (even without -ffast-math, should work fine even for signed zeros and infinities or nans). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-08-24 Jakub Jeline

RE: [PATCH] rs6000, restrict bfloat convert intrinsic to Power 10. Fix BU_P10V macro definitions.

2020-08-24 Thread Carl Love via Gcc-patches
Segher: On Wed, 2020-08-19 at 15:16 -0500, Segher Boessenkool wrote: > On Wed, Aug 19, 2020 at 02:19:12PM -0500, Peter Bergner wrote: > > On 8/14/20 7:42 PM, Segher Boessenkool wrote: > > > I think your current code is fine; I hadn't considered Bill's > > > upcoming > > > rewrite. It is more impo

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Jason Merrill via Gcc-patches
On 8/24/20 1:40 PM, Jakub Jelinek wrote: On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: In DWARF5 class variables (static data members) are represented with a DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't optimized away in the constexpr-var-1.C testcase

[PATCH] gimple: Ignore *0 = {CLOBBER} in path isolation [PR96722]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! Clobbers of MEM_REF with NULL address are just fancy nops, something we just ignore and don't emit any code for it (ditto for other clobbers), they just mark end of life on something, so we shouldn't infer from those that there is some UB. Bootstrapped/regtested on x86_64-linux and i686-linux

[PATCH] c++: Fix up ptr.~PTR () handling [PR96721]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because build_trivial_dtor_call handles the case when instance is a pointer by adding a clobber to what the pointer points to (which is desirable e.g. for delete) rather than the pointer itself. That is I think always desirable behavior for references, b

[PATCH] strlen: Fix handle_builtin_string_cmp [PR96758]

2020-08-24 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled, because handle_builtin_string_cmp sees a strncmp call with constant last argument 4, where one of the strings has an upper bound of 5 bytes (due to it being an array of that size) and the other has a known string length of 1 and the result is used only in

Re: [PATCH] Adjust tree-ssa-dom.c for irange API.

2020-08-24 Thread Jeff Law via Gcc-patches
On Tue, 2020-08-04 at 13:39 +0200, Aldy Hernandez wrote: > This patch removes all uses of VR_ANTI_RANGE in DOM. It required > minor surgery in the switch handling code. > > In doing so, I was able to abstract all the code handling the cases > with ranges into its own function. Interestingly, the

[PATCH] PR fortran/96711 - ICE on NINT() Function

2020-08-24 Thread Harald Anlauf
When rounding a real to integer(16) an ICE happened due to an unhandled case in build_round_expr. The attached patch add a special case for this. I had to change a fold_convert to a convert (which seems to be frontend specific stuff), otherwise I would get errors from the generated GIMPLE. Does a

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Tom Tromey
>> This looks incorrect to me, that is a workaround for a real GCC bug. Mark> I was discussing this after the BoF with Tom Tromey (CCed) and he also Mark> thought gdb could/should actually support the DWARF5 representation, Mark> but because the DW_TAG_variable was removed because the static data

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 3:26 PM, Segher Boessenkool > wrote: > > On Mon, Aug 24, 2020 at 01:48:02PM -0500, Qing Zhao wrote: >> >> >>> On Aug 24, 2020, at 12:59 PM, Segher Boessenkool >>> wrote: >>> >>> [ Please quote correctly. I fixed this up a bit. ] >>> >>> On Mon, Aug 24, 2020 at 02:

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 3:20 PM, Segher Boessenkool > wrote: > > Hi! > > On Mon, Aug 24, 2020 at 01:02:03PM -0500, Qing Zhao wrote: >>> On Aug 24, 2020, at 12:49 PM, Segher Boessenkool >>> wrote: >>> On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > On Aug 19, 2020, at 5:57 PM

Re: [PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Mark Wielaard
On Mon, Aug 24, 2020 at 07:44:27PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:56PM +0200, Mark Wielaard wrote: > > Some DWARF tests scan the assembly output looking for constant values. > > When using DWARF5 those constants might use DW_FORM_implicit_const, > > which are output (in

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Segher Boessenkool
On Mon, Aug 24, 2020 at 01:48:02PM -0500, Qing Zhao wrote: > > > > On Aug 24, 2020, at 12:59 PM, Segher Boessenkool > > wrote: > > > > [ Please quote correctly. I fixed this up a bit. ] > > > > On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: > >>> The call-clobbered

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Segher Boessenkool
Hi! On Mon, Aug 24, 2020 at 01:02:03PM -0500, Qing Zhao wrote: > > On Aug 24, 2020, at 12:49 PM, Segher Boessenkool > > wrote: > > On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > >>> On Aug 19, 2020, at 5:57 PM, Segher Boessenkool > >>> wrote: > >>> Numbers on how expensive this i

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Mark Wielaard
Hi Jakub, On Mon, Aug 24, 2020 at 07:40:51PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: > > In DWARF5 class variables (static data members) are represented with a > > DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't > > opti

Re: [PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Mark Wielaard
Hi, On Mon, Aug 24, 2020 at 07:38:10PM +0200, Jakub Jelinek wrote: > On Mon, Aug 24, 2020 at 02:56:54PM +0200, Mark Wielaard wrote: > > DWARF5 makes it possible to read loclists tables without consulting > > the debuginfo tree by introducing a table header. Adding location views > > breaks this (a

libbacktrace patch committed: Add support for Mach-O 64-bit FAT files

2020-08-24 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch adds support for Mach-O 64-bit FAT files. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to mainline. Ian libbacktrace/: * macho.c (MACH_O_MH_MAGIC_FAT_64): Define. (MACH_O_MH_CIGAM_FAT_64): Define. (struct macho_fat_arch_64)

Re: [PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Mon, Aug 24, 2020 at 12:25 PM Uros Bizjak wrote: > > On Mon, Aug 24, 2020 at 6:17 PM H.J. Lu wrote: > > > > On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > > > > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > > > > > Speaking of pragmas, these should be added outside cpuid.h

Re: [PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 6:17 PM H.J. Lu wrote: > > On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > > > > > #pragma GCC push_options > > > > #pragma GCC

Re: [PATCH v5] dse: Remove partial load after full store for high part access[PR71309]

2020-08-24 Thread Jeff Law via Gcc-patches
On Thu, 2020-08-06 at 06:23 +0100, Richard Sandiford wrote: > luoxhu writes: > > Hi Richard, > > > > On 2020/8/3 22:01, Richard Sandiford wrote: > > > > /* Try a wider mode if truncating the store mode to NEW_MODE > > > > requires a real instruction. */ > > > > if (maybe

[pushed] c++: Emit as-base 'tor symbols for final class. [PR95428]

2020-08-24 Thread Jason Merrill via Gcc-patches
For PR70462 I stopped emitting the as-base constructor and destructor variants for final classes, because they can never be called. Except that it turns out that clang calls base variants from complete variants, even for classes with virtual bases, and in some cases inlines them such that the call

[PING #5][PATCH] separate reading past the end from -Wstringop-overflow

2020-08-24 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html On 8/10/20 10:48 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html On 7/26/20 11:42 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548786.html O

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 12:59 PM, Segher Boessenkool > wrote: > > [ Please quote correctly. I fixed this up a bit. ] > > On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: >>> The call-clobbered regs are the only ones you *can* touch. That does >>> not mean you should

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Ho, Josh. On 08/24, Josh Triplett wrote: > On Sat, Aug 22, 2020 at 06:04:48PM -0300, Giuliano Belinassi wrote: > > Hi, Josh > > > > On 08/21, Josh Triplett wrote: > > > On Thu, Aug 20, 2020 at 07:00:13PM -0300, Giuliano Belinassi wrote: > > > > This patch series add a new flag "-fparallel-jobs="

Re: [PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Richard Biener
On August 24, 2020 5:07:56 PM GMT+02:00, Martin Jambor wrote: >Hi, > >I must admit I was quite surprised to see that SRA does not disqualify >an aggregate from any transformations when it encounters an offset for >which get_ref_base_and_extent returns a negative offset. It may not >matter too muc

[committed] doc: Switch valgrind.com to https

2020-08-24 Thread Gerald Pfeifer
Pushed. Jonathan, I found two more references to valgrind.com without https (which lead to a redirect) at http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html http://valgrind.org/docs/manual/drd-manual.html http://valgrind.org/docs/manual/hg-manual.html Would you mind having a look, per

[committed] wwwdocs: Switch www.validlab.com to https

2020-08-24 Thread Gerald Pfeifer
Pushed. Gerald. --- htdocs/bugs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bugs/index.html b/htdocs/bugs/index.html index a6631d8a..88fba1b9 100644 --- a/htdocs/bugs/index.html +++ b/htdocs/bugs/index.html @@ -300,7 +300,7 @@ to round to the nearest repr

Re: [PATCH] cmpelim: recognize extra clobbers in insns

2020-08-24 Thread Jeff Law via Gcc-patches
On Thu, 2020-08-06 at 12:42 +, Pip Cet via Gcc-patches wrote: > I'm working on the AVR cc0 -> CCmode conversion (bug#92729). One > problem is that the cmpelim pass is currently very strict in requiring > insns of the form > > (parallel [(set (reg:SI) (op:SI ... ...)) >(clobber (reg

Re: [PATCH 1/6] Modify gcc driver for parallel compilation

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Hi, Richi. On 08/24, Richard Biener wrote: > On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi > wrote: > > > > Update the driver for parallel compilation. This process work as > > follows: > > > > When calling gcc, the driver will check if the flag > > "-fparallel-jobs" was provided by the use

Re: reorg.c (fill_slots_from_thread): Improve for TARGET_FLAGS_REGNUM targets

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-14 at 07:27 +0200, Hans-Peter Nilsson via Gcc-patches wrote: > Originally I thought to bootstrap this patch on MIPS and SPARC > since they're both delayed-branch-slot targets but I > reconsidered, as neither is a TARGET_FLAGS_REGNUM target. It > seems only visium and CRIS has this

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 12:49 PM, Segher Boessenkool > wrote: > > On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: >>> On Aug 19, 2020, at 5:57 PM, Segher Boessenkool >>> wrote: >>> Numbers on how expensive this is (for what arch, in code size and in >>> execution time) would be use

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Segher Boessenkool
[ Please quote correctly. I fixed this up a bit. ] On Mon, Aug 24, 2020 at 02:47:22PM +, Rodriguez Bahena, Victor wrote: > > The call-clobbered regs are the only ones you *can* touch. That does > > not mean you should clear them all (it doesn't help much at all in some > > cases). Only the

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Segher Boessenkool
On Wed, Aug 19, 2020 at 06:27:45PM -0500, Qing Zhao wrote: > > On Aug 19, 2020, at 5:57 PM, Segher Boessenkool > > wrote: > > Numbers on how expensive this is (for what arch, in code size and in > > execution time) would be useful. If it is so expensive that no one will > > use it, it helps secu

Re: [PATCH] gimple-fold: Don't optimize wierdo floating point value reads [PR95450]

2020-08-24 Thread Jeff Law via Gcc-patches
On Mon, 2020-08-24 at 12:51 +0200, Richard Biener wrote: > On Wed, 12 Aug 2020, Jakub Jelinek wrote: > > > On Wed, Aug 12, 2020 at 04:30:35PM +0200, Richard Biener wrote: > > > Not a final review but if we care for this kind of normalization at all > > > the we should do so consistently, thus for

Re: [PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:56PM +0200, Mark Wielaard wrote: > Some DWARF tests scan the assembly output looking for constant values. > When using DWARF5 those constants might use DW_FORM_implicit_const, > which are output (in the comments) after the attribute instead of > before. To make sure th

Re: [PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:55PM +0200, Mark Wielaard wrote: > In DWARF5 class variables (static data members) are represented with a > DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't > optimized away in the constexpr-var-1.C testcase so we can still match (2) > const_exp

Re: [PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 24, 2020 at 02:56:54PM +0200, Mark Wielaard wrote: > DWARF5 makes it possible to read loclists tables without consulting > the debuginfo tree by introducing a table header. Adding location views > breaks this (at least for binutils and elfutils). So don't enable > variable-location-view

Re: [PATCH] improve validation of attribute arguments (PR c/78666)

2020-08-24 Thread Martin Sebor via Gcc-patches
On 8/24/20 4:59 AM, Aldy Hernandez wrote: On 8/21/20 1:37 AM, Martin Sebor wrote: On 8/20/20 3:00 PM, Aldy Hernandez wrote: Regardless, here are some random comments. Thanks for the careful review! diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index 37214831538..bc4f4

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Josh Triplett
On Sat, Aug 22, 2020 at 06:04:48PM -0300, Giuliano Belinassi wrote: > Hi, Josh > > On 08/21, Josh Triplett wrote: > > On Thu, Aug 20, 2020 at 07:00:13PM -0300, Giuliano Belinassi wrote: > > > This patch series add a new flag "-fparallel-jobs=" to control if the > > > compiler should try to compile

Re: [PATCH] Fortran : ICE for division by zero in declaration PR95882

2020-08-24 Thread Thomas Koenig via Gcc-patches
Hi Mark, OK to commit and backport? The test cases mentioned in the ChangeLog are not in the patch, instead there is the test case for PR 96624. Could you correct that? Best regards Thomas

[PATCH] x86: Use target("baseline-isas-only") in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Mon, Aug 24, 2020 at 7:55 AM Uros Bizjak wrote: > > On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > > > #pragma GCC push_options > > > #pragma GCC target("general-regs-only") > > > > > > #include > > > > > > void

Re: [PATCH] hppa: Improve expansion of ashldi3 when !TARGET_64BIT

2020-08-24 Thread Jeff Law via Gcc-patches
On Fri, 2020-08-21 at 13:53 +0100, Roger Sayle wrote: > This patch improves the code generated on PA-RISC for DImode > (double word) left shifts by small constants (1-31). This target > has a very cool shd instruction that can be recognized by combine > for simple shifts, but relying on combine is

Re: [PATCH] arm: Fix -mpure-code support/-mslow-flash-data for armv8-m.base [PR94538]

2020-08-24 Thread Christophe Lyon via Gcc-patches
On Mon, 24 Aug 2020 at 11:09, Christophe Lyon wrote: > > On Sat, 22 Aug 2020 at 00:44, Ramana Radhakrishnan > wrote: > > > > On Wed, Aug 19, 2020 at 10:32 AM Christophe Lyon via Gcc-patches > > wrote: > > > > > > armv8-m.base (cortex-m23) has the movt instruction, so we need to > > > disable the

[committed] libstdc++: Add deduction guide for std::ranges::join_view [LWG 3474]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
This implements the proposed resolution for LWG 3474. libstdc++-v3/ChangeLog: * include/std/ranges (join_view): Add deduction guide (LWG 3474). * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test. Tested powerpc64le-linux. Committed to trunk. commit ef275d1f2083f8a1fa1b59a

[committed] libstdc++: Fix std::indirectly_readable ambiguity [LWG 3446]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
This implements the proposed resolution of LWG 3446. I'm also adding another new constrained specialization which isn't proposed by 3446, to resolve the ambiguity when a type has both value_type and element_type but denoting different types. libstdc++-v3/ChangeLog: * include/bits/iterator

Re: [PATCH] libstdc++: Fix iota_view::size() to avoid overflow

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 20/08/20 19:54 +0100, Jonathan Wakely wrote: This avoids overfow that occurs when negating the most negative value of an integral type. Also prevent returning signed int when the values have lower rank and promote to int. libstdc++-v3/ChangeLog: * include/std/ranges (ranges::iota_vi

[committed] libstdc++: Make variant_npos conversions explicit [PR 96766]

2020-08-24 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/96766 * include/std/variant (_Variant_storage): Replace implicit conversions from size_t to __index_type with explicit casts. This fixes a silly Clang UBsan warning from its silly unsigned-integer-overflow sanitizer which complains abou

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Giuliano Belinassi via Gcc-patches
Hi, Richi. On 08/24, Richard Biener wrote: > On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi > wrote: > > > > This patch series add a new flag "-fparallel-jobs=" to control if the > > compiler should try to compile the current file in parallel. > > > > There are three modes which is supported

Re: [PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 21/08/20 09:37 -0300, Alexandre Oliva wrote: On Dec 20, 2019, Jonathan Wakely wrote: On 10/12/19 15:58 +0100, Corentin Gay wrote: This patch was tested on x86_64-linux and is part of our nightly testing on all platforms, including VxWorks. Was it tested on AIX? I think dg-require-gth

[PATCH] sra: Bail out when encountering accesses with negative offsets (PR 96730)

2020-08-24 Thread Martin Jambor
Hi, I must admit I was quite surprised to see that SRA does not disqualify an aggregate from any transformations when it encounters an offset for which get_ref_base_and_extent returns a negative offset. It may not matter too much because I sure hope such programs always have undefined behavior (S

Re: [PATCH] Fix ICE.

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 3:03 PM Hongtao Liu wrote: > > Hi: > This patch is to fix a typo in my last patch [1]. > [1] https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551982.html > > Bootstrap is ok, gcc regression test hosted on CLX for i386/x86-64 > backend is ok. > Ok for trunk? > >

Re: [PATCH] x86: Use -march=x86-64/-march=i386 in

2020-08-24 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 24, 2020 at 3:23 PM H.J. Lu wrote: > > Speaking of pragmas, these should be added outside cpuid.h, like: > > > > #pragma GCC push_options > > #pragma GCC target("general-regs-only") > > > > #include > > > > void cpuid_check () > > ... > > > > #pragma GCC pop_options > > > > >footnote

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Qing Zhao via Gcc-patches
> On Aug 24, 2020, at 5:50 AM, Richard Biener wrote: > > On Tue, 11 Aug 2020, Qing Zhao wrote: > >> Hi, Alexandre, >> >> CC’ing Richard for his comments on this. >> >> >>> On Aug 10, 2020, at 9:39 PM, Alexandre Oliva wrote: I think that moving how to zeroing the registers part to eac

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Rodriguez Bahena, Victor via Gcc-patches
From: Qing Zhao Date: Wednesday, August 19, 2020 at 6:28 PM To: Segher Boessenkool , "Rodriguez Bahena, Victor" Cc: Richard Biener , Jeff Law , Uros Bizjak , "H. J. Lu" , Jakub Jelinek , GCC Patches , Kees Cook Subject: Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|

Re: PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-08-24 Thread Rodriguez Bahena, Victor via Gcc-patches
-Original Message- From: Segher Boessenkool Date: Wednesday, August 19, 2020 at 5:58 PM To: Qing Zhao Cc: Richard Biener , Jeff Law , Uros Bizjak , "H. J. Lu" , Jakub Jelinek , GCC Patches , Kees Cook , "Rodriguez Bahena, Victor" Subject: Re: PING [Patch][Middle-end]Add -fzero-ca

c++: overload dumper

2020-08-24 Thread Nathan Sidwell
I frequently need to look at overload sets, and debug_node spews more information than is useful, most of the time. Here's a dumper for overloads, that just tells you their full name and where they came from. gcc/cp * ptree.c (debug_overload): New. pushed -- Nathan Sidwell diff

[PATCH] x86: Use -march=x86-64/-march=i386 in

2020-08-24 Thread H.J. Lu via Gcc-patches
On Sun, Aug 23, 2020 at 9:03 AM Uros Bizjak wrote: > > On Sun, Aug 23, 2020 at 5:23 PM H.J. Lu wrote: > > > > On Sun, Aug 23, 2020 at 10:18:28AM +0200, Uros Bizjak wrote: > > > On Sat, Aug 22, 2020 at 9:09 PM H.J. Lu wrote: > > > > > > > > > Compile CPUID check with "-mno-sse -mfpmath=387" to di

Re: [PATCH 4/6] Add `+' for Jobserver Integration

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:34 AM Joseph Myers wrote: > > On Thu, 20 Aug 2020, Giuliano Belinassi via Gcc-patches wrote: > > > libbacktrace/Makefile.in | 2 +- > > zlib/Makefile.in | 64 ++-- > > These directories use makefiles generated by automake. Rather than > modifying the

Re: [PATCH 1/6] Modify gcc driver for parallel compilation

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi wrote: > > Update the driver for parallel compilation. This process work as > follows: > > When calling gcc, the driver will check if the flag > "-fparallel-jobs" was provided by the user. If yes, then we will > check what is the desired output,

[PATCH] Fix ICE.

2020-08-24 Thread Hongtao Liu via Gcc-patches
Hi: This patch is to fix a typo in my last patch [1]. [1] https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551982.html Bootstrap is ok, gcc regression test hosted on CLX for i386/x86-64 backend is ok. Ok for trunk? gcc/ChangeLog: PR target/96755 * config/i386/sse.md:

[PATCH 5/5] Add --gdwarf-5 to ASM_SPEC

2020-08-24 Thread Mark Wielaard
This is needed to get DWARF version 5 .debug_line tables. It is also obviously wrong. It needs a check for whether as supports --gdwarf- for all versions we support and it should only be added when generating DWARF debug information for the specific DWARF version we are generating. It also needs s

[PATCH 4/5] Default to DWARF5

2020-08-24 Thread Mark Wielaard
--- gcc/common.opt | 2 +- gcc/doc/invoke.texi | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index 513125f0c00b..05e4e0638ecb 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3144,7 +3144,7 @@ Common Driver JoinedOrMissing Negati

[PATCH 2/5] Make sure that static data member constexpr isn't optimized away in test.

2020-08-24 Thread Mark Wielaard
In DWARF5 class variables (static data members) are represented with a DW_TAG_variable instead of a DW_TAG_member. Make sure the variable isn't optimized away in the constexpr-var-1.C testcase so we can still match (2) const_expr in the the assembly output. Note that the same issue causes some fai

[PATCH 3/5] Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

2020-08-24 Thread Mark Wielaard
Some DWARF tests scan the assembly output looking for constant values. When using DWARF5 those constants might use DW_FORM_implicit_const, which are output (in the comments) after the attribute instead of before. To make sure these tests work introduce a -gdwarf-5 variant of these tests and explici

[PATCH 1/5] Don't enable -gvariable-location-views by default for DWARF5.

2020-08-24 Thread Mark Wielaard
DWARF5 makes it possible to read loclists tables without consulting the debuginfo tree by introducing a table header. Adding location views breaks this (at least for binutils and elfutils). So don't enable variable-location-views by default if DWARF5 or higher is selected. --- gcc/doc/invoke.texi

BoF DWARF5 patches

2020-08-24 Thread Mark Wielaard
Hi, This afternoon there will be a BoF at the virtual Cauldron about DWARF5 and beyond. https://linuxplumbersconf.org/event/7/contributions/746/ Here are some patches for GCC that I would like to discuss. I'll reply to them after the BoF with any comments people made. Cheers, Mark

Re: [PATCH 0/6] Parallelize Intra-Procedural Optimizations using the LTO Engine.

2020-08-24 Thread Richard Biener via Gcc-patches
On Fri, Aug 21, 2020 at 12:00 AM Giuliano Belinassi wrote: > > This patch series add a new flag "-fparallel-jobs=" to control if the > compiler should try to compile the current file in parallel. > > There are three modes which is supported by now: > > 1. -fparallel-jobs=: Try to compile the file

Re: [PATCH] libstdc++: mark variables as possibly unused

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 13:26 +0200, Krystian Kuźniarek via Libstdc++ wrote: Hi, First of all, sorry, I must have sent it as quoted-printable so spaces and tabs are preserved. A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wunused-variable and -Wunused-paramet

Re: [PATCH] libstdc++: remove an ignored qualifier on function return type

2020-08-24 Thread Jonathan Wakely via Gcc-patches
On 24/08/20 13:26 +0200, Krystian Kuźniarek via Libstdc++ wrote: Hi, First of all, sorry, I must have sent it as quoted-printable so spaces and tabs are preserved. A description of the problem/bug and how your patch addresses it: I've got a small patch for -Wignored-qualifiers in system headers

  1   2   >