Re: [PATCH] Don't clobber dominator info in the combiner (PR target/77526)

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 08:47:28AM +0200, Richard Biener wrote: > On Fri, 16 Sep 2016, Jakub Jelinek wrote: > > > Hi! > > > > As mentioned in the PR, combiner sometimes calls > > purge_all_dead_edges or purge_dead_edges that can invalidate the dominator > > info if it is computed. Other passes l

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Rainer Orth
Hi Jason, > OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement on size being a multiple of alignment is in, all is fine on Solaris. Thanks. Rainer -- --

[PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Thomas Schwinge
Hi! (CCing Bernd and Jakub -- for your information, or: "amusement" -- as you've discussed offloading preload_common_nodes issues before...) Got to look into this some more, yesterday: On Thu, 08 Sep 2016 13:43:30 +0200, I wrote: > On Wed, 7 Sep 2016 14:23:18 +0200, Richard Biener > wrote: > >

Re: [PATCH, i386] Spellcheck hints for the i386 backend option handling (PR middle-end/77475, take 2, i386 part)

2016-09-16 Thread Rainer Orth
Hi Jakub, > 2016-09-05 Jakub Jelinek > > PR middle-end/77475 > * config/i386/i386.c (ix86_parse_stringop_strategy_string): Simplify, > use %qs instead of %s where desirable, use argument instead of arg in > the diagnostic wording, add list of supported strategies and >

Re: [PATCH] Fix PR77514

2016-09-16 Thread Bernhard Reutner-Fischer
On 15 September 2016 09:08:36 CEST, Richard Biener wrote: > >Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > >+ /* Likewise if we simplified to sth not queued for insertion. */ >+ bool found = false; >+ gsi = gsi_start (forced_stmts); >+ for (; !gsi_end_p (gsi); gsi_

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Christophe Lyon
On 16 September 2016 at 09:04, Rainer Orth wrote: > Hi Jason, > >> OK, one more: > > this works just fine on both sparc-sun-solaris2.12 and > i386-pc-solaris2.12. > > Once Jonathan's patch to heed aligned_alloc's requirement on size being > a multiple of alignment is in, all is fine on Solaris. >

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> > Here are the results: > > Param Size (GCC5)Time (GCC5) Time (GCC7) > 0 44686265 (-8.26%) 58.772s 66.332s > 1 45692793 (-6.19%) 40.684s 39.220s > 2 45556185 (-6.47%) 35.292s 34.328s > 3 46251049 (-5.05%) 28.820s 27.136s > 4 47028873 (-

Re: [PATCH] Fix PR77514

2016-09-16 Thread Richard Biener
On Fri, 16 Sep 2016, Bernhard Reutner-Fischer wrote: > On 15 September 2016 09:08:36 CEST, Richard Biener wrote: > > > >Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. > > > > >+ /* Likewise if we simplified to sth not queued for insertion. */ > >+ bool found = false; >

Re: [PATCH, i386] Spellcheck hints for the i386 backend option handling (PR middle-end/77475, take 2, i386 part)

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 09:12:42AM +0200, Rainer Orth wrote: > Excess errors: > cc1: error: strategy name 'rep_8byte' specified for option > '-mmemcpy_strategy=' not supported for 32-bit code > > > --- gcc/config/i386/i386.c.jj 2016-09-06 16:55:35.524605779 +0200 > > +++ gcc/config/i386/i38

Re: [PATCH] Fix PR77514

2016-09-16 Thread Michael Matz
Hi, On Fri, 16 Sep 2016, Richard Biener wrote: > We don't -- I guess it would be an interesting transform but difficult > in this case as gimple_get_lhs might have side-effects we cannot skip. If there are side-effects it's anyway not going to be very profitable. loop-splitting is mostly an e

Re: [patch,gomp4] Fix PR74600

2016-09-16 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 05:37:52PM -0700, Cesar Philippidis wrote: > On 09/09/2016 03:34 PM, Cesar Philippidis wrote: > > By design, the libgomp OpenACC runtime prohibits data clauses with > > aliased addresses from being used in the same construct. E.g., the user > > is not allowed to specify > >

Re: [patch,gomp4] Fix PR74600

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 10:28:49AM +0200, Jakub Jelinek wrote: > I'll need to discuss it on omp-lang. I think we just need to declare > accesses to the vars living in parent frame when the parent is partially or > fully not offloaded and the nested function is as unspecified behavior. > Of course

Re: [PATCH][2/n] Change dw2_asm_output_offset to allow assembling extra offset

2016-09-16 Thread Andreas Schwab
* config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use parameter OFFSET, not offset. * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index 228d6a2..faf8fa4 100644 --- a/gcc/config/i386/cygming.h ++

Re: [PATCH][2/n] Change dw2_asm_output_offset to allow assembling extra offset

2016-09-16 Thread Richard Biener
On Fri, 16 Sep 2016, Andreas Schwab wrote: > * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use parameter > OFFSET, not offset. > * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. Oops. Ok (counts as obvious). Thanks, Richard. > diff --git a/gcc/config/i386/cygmin

[PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
Hi all, Currently the functions: int f1(int x, int t) { if (x == -1 || x == -2) t = 1; return t; } int f2(int x, int t) { if (x == -1 || x == -2) return 1; return t; } generate different code on AArch64 even though they have identical functionality: f1: add w0, w0,

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-09-16 Thread Richard Biener
On Thu, Sep 15, 2016 at 4:45 PM, Jeff Law wrote: > On 09/14/2016 11:55 PM, Richard Biener wrote: >> >> On September 14, 2016 11:36:16 PM GMT+02:00, Jan Hubicka >> wrote: + /* Visit PHI stmts and discover any new VRs possible. */ + gimple_stmt_iterator gsi; + for (gphi_iter

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Yuan, Pengfei
> > Here are the results: > > > > Param Size (GCC5)Time (GCC5) Time (GCC7) > > 0 44686265 (-8.26%) 58.772s 66.332s > > 1 45692793 (-6.19%) 40.684s 39.220s > > 2 45556185 (-6.47%) 35.292s 34.328s > > 3 46251049 (-5.05%) 28.820s 27.136s > > 4

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 9:05 AM, Thomas Schwinge wrote: > Hi! > > (CCing Bernd and Jakub -- for your information, or: "amusement" -- as > you've discussed offloading preload_common_nodes issues before...) > > Got to look into this some more, yesterday: > > On Thu, 08 Sep 2016 13:43:30 +0200, I wro

Re: C/C++ PATCH to implement -Wbool-operation (PR c/77490)

2016-09-16 Thread Marek Polacek
On Thu, Sep 15, 2016 at 04:45:03PM -0400, Eric Gallager wrote: > > +@item -Wbool-operation > > +@opindex Wno-bool-operation > > +@opindex Wbool-operation > > +Warn about suspicious operations on expressions of a boolean type. For > > +instance, bitwise negation of a boolean is very likely a bug in

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: > Hi all, > > Currently the functions: > int f1(int x, int t) > { > if (x == -1 || x == -2) > t = 1; > return t; > } > > int f2(int x, int t) > { > if (x == -1 || x == -2) > return 1; > return t; > } > > generate different cod

Re: C/C++ PATCH for c/77423 (bogus warning with -Wlogical-not-parentheses)

2016-09-16 Thread Marek Polacek
On Thu, Sep 15, 2016 at 01:21:21PM -0600, Jeff Law wrote: > On 09/05/2016 08:28 AM, Marek Polacek wrote: > > > test.c:10:8: note: add parentheses around left hand side expression to > > > silence this warning > > > r += !a == ~b; > > > ^~ > > > ( ) > > > > > > this will not f

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Jonathan Wakely
On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement on size being a multiple of alignment is in, all is fine on Solaris. I've got a slightly

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: >> > Here are the results: >> > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) >> > 0 44686265 (-8.26%) 58.772s 66.332s >> > 1 45692793 (-6.19%) 40.684s 39.220s >> > 2 45556185 (-6.47%) 35.292s 34.328s

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: > >> > Here are the results: > >> > > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) > >> > 0 44686265 (-8.26%) 58.772s 66.332s > >> > 1 45692793 (-6.19%) 40.684s 39.220s > >> > 2 45556185 (-6.47%) 35.292

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: Hi all, Currently the functions: int f1(int x, int t) { if (x == -1 || x == -2) t = 1; return t; } int f2(int x, int t) { if (x == -1 || x == -2) return 1; return t; } gene

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Marc Glisse
On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement on size being a multiple of alignment is in,

Backports to 6.x

2016-09-16 Thread Jakub Jelinek
Hi! I've backported a bunch of patches to 6.x, after bootstrapping/regtesting them on x86_64-linux and i686-linux: Jakub 2016-09-16 Jakub Jelinek Backported from mainline 2016-09-05 Jakub Jelinek PR sanitizer/77396 * asan/asan_globals.cc: Cherry-pic

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: > > On 16/09/16 10:02, Richard Biener wrote: >> >> On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov >> wrote: >>> >>> Hi all, >>> >>> Currently the functions: >>> int f1(int x, int t) >>> { >>>if (x == -1 || x == -2) >>> t = 1; >>>

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: Hi all, Currently the functions: int f1(int x, int t) { if (x == -1 || x == -2) t = 1;

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-16 Thread Trevor Saunders
On Thu, Sep 15, 2016 at 10:27:56AM -0600, Jeff Law wrote: > On 09/15/2016 10:10 AM, Trevor Saunders wrote: > > On Thu, Sep 15, 2016 at 12:52:59PM +0200, Bernd Schmidt wrote: > > > On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: > > > > > > > Basically $subject. First change variable's ty

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov wrote: > > On 16/09/16 10:50, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov >> wrote: >>> >>> On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: > > Hi

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 11:05, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov wrote: On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: Hi all,

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 12:10 PM, Trevor Saunders wrote: ok, going through all the casts added here I see the following reasons for them. - in md files operands is a array of rtx, we should probably have a different way to pass insns to the C code here. That seems worth investigating incrementally.

[committed] Use true/false instead of 1/0 in lvalue_p

2016-09-16 Thread Marek Polacek
lvalue_p returns bool but was using 0/1 as return values. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2016-09-16 Marek Polacek * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c index 4dec397..059ad1f 100644 ---

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 7:59 AM, kugan wrote: > Hi Richard, > > Thanks for the review. > > On 14/09/16 22:04, Richard Biener wrote: >> >> On Tue, Aug 23, 2016 at 4:11 AM, Kugan Vivekanandarajah >> wrote: >>> >>> Hi, >>> >>> On 19 August 2016 at 21:41, Richard Biener >>> wrote: On Tue,

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 11:07 AM, Kyrill Tkachov wrote: > > On 16/09/16 11:05, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov >> wrote: >>> >>> On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: > > On 16/09

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-16 Thread Gerald Pfeifer
On Wed, 14 Sep 2016, Segher Boessenkool wrote: > 2016-09-14 Segher Boessenkool > > * target.def (lra_p): Change commentary (for the manual) for the > new default. > * doc/tm.texi: Regenerate. "returns always true" -> "always returns true" ? (The former is how we'd say it in

Re: [PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 5:29 AM, Martin Sebor wrote: > __builtin_object_size fails for POINTER_PLUS expressions involving > non-constant offsets into objects of known size, causing GCC to fail > to detect (and add instrumentation to prevent) buffer overflow in > some basic cases such as the follow

Re: [PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 12:29:49PM +0200, Richard Biener wrote: > > PS What would be a good way to arrange for the VRP pass to run before > > the object size pass so that the latter can benefit more from range > > information? As an experiment I added another instance of the VRP > > pass before th

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 10:40 AM, Kyrill Tkachov wrote: 2016-09-16 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-16 Kyrylo Tkachov * gcc.target/aarch64/gtu_to_ltu_cmp_1.c: New test. Ok. Don't kn

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Jonathan Wakely
On 16/09/16 11:37 +0200, Marc Glisse wrote: On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement

Re: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def

2016-09-16 Thread Prathamesh Kulkarni
On 15 September 2016 at 17:53, Richard Biener wrote: > On Thu, Sep 15, 2016 at 1:21 PM, Prathamesh Kulkarni > wrote: >> On 15 September 2016 at 16:31, Richard Sandiford >> wrote: >>> Prathamesh Kulkarni writes: On 15 September 2016 at 04:21, Richard Sandiford wrote: > Richard San

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 11:45, Bernd Schmidt wrote: On 09/16/2016 10:40 AM, Kyrill Tkachov wrote: 2016-09-16 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-16 Kyrylo Tkachov * gcc.target/aarch64/gt

Re: [PATCH] Fix late dwarf generated early from optimized out globals

2016-09-16 Thread Richard Biener
On Thu, 15 Sep 2016, Richard Biener wrote: > > This addresses sth I needed to address with the early LTO debug patches > (you might now figure I'm piecemail merging stuff from that patch). > > When the cgraph code optimizes out a global we call the late_global_decl > debug hook to eventually add

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Yuan, Pengfei
> > I also like a new param better as it avoids a new magic constant and > > makes playing with > > it easier (your patch removes the ability to do statistics like you did via > > the > > early-inlining-insns parameter by forcing it to two). > > Hmm, you are right that you do not know if this par

[Patch, testsuite] Require int32plus for pr70421.c

2016-09-16 Thread Senthil Kumar Selvaraj
Hi, This patch fixes a bogus testsuite failure for the avr target. The test has integer literals that only fit on targets with int size >= 32. Committed to trunk. Regards Senthil gcc/testsuite/ChangeLog 2016-09-16 Senthil Kumar Selvaraj * gcc.dg/torture/pr70421.c: Require int

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-16 Thread Jan Hubicka
> > > I also like a new param better as it avoids a new magic constant and > > > makes playing with > > > it easier (your patch removes the ability to do statistics like you did > > > via the > > > early-inlining-insns parameter by forcing it to two). > > > > Hmm, you are right that you do not kn

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Jonathan Wakely
On 16/09/16 11:56 +0100, Jonathan Wakely wrote: On 16/09/16 11:37 +0200, Marc Glisse wrote: On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jon

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Rainer Orth
Hi Jonathan, > I've committed the patch now, to fix the failures for Solaris. I'll > revisit it when I get clarification from the committee about invalid > alignment arguments. Solaris bootstraps with the revised patch included just completed successfully. Thanks. Rainer -- ---

[PATCH] Fix PR77605

2016-09-16 Thread Richard Biener
The following patch fixes PR77605. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2016-09-16 Richard Biener PR middle-end/77605 * tree-data-ref.c (analyze_subscript_affine_affine): Use the proper niter to bound the loops. * gcc.dg/tortur

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-16 Thread Richard Kenner
> "returns always true" -> "always returns true" ? > > (The former is how we'd say it in German, and hence might be common in > Dutch as well? In English, both probably are fine, the latter feeling > more natural to me. But then, I'm not a native speaker. ;-) The former is unusual in English

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-16 Thread Wilco Dijkstra
Bernd Schmidt wrote: > On 09/15/2016 03:38 PM, Wilco Dijkstra wrote: > > __rawmemchr is not the fastest on any target I tried, including x86, > > Interesting. Care to share your test program? I just looked at the libc > sources and strlen/rawmemchr are practically identical code so I'd > expect a

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Thomas Schwinge
Hi! On Fri, 16 Sep 2016 10:59:16 +0200, Richard Biener wrote: > On Fri, Sep 16, 2016 at 9:05 AM, Thomas Schwinge > wrote: > > On Thu, 08 Sep 2016 13:43:30 +0200, I wrote: > >> On Wed, 7 Sep 2016 14:23:18 +0200, Richard Biener > >> wrote: > >> > On Wed, Sep 7, 2016 at 1:52 PM, Thomas Schwinge

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-16 Thread Segher Boessenkool
On Fri, Sep 16, 2016 at 12:26:42PM +0200, Gerald Pfeifer wrote: > On Wed, 14 Sep 2016, Segher Boessenkool wrote: > > 2016-09-14 Segher Boessenkool > > > > * target.def (lra_p): Change commentary (for the manual) for the > > new default. > > * doc/tm.texi: Regenerate. > > "returns a

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-16 Thread Trevor Saunders
On Fri, Sep 16, 2016 at 12:10:51PM +0200, Bernd Schmidt wrote: > On 09/16/2016 12:10 PM, Trevor Saunders wrote: > > ok, going through all the casts added here I see the following reasons > > for them. > > > > - in md files operands is a array of rtx, we should probably have a > > different way t

Re: [PATCH 2/8] use rtx_insn * more

2016-09-16 Thread Alexander Monakov
On Wed, 14 Sep 2016, tbsaunde+...@tbsaunde.org wrote: > @@ -3790,7 +3790,8 @@ static void > rl78_calculate_death_notes (void) > { >char dead[FIRST_PSEUDO_REGISTER]; > - rtx insn, p, s, d; > + rtx p, s, d; > +rtx_insn *insn; Minor nit: this hunk seems to be missing indentation preceding 'rt

[PATCH, rs6000] Fix PR77613 (swap optimization for splat-with-truncate)

2016-09-16 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77613 identifies a case where we fail to remove swaps from a region because it contains a form of splat that we don't yet recognize. This patch adds support for splat insns that have an embedded truncate, such as the vsx_vsplth_di pattern. Bootstr

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-16 Thread Jeff Law
On 09/16/2016 04:10 AM, Bernd Schmidt wrote: On 09/16/2016 12:10 PM, Trevor Saunders wrote: ok, going through all the casts added here I see the following reasons for them. - in md files operands is a array of rtx, we should probably have a different way to pass insns to the C code here. Tha

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-16 Thread Jeff Law
On 09/16/2016 07:28 AM, Wilco Dijkstra wrote: I noticed rawmemchr taking non-trivial amounts of time in various profiles despite no use of rawmemchr in any of the source code. It's apparently a common idiom to use strchr (s, 0) to find the end of a string. A bit of a surprise, but it is what it

Re: [RFC,PATCH] Using equivalences to help eliminate_regs_in_insn

2016-09-16 Thread Vladimir N Makarov
On 09/06/2016 11:22 AM, Matthew Fortune wrote: There is an implementation that optimises a single set but not one for a REG_EQUAL. Do you have any recollection of this code and do you think there was a reason you didn't implement the REG_EQUAL case? Either way any advice on my approach is welco

Re: [PATCH, rs6000] Fix PR77613 (swap optimization for splat-with-truncate)

2016-09-16 Thread Segher Boessenkool
On Fri, Sep 16, 2016 at 10:13:09AM -0500, Bill Schmidt wrote: > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no > regressions. Ok for trunk, and eventual backport to 6 and 5 branches? Okay and okay. One nit... > --- gcc/config/rs6000/rs6000.c(revision 240187) > +++ gcc/

RE: [RFC,PATCH] Using equivalences to help eliminate_regs_in_insn

2016-09-16 Thread Matthew Fortune
Vladimir N Makarov writes: > On 09/06/2016 11:22 AM, Matthew Fortune wrote: > > There is an implementation that optimises a single set but not one for > > a REG_EQUAL. Do you have any recollection of this code and do you > > think there was a reason you didn't implement the REG_EQUAL case? > > Eit

[PATCH][Libiberty] Support empty arguments in pex-win32

2016-09-16 Thread Andrew Stubbs
Hi, This patch fixes a libiberty bug in which zero-length arguments to "pex_run" subprocesses were silently dropped on MinGW. Basically, the code does not quote parameters unless it has to, but this corner-case was forgotten. OK? Andrew 2016-09-16 Andrew Stubbs libiberty/ * pex-win3

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-16 Thread Jeff Law
On 09/08/2016 02:59 PM, Jason Merrill wrote: On Thu, Sep 8, 2016 at 11:55 AM, Joseph Myers wrote: > On Thu, 8 Sep 2016, Jason Merrill wrote: > >> Various places in GCC use negate, bit-and and compare to test whether >> an integer is a power of 2, but I think it would be clearer for this >> tes

Re: [PATCH] Fix warning breaking profiled bootstrap

2016-09-16 Thread Jeff Law
On 08/21/2016 02:30 PM, Eric Botcazou wrote: Consider the case where sym1 results in a non-null return value (and initializes neg1/inv1), but sym2 results in a null return value, leaving neg2/inv2 undefined, but cst2 is can still be true (ADDR_EXPR with an invariant address comes to mind). Thus

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/09/2016 05:17 PM, Martin Sebor wrote: On 09/09/2016 07:59 AM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PS I used hexadecimal based on what c-format.c does but now that I checked more carefully how %qE formats string literals I see it uses octal. I think hexadecimal is

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/08/2016 08:19 PM, Martin Sebor wrote: While working on the -Wformat-length pass I noticed that in some diagnostics that make use of the %qc and %qs directives GCC prints non-printable characters raw. For example, it might print a newline, corrupting the diagnostic stream (bug 77521). Some

Re: [PATCH] unbreak libsanitizer build on sparc-linux (PR 67899)

2016-09-16 Thread Jeff Law
On 09/12/2016 11:04 AM, Mikael Pettersson wrote: PR sanitizer/67899 is a bootstrap failure on sparc-linux, caused by a compilation error in libsanitizer. The root cause is that `struct sigaction' has changed layout in glibc twice recently, first an unintended ABI change in glibc-2.20, and then t

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread Jeff Law
On 09/08/2016 01:03 PM, Martin Sebor wrote: Attached is another update to the patch to address the last round of comments and suggestions, most notably to: * implement the checking of the implementation limit of 4,095 on the output of a single directive to allow for the Glibc failure d

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Joseph Myers
On Fri, 16 Sep 2016, Richard Biener wrote: > Humm ... do we anywhere compare to those global trees by pointer equivalence? > If so then it breaks LTO support for those types. The C front end compares main variants to those types for handling usual arithmetic conversions (and more generally for t

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Joseph Myers
On Fri, 16 Sep 2016, Thomas Schwinge wrote: > That's what I was afraid of: for example, I can't tell if it holds for > all GCC configurations (back ends), that complex types' component types > will always match one of the already existing global trees? (I can Well, a component type could certain

[Committed] Fix PR fortran/77612

2016-09-16 Thread Steve Kargl
I've committed the following patch. 2016-09-16 Steven G. Kargl PR fortran/77612 * decl.c (char_len_param_value): Check parent namespace for seen_implicit_none. 2016-09-16 Steven G. Kargl PR fortran/77612 * gfortran.dg/pr77612.f90: New test. Inde

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread Jeff Law
On 09/11/2016 08:03 PM, Martin Sebor wrote: Attached is revision 8 of the patch (hopefully) adjusted as requested above, and with a simple test with of the multiline diagnostic directives suggested by David. This revision also enables the -fprintf-return-value option by default. The libgomp te

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-16 Thread Jonathan Wakely
On 16/09/16 13:12 +0100, Jonathan Wakely wrote: On 16/09/16 11:56 +0100, Jonathan Wakely wrote: On 16/09/16 11:37 +0200, Marc Glisse wrote: Is the division (by a non-constant denominator) really necessary? Probably not, but I've asked the committee for clarification what this function should

Re: [PATCH][Libiberty] Support empty arguments in pex-win32

2016-09-16 Thread DJ Delorie
This is OK. Thanks!

Re: [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-09-16 Thread Jason Merrill
On 09/14/2016 01:03 PM, Martin Sebor wrote: Attached is an updated patch that does away with the "overlapping" warning and instead issues the same warnings as the C front end (though with more context). In struct flexmems_t I've retained the NEXT array even though only the first element is used

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread David Malcolm
On Sun, 2016-09-11 at 20:03 -0600, Martin Sebor wrote: > On 09/08/2016 04:10 PM, Joseph Myers wrote: > > On Thu, 8 Sep 2016, Martin Sebor wrote: > > > > > diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in > > > index da133a4..4607495 100644 > > > --- a/gcc/doc/tm.texi.in > > > +++ b/gcc/doc/tm.

Re: [PATCH] Partially improve scalability of the unwinder (PR libgcc/71744)

2016-09-16 Thread Torvald Riegel
On Thu, 2016-09-15 at 09:22 +0200, Jakub Jelinek wrote: > Hi! > > These days on many targets that use dl_iterate_phdr to find .eh_frame_hdr > that way in most of the programs the old style EH registry is never used, > yet we still lock a global mutex and unlock it soon afterwards to find out > it

Re: [PATCH] Partially improve scalability of the unwinder (PR libgcc/71744)

2016-09-16 Thread Torvald Riegel
On Thu, 2016-09-15 at 06:05 -0700, Ian Lance Taylor wrote: > Jakub Jelinek writes: > > > 2016-09-15 Jakub Jelinek > > > > PR libgcc/71744 > > * unwind-dw2-fde.c (ATOMIC_FDE_FAST_PATH): Define if __register_frame* > > is not the primary registry and atomics are available. > > (a

[PATCH] Fix cgraph_node::rtl_info (PR target/77587)

2016-09-16 Thread Jakub Jelinek
Hi! On the following testcase the weak alias can be overridden, so we shouldn't assume because we see bar to be alias to foo and have foo definition that call to bar will bind to the current TU's foo. cgraph_node::rtl_info calls ultimate_alias_target without checking if it can be overridden or not

[Patch, reload, tentative, PR 71627] Tweak conditions in find_valid_class_1

2016-09-16 Thread Senthil Kumar Selvaraj
Hi, The below patch fixes what I think are a couple of problems with reload.c:find_valid_class_1. First, even if no regno is in_hard_reg_set_p, it goes ahead and considers rclass as valid. bad is set only if a regno is in the reg class *and* HARD_REGNO_MODE_OK is false - if both are fal

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-16 Thread Mike Stump
On Sep 16, 2016, at 6:40 AM, Segher Boessenkool wrote: > > Does just "The default version of this target hook returns true." sound > better? I.e. delete "always". That is fine.

Re: [C++ PATCH] Propagate CLASSTYPE_HAS_MUTABLE from bases to derived classes (PR c++/77375)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 3:37 PM, Jakub Jelinek wrote: > Hi! > > The following testcase fails (foo is allocated in .rodata and modified) > because while we clear TREE_READONLY for classes with mutable members, we > don't do that if they only have bases with mutable members. > > Fixed thusly, b

Re: [C++ PATCH] Fix ICE with PARM_DECL with incomplete type (PR c++/77338)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 3:46 PM, Jakub Jelinek wrote: > Hi! > > In r239289 you've done something similar for the VAR_DECL etc. case, but > for PARM_DECL we can still call is_really_empty_class on incomplete types > and ICE because TYPE_BINFO is NULL. > > Fixed thusly, bootstrapped/regtested o

Re: [PATCH] Fix abi_tag23* test failure (PR c++/77379)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 4:10 PM, Jakub Jelinek wrote: > On Mon, Aug 29, 2016 at 12:42:28PM -0400, Jason Merrill wrote: >> Another missing ABI tag, sigh. >> >> Tested x86_64-pc-linux-gnu, applying to trunk. > >> commit 1337a943a2d3926537b63d6e1f0d7f46ef10a06d >> Author: Jason Merrill >> Date:

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-16 Thread Jeff Law
On 09/12/2016 10:19 AM, Tamar Christina wrote: Hi All, This patch adds an optimized route to the fpclassify builtin for floating point numbers which are similar to IEEE-754 in format. The goal is to make it faster by: 1. Trying to determine the most common case first (e.g. the float is a Nor

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jason Merrill
On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek wrote: > + /* If body is a statement other than STATEMENT_LIST or BIND_EXPR, > + it should be skipped. E.g. switch (a) b = a; */ > + if (TREE_CODE (body) == STATEMENT_LIST > + || TREE_CODE (body) == BIND_EXPR) I'm nervous about this optim

Re: [C++ PATCH] Fix ICE in cp/error.c (PR c++/77482)

2016-09-16 Thread Jason Merrill
OK. On Mon, Sep 5, 2016 at 1:17 PM, Jakub Jelinek wrote: > Hi! > > The recent concept changes that were also backported to 6.2 break > diagnostics e.g. on the following testcase, sometimes it ICEs during > reporting of the first error, so isn't just a normal low prio error > recovery. The thing

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-16 Thread Jeff Law
On 09/14/2016 02:37 AM, Richard Biener wrote: Note that while the "snippets" may largely work (not sure how many you tried to come up with) I see the issue that a lot of RTL "unit tests" would need some trees set up, like to properly form MEM_EXPRs or REG_DECL or even SYMBOL_REFs. So I fear tha

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-16 Thread Jeff Law
On 09/13/2016 05:15 AM, Bernd Schmidt wrote: Note that the loader now resets INSN_CODE to -1, regardless of the actual code passed in, to force re-recognition, and to isolate the dumps somewhat from changes to the .md files. So although the above says insn 641 and 642 (for some snapshot of the

Re: [PATCH 4/9] Expose forcibly_ggc_collect and run it after all selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: Force a GC at the end of the selftests, to shake out GC-related issues. For example, if any GC-managed items have buggy (or missing) finalizers, this last collection will ensure that things that were failed to be finalized can be detected by valgrind.

Re: [PATCH 9/9] cse.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: This patch uses rtl_dump_test to start building out a test suite for cse. I attempted to create a reproducer for PR 71779; however I'm not yet able to replicate the bogus cse reported there via the test case. gcc/ChangeLog: * cse.c: Include s

Re: [PATCH 3/9] selftest.h: add temp_override fixture

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: We have a lot of global state in our code. Ideally we'd reduce the amount of such global state, but a prerequisite for sane refactoring is having automated testing in place to ensure that the refactoring doesn't break anything. However, the global st

Re: [PATCH 6/9] df selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * df-core.c: Include selftest.h and selftest-rtl.h. (selftest::dataflow_test::dataflow_test): New ctor. (selftest::dataflow_test::~dataflow_test): New dtor. (selftest::test_df_single_set): New function.

Re: [PATCH] Fix warning breaking profiled bootstrap

2016-09-16 Thread Andi Kleen
On Fri, Sep 16, 2016 at 10:44:34AM -0600, Jeff Law wrote: > On 08/21/2016 02:30 PM, Eric Botcazou wrote: > > > Consider the case where sym1 results in a non-null return value (and > > > initializes neg1/inv1), but sym2 results in a null return value, leaving > > > neg2/inv2 undefined, but cst2 is c

Re: [PATCH 7/9] combine.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * combine.c: Include selftest.h and selftest-rtl.h. (try_combine): Add assertion on this_basic_block. (class selftest::combine_test): New subclass of selftest::tl_dump_test. (selftest::combine_test

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 03:51:11PM -0400, Jason Merrill wrote: > On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek wrote: > > + /* If body is a statement other than STATEMENT_LIST or BIND_EXPR, > > + it should be skipped. E.g. switch (a) b = a; */ > > + if (TREE_CODE (body) == STATEMENT_LIST >

Re: [PATCH 8/9] final.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * final.c: Include selftest.h and selftest-rtl.h. (class selftest::temp_asm_out): New subclass of selftest::named_temp_file. (selftest::temp_asm_out::temp_asm_out): New ctor. (selftest::temp_asm_ou

Re: [PATCH 2/9] Add selftest::read_file

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: This is used later in the kit by the selftests for final.c gcc/ChangeLog: * selftest.c (selftest::read_file): New function. (selftest::test_read_file): New function. (selftest::selftest_c_tests): Call test_read_file. *

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:00 -0600, Jeff Law wrote: > On 09/14/2016 02:37 AM, Richard Biener wrote: > > > > Note that while the "snippets" may largely work (not sure how many > > you tried to come up with) I see the issue that a lot of RTL "unit > > tests" would need some trees set up, like to prop

  1   2   >