[PATCH, gomp4] Propagate independent clause for OpenACC kernels pass

2015-07-13 Thread Chung-Lin Tang
Hi Tom, this patch provides a 'bool independent' field in struct loop, which will be switched on by an "independent" clause in a #pragma acc loop directive. I assume you'll be wiring it to the kernels parloops pass in a followup patch. Note: there are already a few other similar fields in struct l

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 03:32 AM, Richard Biener wrote: On Mon, 13 Jul 2015, Richard Biener wrote: On Sun, 12 Jul 2015, Jeff Law wrote: On 06/29/2015 01:58 AM, Richard Biener wrote: In principle the following works for the testcase (even w/o fixing the VRP part). Index: gcc/tree-ssa-dom.c ==

[Patch wwwdocs] gcc-6/changes.html : Document AMD monitorx and mwaitx

2015-07-13 Thread Kumar, Venkataramanan
Hi Richard and Gerald, This patch adds the documentation in changes.html for the GCC trunk (gcc-6) . Please let me know if it is good to commit. Index: htdocs/gcc-6/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.ht

Re: [PATCH, rtl-optimization]: Fix PR66838, Calling multiple SYSV AMD64 ABI functions from MS x64 ABI one results in clobbered parameters

2015-07-13 Thread Jeff Law
On 07/12/2015 12:35 PM, Uros Bizjak wrote: Another missing case of CALL_INSN_FUNCTION_USAGE, where clobbered registers are also marked, this time in postreload/ reload_cse_move2add. Fixed compiler now generates following code callsysv_abi_func movl$global, %esi m

Re: [patch, driver] Ignore -ftree-parallelize-loops={0,1}

2015-07-13 Thread Jeff Law
On 07/13/2015 04:58 AM, Tom de Vries wrote: On 07/07/15 09:53, Tom de Vries wrote: Hi, currently, we have these spec strings in gcc/gcc.c involving ftree-parallelize-loops: ... %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %{fopenacc|fopenmp|ftree-paralleli

Re: [PATCH, RFC] combine: Don't create insv insns unless HAVE_insv

2015-07-13 Thread Jeff Law
On 07/12/2015 07:56 AM, Segher Boessenkool wrote: Currently combine tries to make assignments to bitfields (of a register) whenever it can. If the target has no insv pattern, the result will not ever match (if the MD is sane at all). Doing insv on registers generates worse code than what you ge

Re: [PATCH 1/2, rtl-optimization]: Fix PR 58066, __tls_get_addr is called with misaligned stack on x86-64

2015-07-13 Thread Jeff Law
On 07/13/2015 11:03 AM, Uros Bizjak wrote: This is rtl-optimization part of a two-part patch series. As discussed in the PR, we have to prcompute register parameters before stack alignment is performed, otherwise eventual call to __tls_get_addr can be called with unaligned stack. When compiling

[PING] Re: [PATCH] c/66516 - missing diagnostic on taking the address of a builtin function

2015-07-13 Thread Martin Sebor
[CC Jason since the patch also touches the C++ front end] The updated patch is here: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00258.html Thanks Martin On 07/04/2015 04:32 PM, Martin Sebor wrote: I don't think c_validate_addressable is a good name - given that it's called for lots of thi

[PING 4] Re: [PATCH] warn for unsafe calls to __builtin_return_addres

2015-07-13 Thread Martin Sebor
Still looking for a review of this small patch to help detect potentially unsafe calls to __builtin_{frame,return}_address (with an argument > 2) that tend to either return bogus values or lead to crashes at runtime. The problem the function can cause was originally reported in pr8743 and resolve

Go patch committed: Check for possible pointers at run time

2015-07-13 Thread Ian Lance Taylor
This patch by Chris Manghane changes the Go frontend to check whether a type contains pointers at run time, rather than using two different functions, one with possible pointers, one not. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofr

Go patch committed: Fix location of function parameters

2015-07-13 Thread Ian Lance Taylor
This patch by Chris Manghane fixes the location of function parameters in the Go frontend. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofro

Re: [PATCH][AArch64] Handle -|x| case using a single csneg

2015-07-13 Thread Segher Boessenkool
On Mon, Jul 13, 2015 at 10:48:19AM +0100, Kyrill Tkachov wrote: > For the testcase in the patch we were generating an extra neg instruction: > cmp w0, wzr > csneg w0, w0, w0, ge > neg w0, w0 > ret > > instead of the optimal: > cmp w0, wzr >

Go patch committed: Analyze multiple-result conversions

2015-07-13 Thread Ian Lance Taylor
This patch from Chris Manghane fixes escape analysis to correctly handle calls to interface conversion functions that return multiple results. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 01:55 AM, Richard Biener wrote: I *think* these are closely enough related that some code can be factored out a bit and reused in both r_e_f_i_e and r_t_e to discover both types of equivalences for DOM and for jump threading. Indeed - the odd thing here is that one function uses c

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Jeff Law
On 07/13/2015 01:47 AM, Richard Biener wrote: The path duplication to expose redundancies is one of the things I'd like to get out of a Bodik-esque scheme. One of the things Bodik's work does is identify the minimal set of blocks that need to be copied to expose each path specific redundancy th

RE: [PATCH, MIPS] Fix restoration of hi/lo in MIPS64R2 interrupt handlers

2015-07-13 Thread Moore, Catherine
> -Original Message- > From: Robert Suchanek [mailto:robert.sucha...@imgtec.com] > Sent: Wednesday, July 08, 2015 6:43 AM > To: Moore, Catherine; Matthew Fortune; gcc-patches@gcc.gnu.org > Subject: [PATCH, MIPS] Fix restoration of hi/lo in MIPS64R2 interrupt > handlers > > Hi, > > The a

RE: [PATCH, MIPS] Support new interrupt handler options

2015-07-13 Thread Moore, Catherine
> -Original Message- > From: Robert Suchanek [mailto:robert.sucha...@imgtec.com] > Sent: Wednesday, July 08, 2015 6:43 AM > To: Matthew Fortune; Moore, Catherine; gcc-patches@gcc.gnu.org > Subject: [PATCH, MIPS] Support new interrupt handler options > > Hi, > > This patch adds support f

RE: [PATCH, MIPS] Support interrupt handlers with hard-float

2015-07-13 Thread Moore, Catherine
> -Original Message- > From: Robert Suchanek [mailto:robert.sucha...@imgtec.com] > Sent: Wednesday, July 08, 2015 6:42 AM > To: Matthew Fortune; Moore, Catherine; gcc-patches@gcc.gnu.org > Subject: [PATCH, MIPS] Support interrupt handlers with hard-float > > Hi Matthew/Catherine, > > Th

[patch] libstdc++/66855 ignore endianness in codecvt_utf8_utf16

2015-07-13 Thread Jonathan Wakely
This facet is not meant to pay attention to mode|little_endian, so explicitly override the value to output with the target's native endianness. Tested powerpc64-linux and powerp64le-linux, committed to trunk. I'll commit it to the gcc-5-branch after the 5.2 release. commit e35e03773955a618cba43

Re: [Patch, fortran] PR 37131, inline matmul

2015-07-13 Thread Thomas Schwinge
Hi! On Wed, 06 May 2015 22:26:31 +0200, Thomas Koenig wrote: > thanks for the review. I have committed the following [...] For nvptx-none targets, I'm seeing some odd behavior with this commit. Background: the nvptx backend has some special handling for varags functions, and this only works if

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 10:06:24PM +0300, Ilya Verbin wrote: > libgomp/ > * libgomp.h (struct gomp_device_descr): Add dev2dev_func. > * target.c (omp_target_memcpy): Support device-to-device. > (omp_target_memcpy_rect_worker): Likewise. > (omp_target_memcpy_rect): Likewise.

Re: [PATCH] Fix typo in rtl.c

2015-07-13 Thread Jeff Law
On 07/13/2015 11:00 AM, Marek Polacek wrote: While working on a new warning I found this typo. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-07-13 Marek Polacek * rtl.c (rtx_equal_p_cb): Fix typo. OK. jeff

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-07-13 Thread Evandro Menezes
FWIW, I was curious about the precision of the results using such instructions for the standard sqrt{,f} functions. This is not a wide sample, but it does point to a floor of series iterations to 3 for DP and 2 for SP: x sqrt(x) 1 Step (ulps) 2 Steps (ulps)

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 18:50:29 +0300, Ilya Verbin wrote: > On Mon, Jul 13, 2015 at 17:26:43 +0200, Jakub Jelinek wrote: > > > > > > + /* FIXME: Support device-to-device somehow? */ > > > > > > > > > > Should libgomp copy data device-host-device if device-device is not > > > > > supported by >

libgo patch committed: Remove unnecessary Entersyscall (RMs: OK for GCC 5 branch?)

2015-07-13 Thread Ian Lance Taylor
This patch by Lynn Boger removes unnecessary duplicate calls to Entersyscall and Exitsyscall from the GNU/Linux Getdents function. The calls are duplicates because they are called by Syscall, also called by Getdents. These duplicate calls sometimes cause the deadlock detector to fire incorrectly,

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 10:11:35AM -0700, Aldy Hernandez wrote: > On 07/13/2015 06:56 AM, Jakub Jelinek wrote: > >On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: > > >On the C++ FE side, please also try a testcase in g++.dg/gomp/ where > >the ordered(n) loop with #pragma omp ordere

Re: [RFC, Fortran, (pr66775)] Allocatable function result

2015-07-13 Thread Mike Stump
On Jul 11, 2015, at 4:58 AM, Dan Nagle wrote: > The standard is written in standardese, not English. While what you say is true, sorry, shall _is_ English: used in laws, regulations, or directives to express what is mandatory

[v3 patch] Remove __gnu_cxx::__alloc_traits::_S_nothrow_swap()

2015-07-13 Thread Jonathan Wakely
As I suggested recently, this removes the _S_nothrow_swap() function because it's redundant: allocators are not allowed to throw exceptions when swapped, so we can assume they don't. So now exception specifications for swapping containers don't depend on allocators. This also adds a _GLIBCXX_NOE

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Aldy Hernandez
On 07/13/2015 06:56 AM, Jakub Jelinek wrote: On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: On the C++ FE side, please also try a testcase in g++.dg/gomp/ where the ordered(n) loop with #pragma omp ordered depend({source,sink}) will be in a template, to make sure pt.c does the

[PATCH 2/2, i386]: Fix PR 58066, __tls_get_addr is called with misaligned stack on x86-64

2015-07-13 Thread Uros Bizjak
This is target-dependant part of a two patch series. Scheduler is free to move stack adjustment throughs tls_global_dynamic_64 and tls_local_dynamic_base_64 patterns, misaligning the stack for embedded call to __tls_get_addr. The patch makes these patterns dependent on SP_REG. Patch was bootstra

[PATCH 1/2, rtl-optimization]: Fix PR 58066, __tls_get_addr is called with misaligned stack on x86-64

2015-07-13 Thread Uros Bizjak
This is rtl-optimization part of a two-part patch series. As discussed in the PR, we have to prcompute register parameters before stack alignment is performed, otherwise eventual call to __tls_get_addr can be called with unaligned stack. When compiling the testcase from the PR, anti_adjust_stack i

[PATCH] Fix typo in rtl.c

2015-07-13 Thread Marek Polacek
While working on a new warning I found this typo. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-07-13 Marek Polacek * rtl.c (rtx_equal_p_cb): Fix typo. diff --git gcc/rtl.c gcc/rtl.c index dccf298..b1b485e 100644 --- gcc/rtl.c +++ gcc/rtl.c @@ -441,7 +441,7 @@ rtx_equal_

Re: [PATCH] PR target/66824: Allow software FP SFmode in FP splitter

2015-07-13 Thread H.J. Lu
On Sun, Jul 12, 2015 at 10:56 AM, Uros Bizjak wrote: > On Sat, Jul 11, 2015 at 9:23 PM, H.J. Lu wrote: >> On Thu, Jul 09, 2015 at 01:58:22PM -0700, H.J. Lu wrote: >>> On Thu, Jul 09, 2015 at 12:13:38PM -0700, H.J. Lu wrote: >>> > ix86_split_long_move can optimize floating point constant move, whi

Re: [PATCH][ARM][testsuite] Fix FAIL: gcc.target/arm/macro_defs0.c and macro_defs1.c when -marm forced

2015-07-13 Thread Kyrill Tkachov
Hi Mantas, On 05/03/15 10:14, Mantas Mikaitis wrote: Hello, Tests gcc.target/arm/macro_defs0.c and gcc.target/arm/macro_defs1.c fail in multilib which forces -marm as pointed out in this message: https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00483.html . This patch will cause these tests to be

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 17:26:43 +0200, Jakub Jelinek wrote: > > > > > + /* FIXME: Support device-to-device somehow? */ > > > > > > > > Should libgomp copy data device-host-device if device-device is not > > > > supported by > > > > target? Current liboffloadmic doesn't support this. I'll fin

[gomp4] Add additional test for declare directive

2015-07-13 Thread James Norris
Hi, The attached patch adds a test for the copyout clause with the declare directive. The testing of this clause was overlooked. Committed to gomp-4_0-branch. Jim diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/declare-1.c index

Re: [PATCH, ARM] stop changing signedness in PROMOTE_MODE

2015-07-13 Thread H.J. Lu
On Mon, Jul 13, 2015 at 8:29 AM, Michael Matz wrote: > Hi, > > On Mon, 13 Jul 2015, Richard Biener wrote: > >> On Fri, Jul 10, 2015 at 5:46 PM, Jim Wilson wrote: >> > On Tue, Jul 7, 2015 at 2:35 PM, Richard Biener >> > wrote: >> >> On July 7, 2015 6:29:21 PM GMT+02:00, Jim Wilson >> >> wrote:

[Fortran, Patch] Passing function pointer to co_reduce

2015-07-13 Thread Alessandro Fanfarillo
Dear all, during the implementation of co_reduce in OpenCoarrays I noticed that GFortran passes a pointer to function instead of the function name to co_reduce. Currently the compiler produces the following call: _gfortran_caf_co_reduce (&desc.0, &simple_reduction, 0, 0, 0B, 0B, 0, 0); where si

Re: [PATCH, ARM] stop changing signedness in PROMOTE_MODE

2015-07-13 Thread Michael Matz
Hi, On Mon, 13 Jul 2015, Richard Biener wrote: > On Fri, Jul 10, 2015 at 5:46 PM, Jim Wilson wrote: > > On Tue, Jul 7, 2015 at 2:35 PM, Richard Biener > > wrote: > >> On July 7, 2015 6:29:21 PM GMT+02:00, Jim Wilson > >> wrote: > >>>signed sub-word locals. Thus to detect the need for a conve

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 06:15:45PM +0300, Ilya Verbin wrote: > On Mon, Jul 13, 2015 at 16:03:06 +0200, Jakub Jelinek wrote: > > On Mon, Jul 13, 2015 at 04:38:33PM +0300, Ilya Verbin wrote: > > > On Mon, Jul 13, 2015 at 15:17:29 +0200, Jakub Jelinek wrote: > > > > + k->refcount = INT_MAX; > > >

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 16:03:06 +0200, Jakub Jelinek wrote: > On Mon, Jul 13, 2015 at 04:38:33PM +0300, Ilya Verbin wrote: > > On Mon, Jul 13, 2015 at 15:17:29 +0200, Jakub Jelinek wrote: > > > + k->refcount = INT_MAX; > > > > Shouldn't it be UINTPTR_MAX? > > Dunno if we can count on it bei

Re: [PATCH] Fix PR c++/65186 (bound template template parm as valid nontype parm)

2015-07-13 Thread Jason Merrill
OK. Jason

[PATCH, PR66851] Handle double reduction in parloops

2015-07-13 Thread Tom de Vries
Hi, this patch fixes PR66851. In parloops, we manage to parallelize outer loops, but not if the inner loop contains a reduction. There is an xfail in autopar/outer-4.c for this: ... /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */ ... This

Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-13 Thread Tom de Vries
On 13/07/15 16:21, Michael Matz wrote: Hi, On Mon, 13 Jul 2015, Tom de Vries wrote: Implementing multi-step maps or making the hashmaps non-caching doesn't solve any of the above problems I'm not saying that making those hashmaps non-caching solves any of these problems. Ah, I didn't mean

Re: [PATCH] libstdc++ os_defines now required for DragonFly

2015-07-13 Thread Jonathan Wakely
On 06/07/15 15:57 +0200, John Marino wrote: On the development branch of DragonFly BSD, it was discovered that __LONG_LONG_SUPPORTED was accidently unconditionally defined. This had a positive side effect of allowing GCC conftests to pass for C99 support via wchar.h. When the bug was fixed, the

Re: [PATCH] [gomp] Recycle non-nested team if possible

2015-07-13 Thread Sebastian Huber
On 13/07/15 16:17, Jakub Jelinek wrote: On Mon, Jul 13, 2015 at 01:15:44PM +0200, Sebastian Huber wrote: diff --git a/libgomp/team.c b/libgomp/team.c index b98b233..0bcbaf8 100644 --- a/libgomp/team.c +++ b/libgomp/team.c @@ -134,6 +134,25 @@ gomp_thread_start (void *xdata) return NULL;

Re: [GOMP] a struct for offload target data

2015-07-13 Thread Bernd Schmidt
On 07/13/2015 03:57 PM, Nathan Sidwell wrote: this patch changes the offload target data type from an array of void *, to a struct, which is somewhat easier to deal with than remembering numeric indices and type casts. This is step 1 in reworking the launch API. Looks fine. Bernd

Re: [PATCH 2/4] Add liboffloadmic

2015-07-13 Thread Ilya Verbin
On Thu, Jul 09, 2015 at 12:00:29 +0200, Thomas Schwinge wrote: > I noticed that -- at least with current versions of GCC -- there are > several compiler diagnostics displayed during the build. It would be > nice to get these addressed -- as applicable, presumably in the Intel > upstream version, a

Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-13 Thread Michael Matz
Hi, On Mon, 13 Jul 2015, Tom de Vries wrote: > > Implementing multi-step maps or making the hashmaps non-caching > > doesn't solve any of the above problems > > I'm not saying that making those hashmaps non-caching solves any of > these problems. Ah, I didn't mean to imply this, I meant to im

Change genmatch (if ...) syntax

2015-07-13 Thread Richard Biener
The following patch fixes a subtle issue with how (if ...) is currently operating. Take /* Transform comparisons of the form X * C1 CMP 0 to X CMP 0 in the signed arithmetic case. That form is created by the compiler often enough for folding it to be of value. One example is in comput

Re: [PATCH] [gomp] Recycle non-nested team if possible

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 01:15:44PM +0200, Sebastian Huber wrote: > diff --git a/libgomp/team.c b/libgomp/team.c > index b98b233..0bcbaf8 100644 > --- a/libgomp/team.c > +++ b/libgomp/team.c > @@ -134,6 +134,25 @@ gomp_thread_start (void *xdata) >return NULL; > } > > +static struct gomp_team

Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-13 Thread Tom de Vries
On 13/07/15 15:43, Michael Matz wrote: Hi, On Sun, 12 Jul 2015, Tom de Vries wrote: I'm trying to get to a defined policy for what is allowed for caches. Either forbidding or allowing multi-step dependencies, I don't really mind. I think forbidding is the way to go, because ... I managed t

Re: [PATCH][RTL-ifcvt] Make non-conditional execution if-conversion more aggressive

2015-07-13 Thread Kyrill Tkachov
Hi Bernhard, On 13/07/15 10:45, Kyrill Tkachov wrote: PS: no -mbranch-cost and, a tad more seriously, no --param branch-cost either ;) PPS: attached meant to illustrate comments above. Untested. Thanks a lot! This is all very helpful. I'll respin the patch. Here it is. I've expanded the comme

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 04:38:33PM +0300, Ilya Verbin wrote: > On Mon, Jul 13, 2015 at 15:17:29 +0200, Jakub Jelinek wrote: > > Here is a new version that I've committed. I've finished up > > associate/disassociate, wrote a test and tested also with intelmicemul > > offloading. > > Great! > > >

Re: GOMP_offload_register

2015-07-13 Thread Nathan Sidwell
On 07/13/15 09:49, Ilya Verbin wrote: On Mon, Jul 13, 2015 at 09:42:50 -0400, Nathan Sidwell wrote: GOMP_offload_register's target data argument is 'void *'. Is there any reason it shouldn't be 'const void *'? It would seem to me that that would be better? (a cursory look at i386/intelmic-mko

[GOMP] a struct for offload target data

2015-07-13 Thread Nathan Sidwell
Bernd, this patch changes the offload target data type from an array of void *, to a struct, which is somewhat easier to deal with than remembering numeric indices and type casts. This is step 1 in reworking the launch API. ok? nathan 2015-07-13 Nathan Sidwell gcc/ * config/nvptx/mkof

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Jakub Jelinek
On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: > It looks like the C++ bits are quite similar to the C ones. AFAICT, only > numbers are allowed for the sink offsets, so no C++ iterators, which would > likely complicate matters. If they are eventually allowed, we can implement > t

Re: GOMP_offload_register

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 09:42:50 -0400, Nathan Sidwell wrote: > GOMP_offload_register's target data argument is 'void *'. Is there > any reason it shouldn't be 'const void *'? It would seem to me that > that would be better? > > (a cursory look at i386/intelmic-mkoffload.c suggests a lack of > c

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Richard Biener
On Mon, Jul 13, 2015 at 3:46 PM, Paolo Bonzini wrote: > > > On 13/07/2015 15:45, Richard Biener wrote: >> It would be nice to have a patch that can be backported to the GCC 5 branch >> as well. We can improve this on trunk as followup,no? > > The patch I've already posted can be backported. O:-)

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 15:45, Richard Biener wrote: > It would be nice to have a patch that can be backported to the GCC 5 branch > as well. We can improve this on trunk as followup,no? The patch I've already posted can be backported. O:-) Paolo

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Richard Biener
On Mon, Jul 13, 2015 at 3:30 PM, Martin Jambor wrote: > On Mon, Jul 13, 2015 at 02:47:23PM +0200, Paolo Bonzini wrote: >> >> >> On 13/07/2015 14:34, Martin Jambor wrote: >> > You might want to use Martin's shiny new >> > function_summary class in symbol-summary.c. That is a mechanism >> > specifi

Re: [PATCH] remove some usage of expr_list from read_rtx

2015-07-13 Thread Richard Sandiford
Nice clean-up :-) tbsaunde+...@tbsaunde.org writes: > @@ -2248,11 +2249,14 @@ process_define_subst (void) > static void > rtx_handle_directive (int lineno, const char *rtx_name) > { > - rtx queue, x; > + auto_vec subrtxs; > + if (!read_rtx (rtx_name, &subrtxs)) > +return; Very minor, bu

Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-13 Thread Michael Matz
Hi, On Sun, 12 Jul 2015, Tom de Vries wrote: > > I'm trying to get to a defined policy for what is allowed for caches. > > Either forbidding or allowing multi-step dependencies, I don't really > > mind. I think forbidding is the way to go, because ... > > I managed to write a patch series tha

GOMP_offload_register

2015-07-13 Thread Nathan Sidwell
Ilya, GOMP_offload_register's target data argument is 'void *'. Is there any reason it shouldn't be 'const void *'? It would seem to me that that would be better? (a cursory look at i386/intelmic-mkoffload.c suggests a lack of consts in the variable decls there. ptx suffers the same problem

[C++ Patch] Prefer error + inform to two errors in check_template_shadow

2015-07-13 Thread Paolo Carlini
Hi, while going thru the pending template template issues, I noticed that check_template_shadow still emits two errors. I believe we also want to simply use D instead of #D for template parameters, that avoids the nit about class T vs template T which could be slightly confusing to novices, I

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Ilya Verbin
On Mon, Jul 13, 2015 at 15:17:29 +0200, Jakub Jelinek wrote: > Here is a new version that I've committed. I've finished up > associate/disassociate, wrote a test and tested also with intelmicemul > offloading. Great! > + k->refcount = INT_MAX; Shouldn't it be UINTPTR_MAX? > + /* FIXME: S

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Martin Jambor
On Mon, Jul 13, 2015 at 02:47:23PM +0200, Paolo Bonzini wrote: > > > On 13/07/2015 14:34, Martin Jambor wrote: > > You might want to use Martin's shiny new > > function_summary class in symbol-summary.c. That is a mechanism > > specifically designed to append to a cgraph_node information specifi

Re: [gomp] Move openacc vector& worker single handling to RTL

2015-07-13 Thread Nathan Sidwell
On 07/13/15 07:26, Thomas Schwinge wrote: Hi! On Fri, 10 Jul 2015 11:04:14 +0200, I wrote: On Thu, 09 Jul 2015 20:25:22 -0400, Nathan Sidwell wrote: This is the patch I committed. 2. Don't be shy to remove a bunch of XFAILs, in fact all :-) of those remaining from the test cases that Julia

[PING] Re: [PATCH] New configure option to default enable Smart Stack Protection

2015-07-13 Thread Magnus Granberg
söndag 05 juli 2015 23.59.32 skrev Magnus Granberg: > Changlogs > /gcc > 2015-07-05 Magnus Granberg > > * common.opt (fstack-protector): Initialize to -1. > (fstack-protector-all): Likewise. > (fstack-protector-strong): Likewise. > (fstack-protector-explicit): L

Re: Merge trunk r225562 (2015-07-08) into gomp-4_0-branch

2015-07-13 Thread Nathan Sidwell
On 07/12/15 05:39, Thomas Schwinge wrote: Hi! On Fri, 10 Jul 2015 18:50:20 -0400, Nathan Sidwell wrote: it looks like the most recent merge from trunk to gomp4 was early May. I think it is time for another one -- can you handle that? Indeed :-) -- and, as it happens, resolving the "merge a

Re: [gomp4.1 WIP] omp_target_* libgomp APIs

2015-07-13 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 04:06:57PM +0200, Jakub Jelinek wrote: > The latest spec adds a bunch of new functions, this patch attempts to > implement them, except I gave up partly in omp_target_associate_ptr > and completely in omp_target_disassociate_ptr for now. > > As for the plugins, I think we'l

Re: [PATCH][RTL-ifcvt] Make non-conditional execution if-conversion more aggressive

2015-07-13 Thread Kyrill Tkachov
On 13/07/15 11:48, Bernhard Reutner-Fischer wrote: On July 13, 2015 11:45:55 AM GMT+02:00, Kyrill Tkachov wrote: Hi Bernhard, Did you include go in your testing? I see: Unexpected results in this build (new failures) FAIL: encoding/json FAIL: go/printer FAIL: go/scanner FAIL: html/template

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 14:34, Martin Jambor wrote: > You might want to use Martin's shiny new > function_summary class in symbol-summary.c. That is a mechanism > specifically designed to append to a cgraph_node information specific > to an optimization pass (or two, as ipa-cp and ipa-inline already both

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Martin Jambor
Hi, On Mon, Jul 13, 2015 at 02:13:59PM +0200, Paolo Bonzini wrote: > > > On 13/07/2015 13:55, Martin Jambor wrote: > > I can't approve it, but FWIW, I'm generally fine with the patch. > > Although the original idea was to share one func_body_info in between > > ipa-cp and ipa-inline analyses, th

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Paolo Bonzini
On 13/07/2015 13:55, Martin Jambor wrote: > I can't approve it, but FWIW, I'm generally fine with the patch. > Although the original idea was to share one func_body_info in between > ipa-cp and ipa-inline analyses, this is certainly better than what we > have now and perhaps even good enough gene

Re: [gomp4] declare directive [5/5]

2015-07-13 Thread Thomas Schwinge
Hi Jim! On Mon, 8 Jun 2015 10:06:21 -0500, James Norris wrote: > --- /dev/null > +++ b/libgomp/testsuite/libgomp.oacc-c++/declare-1.C > @@ -0,0 +1,24 @@ > + > +template > +T foo() > +{ > + T a; > + #pragma acc declare create (a) > + > + #pragma acc parallel > + { > +a = 5; > + } > + > +

Re: [PATCH] PR/66760, ipa-inline-analysis.c compile-time hog

2015-07-13 Thread Martin Jambor
Hi, On Sun, Jul 12, 2015 at 11:39:55PM +0200, Paolo Bonzini wrote: > From: bonz...@gnu.org > > In this PR, a lot of time is spent doing the same ipa_load_from_parm_agg > query over and over. Luckily a memoization scheme is already there, it's > just not used by ipa-inline-analysis.c. The patch

Re: [ARM] Optimize compare against smin/umin

2015-07-13 Thread Ramana Radhakrishnan
On Thu, Jun 25, 2015 at 6:08 PM, Michael Collison wrote: > > This patch is designed to optimize constructs such as: > > #define min(x, y) ((x) <= (y)) ? (x) : (y) > > unsignedint foo (unsignedint i, unsignedint x ,unsignedint y) > { > return i < (min (x, y)); > } > > int bar (int i,int x

Re: [gomp] Move openacc vector& worker single handling to RTL

2015-07-13 Thread Thomas Schwinge
Hi! On Fri, 10 Jul 2015 11:04:14 +0200, I wrote: > On Thu, 09 Jul 2015 20:25:22 -0400, Nathan Sidwell wrote: > > This is the patch I committed. > 2. Don't be shy to remove a bunch of XFAILs, in fact all :-) of those > remaining from the test cases that Julian had added in >

[PATCH] [gomp] Recycle non-nested team if possible

2015-07-13 Thread Sebastian Huber
Try to recycle the last non-nested team to avoid the use of malloc() and free() in the normal case where the number of threads is the same. Avoid superfluous destruction and initialization of team synchronization objects. Using the microbenchmark posted here https://gcc.gnu.org/ml/gcc-patches/200

Re: Merge trunk r225562 (2015-07-08) into gomp-4_0-branch

2015-07-13 Thread Thomas Schwinge
Hi Tom! On Mon, 13 Jul 2015 12:32:20 +0200, Tom de Vries wrote: > On 13/07/15 10:31, Thomas Schwinge wrote: > > On Mon, 13 Jul 2015 09:20:16 +0200, Tom de Vries > > wrote: > >> >On 12/07/15 11:39, Thomas Schwinge wrote: > >> >I've looked at the merge commit, gcc/tree-parloops.c was not modified

[PATCH, PR46193] Handle mix/max pointer reductions in parloops

2015-07-13 Thread Tom de Vries
Hi, this patch fixes PR46193. It handles min and max reductions of pointer type in parloops. Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom Handle mix/max pointer reductions in parloops 2015-07-13 Tom de Vries PR tree-optimization/46193 * omp-low.c (omp_reduction_in

Re: [patch, driver] Ignore -ftree-parallelize-loops={0,1}

2015-07-13 Thread Tom de Vries
On 07/07/15 09:53, Tom de Vries wrote: Hi, currently, we have these spec strings in gcc/gcc.c involving ftree-parallelize-loops: ... %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %{fopenacc|fopenmp|ftree-parallelize-loops=*:-pthread}" ... Actually, ftree-par

Re: [v3 PATCH] Implement make_array and to_array from the Fundamentals v2 TS draft

2015-07-13 Thread Ville Voutilainen
On 13 July 2015 at 01:25, Ville Voutilainen wrote: > On 12 July 2015 at 21:45, Ville Voutilainen > wrote: >> Tested on Linux-PPC64. >> >> 2015-07-12 Ville Voutilainen >> Implement std::experimental::fundamentals_v2::make_array and >> std::experimental::fundamentals_v2::to_array. >>

Re: [PATCH][RTL-ifcvt] Make non-conditional execution if-conversion more aggressive

2015-07-13 Thread Bernhard Reutner-Fischer
On July 13, 2015 11:45:55 AM GMT+02:00, Kyrill Tkachov wrote: >Hi Bernhard, > >> Did you include go in your testing? >> I see: >> Unexpected results in this build (new failures) >> FAIL: encoding/json >> FAIL: go/printer >> FAIL: go/scanner >> FAIL: html/template >> FAIL: log >> FAIL: net/http >

Re: Merge trunk r225562 (2015-07-08) into gomp-4_0-branch

2015-07-13 Thread Tom de Vries
On 13/07/15 10:31, Thomas Schwinge wrote: Hi Tom! On Mon, 13 Jul 2015 09:20:16 +0200, Tom de Vries wrote: >On 12/07/15 11:39, Thomas Schwinge wrote: > >On Fri, 10 Jul 2015 18:50:20 -0400, Nathan Sidwell wrote: > >>it looks like the most recent merge from trunk to gomp4 was early May. I t

Re: [PATCH][AArch64][testsuite] Adjust some arith+compare tests for potentially more aggressive if-conversion

2015-07-13 Thread Kyrill Tkachov
On 10/07/15 21:21, James Greenhalgh wrote: On Fri, Jul 10, 2015 at 01:21:05PM +0100, Kyrill Tkachov wrote: Hi all, Some of the testcases in aarch64.exp can fail their scan-assembler patterns if if-conversion becomes more aggressive. This patch adjusts the testcases in case the branches are el

Re: [PATCH][RTL-ifcvt] Make non-conditional execution if-conversion more aggressive

2015-07-13 Thread Kyrill Tkachov
On 13/07/15 10:45, Kyrill Tkachov wrote: +/* Return iff the registers that the insns in BB_A set do not + get used in BB_B. */ Return true iff I tried to be too formal here ;) https://en.wikipedia.org/wiki/If_and_only_if I'll use a normal if here. Err, of course you were talking about

[Committed] Mark *.omp_data_i as non-trapping

2015-07-13 Thread Tom de Vries
[ was: Re: [gomp4, committed] Handle nested loops in kernels regions ] On 13/07/15 10:36, Jakub Jelinek wrote: On Mon, Jul 13, 2015 at 10:19:56AM +0200, Thomas Schwinge wrote: We rely on pass_lim to move the *.omp_data_i loads out of the loop nest. For the test-case, pass_lim was managing to mo

[PATCH][AArch64] Handle -|x| case using a single csneg

2015-07-13 Thread Kyrill Tkachov
Hi all, For the testcase in the patch we were generating an extra neg instruction: cmp w0, wzr csneg w0, w0, w0, ge neg w0, w0 ret instead of the optimal: cmp w0, wzr csneg w0, w0, w0, lt ret The reason is that combine trie

Re: [PATCH][RTL-ifcvt] Make non-conditional execution if-conversion more aggressive

2015-07-13 Thread Kyrill Tkachov
Hi Bernhard, On 11/07/15 00:00, Bernhard Reutner-Fischer wrote: On 10 July 2015 at 14:31, Kyrill Tkachov wrote: Hi all, This patch makes if-conversion more aggressive when handling code of the form: if (test) x := a //THEN else x := b //ELSE The current code adds the costs of both the

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Richard Biener
On Mon, 13 Jul 2015, Richard Biener wrote: > On Sun, 12 Jul 2015, Jeff Law wrote: > > > On 06/29/2015 01:58 AM, Richard Biener wrote: > > > > > > In principle the following works for the testcase (even w/o fixing > > > the VRP part). > > > > > > Index: gcc/tree-ssa-dom.c > > > =

Re: [PATCH] Improve in_array_bounds_p

2015-07-13 Thread Richard Biener
On Fri, 10 Jul 2015, Richard Biener wrote: > On Fri, 10 Jul 2015, Richard Biener wrote: > > > > > I was just testing the patch below which runs into latent issues when > > building libjava (at least)... > > > > /space/rguenther/src/svn/trunk/libjava/java/lang/natClassLoader.cc: In > > function

Re: [Fortran, patch, pr64589, v1] [OOP] Linking error due to undefined integer symbol with unlimited polymorphism

2015-07-13 Thread Andre Vehreschild
Hi Mikael, hi everyone, thanks for the review, Mikael. Commited as r225730. Regards, Andre On Fri, 10 Jul 2015 18:12:53 +0200 Mikael Morin wrote: > Le 10/07/2015 16:51, Andre Vehreschild a écrit : > > Hi everyone, > > > > attached is a rather trivial patch to fix a linker issue when

Re: [PATCH, PR ipa/66566] Fix ICE in early_inliner: internal compiler error: in operator[]

2015-07-13 Thread Ilya Enkovich
Ping 2015-06-18 12:54 GMT+03:00 Ilya Enkovich : > Hi, > > In early_inliner we do recompute inline summaries for edges after > optimize_inline_calls, but check this summary exists in case new edges > appear. But then it calls inline_update_overall_summary which also going > through edges inline

Re: [gomp4, committed] Handle nested loops in kernels regions

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 10:19:56AM +0200, Thomas Schwinge wrote: > > We rely on pass_lim to move the *.omp_data_i loads out of the loop nest. > > For the test-case, pass_lim was managing to move the load out of the > > inner loop, but not the outer loop, because the load was classified as > > 'M

Re: Merge trunk r225562 (2015-07-08) into gomp-4_0-branch

2015-07-13 Thread Thomas Schwinge
Hi Tom! On Mon, 13 Jul 2015 09:20:16 +0200, Tom de Vries wrote: > On 12/07/15 11:39, Thomas Schwinge wrote: > > On Fri, 10 Jul 2015 18:50:20 -0400, Nathan Sidwell > > wrote: > >> it looks like the most recent merge from trunk to gomp4 was early May. I > >> think > >> it is time for another on

Re: [gomp4, committed] Handle nested loops in kernels regions

2015-07-13 Thread Thomas Schwinge
Hi! On Sun, 12 Jul 2015 14:46:02 +0200, Tom de Vries wrote: > This patch allows parallelization of an outer loop in an openacc kernels > region. \o/ > We rely on pass_lim to move the *.omp_data_i loads out of the loop nest. > For the test-case, pass_lim was managing to move the load out of t

Re: [PATCH, ARM] stop changing signedness in PROMOTE_MODE

2015-07-13 Thread Richard Biener
On Fri, Jul 10, 2015 at 5:46 PM, Jim Wilson wrote: > On Tue, Jul 7, 2015 at 2:35 PM, Richard Biener > wrote: >> On July 7, 2015 6:29:21 PM GMT+02:00, Jim Wilson >> wrote: >>>signed sub-word locals. Thus to detect the need for a conversion, you >>>have to have the decls, and we don't have them

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-07-13 Thread Richard Biener
On Sun, 12 Jul 2015, Jeff Law wrote: > On 06/29/2015 01:58 AM, Richard Biener wrote: > > > > In principle the following works for the testcase (even w/o fixing > > the VRP part). > > > > Index: gcc/tree-ssa-dom.c > > === > > --- gcc

  1   2   >