[committed] fix comment for SSA_PROP_NOT_INTERESTING

2016-03-24 Thread Aldy Hernandez
It's not obvious in the comment at the top of the file that PROP_NOT_INTERESTING may be simulated again. Interestingly enough, Diego's GCC summit presentation on the propagator has much better docs than our internal docs/comments. We should probably merge a lot from there. Anyways... Commi

[committed] fix typo in pure attribute documentation

2016-03-24 Thread Aldy Hernandez
Committed as obvious. commit cdc4f177c26c1949be630634a72a6622250624a8 Author: Aldy Hernandez Date: Thu Mar 24 22:55:07 2016 -0500 * doc/extend.texi: Fix typo in documentation to pure attribute. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 623a5d0..6e27029 100644 --- a/

Re: out of bounds access in insn-automata.c

2016-03-24 Thread Aldy Hernandez
On 03/24/2016 10:02 AM, Alexander Monakov wrote: Hi, On Thu, 24 Mar 2016, Bernd Schmidt wrote: On 03/24/2016 11:17 AM, Aldy Hernandez wrote: On 03/23/2016 10:25 AM, Bernd Schmidt wrote: It looks like this block of code is written by a helper function that is really intended for other purposes

[committed] Fix bswapdi2 pattern in pa.md

2016-03-24 Thread John David Anglin
This fixes PR target/70319. We need to us a scratch register to avoid clobbering operand 1. Tested on hppa64-hp-hpux11.11. Committed to trunk and gcc-5. Dave -- John David Anglin dave.ang...@bell.net 2016-03-24 John David Anglin PR target/70319 * config/pa/pa.md (bs

check-target-libgomp wall time, without vs. with offloading (was: Also test -O0 for OpenACC C, C++ offloading test cases)

2016-03-24 Thread Thomas Schwinge
Hi! On Wed, 23 Mar 2016 20:02:01 +0100, Jakub Jelinek wrote: > On Tue, Mar 22, 2016 at 11:23:43AM +0100, Thomas Schwinge wrote: > > As discussed in > > > > (and similar to what we're already doing for Fortran, a

Re: Also test -O0 for OpenACC C, C++ offloading test cases

2016-03-24 Thread Thomas Schwinge
Hi! On Wed, 23 Mar 2016 19:57:50 +0100, Bernd Schmidt wrote: > Ok with [...]. Thanks for the review; committed in r234471: commit 02662647911b3296b07d7f4e3e3ed0200619da48 Author: tschwinge Date: Thu Mar 24 21:29:55 2016 + Also test -O0 for OpenACC C, C++ offloading test cases

Re: Fix 69650, bogus line numbers from libcpp

2016-03-24 Thread Jeff Law
On 03/24/2016 09:20 AM, Bernd Schmidt wrote: On 03/23/2016 03:21 PM, Richard Biener wrote: On Wed, Mar 23, 2016 at 2:15 PM, Bernd Schmidt wrote: On 03/23/2016 01:41 PM, Richard Biener wrote: Btw, the issue in the PR is also fixed with a simple Index: libcpp/line-map.c

[PATCH ARM v2] PR69770 -mlong-calls does not affect calls to __gnu_mcount_nc generated by -pg

2016-03-24 Thread Charles Baylis
When compiling with -mlong-calls and -pg, calls to the __gnu_mcount_nc function are not generated as long calls. This is the sequel to this patch https://gcc.gnu.org/ml/gcc-patches/2016-02/msg00881.html This patch fixes the following problems with the previous patch. . Nested functions now wo

[gomp-nvptx 1/2] libgomp: avoid malloc calls in gomp_nvptx_main

2016-03-24 Thread Alexander Monakov
Avoid calling malloc where it's easy to use stack storage instead: device malloc is very slow in CUDA. This cuts about 60-80 microseconds from target region entry/exit time, slimming down empty target regions from ~95 to ~17 microseconds (as measured on a GTX Titan). * config/nvptx/target

[gomp-nvptx 0/2] gomp_nvptx_main tweaks

2016-03-24 Thread Alexander Monakov
I have committed two nvptx libgomp tweaks to amonakov/gomp-nvptx branch, one to improve efficiency, another to workaround a Maxwell-specific driver bug. Alexander Monakov (2): libgomp: avoid malloc calls in gomp_nvptx_main libgomp: avoid triggering a driver bug on sm_50 libgomp/ChangeLog.gom

[gomp-nvptx 2/2] libgomp: avoid triggering a driver bug on sm_50

2016-03-24 Thread Alexander Monakov
Loops lacking exit edges can trigger an NVIDIA driver sm_50 code generation bug, which manifested as stack pointer (SASS register R1) corruption in this case. Adjusting source by hand to arrange a cheap exit branch seems to be the most reasonable workaround. NVIDIA bug ID 200177879. * con

C++ PATCH for c++/70386 (constexpr ICE with -Wall and PMF)

2016-03-24 Thread Jason Merrill
The compiler passes around PMF temporaries as bare CONSTRUCTORs, so we need to be prepared for that. Tested x86_64-pc-linux-gnu, applying to trunk. commit ebbe164ea708e318be4aa911cc9e98fa333dcd02 Author: Jason Merrill Date: Thu Mar 24 14:52:25 2016 -0400 PR c++/70386 * constexpr.c

Re: [AArch64] Emit square root using the Newton series

2016-03-24 Thread Evandro Menezes
On 03/17/16 17:46, Evandro Menezes wrote: This patch refactors the function to emit the reciprocal square root approximation to also emit the square root approximation. 2016-03-23 Evandro Menezes Wilco Dijkstra gcc/ * config/aarch64/aarch64-tuning-flags.de

Re: [PATCH 3/4, libgomp] Resolve deadlock on plugin exit, HSA plugin parts

2016-03-24 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 06:22:17PM +0800, Chung-Lin Tang wrote: > Hi Martin, I think you're the one to CC for this, > as I mentioned in the first email, this has been build tested, however I did > not know if I could test this without a Radeon card. If convenient, > could you or anyone famili

Re: [PATCH 1/4, libgomp] Resolve deadlock on plugin exit

2016-03-24 Thread Martin Jambor
Hi, On Mon, Mar 21, 2016 at 06:21:02PM +0800, Chung-Lin Tang wrote: > Hi, this is the set of patches from > https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01411.html > revised again, this time also with audits for the HSA plugin. > > The changes are pretty minor, mainly that the unload_image hook

Re: [patch] libstdc++/69945 Add __gnu_cxx::__freeres hook

2016-03-24 Thread Jonathan Wakely
On 16/03/16 16:29 +0100, Mark Wielaard wrote: On Thu, 2016-03-03 at 16:34 +0100, Mark Wielaard wrote: On Wed, 2016-02-24 at 18:35 +, Jonathan Wakely wrote: > This adds a new function to libsupc++ which will free the memory still > in use by the pool used for allocating exceptions when malloc

Re: [C++ PATCH] Diagnose constexpr overflow (PR c++/70323)

2016-03-24 Thread Jason Merrill
On 03/23/2016 02:34 PM, Jason Merrill wrote: For GCC 7 we should do constexpr evaluation on the unfolded function, but for GCC 6 this is OK. And here's a fix for the -Wall case. Tested x86_64-pc-linux-gnu, applying to trunk. commit 75f153ad9c455c7f2340b6da6791e5a9a0787a8e Author: Jason Merri

Re: [PATCH] Fix 69845

2016-03-24 Thread Jeff Law
On 03/22/2016 11:40 AM, Richard Henderson wrote: In PR68142 you added a check for overflow + __INT_MIN__. I can't figure out why the check for __INT_MIN__, except that it seems specific to the test case you examined. And indeed, this test case shows how things go wrong with other distributed fol

Re: [DOC Patch] Add sample for @cc constraint

2016-03-24 Thread Sandra Loosemore
On 03/24/2016 09:00 AM, Bernd Schmidt wrote: In principle we probably should have an example, but once again I have some problems with the style of the added documentation. I prefer concise writing without unnecessary repetition. Any other reviewers can of course override me, but the following is

[PATCH GCC]Reduce compilation time for IVOPT by skipping cost computation in use group

2016-03-24 Thread Bin Cheng
Hi, Quite lot of time is used when IVOPT computes cost for pairs. As a matter of fact, some pairs are very similar to each other, and we can abstract and compute cost only once for these pairs. This is a patch doing so, the idea is skipping cost computation for sub-uses in each group, of cour

Re: [PR70366] fix chromium build failure with LTO due to segfault in inline_call

2016-03-24 Thread Jeff Law
On 03/24/2016 08:43 AM, Prathamesh Kulkarni wrote: Hi, The following fix suggested by Richard fixes chromium build failing due to segfault in inline_call. Bootstrapped and tested on x86_64-unknown-linux-gnu. Cross-tested on arm*-*-* and aarch64*-*-*. Ok for trunk ? OK. jeff

[PATCH] Remove incorrect warning for parallel firstprivate clause

2016-03-24 Thread Tom de Vries
Hi, This patch fixes an incorrect warning for the oacc firstprivate clause. Consider this test-case: ... void foo (void) { int i; #pragma acc parallel { i = 1; } } ... When compiling with -fopenacc -Wuninitialized, we get an 'is used uninitialized' warning for variable 'i', which i

[PATCH] Remove incorrect warning for kernels copy clause

2016-03-24 Thread Tom de Vries
Hi, This patch fixes an incorrect warning for the oacc copy clause. Consider this test-case: ... void foo (void) { int i; #pragma acc kernels { i = 1; } } ... When compiling with -fopenacc -Wuninitialized, we get an 'is used uninitialized' warning for variable 'i', which is confusi

Re: [gomp4] Some additional OpenACC reduction tests

2016-03-24 Thread Thomas Schwinge
Hi! On Wed, 29 Jul 2015 18:23:12 +0100, Julian Brown wrote: > This is a set of 19 new tests for OpenACC reductions, covering several > ways of performing reductions over the parallel and loop directives > using gang or worker/vector level parallelism. > --- /dev/null > +++ b/libgomp/testsuite/l

Re: rs6000 stack_tie mishap again

2016-03-24 Thread Jeff Law
On 03/24/2016 02:17 AM, Olivier Hainque wrote: [snip] So, aside from the dependency issue which needs to be fixed somehow, I think it would make sense to consider using a strong blockage mecanism in expand_epilogue. That's what we both said here https://gcc.gnu.org/ml/gcc-patches/2011-11/msg01

Re: [RS6000, PATCH] PR70052, ICE compiling _Decimal128 test case

2016-03-24 Thread David Edelsohn
On Thu, Mar 24, 2016 at 7:01 AM, Alan Modra wrote: > This fixes the PR70052 ICE by modifying easy_fp_constant to correctly > return false for decimal floating point zero. 0.0D is not an all-zero > bit pattern, at least, not the canonical form. > > I've also taken on Mike's suggestion of using a m

[testsuite, committed] Add goacc/uninit-use-device-clause.{c,f95}

2016-03-24 Thread Tom de Vries
Hi, I've committed attached patch, which adds testcases that test the -Wuninitialized warning for the use-device-clause on the openacc directive host_data. I found an issue with compilation of the host_data directive on C/C++, which I've filed as PR70388 - '[openacc] host_data use_device tri

[testsuite, committed] Add goacc/uninit-dim-clause.{c,f95}

2016-03-24 Thread Tom de Vries
Hi, I've committed attached patch, which adds testcases that test the -Wuninitialized warning for the num_gangs, num_workers, vector_length clauses on the openacc directive parallel. Thanks, - Tom Add goacc/uninit-dim-clause.{c,f95} 2016-03-24 Tom de Vries * c-c++-common/goacc/uninit-di

[testsuite, committed] Add missing initialization in goacc/host_data-tree.f95

2016-03-24 Thread Tom de Vries
Hi, I've run the goacc.exp testcases with -Wuninitialized and found one more missing initialization. Fixed and committed as attached. Thanks, - Tom Add missing initialization in goacc/host_data-tree.f95 2016-03-24 Tom de Vries * gfortran.dg/goacc/host_data-tree.f95: Add missing initializ

Re: [PATCH] 69517 - [5/6 regression] SEGV on a VLA with excess initializer elements

2016-03-24 Thread Jason Merrill
On 03/23/2016 03:47 PM, Martin Sebor wrote: Thanks for the comments. 2) It hardwires a rather arbitrarily restrictive limit of 64 KB on the size of the biggest C++ VLA. (This could stand to be improved and made more intelligent, and perhaps integrated with stack checking via -fstac

Re: [DOC Patch] Add sample for @cc constraint

2016-03-24 Thread Bernd Schmidt
In principle we probably should have an example, but once again I have some problems with the style of the added documentation. I prefer concise writing without unnecessary repetition. Any other reviewers can of course override me, but the following is my opinion on these changes. More problem

Re: Fix 69650, bogus line numbers from libcpp

2016-03-24 Thread Bernd Schmidt
On 03/23/2016 03:21 PM, Richard Biener wrote: On Wed, Mar 23, 2016 at 2:15 PM, Bernd Schmidt wrote: On 03/23/2016 01:41 PM, Richard Biener wrote: Btw, the issue in the PR is also fixed with a simple Index: libcpp/line-map.c ==

[PATCH, HSA]: Fix PR hsa/70399

2016-03-24 Thread Martin Liška
Hello. Current HSA back-end wrongly handles memory stores. Although, we properly identify that an immediate operand needs to respect type of a memory store instruction it belongs to, the binary representation of the operand is not updated. Following patch delays emission of the binary represent

Re: out of bounds access in insn-automata.c

2016-03-24 Thread Alexander Monakov
Hi, On Thu, 24 Mar 2016, Bernd Schmidt wrote: > On 03/24/2016 11:17 AM, Aldy Hernandez wrote: > > On 03/23/2016 10:25 AM, Bernd Schmidt wrote: > > > It looks like this block of code is written by a helper function that is > > > really intended for other purposes than for maximal_insn_latency. Migh

[PR70366] fix chromium build failure with LTO due to segfault in inline_call

2016-03-24 Thread Prathamesh Kulkarni
Hi, The following fix suggested by Richard fixes chromium build failing due to segfault in inline_call. Bootstrapped and tested on x86_64-unknown-linux-gnu. Cross-tested on arm*-*-* and aarch64*-*-*. Ok for trunk ? Thanks, Prathamesh diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transfo

Re: [PATCH] Slightly improve TARGET_STV splitters (PR target/70321)

2016-03-24 Thread Uros Bizjak
On Wed, Mar 23, 2016 at 8:35 AM, Uros Bizjak wrote: > On Tue, Mar 22, 2016 at 10:37 PM, Jakub Jelinek wrote: >> Hi! >> >> As the PR mentions, DImode AND/IOR/XOR patterns often result in too ugly >> code, regression from when the patterns weren't there (before STV has been >> added). This patch a

Re: out of bounds access in insn-automata.c

2016-03-24 Thread Bernd Schmidt
On 03/24/2016 11:17 AM, Aldy Hernandez wrote: On 03/23/2016 10:25 AM, Bernd Schmidt wrote: It looks like this block of code is written by a helper function that is really intended for other purposes than for maximal_insn_latency. Might be worth changing to int insn_code = dfa_insn_code (as_a

Re: [patch] avoid double evaluation of PIC_OFFSET_TABLE_REGNUM

2016-03-24 Thread Bernd Schmidt
On 03/24/2016 11:32 AM, Aldy Hernandez wrote: On x86, PIC_OFFSET_TABLE_REGNUM calls a function (ix86_use_pseudo_pic_reg) so its value can theoretically change between its first and second use in the following conditional: if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM &&

[PATCH] Fix PR70396

2016-03-24 Thread Richard Biener
I am testing the following obvious patch on x86_64-unknown-linux-gnu. Richard. 2016-03-24 Richard Biener PR tree-optimization/70396 * tree-vect-stmts.c (vectorizable_comparison): Use get_vectype_for_scalar_type. * gcc.dg/torture/pr70396.c: New testcase. Inde

Re: [PATCH] Properly assign to packet header (PR hsa/70394)

2016-03-24 Thread Martin Jambor
Hi, On Thu, Mar 24, 2016 at 12:48:34PM +0100, Martin Liska wrote: > Hello. > > Following patch initializes whole packet->header field, which is eventually > stored > to a packet in atomic manner. The function mechanism was adopted from the HSA > runtime > manual. > > I've been running bootstra

[testsuite, committed] Add goacc/uninit-if-clause.{c,f95}

2016-03-24 Thread Tom de Vries
Hi, I've committed attached patch, which adds testcases that test the -Wuninitialized warning for the if clause on various openacc directives. I found an issue with line-numbers of the warning in C++, which I've filed as PR70392 - '[openacc] inconsistent line numbers in uninitialised warning

[testsuite, committed] Add missing initializations in oacc testcases

2016-03-24 Thread Tom de Vries
Hi, I've run the goacc.exp testcases with -Wuninitialized and found a few more missing initializations. Fixed and committed as attached. Thanks, - Tom Add missing initializations in oacc testcases 2016-03-24 Tom de Vries * gfortran.dg/goacc/data-tree.f95: Add missing initialization. * g

[PATCH] Fix PR70370

2016-03-24 Thread Richard Biener
The following patch fixes a missed gimplification of components of registers used as asm outputs with non-memory constraints. The solution is to handle !allows_mem during gimplification rather than leaving it up to RTL expansion. I'm only handling the case where we'd otherwise ICE because of inv

[PATCH] Properly assign to packet header (PR hsa/70394)

2016-03-24 Thread Martin Liška
Hello. Following patch initializes whole packet->header field, which is eventually stored to a packet in atomic manner. The function mechanism was adopted from the HSA runtime manual. I've been running bootstrap and regression tests. Ready to be installed after it finishes? Thanks, Martin lib

[committed] Fix up pr70290.C testcase

2016-03-24 Thread Jakub Jelinek
Hi! I've noticed pr70290.C testcase fails on powerpc*, for the usual reasons, extra ABI warnings. -w -Wno-psabi is the standard way to deal with this. Committed as obvious. 2016-03-24 Jakub Jelinek PR target/70290 * g++.dg/ext/pr70290.C: Add -Wno-psabi -w to dg-options. Form

[RS6000, PATCH] PR70052, ICE compiling _Decimal128 test case

2016-03-24 Thread Alan Modra
This fixes the PR70052 ICE by modifying easy_fp_constant to correctly return false for decimal floating point zero. 0.0D is not an all-zero bit pattern, at least, not the canonical form. I've also taken on Mike's suggestion of using a mode dependent constraint for insns that currently use "j". N

[patch] avoid double evaluation of PIC_OFFSET_TABLE_REGNUM

2016-03-24 Thread Aldy Hernandez
On x86, PIC_OFFSET_TABLE_REGNUM calls a function (ix86_use_pseudo_pic_reg) so its value can theoretically change between its first and second use in the following conditional: if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) Sinc

Re: out of bounds access in insn-automata.c

2016-03-24 Thread Aldy Hernandez
On 03/23/2016 10:25 AM, Bernd Schmidt wrote: On 03/23/2016 07:32 AM, Aldy Hernandez wrote: int maximal_insn_latency (rtx insn) { int insn_code; if (insn == 0) insn_code = DFA__ADVANCE_CYCLE; else { insn_code = dfa_insn_code (as_a (insn)); if (insn_code > DFA

Re: rs6000 stack_tie mishap again

2016-03-24 Thread Olivier Hainque
Hello Alan, > On 24 Mar 2016, at 05:10, Alan Modra wrote: > >>if (could_be_prologue_epilogue >>&& prologue_epilogue_contains (insn)) >> continue; > https://gcc.gnu.org/ml/gcc-patches/1999-08n/msg00048.html Ah, interesting, thanks! >> My rou

Re: rs6000 stack_tie mishap again

2016-03-24 Thread Olivier Hainque
> On 24 Mar 2016, at 05:58, Alan Modra wrote: > > On Wed, Mar 23, 2016 at 01:38:26PM -0400, David Edelsohn wrote: >> The description and >> references to prior SPE prologue and epilogue changes do not confirm a >> wider problem. > > There's a good chance this affects ABI_V4 large stack frames t