Re: [PATCH, PR81192] Fix sigsegv in find_same_succ_bb

2017-07-02 Thread Richard Biener
On Sun, 2 Jul 2017, Tom de Vries wrote: > Hi, > > consider this test-case: > ... > unsigned a; > int b, c; > > static int > fn1 (int p1, int p2) > { > return p1 > 2147483647 - p2 ? p1 : p1 + p2; > } > > void > fn2 (void) > { > int j; > a = 30; > for (; a;) > for (; c; b = fn1 (j, 1)

Re: Add DR_BASE_ALIGNMENT

2017-07-02 Thread Richard Sandiford
Richard Biener writes: > On Wed, Jun 28, 2017 at 3:40 PM, Richard Sandiford > wrote: >> This patch records the base alignment in data_reference, to avoid the >> second-guessing that was previously done in vect_compute_data_ref_alignment. >> It also makes vect_analyze_data_refs use dr_analyze_inne

Re: [PATCH][GCC][AARCH64]Bad code-gen for structure/block/unaligned memory access

2017-07-02 Thread Tamar Christina
Hi All, Sorry I just realized I never actually sent the updated patch... So here it is :) Regards, Tamar From: gcc-patches-ow...@gcc.gnu.org on behalf of Tamar Christina Sent: Friday, June 9, 2017 4:51:52 PM To: Richard Sandiford Cc: GCC Patches; nd; J

Re: [PATCH][GCC][AArch64] optimize float immediate moves (2 /4) - HF/DF/SF mode.

2017-07-02 Thread Tamar Christina
Ping From: gcc-patches-ow...@gcc.gnu.org on behalf of Tamar Christina Sent: Monday, June 26, 2017 11:50:51 AM To: James Greenhalgh Cc: GCC Patches; nd; Marcus Shawcroft; Richard Earnshaw Subject: Re: [PATCH][GCC][AArch64] optimize float immediate moves (2

Re: [PATCH][GCC][AArch64] optimize float immediate moves (1 /4) - infrastructure.

2017-07-02 Thread Tamar Christina
Ping From: gcc-patches-ow...@gcc.gnu.org on behalf of Tamar Christina Sent: Monday, June 26, 2017 11:49:42 AM To: James Greenhalgh Cc: Richard Sandiford; GCC Patches; nd; Marcus Shawcroft; Richard Earnshaw Subject: Re: [PATCH][GCC][AArch64] optimize float

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-02 Thread Yuri Gribov
On Sun, Jul 2, 2017 at 6:03 PM, Yuri Gribov wrote: > Hi all, > > This is initial patch for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's > suggestion it optimizes > (float)lhs CMP rhs > (double)lhs CMP rhs > to > lhs CMP (typeof(x))rhs > whenever typeof(x) can be precis

[PATCH] Add dotfn

2017-07-02 Thread Tom de Vries
Hi, this patch adds a debug function dotfn and a convenience macro DOTFN similar to dot-fn in gdbhooks.py. It can be used to have the compiler: - dump a control flow graph, or - pop up a control flow graph window at specific moments in the compilation flow, for debugging purposes. Bootstrappe

[PATCH, PR69468] Ignore EDGE_{DFS_BACK,EXECUTABLE} in tail-merge

2017-07-02 Thread Tom de Vries
[ was: Re: [PATCH, PR81192] Don't tail-merge blocks from different loops ] On 07/03/2017 12:49 AM, Tom de Vries wrote: [ was: Re: [PATCH, PR81192] Fix sigsegv in find_same_succ_bb ] On 07/03/2017 12:26 AM, Tom de Vries wrote: [ Trying again with before.svg instead of before.pdf ] Hi, conside

[PATCH, PR81192] Don't tail-merge blocks from different loops

2017-07-02 Thread Tom de Vries
[ was: Re: [PATCH, PR81192] Fix sigsegv in find_same_succ_bb ] On 07/03/2017 12:26 AM, Tom de Vries wrote: [ Trying again with before.svg instead of before.pdf ] Hi, consider this test-case: ... unsigned a; int b, c; static int fn1 (int p1, int p2) { return p1 > 2147483647 - p2 ? p1 : p1 +

[PATCH, PR81192] Fix sigsegv in find_same_succ_bb

2017-07-02 Thread Tom de Vries
[ Trying again with before.svg instead of before.pdf ] Hi, consider this test-case: ... unsigned a; int b, c; static int fn1 (int p1, int p2) { return p1 > 2147483647 - p2 ? p1 : p1 + p2; } void fn2 (void) { int j; a = 30; for (; a;) for (; c; b = fn1 (j, 1)) ; } ... When co

Update profile in tree-complex.c

2017-07-02 Thread Jan Hubicka
bootrapped/regtested x86_64-linux, comitted. Honza * tree-complex.c (expand_complex_div_wide): update profile. Index: tree-complex.c === --- tree-complex.c (revision 249881) +++ tree-complex.c (working copy) @@ -118

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-02 Thread Marc Glisse
On Sun, 2 Jul 2017, Yuri Gribov wrote: On Sun, Jul 2, 2017 at 6:32 PM, Marc Glisse wrote: On Sun, 2 Jul 2017, Yuri Gribov wrote: This is initial patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Thanks. I have had this unfinished, probably wrong patch on my hard drive for 4 ye

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-02 Thread Yuri Gribov
On Sun, Jul 2, 2017 at 6:32 PM, Marc Glisse wrote: > On Sun, 2 Jul 2017, Yuri Gribov wrote: > >> This is initial patch for >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . > > Thanks. I have had this unfinished, probably wrong patch on my hard drive > for 4 years, I doubt there is much you

[gcc commit] [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external

2017-07-02 Thread Jan Kratochvil
On Sun, 02 Jul 2017 18:22:45 +0200, Jason Merrill wrote: > I'd suggest "internal" rather than "static". Otherwise the patch looks good. Checked in as r249883 with: DW_IDX_GNU_internal, DW_IDX_GNU_external Jan

[PATCH] enhance -Wrestrict for sprintf %s arguments

2017-07-02 Thread Martin Sebor
The attached patch enhances the -Wrestrict warning to detect more than just trivial instances of overlapping copying by sprintf and related functions. The meat of the patch is relatively simple but because it introduces dependencies between existing classes in the sprintf pass I had to move the c

Re: [PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-02 Thread Marc Glisse
On Sun, 2 Jul 2017, Yuri Gribov wrote: This is initial patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Thanks. I have had this unfinished, probably wrong patch on my hard drive for 4 years, I doubt there is much you can extract from it, but just in case... -- Marc GlisseInde

[PATCH][PR 57371] Remove useless floating point casts in comparisons

2017-07-02 Thread Yuri Gribov
Hi all, This is initial patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57371 . Per Joseph's suggestion it optimizes (float)lhs CMP rhs (double)lhs CMP rhs to lhs CMP (typeof(x))rhs whenever typeof(x) can be precisely represented by floating-point type (e.g. short by float or int by d

Re: ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external

2017-07-02 Thread Jason Merrill
On Sun, Jul 2, 2017 at 3:25 AM, Jan Kratochvil wrote: > http://dwarfstd.org/ShowIssue.php?issue=170527.1 > > 170527.1 Jan Kratochvil DW_IDX_* for static/extern symbols Enhancement Open > > Section 6.1.1.4.7, pg 147 > When a debugger wants to print 'somename' it logically tries to find first > 'so

Re: [patch, fortran] Implement blocked eoshift for eoshift0

2017-07-02 Thread Paul Richard Thomas
Hi Thomas, The timings are impressive! OK for trunk. Thanks Paul On 1 July 2017 at 14:48, Thomas Koenig wrote: > Hello world, > > the attached patch implements the blocked algorithm for > constant shift for dim > 1 for eoshift0 (which handles > the case of constant shift and constant fill valu

Re: [2/2] PR 80769: Incorrect strlen optimisation

2017-07-02 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, May 16, 2017 at 09:02:08AM +0100, Richard Sandiford wrote: >> 2017-05-16 Richard Sandiford >> >> gcc/ >> PR tree-optimization/80769 >> * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used >> for malloc and calloc. Document the new inv

[PATCHv2][PR 56727] Bypass PLT for recursive calls

2017-07-02 Thread Yuri Gribov
Hi all, This is a new version of previous patch (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00020.html), fixed after Rainer's remarks. -Y pr56727-2.patch Description: Binary data

Re: [PATCH][PR 56727] Bypass PLT for recursive calls

2017-07-02 Thread Yuri Gribov
On Sat, Jul 1, 2017 at 9:56 PM, Rainer Orth wrote: > Hi Yuri, > >> diff -rupN gcc/gcc/testsuite/gcc.dg/pr56727-1.c >> gcc-56727/gcc/testsuite/gcc.dg/pr56727-1.c >> --- gcc/gcc/testsuite/gcc.dg/pr56727-1.c 1970-01-01 01:00:00.0 >> +0100 >> +++ gcc-56727/gcc/testsuite/gcc.dg/pr56727-

ping^2: [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external

2017-07-02 Thread Jan Kratochvil
http://dwarfstd.org/ShowIssue.php?issue=170527.1 170527.1 Jan Kratochvil DW_IDX_* for static/extern symbols Enhancement Open Section 6.1.1.4.7, pg 147 When a debugger wants to print 'somename' it logically tries to find first 'somename' as an external symbol in all available libraries. Only i