Re: [PATCH] include MEM_REF type in tree dumps (PR 90676)

2019-06-14 Thread Richard Biener
On Thu, Jun 13, 2019 at 5:54 PM Jakub Jelinek wrote: > > On Thu, Jun 13, 2019 at 09:50:16AM -0600, Martin Sebor wrote: > > On 6/13/19 9:34 AM, Jakub Jelinek wrote: > > > On Thu, Jun 13, 2019 at 09:30:37AM -0600, Martin Sebor wrote: > > > > The size of the access above doesn't look right. The test

Re: indirect_ref_may_alias_decl_p fix

2019-06-14 Thread Jan Hubicka
> Hi Jan, > > > I am testing the following patch which solves the bogus warning in > > tree-ssa-forwprop.c and -m32 and plan to commit it as obvoius to unbreak > > bootstrap once testing converges. Previously we did not get here wince > > we got mismatch between TMR type and decl type but same cod

Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Jan Hubicka
Hi, this patch removes nonoverlapping_component_refs_of_decl_p and replaces it by nonoverlapping_component_refs_p. Those functions are basically equivalent, however the first assumes that the outer type of memory access is type of decl which is not true in the gimple memory model. nonoverlapping_c

Re: [PATCH] include MEM_REF type in tree dumps (PR 90676)

2019-06-14 Thread Jan Hubicka
> > > Aah, it's two REFs in one. I misread the array index as being > > > a part of the MEM_REF operand, like this: > > > > > > MEM [((int *)&i)[j_1(D)]] = 1; > > > > > > I guess I've never noticed this before. Why is the whole thing > > > not simplified to an ARRAY_REF? > > > > > > i[j_2(D)

[PATCH][TESTSUITE] Add effective target keyword to check for 64-bit long long

2019-06-14 Thread Jozef Lawrynowicz
For tests that specifically require 64-bit long long, it would be useful to check this is supported with an effective target keyword. Currently it appears that either overly-restrictive effective target keywords such as int32plus are used, or code is guarded at runtime by checking sizeof(long long)

Re: Use ODR for canonical types construction in LTO

2019-06-14 Thread Jan Hubicka
> * alias.c (record_component_aliases): Honor odr_based_tbaa_p. > * ipa-devirt.c (odr_type_d): Add tbaa_enabled field. > (get_odr_type): Return NULL when odr_type_hash is NULL. > (enable_odr_based_tbaa): New function. > (odr_based_tbaa_p): New function. > (set_ty

[PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Janne Blomqvist
As GCC now provides builtins for doing integer overflow checking, lets use it when checking for overflow in xmallocarray. Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2019-06-14 Janne Blomqvist * runtime/memory.c (SIZE_MAX):Remove macro definition. (

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Richard Biener
On Fri, 14 Jun 2019, Jan Hubicka wrote: > Hi, > this patch removes nonoverlapping_component_refs_of_decl_p and replaces > it by nonoverlapping_component_refs_p. Those functions are basically > equivalent, however the first assumes that the outer type of memory access > is type of decl which is not

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Jan Hubicka
> nonoverlapping_component_refs_of_decl_p was added by Eric before > I moved nonoverlapping_component_refs_p from RTL to trees. It's > nice to see them merged. > > Still I'd like to see it done in two steps, first making them > more equivalent by adding missing checks, best with actually > failin

Re: Use ODR for canonical types construction in LTO

2019-06-14 Thread Richard Biener
On Mon, 3 Jun 2019, Jan Hubicka wrote: > Hi, > this patch makes LTO to use ODR names when building canonical types. > Theoretically this is easy task because every ODR type is unique and > it is enough to fill in the hash with the ODR names and compare them. > > In reality we want to be more care

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Richard Biener
On Fri, 14 Jun 2019, Jan Hubicka wrote: > > nonoverlapping_component_refs_of_decl_p was added by Eric before > > I moved nonoverlapping_component_refs_p from RTL to trees. It's > > nice to see them merged. > > > > Still I'd like to see it done in two steps, first making them > > more equivalent

Re: Use ODR for canonical types construction in LTO

2019-06-14 Thread Jan Hubicka
> > Step 2 remain same. > > Additional step 3 registers all odr derived types into canonical type hash. > > This requires canonical type hash to play well with ODR types (i.e. not > > consider them equivalent based on structural equivalety). > > > > The decision on whether given type has ODR based

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Jan Hubicka
Hi, I am heading to lunch, thanks for all the reviews! This is the cut down version of patch I am testing and will be back in about an hour. Honza * tree-ssa-alias.c (alias_stats): Add nonoverlapping_component_refs_p_may_alias, nonoverlapping_component_refs_p_no_alias,

[PATCH] Improve loop-distribution pattern detection with reductions in place

2019-06-14 Thread Richard Biener
This improves gcc.dg/tree-ssa/ldist-26.c so that both split loop parts get the memset recognized. The patch delays handling of reductions appearing in all partitions so that builtins can be properly detected and fixes up by trying to put a non-builtin partition last and eventually force the last

C++ PATCH for c++/90884 - stray note with -Wctor-dtor-privacy

2019-06-14 Thread Marek Polacek
This patch fixes a naked inform call, resulting in bogus note in the following testcase, if not compiled with -Wsystem-headers. Bootstrap/regtest running on x86_64-linux, ok for trunk? 2019-06-14 Marek Polacek PR c++/90884 - stray note with -Wctor-dtor-privacy. * class.c (mayb

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Richard Biener
On Fri, 14 Jun 2019, Jan Hubicka wrote: > Hi, > I am heading to lunch, thanks for all the reviews! > This is the cut down version of patch I am testing and will be back in > about an hour. > > Honza > > * tree-ssa-alias.c (alias_stats): Add > nonoverlapping_component_refs_p_may_alias

Re: [RFC] ARM -mfpu=auto woes

2019-06-14 Thread Richard Earnshaw (lists)
On 13/06/2019 14:00, Alexandre Oliva wrote: > On Jun 12, 2019, Alexandre Oliva wrote: > >> I'm looking into a regression between gcc-7 and gcc-8 that causes >> compilation with -mfloat-abi=hard to fail on arm-eabi with: > >> $ arm-eabi-gcc -c -mfloat-abi=hard t.c >> cc1: error: -mfloat-abi=hard:

Re: [PATCH V4] A jump threading opportunity for condition branch

2019-06-14 Thread Jiufu Guo
Jeff Law writes: > On 6/3/19 11:28 PM, Jiufu Guo wrote: >> >> Hi, >> >> This patch implements a new opportunity of jump threading for PR77820. >> In this optimization, conditional jumps are merged with unconditional >> jump. And then moving CMP result to GPR is eliminated. >> >> This version i

[C++ PATCH] PR c++/85552 - wrong instantiation of dtor for DMI.

2019-06-14 Thread Jason Merrill
The problem here is that when processing direct-initialization of a data member, we don't need to worry about destruction semantics; that will be handled in the [cd]tor. Conveniently, we already have tf_no_cleanup from a similar fix to new-expressions. Tested x86_64-pc-linux-gnu, applying to trun

[PATCH] Add __cpp_lib_bind_front macro to header

2019-06-14 Thread Jonathan Wakely
* include/std/version (__cpp_lib_bind_front): Add missing macro. Tested x86_64-linux, committed to trunk. I'll backport t his to gcc-9-branch too. This missing macro was found by the following script I used for testing an installed compiler: #!/bin/sh : ${CXX:=$HOME/gcc/latest/bin/g++

[PATCH] Disable -Wctor-dtor-privacy warnings for some standard types

2019-06-14 Thread Jonathan Wakely
These types are not constructible by design, so we never want warnings for them, even with -Wsystem-headers. * include/experimental/type_traits (experimental::nonesuch): Use pragma to disable -Wctor-dtor-privacy warnings. * include/std/type_traits (__is_convertible_helper)

Re: [PATCH] netbsd EABI support

2019-06-14 Thread Richard Earnshaw (lists)
On 12/06/2019 17:19, co...@sdf.org wrote: > I think copyright assignment is done. Thanks for bearing with me. > > I noticed the version I submitted in April is missing some changes we > discussed on October 2018. > > I took the patch from then and removed -matpcs too, the unnecessary > change to

[PATCH, sanitizer] Wrap rethrow_primary_exception (PR 87880).

2019-06-14 Thread Iain Sandoe
For some Darwin versions the absence of the rethrow_primary_exception symbol causes almost all sanitizer tests to fail. The following patch wraps it as suggested by Jakub in the PR trail, such that if the gate is not defined, it’s assumed to be available. OK for trunk? Iain libsanitizer/ 2019-0

Re: C++ PATCH for c++/90884 - stray note with -Wctor-dtor-privacy

2019-06-14 Thread Jason Merrill
Ok. On Fri, Jun 14, 2019, 8:10 AM Marek Polacek wrote: > This patch fixes a naked inform call, resulting in bogus note in the > following testcase, if not compiled with -Wsystem-headers. > > Bootstrap/regtest running on x86_64-linux, ok for trunk? > > 2019-06-14 Marek Polacek > > PR c

Re: [PATCH, sanitizer] Wrap rethrow_primary_exception (PR 87880).

2019-06-14 Thread Jakub Jelinek
On Fri, Jun 14, 2019 at 03:38:05PM +0100, Iain Sandoe wrote: > For some Darwin versions the absence of the rethrow_primary_exception > symbol causes almost all sanitizer tests to fail. > > The following patch wraps it as suggested by Jakub in the PR trail, such that > if the gate is not defined, i

Re: RFA: Synchronize top level files with binutils

2019-06-14 Thread Richard Earnshaw (lists)
On 10/06/2019 10:47, Nick Clifton wrote: > Hi Richard, > > OK, here is a resubmission of my patch with just the addition of the > libctf patches this time. (Sorry about the previous bad patch). > Tested with a bootstrap and a normal build. OK to apply ? > > Cheers > Nick Would it be fe

Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Steve Kargl
On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > As GCC now provides builtins for doing integer overflow checking, lets > use it when checking for overflow in xmallocarray. > > Regtested on x86_64-pc-linux-gnu, Ok for trunk? > OK -- Steve

[PATCH] i386: Update SSE <-> integer move costs

2019-06-14 Thread H.J. Lu
Since inline_secondary_memory_needed has /* ??? This is a lie. We do have moves between mmx/general, and for mmx/sse2. But by saying we need secondary memory we discourage the register allocator from using the mmx registers unless needed. */ if (MMX_CLASS_P (class1) != MMX_CLASS_P

Re: V3: [PATCH] Update preferred_stack_boundary only when expanding function call

2019-06-14 Thread Richard Sandiford
"H.J. Lu" writes: > diff --git a/gcc/calls.c b/gcc/calls.c > index c8a42680041..6ab138e7bb0 100644 > --- a/gcc/calls.c > +++ b/gcc/calls.c > @@ -3226,6 +3226,19 @@ can_implement_as_sibling_call_p (tree exp, >return true; > } > > +/* Update stack alignment when the parameter is passed in the

Re: [PATCH] i386: Update SSE <-> integer move costs

2019-06-14 Thread Uros Bizjak
On Fri, Jun 14, 2019 at 5:19 PM H.J. Lu wrote: > > Since inline_secondary_memory_needed has > > /* ??? This is a lie. We do have moves between mmx/general, and for > mmx/sse2. But by saying we need secondary memory we discourage the > register allocator from using the mmx registers u

[patch][aarch64] add netbsd/aarch64 target

2019-06-14 Thread coypu
Hi folks, This patch adds support for netbsd/aarch64. It would be nice to have it committed, please tell me if anything is wrong. Thanks. Matthew Green Maya Rashish gcc: * config.gcc (aarch64*-*-netbsd*): New target. * config/aarch64/aarch64-netbsd.h: New file. * confi

[patch] Add NetBSD/hppa target

2019-06-14 Thread coypu
This adds netbsd/hppa support. I tested it on the shiny new QEMU-git which can now boot NetBSD too :-) Files are very similar to the linux code. Please let me know if any changes need to be made. Matt Thomas Nick Hudson Matthew Green Maya Rashish gcc/ChangeLog: config.gcc (hppa*-*-n

Re: V3: [PATCH] Update preferred_stack_boundary only when expanding function call

2019-06-14 Thread H.J. Lu
On Fri, Jun 14, 2019 at 8:31 AM Richard Sandiford wrote: > > "H.J. Lu" writes: > > diff --git a/gcc/calls.c b/gcc/calls.c > > index c8a42680041..6ab138e7bb0 100644 > > --- a/gcc/calls.c > > +++ b/gcc/calls.c > > @@ -3226,6 +3226,19 @@ can_implement_as_sibling_call_p (tree exp, > >return true;

Re: V3: [PATCH] Update preferred_stack_boundary only when expanding function call

2019-06-14 Thread Richard Sandiford
"H.J. Lu" writes: > On Fri, Jun 14, 2019 at 8:31 AM Richard Sandiford > wrote: >> >> "H.J. Lu" writes: >> > diff --git a/gcc/calls.c b/gcc/calls.c >> > index c8a42680041..6ab138e7bb0 100644 >> > --- a/gcc/calls.c >> > +++ b/gcc/calls.c >> > @@ -3226,6 +3226,19 @@ can_implement_as_sibling_call_p

Re: [patch] Add NetBSD/hppa target

2019-06-14 Thread Jeff Law
On 6/14/19 9:44 AM, co...@sdf.org wrote: > This adds netbsd/hppa support. I tested it on the shiny new QEMU-git > which can now boot NetBSD too :-) > > Files are very similar to the linux code. > > Please let me know if any changes need to be made. > > Matt Thomas > Nick Hudson > Matthew Green

Re: [PATCH] PR fortran/89646 -- suppress spurious warnings

2019-06-14 Thread Janne Blomqvist
On Fri, Jun 14, 2019 at 1:16 AM Steve Kargl wrote: > > The attached patch suppresses the spurious warnings that > would otherwise occur for the testcase. Regression > tested cleanly on x86_64-*-freebsd. OK to commit? Ok, thanks for the patch. -- Janne Blomqvist

Re: [PATCH 3/3] Enable full libgfortran library for AMD GCN

2019-06-14 Thread Janne Blomqvist
On Fri, Jun 7, 2019 at 5:41 PM Andrew Stubbs wrote: > > This patch basically reverts the previous patch to put AMD GCN in > "minimal" mode. This is Ok, provided the maintainers for the areas touched by the other 2 patches in this series Ok those. Thanks for improving Fortran offloading (given th

Re: [PATCH V4] A jump threading opportunity for condition branch

2019-06-14 Thread Jeff Law
On 6/14/19 6:51 AM, Jiufu Guo wrote: > Jeff Law writes: > >> On 6/3/19 11:28 PM, Jiufu Guo wrote: >>> >>> Hi, >>> >>> This patch implements a new opportunity of jump threading for PR77820. >>> In this optimization, conditional jumps are merged with unconditional >>> jump. And then moving CMP resu

[RFC] #pragma omp scan inclusive vectorization

2019-06-14 Thread Jakub Jelinek
Hi! OpenMP 5.0 introduced scan reductions, like: #pragma omp simd reduction (inscan, +:r) for (int i = 0; i < 1024; i++) { r += a[i]; #pragma omp scan inclusive(r) b[i] = r; } where there are 2 parts of code in each iteration, one which is supposed to compute the valu

Re: [patch] Add NetBSD/hppa target

2019-06-14 Thread John David Anglin
On 2019-06-14 12:02 p.m., Jeff Law wrote: >> diff --git a/gcc/config.gcc b/gcc/config.gcc >> index 76bb316942d..ba93bb41ec8 100644 >> --- a/gcc/config.gcc >> +++ b/gcc/config.gcc >> @@ -1481,6 +1481,14 @@ hppa*-*-openbsd*) >> gas=yes >> gnu_ld=yes >> ;; >> +hppa*-*-netbsd*) >> +t

Re: [Patch, fortran] PR90577, PR90578 - FAIL: gfortran.dg/lrshift_1.f90 & Wrong code with LSHIFT and optimization

2019-06-14 Thread Harald Anlauf
Committed as svn rev. 272309. Thanks for the quick review! Harald On 06/14/19 00:18, Steve Kargl wrote: > On Thu, Jun 13, 2019 at 11:50:23PM +0200, Harald Anlauf wrote: >> >> it was already discussed in the above PRs that the testcase >> lrshift_1.f90 needs to be corrected because it invokes neg

Re: [PATCH][TESTSUITE] Add effective target keyword to check for 64-bit long long

2019-06-14 Thread Jeff Law
On 6/14/19 3:45 AM, Jozef Lawrynowicz wrote: > For tests that specifically require 64-bit long long, it would be useful to > check this is supported with an effective target keyword. > Currently it appears that either overly-restrictive effective target keywords > such as int32plus are used, or cod

Re: [PATCH] improve strcmp folding of unequal strings (PR 90626)

2019-06-14 Thread Jeff Law
On 6/13/19 5:50 PM, Martin Sebor wrote: > While integrating the strlen and sprintf passes and investigating > optimization opportunities that it opens up I noticed a few related > to a strcmp optimization implemented in GCC 9.  One is to take > advantage of the fact that a nul-terminated string of 

Re: [PATCH][openacc] Disable pass_thread_jumps for IFN_UNIQUE

2019-06-14 Thread Jeff Law
On 6/12/19 11:54 AM, Tom de Vries wrote: > Hi, > > If we compile the openacc testcase with -fopenacc -O2, we run into a SIGSEGV > or assert. The root cause for this is that pass_thread_jumps breaks the > invariant that OACC_FORK and OACC_JOIN mark the start and end of a > single-entry-single-exit

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Jan Hubicka
> > I think this is still error-prone since we look past > VIEW_CONVERT_EXPRs in the path so we happily disambiguate, > say, > > struct X { int e; int d; }; > struct Y { int d; int e; }; > > VIEW_CONVERT(p->b).d > VIEW_CONVERT(q->b).e > > where in reality only the access paths from the base

Re: Remove nonoverlapping_component_refs_of_decl_p

2019-06-14 Thread Jan Hubicka
... and forgot to add stats for tramp3d :) Alias oracle query stats: refs_may_alias_p: 3021539 disambiguations, 3321136 queries ref_maybe_used_by_call_p: 7118 disambiguations, 3047133 queries call_may_clobber_ref_p: 817 disambiguations, 817 queries nonoverlapping_component_refs_p: 22 disam

Re: C++ PATCH to implement deferred parsing of noexcept-specifiers (c++/86476, c++/52869)

2019-06-14 Thread Marek Polacek
On Tue, Jun 11, 2019 at 11:46:05PM -0400, Jason Merrill wrote: > On 6/3/19 9:01 PM, Marek Polacek wrote: > > > I sort of ended up going down a rathole, but then I realized we don't need > > to > > delay parsing of noexcept-specifiers of member friend function declarations, > > because they aren't

Re: [PATCH v6 01/10] Initial TI PRU GCC port

2019-06-14 Thread Segher Boessenkool
On Wed, Jun 12, 2019 at 06:08:13AM +0300, Dimitar Dimitrov wrote: > On неделя, 9 юни 2019 г. 17:38:58 EEST Segher Boessenkool wrote: > > On Sun, Jun 09, 2019 at 11:01:38PM +0300, Dimitar Dimitrov wrote: > > > +; An unfortunate side effect is that quite a few invalid RTL patterns are > > > +; genera

Re: [PATCH v4 2/3] Add predict_doloop_p target hook

2019-06-14 Thread Segher Boessenkool
Hi Kewen, On Thu, Jun 13, 2019 at 01:50:05PM +0800, Kewen.Lin wrote: > Comparing with the previous version, I dropped the checks > on costly niter and invalid stmt scanning. As Richard's > suggestion, keep this as simple as possible, refine it > if finding any cases which matter later. I think

[PATCH,Fortran] -- Check for overflow integer exponentation

2019-06-14 Thread Steve Kargl
I have had this patch in my tree since the beginning of May. During constant folding, gfortran would not issue an error for overflow for integer exponentation. Bootstrapped and regression tested multiple times on x86_64-*-freebsd? OK to commit? 2019-06-15 Steven G. Kargl * arith.c

Re: [PATCH] libgfortran: Use __builtin_mul_overflow in xmallocarray

2019-06-14 Thread Steve Kargl
On Fri, Jun 14, 2019 at 08:07:36AM -0700, Steve Kargl wrote: > On Fri, Jun 14, 2019 at 01:08:48PM +0300, Janne Blomqvist wrote: > > As GCC now provides builtins for doing integer overflow checking, lets > > use it when checking for overflow in xmallocarray. > > > > Regtested on x86_64-pc-linux-gnu

Re: [PATCH,Fortran] -- Check for overflow integer exponentation

2019-06-14 Thread Jerry DeLisle
On 6/14/19 3:56 PM, Steve Kargl wrote: I have had this patch in my tree since the beginning of May. During constant folding, gfortran would not issue an error for overflow for integer exponentation. Bootstrapped and regression tested multiple times on x86_64-*-freebsd? OK to commit? 2019-06-15

[Darwin, committed] opts processing - Initial tidy

2019-06-14 Thread Iain Sandoe
This change adds RejectNegative in a number of places it was needed, reorders the opts into two groups (one general and one driver-only). We also add a minimal description to each opt, and note some that are now obsolete. The only functional change is to permit -mtarget-linker= as an alias of -m

Re: [PATCH v4 2/3] Add predict_doloop_p target hook

2019-06-14 Thread Bill Schmidt
On 6/14/19 4:53 PM, Segher Boessenkool wrote: > Hi Kewen, > > On Thu, Jun 13, 2019 at 01:50:05PM +0800, Kewen.Lin wrote: >> Comparing with the previous version, I dropped the checks >> on costly niter and invalid stmt scanning. As Richard's >> suggestion, keep this as simple as possible, refine

[PATCH] Sync top-level change from gdb

2019-06-14 Thread Tom Tromey
This patch syncs a change to the top-level configury from gdb. It should not affect the gcc build at all. Tested by rebuilding. ChangeLog 2019-06-14 Tom Tromey * configure.ac (host_libs): Add gnulib. * configure: Rebuild. * Makefile.def (host_modules, dependencies): A

[PATCH] rs6000: New iterator CCEITHER

2019-06-14 Thread Segher Boessenkool
This expands to both CC and CCUNS, it's useful for isel for example. Tested on powerpc64le-linux; committing to trunk. Segher 2019-06-15 Segher Boessenkool * config/rs6000/rs6000.md (CCEITHER): New define_mode_iterator. (un): New define_mode_attr. (isel_signed_, ise

Re: [PATCH] Sync top-level change from gdb

2019-06-14 Thread Jeff Law
On 6/14/19 6:15 PM, Tom Tromey wrote: > This patch syncs a change to the top-level configury from gdb. It > should not affect the gcc build at all. Tested by rebuilding. > > ChangeLog > 2019-06-14 Tom Tromey > > * configure.ac (host_libs): Add gnulib. > * configure: Rebuild. >