Re: [gomp4] OpenACC reduction tests

2015-09-23 Thread Thomas Schwinge
Hi! On Fri, 18 Sep 2015 10:11:25 +0200, I wrote: > On Fri, 17 Jul 2015 11:13:59 -0700, Cesar Philippidis > wrote: > > This patch updates the libgomp OpenACC reduction test cases [...] > > > --- a/libgomp/testsuite/libgomp.oacc-fortran/reduction-5.f90 > > +++ b/libgomp/testsuite/libgomp.oacc-for

Re: [gomp4] Another oacc reduction simplification

2015-09-23 Thread Thomas Schwinge
Hi! On Tue, 22 Sep 2015 11:29:37 -0400, Nathan Sidwell wrote: > I've committed this patch, which simplifies the generation of openacc > reduction > code. Aside from the progression mentioned in ,

Re: [ARM] Use vector wide add for mixed-mode adds

2015-09-23 Thread Kyrill Tkachov
Hi Michael, On 23/09/15 00:52, Michael Collison wrote: This is a modified version of the previous patch that removes the documentation and read-md.c fixes. These patches have been submitted separately and approved. This patch is designed to address code that was not being vectorized due to miss

Re: [PATCH] Fix a -Wmisleading-indentation false-negative

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 03:37 AM, Patrick Palka wrote: gcc/c-family/ChangeLog: * c-indentation.c (should_warn_for_misleading_indentation): Compare next_stmt_vis_column with guard_line_first_nws instead of with guard_line_vis_column. gcc/testsuite/ChangeLog: * c-c++-commo

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Kyrill Tkachov
On 22/09/15 20:31, Jeff Law wrote: On 09/22/2015 07:36 AM, Kyrill Tkachov wrote: Hi all, Unfortunately, I see a testsuite regression with this patch: FAIL: gcc.dg/pr66299-2.c scan-tree-dump-not optimized "<<" The reduced part of that test is: void test1 (int x, unsigned u) { if ((1U << x)

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Pinski, Andrew
> On Sep 23, 2015, at 1:59 AM, Kyrill Tkachov wrote: > > >> On 22/09/15 20:31, Jeff Law wrote: >>> On 09/22/2015 07:36 AM, Kyrill Tkachov wrote: >>> Hi all, >>> Unfortunately, I see a testsuite regression with this patch: >>> FAIL: gcc.dg/pr66299-2.c scan-tree-dump-not optimized "<<" >>> >>> T

[HSA] Add new gate predicate

2015-09-23 Thread Martin Liška
Hello. Following patch does a small refactoring of HSA tree generation pass. Martin >From a887efce8fc6aa136a2a069ea5ddda10b4e28de6 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 22 Sep 2015 18:58:12 +0200 Subject: [PATCH] HSA: add new gate predicate gcc/ChangeLog: 2015-09-22 Martin Liska

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Kyrill Tkachov
On 23/09/15 10:09, Pinski, Andrew wrote: On Sep 23, 2015, at 1:59 AM, Kyrill Tkachov wrote: On 22/09/15 20:31, Jeff Law wrote: On 09/22/2015 07:36 AM, Kyrill Tkachov wrote: Hi all, Unfortunately, I see a testsuite regression with this patch: FAIL: gcc.dg/pr66299-2.c scan-tree-dump-not optim

Re: [gomp4] lock/unlock internal fn

2015-09-23 Thread Thomas Schwinge
Hi Nathan! On Mon, 17 Aug 2015 15:30:16 -0400, Nathan Sidwell wrote: > I've committed this patch to add a new pair of internal functions. These > will > be used in implementing reductions. > > They'll be emitted around reduction finalization, and implement the locking > required for the gene

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Richard Biener
On Wed, 23 Sep 2015, Kyrill Tkachov wrote: > > On 23/09/15 10:09, Pinski, Andrew wrote: > > > On Sep 23, 2015, at 1:59 AM, Kyrill Tkachov > > > wrote: > > > > > > > > > > On 22/09/15 20:31, Jeff Law wrote: > > > > > On 09/22/2015 07:36 AM, Kyrill Tkachov wrote: > > > > > Hi all, > > > > > Unfo

Re: [RFC, PR target/65105] Use vector instructions for scalar 64bit computations on 32bit target

2015-09-23 Thread Ilya Enkovich
On 14 Sep 17:50, Uros Bizjak wrote: > > +(define_insn_and_split "*zext_doubleword" > + [(set (match_operand:DI 0 "register_operand" "=r") > + (zero_extend:DI (match_operand:SWI24 1 "nonimmediate_operand" "rm")))] > + "!TARGET_64BIT && TARGET_STV && TARGET_SSE2" > + "#" > + "&& reload_completed

Re: [RFC, PR target/65105] Use vector instructions for scalar 64bit computations on 32bit target

2015-09-23 Thread Uros Bizjak
On Wed, Sep 23, 2015 at 12:19 PM, Ilya Enkovich wrote: > On 14 Sep 17:50, Uros Bizjak wrote: >> >> +(define_insn_and_split "*zext_doubleword" >> + [(set (match_operand:DI 0 "register_operand" "=r") >> + (zero_extend:DI (match_operand:SWI24 1 "nonimmediate_operand" "rm")))] >> + "!TARGET_64BIT &&

Re: [gomp4, wip] remove references to ganglocal shared memory inside gcc

2015-09-23 Thread Thomas Schwinge
Hi! On Fri, 18 Sep 2015 06:51:18 -0700, Cesar Philippidis wrote: > On 09/18/2015 01:39 AM, Thomas Schwinge wrote: > > > On Tue, 1 Sep 2015 18:29:55 +0200, Tom de Vries > > wrote: > >> On 27/08/15 03:37, Cesar Philippidis wrote: > >>> - ctx->ganglocal_size_host = align_and_expand (&gl_host, h

Re: [Patch/ccmp] Cost instruction sequences to choose better expand order

2015-09-23 Thread Bernd Schmidt
No. Please see NOTE part of the description. AArch64 doesn't cost ccmp currently. It will be fixed by a seperate patch later. The testcase is thus marked as XFAIL. I'd prefer to do things in the right order. Your patch is approved, but please commit only after you can remove the xfail from the

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 05:16 PM, Nathan Sidwell wrote: + if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time for +constant arguments. */ + { + oacc_xform_on_device (call); + rescan = true; +

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 05:11 PM, Marek Polacek wrote: diff --git gcc/c-family/c-ubsan.c gcc/c-family/c-ubsan.c index e0cce84..d2bc264 100644 --- gcc/c-family/c-ubsan.c +++ gcc/c-family/c-ubsan.c @@ -104,6 +104,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) } } t =

[PATCH] Improve restrict handling further

2015-09-23 Thread Richard Biener
The following fixes int f5 (S *__restrict x, S *__restrict y) { x->p[0] = 5; y->p[0] = 0; // { dg-final { scan-tree-dump-times "return 5" 1 "optimized" { xfail *-*-* } } } return x->p[0]; } which requires building representatives for restrict qualified pointers (as opposed to references o

Re: [PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-23 Thread Bernd Schmidt
On 09/22/2015 08:08 PM, Manuel López-Ibáñez wrote: Use find_opt instead of linear search through options in handle_pragma_diagnostic (PR 49654) and reject non-warning options and options not valid for the current language (PR 49655). + /* option_string + 1 to skip the initial '-' */ + unsign

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Kyrill Tkachov
On 23/09/15 11:10, Richard Biener wrote: On Wed, 23 Sep 2015, Kyrill Tkachov wrote: On 23/09/15 10:09, Pinski, Andrew wrote: On Sep 23, 2015, at 1:59 AM, Kyrill Tkachov wrote: On 22/09/15 20:31, Jeff Law wrote: On 09/22/2015 07:36 AM, Kyrill Tkachov wrote: Hi all, Unfortunately, I see a

Re: [RFC] PR tree-optimization/67628: Make tree ifcombine more symmetric and interactions with dom

2015-09-23 Thread Richard Biener
On Wed, 23 Sep 2015, Kyrill Tkachov wrote: > > On 23/09/15 11:10, Richard Biener wrote: > > On Wed, 23 Sep 2015, Kyrill Tkachov wrote: > > > > > On 23/09/15 10:09, Pinski, Andrew wrote: > > > > > On Sep 23, 2015, at 1:59 AM, Kyrill Tkachov > > > > > wrote: > > > > > > > > > > > > > > > > On 2

[v3 patch] Fix filesystem::create_directories() function

2015-09-23 Thread Jonathan Wakely
This function wasn't working properly (testing is useful!) Tested x86_64-linux, powerpc64le-linux and x86_64-dragonfly4.1, committed to trunk. commit 9f9ee62dc3e3d5a1cc825298b93afedc2eaf0aeb Author: Jonathan Wakely Date: Tue Sep 22 23:43:59 2015 +0100 Fix filesystem::create_directories()

Re: [PATCH c-family/49654/49655] reject invalid options in pragma diagnostic

2015-09-23 Thread Marek Polacek
On Tue, Sep 22, 2015 at 08:08:28PM +0200, Manuel López-Ibáñez wrote: > + else if (!(cl_options[option_index].flags & lang_mask)) > +{ > + char * ok_langs = write_langs (cl_options[option_index].flags); > + char * bad_lang = write_langs (c_common_option_lang_mask ()); Please remove t

[v3 patch] Fix Filesystem TS directory iterators

2015-09-23 Thread Jonathan Wakely
directory_iterator and recursive_directory_iterator fail to meet this requirement in http://wg21.link/n4099#Class-directory_iterator The directory_iterator default constructor shall create an iterator equal to the end iterator value, and this shall be the only valid iterator for the end condit

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-23 Thread Jonathan Wakely
On 17/09/15 09:37 -0600, Martin Sebor wrote: On 09/17/2015 05:16 AM, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU rac

[SH][committed] Fix PR 67391

2015-09-23 Thread Oleg Endo
Hi, The attached patch fixes PR 67391. Some additional reg overlapping were added to the addsi3 patterns while making LRA on SH work, but not all of them seem to be good. Removing them, seems to be working just fine. Tested on sh-elf (LRA enabled) with make -k check RUNTESTFLAGS="--target_board=

Re: New post-LTO OpenACC pass

2015-09-23 Thread Nathan Sidwell
On 09/23/15 06:59, Bernd Schmidt wrote: On 09/22/2015 05:16 PM, Nathan Sidwell wrote: +if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time for + constant arguments. */ + { +oacc_xform_on_device (call); +

Re: [gomp4] Another oacc reduction simplification

2015-09-23 Thread Nathan Sidwell
On 09/23/15 04:02, Thomas Schwinge wrote: Hi! On Tue, 22 Sep 2015 11:29:37 -0400, Nathan Sidwell wrote: I've committed this patch, which simplifies the generation of openacc reduction code. Aside from the progression mentioned in

Re: [gomp4] lock/unlock internal fn

2015-09-23 Thread Nathan Sidwell
On 09/23/15 05:27, Thomas Schwinge wrote: Hi Nathan! On Mon, 17 Aug 2015 15:30:16 -0400, Nathan Sidwell wrote: I've committed this patch to add a new pair of internal functions. These will be used in implementing reductions. They'll be emitted around reduction finalization, and implement the

[gomp4] vector reductions

2015-09-23 Thread Nathan Sidwell
I've committed this reimplementation of the vector shuffling code. In preparing a fix for the worker reductions (to use a lockless scheme), I wanted to check VIEW_CONVERT_EXPR DTRT. Use of gimplify_assign also reduces the code size. nathan 2015-09-23 Nathan Sidwell * config/nvptx/nvptx.c

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 02:14 PM, Nathan Sidwell wrote: On 09/23/15 06:59, Bernd Schmidt wrote: On 09/22/2015 05:16 PM, Nathan Sidwell wrote: +if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time for + constant arguments. */ +

[PATCH] Fix testcase from PR48885

2015-09-23 Thread Richard Biener
I am currently testing the following patch enabling us to optimize void test (int *a, int *b, int * restrict v) { *a = *v; *b = *v; } there is a simple case we can handle without implementing ??? from visit_loadstore. Richard. 2015-09-23 Richard Biener PR tree-optim

[PATCH] Preserve restrict dependence info in FRE/PRE

2015-09-23 Thread Richard Biener
I noticed we don't handle secondary effects of restrict in FRE when looking at another testcase from PR48885: int f (int *__restrict__ &__restrict__ p, int *p2) { *p = 1; *p2 = 2; return *p; } with the previously posted patch to improve the handling for p2 we should be able to optimize the

Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2)

2015-09-23 Thread Michael Matz
Hi, On Tue, 22 Sep 2015, David Malcolm wrote: > The drawback is that it could bloat the ad-hoc table. Can the ad-hoc > table ever get smaller, or does it only ever get inserted into? It only ever grows. > An idea I had is that we could stash short ranges directly into the 32 > bits of locatio

Re: [PATCH, i386, AVX-512] Fix iterator for k, introduce kshift[lr][bwdq].

2015-09-23 Thread Kirill Yukhin
Hello, On 22 Sep 18:14, Kirill Yukhin wrote: > Hello, > Patch in the bottom fixes iterator for k insns > since QI mode is only available for AVX-512DQ. > > It also adds support for kshift[rl][bwdq]. This patterns > will be used for mask load/store autogeneration on which > Ilya Enkovich is working

Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2)

2015-09-23 Thread Richard Biener
On Wed, Sep 23, 2015 at 3:19 PM, Michael Matz wrote: > Hi, > > On Tue, 22 Sep 2015, David Malcolm wrote: > >> The drawback is that it could bloat the ad-hoc table. Can the ad-hoc >> table ever get smaller, or does it only ever get inserted into? > > It only ever grows. > >> An idea I had is that

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Ilya Enkovich
2015-09-18 16:40 GMT+03:00 Ilya Enkovich : > 2015-09-18 15:22 GMT+03:00 Richard Biener : >> >> I was thinking about targets not supporting generating vec >> (of whatever mode) from a comparison directly but only via >> a COND_EXPR. > > Where may these direct comparisons come from? Vectorizer never

Re: [RFC] Masking vectorized loops with bound not aligned to VF.

2015-09-23 Thread Richard Biener
On Fri, Sep 18, 2015 at 6:07 PM, Kirill Yukhin wrote: > Hello, > On 18 Sep 10:31, Richard Biener wrote: >> On Thu, 17 Sep 2015, Ilya Enkovich wrote: >> >> > 2015-09-16 15:30 GMT+03:00 Richard Biener : >> > > On Mon, 14 Sep 2015, Kirill Yukhin wrote: >> > > >> > >> Hello, >> > >> I'd like to initia

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Biener
On Fri, Sep 18, 2015 at 3:40 PM, Ilya Enkovich wrote: > 2015-09-18 15:22 GMT+03:00 Richard Biener : >> On Thu, Sep 3, 2015 at 3:57 PM, Ilya Enkovich wrote: >>> 2015-09-03 15:11 GMT+03:00 Richard Biener : On Thu, Sep 3, 2015 at 2:03 PM, Ilya Enkovich wrote: > Adding CCs. >

Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2)

2015-09-23 Thread Michael Matz
Hi, On Wed, 23 Sep 2015, Richard Biener wrote: > The issue we have with LTO is that the linemap gets populated in quite > random order and thus we repeatedly switch files (we've mitigated this > somewhat for GCC 5). Yes. > We also considered dropping column info (and would drop range info) as

Re: patch for PR61578

2015-09-23 Thread Dominik Vogt
On Tue, Sep 01, 2015 at 03:39:19PM -0400, Vladimir Makarov wrote: > The following patch is for > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61578 > > The patch was bootstrapped and tested on x86 and x86-64. > > Committed as rev. 227382. > > 2015-09-01 Vladimir Makarov > >

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Biener
On Wed, Sep 23, 2015 at 3:41 PM, Ilya Enkovich wrote: > 2015-09-18 16:40 GMT+03:00 Ilya Enkovich : >> 2015-09-18 15:22 GMT+03:00 Richard Biener : >>> >>> I was thinking about targets not supporting generating vec >>> (of whatever mode) from a comparison directly but only via >>> a COND_EXPR. >> >>

[PATCH] Fix PR67662

2015-09-23 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-09-23 Richard Biener PR middle-end/67662 * fold-const.c (fold_binary_loc): Do not reassociate two vars with undefined overflow unless they will cancel out. * gcc.dg/ubsan/pr67662.c:

Refactor omp_reduction_init: omp_reduction_init_op (was: [gomp4] ptx reduction simplification)

2015-09-23 Thread Thomas Schwinge
Hi! On Tue, 22 Sep 2015 11:11:59 -0400, Nathan Sidwell wrote: > On 09/22/15 11:10, Thomas Schwinge wrote: > > On Fri, 18 Sep 2015 20:05:48 -0400, Nathan Sidwell wrote: > >> I've committed this patch to rework and simplify [...] > >> the reduction lowering hooks. > >> > >> The current implementa

Re: Refactor omp_reduction_init: omp_reduction_init_op

2015-09-23 Thread Bernd Schmidt
gcc/ * omp-low.h (omp_reduction_init_op): Declare. * omp-low.c (omp_reduction_init_op): New, broken out of ... (omp_reduction_init): ... here. Call it. * tree-parloops.c (initialize_reductions): Use omp_reduction_init_op. That looks ok. Bernd

Re: [gomp4] lock/unlock internal fn

2015-09-23 Thread Thomas Schwinge
Hi Nathan! On Wed, 23 Sep 2015 08:40:51 -0400, Nathan Sidwell wrote: > On 09/23/15 05:27, Thomas Schwinge wrote: > > On Mon, 17 Aug 2015 15:30:16 -0400, Nathan Sidwell wrote: > >> I've committed this patch to add a new pair of internal functions. These > >> will > >> be used in implementing r

Re: [gomp4] lock/unlock internal fn

2015-09-23 Thread Nathan Sidwell
On 09/23/15 10:16, Thomas Schwinge wrote: Hi Nathan! On Wed, 23 Sep 2015 08:40:51 -0400, Nathan Sidwell wrote: On 09/23/15 05:27, Thomas Schwinge wrote: On Mon, 17 Aug 2015 15:30:16 -0400, Nathan Sidwell wrote: I've committed this patch to add a new pair of internal functions. These will

Re: [PATCH] Add new hooks ASM_OUTPUT_START_FUNCTION_HEADER ...

2015-09-23 Thread Dominik Vogt
On Tue, Sep 22, 2015 at 01:56:15PM -0600, Jeff Law wrote: > Is there some good reason these aren't hooks? No, that was just inobservance. New version attached. Would it be preferrable to initialize the hooks with a NULL pointer and test the pointer before calling them? (That way the changes to

Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling

2015-09-23 Thread Thomas Schwinge
Hi! I clarified the -foffload usage: . On Wed, 23 Sep 2015 00:23:50 +0200, Bernd Schmidt wrote: > On 09/22/2015 02:02 PM, Thomas Schwinge wrote: > > > > gcc/ > > * gcc.c (handle_foffload_option): Don't lose

Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2)

2015-09-23 Thread Jeff Law
On 09/23/2015 07:47 AM, Michael Matz wrote: Hi, On Wed, 23 Sep 2015, Richard Biener wrote: The issue we have with LTO is that the linemap gets populated in quite random order and thus we repeatedly switch files (we've mitigated this somewhat for GCC 5). Yes. We also considered dropping col

Re: [gomp4] lock/unlock internal fn

2015-09-23 Thread Thomas Schwinge
Hi! On Wed, 23 Sep 2015 10:19:15 -0400, Nathan Sidwell wrote: > On 09/23/15 10:16, Thomas Schwinge wrote: > > On Wed, 23 Sep 2015 08:40:51 -0400, Nathan Sidwell > > wrote: > >> On 09/23/15 05:27, Thomas Schwinge wrote: > >>> On Mon, 17 Aug 2015 15:30:16 -0400, Nathan Sidwell wrote: > I'v

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-23 Thread Alan Hayward
On 18/09/2015 14:53, "Alan Hayward" wrote: > > >On 18/09/2015 14:26, "Alan Lawrence" wrote: > >>On 18/09/15 13:17, Richard Biener wrote: >>> >>> Ok, I see. >>> >>> That this case is already vectorized is because it implements MAX_EXPR, >>> modifying it slightly to >>> >>> int foo (int *a) >>>

[PATCH][tree-inline][obvious] Delete redundant count_insns_seq

2015-09-23 Thread Kyrill Tkachov
Hi all, I notice that the functions count_insns_seq and estimate_num_insns_seq perform the exact same function for exactly the same arguments. It's redundant to keep both around. I've decided to delete count_insns_seq and replace its one use by estimate_num_insns_seq. Bootstrapped and tested o

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-23 Thread Marek Polacek
On Wed, Sep 23, 2015 at 01:08:53PM +0200, Bernd Schmidt wrote: > On 09/22/2015 05:11 PM, Marek Polacek wrote: > > >diff --git gcc/c-family/c-ubsan.c gcc/c-family/c-ubsan.c > >index e0cce84..d2bc264 100644 > >--- gcc/c-family/c-ubsan.c > >+++ gcc/c-family/c-ubsan.c > >@@ -104,6 +104,7 @@ ubsan_inst

[patch] Reduce space and time overhead of std::thread

2015-09-23 Thread Jonathan Wakely
For PR 65393 I avoided some unnecessary shared_ptr copies while launching a std::thread. This goes further and avoids shared_ptr entirely, using unique_ptr instead. This reduces the memory overhead of a std::thread by 32 bytes (on 64-bit) and avoids any reference-count updates. The downside is it

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249) (take

2015-09-23 Thread Marek Polacek
On Tue, Sep 22, 2015 at 03:33:34PM -0600, Martin Sebor wrote: > It's fine by me (for whatever it's worth). Thanks. Let's wait if Jason/Joseph or anyone else wants to chime in. > Btw., if you're unhappy about having to wipe out the whole chain > after every side-effect it occurred to me that it

libgo patch committed: rewrite lfstack to look more like gc code

2015-09-23 Thread Ian Lance Taylor
This patch by Michael Hudson-Doyle rewrites the lfstack code in libgo to look more like that in the gc library. It also fixes it for arm64. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

[gomp4 1/8] nvptx: remove assumption of OpenACC attrs presence

2015-09-23 Thread Alexander Monakov
This patch makes one OpenACC-specific path in nvptx_record_offload_symbol optional. * config/nvptx/nvptx.c (nvptx_record_offload_symbol): Allow missing OpenACC attributes. --- gcc/config/nvptx/nvptx.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff

[gomp4 4/8] libgomp: minimal OpenMP support in plugin-nvptx.c

2015-09-23 Thread Alexander Monakov
This is a minimal patch for NVPTX OpenMP offloading, using Jakub's initial implementation. It allows to successfully run '#pragma omp target', without any parallel execution: 1 team of 1 thread is spawned on the device, and target regions with '#pragma omp parallel' will fail with a link error.

[gomp4 3/8] libgomp: provide target-to-host fallback diagnostic

2015-09-23 Thread Alexander Monakov
This patch allows to see when target regions are executed on host with GOMP_DEBUG=1 in the environment. * target.c (GOMP_target): Use gomp_debug on fallback path. --- libgomp/target.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libgomp/target.c b/libgomp/target.c index 6ca80ad..1c

[gomp4 2/8] nvptx mkoffload: do not restrict to OpenACC

2015-09-23 Thread Alexander Monakov
This patch allows to meaningfully invoke mkoffload with -fopenmp. The check for -fopenacc flag is specific to gomp4 branch: trunk does not have it. * config/nvptx/mkoffload.c (main): Do not check for -fopenacc. --- gcc/config/nvptx/mkoffload.c | 7 ++- 1 file changed, 2 insertions(+)

[gomp4 0/8] NVPTX: initial OpenMP offloading

2015-09-23 Thread Alexander Monakov
Hello, This patch series implements some minimally required changes to have OpenMP offloading working for NVPTX target on the gomp4 branch. '#pragma omp target' and data updates should work, but all parallel execution functionality remains stubbed out (uses of '#pragma omp parallel' in target reg

[gomp4 7/8] libgomp: work around missing pthread_attr_t on nvptx

2015-09-23 Thread Alexander Monakov
Although newlib headers define most pthreads types, pthread_attr_t is not available. Macro-replace it by 'void' to keep the prototype of gomp_init_thread_affinity unchanged, and do not declare gomp_thread_attr. * libgomp.h: Define pthread_attr_t to void on NVPTX. --- libgomp/libgomp.h |

[gomp4 6/8] libgomp: provide stub bar.h on nvptx

2015-09-23 Thread Alexander Monakov
This stub header only provides empty struct gomp_barrier_t. For now I've punted on providing a minimally-correct implementation. * config/nvptx/bar.h: New file. --- libgomp/config/nvptx/bar.h | 38 ++ 1 file changed, 38 insertions(+) create mode 10064

[gomp4 8/8] libgomp: provide ICVs via env.c on nvptx

2015-09-23 Thread Alexander Monakov
This patch ports env.c to NVPTX. It drops all environment parsing routines since there's no "environment" on the device. For now, the useful effect of the patch is providing 'omp_is_initial_device' to distinguish host execution from target execution in user code. Several functions use gomp_icv,

[gomp4 5/8] libgomp: provide sem.h, mutex.h, ptrlock.h on nvptx

2015-09-23 Thread Alexander Monakov
This patch provides minimal non-stub implementations for libgomp mutex/ptrlock/semaphore, using atomic ops and busy waiting. The goal here is to at least provide stub struct declarations necessary to unbreak libgomp.h. Atomics with busy waiting seems to be the only way to provide such primitives

Re: (patch,rfc) s/gimple/gimple */

2015-09-23 Thread Thomas Schwinge
Hi! On Sat, 19 Sep 2015 20:55:35 -0400, Trevor Saunders wrote: > On Fri, Sep 18, 2015 at 09:32:37AM -0600, Jeff Law wrote: > > On 09/18/2015 07:32 AM, Trevor Saunders wrote: > > >On Wed, Sep 16, 2015 at 03:11:14PM -0400, David Malcolm wrote: > > >>On Wed, 2015-09-16 at 09:16 -0400, Trevor Saunde

[gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
Gang, worker, vector and collapse all contain optional arguments which may be used during loop expansion. In OpenACC, those expressions could contain variables, but those variables aren't always getting remapped automatically. This patch remaps those variables inside lower_omp_loop. Note that I di

Re: [PATCH] Preserve restrict dependence info in FRE/PRE

2015-09-23 Thread Bernhard Reutner-Fischer
On September 23, 2015 3:00:51 PM GMT+02:00, Richard Biener wrote: >*** copy_reference_ops_from_ref (tree ref, v >*** 816,826 >--- 828,846 > temp.op0 = TREE_OPERAND (ref, 1); > if (tree_fits_shwi_p (TREE_OPERAND (ref, 1))) > temp.off = tree_to_shwi

[gomp4] oacc xform updates

2015-09-23 Thread Nathan Sidwell
I've committed this patch to change all the OACC hooks to take a gcall * rather than 'gimple'. mainline has changed the type of 'gimple', and we know we're passing a call anyway. Also updated the rescanning to be more straightforwards. nathan 2015-09-23 Nathan Sidwell * target.def: GOACC

Re: [gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
On 09/23/2015 10:42 AM, Cesar Philippidis wrote: > I've applied this patch to gomp-4_0-branch. This patch, that is. Cesar 2015-09-23 Cesar Philippidis gcc/ * omp-low.c (lower_omp_for): Remap any variables present in OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR and OMP_CLAUSE_CO

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249) (take

2015-09-23 Thread Jeff Law
On 09/23/2015 10:32 AM, Marek Polacek wrote: On Tue, Sep 22, 2015 at 03:33:34PM -0600, Martin Sebor wrote: It's fine by me (for whatever it's worth). Thanks. Let's wait if Jason/Joseph or anyone else wants to chime in. Btw., if you're unhappy about having to wipe out the whole chain after e

[C++ PATCH] Fix small typos in the coding rule enforcement warnings.

2015-09-23 Thread Ville Voutilainen
Tested on Linux-PPC64, committed as obvious. /cp 2015-09-23 Ville Voutilainen Fix small typos in the coding rule enforcement warnings. * parser.c (cp_parser_namespace_definition): Replace 'namepace' with 'namespace'. /testsuite 2015-09-23 Ville Voutilainen Fix small typos

Re: [PATCH][tree-inline][obvious] Delete redundant count_insns_seq

2015-09-23 Thread Jeff Law
On 09/23/2015 10:05 AM, Kyrill Tkachov wrote: Hi all, I notice that the functions count_insns_seq and estimate_num_insns_seq perform the exact same function for exactly the same arguments. It's redundant to keep both around. I've decided to delete count_insns_seq and replace its one use by estim

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-23 Thread Jeff Law
On 09/18/2015 08:29 PM, Martin Sebor wrote: I guess it is not the 'const' I think should be handled special but the 'static'. Having unused static variables (const or not) declared in a header file but unused seems reasonable since the header file may be included in multiple .c files each of whi

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249) (take

2015-09-23 Thread Marek Polacek
On Wed, Sep 23, 2015 at 12:21:35PM -0600, Jeff Law wrote: > On 09/23/2015 10:32 AM, Marek Polacek wrote: > >On Tue, Sep 22, 2015 at 03:33:34PM -0600, Martin Sebor wrote: > >>It's fine by me (for whatever it's worth). > > > >Thanks. Let's wait if Jason/Joseph or anyone else wants to chime in. > > >

Re: [gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Thomas Schwinge
Hi! On Wed, 23 Sep 2015 10:57:40 -0700, Cesar Philippidis wrote: > On 09/23/2015 10:42 AM, Cesar Philippidis wrote: > | Gang, worker, vector and collapse all contain optional arguments which > | may be used during loop expansion. In OpenACC, those expressions could > | contain variables I'm fai

Re: [gomp4 0/8] NVPTX: initial OpenMP offloading

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 07:22 PM, Alexander Monakov wrote: This patch series implements some minimally required changes to have OpenMP offloading working for NVPTX target on the gomp4 branch. '#pragma omp target' and data updates should work, but all parallel execution functionality remains stubbed out (u

Re: New post-LTO OpenACC pass

2015-09-23 Thread Nathan Sidwell
On 09/23/15 08:58, Bernd Schmidt wrote: On 09/23/2015 02:14 PM, Nathan Sidwell wrote: On 09/23/15 06:59, Bernd Schmidt wrote: On 09/22/2015 05:16 PM, Nathan Sidwell wrote: +if (gimple_call_builtin_p (call, BUILT_IN_ACC_ON_DEVICE)) + /* acc_on_device must be evaluated at compile time f

Re: [RFC] Try vector as a new representation for vector masks

2015-09-23 Thread Richard Henderson
On 09/23/2015 06:53 AM, Richard Biener wrote: > I think independent improvements are > > 1) remove (most) of the bool patterns from the vectorizer > > 2) make VEC_COND_EXPR not have a GENERIC comparison embedded > > (same for COND_EXPR?) Careful. The reason that COND_EXPR have embedded compa

Re: [gomp4] remap variables inside gang, worker, vector and collapse clauses

2015-09-23 Thread Cesar Philippidis
On 09/23/2015 11:26 AM, Thomas Schwinge wrote: > On Wed, 23 Sep 2015 10:57:40 -0700, Cesar Philippidis > wrote: >> On 09/23/2015 10:42 AM, Cesar Philippidis wrote: >> | Gang, worker, vector and collapse all contain optional arguments which >> | may be used during loop expansion. In OpenACC, those

Re: New post-LTO OpenACC pass

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 08:42 PM, Nathan Sidwell wrote: As I feared, builtin folding occurs in several places. In particular its first call is very early on in the host compiler, which is far too soon. We have to defer folding until we know whether we're doing host or device compilation. Doesn't somet

Re: [ubsan PATCH] Fix uninitialized var issue (PR sanitizer/64906)

2015-09-23 Thread Bernd Schmidt
On 09/23/2015 06:07 PM, Marek Polacek wrote: Given that the code above seems to be useless now, I think let's put this patch in as-is, backport it to gcc-5, then remove those redundant hunks on trunk and add the testcase above. Do you agree? Sounds reasonable. If you can find a point in the hi

Re: New post-LTO OpenACC pass

2015-09-23 Thread Nathan Sidwell
On 09/23/15 14:51, Bernd Schmidt wrote: On 09/23/2015 08:42 PM, Nathan Sidwell wrote: As I feared, builtin folding occurs in several places. In particular its first call is very early on in the host compiler, which is far too soon. We have to defer folding until we know whether we're doing ho

Re: Elimitate duplication of get_catalogs in different abi

2015-09-23 Thread François Dumont
On 05/09/2015 23:02, François Dumont wrote: > On 22/08/2015 14:24, Daniel Krügler wrote: >> 2015-08-21 23:11 GMT+02:00 François Dumont : >>> I think I found a better way to handle this problem. It is c++locale.cc >>> that needs to be built with --fimplicit-templates. I even think that the >>> *_cow

Re: [PR64164] drop copyrename, integrate into expand

2015-09-23 Thread Alexandre Oliva
On Sep 18, 2015, Alan Lawrence wrote: > With the latest git commit 2b27ef197ece54c4573c5a748b0d40076e35412c on > branch aoliva/pr64164, I am now able to build a cross toolchain for > aarch64 and aarch64_be, and can confirm the ABI failure is fixed on > the branch. Thanks for the confirmation. I

Re: [gomp4 0/8] NVPTX: initial OpenMP offloading

2015-09-23 Thread Alexander Monakov
On Wed, 23 Sep 2015, Bernd Schmidt wrote: > I have two major concerns here. Can I ask you how much experience you have > with GPU programming and ptx? I'd say I have a good understanding of the programming model and nvidia hardware architecture, having used CUDA tools and payed attention to r&d ne

libgo patch committed: Use =, not ==, in mksysinfo.sh

2015-09-23 Thread Ian Lance Taylor
As suggested in http://gcc.gnu.org/PR67695 , we should not use test with == in mksysinfo.sh. This patch fixes it. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [PATCH, ARM]: Fix static interworking call

2015-09-23 Thread Christophe Lyon
On 21 September 2015 at 16:15, Christian Bruel wrote: > > > On 09/18/2015 05:03 PM, Richard Earnshaw wrote: > >>> Index: attr_thumb-static2.c >>> === >>> --- attr_thumb-static2.c(revision 227904) >>> +++ attr_thumb-static2.c

[PATCH 0/4] bb-reorder: Add the "simple" algorithm

2015-09-23 Thread Segher Boessenkool
The current basic block reordering always uses the "software trace cache" algorithm. That has a few problems: 1) It increases code size substantially; this makes it not suitable for -O1 or -Os, and not at all for some architectures; 2) but it is enabled for -Os and all targets; 3) and -O1 gets no

[PATCH 1/4] bb-reorder: Split out STC

2015-09-23 Thread Segher Boessenkool
This first patch simply factors code a little bit. 2015-09-23 Segher Boessenkool * bb-reorder.c (reorder_basic_blocks_software_trace_cache): New function, factored out from ... (reorder_basic_blocks): ... here. --- gcc/bb-reorder.c | 29 ++---

[PATCH 2/4] bb-reorder: Add the "simple" algorithm

2015-09-23 Thread Segher Boessenkool
This is the meat of this series: a new algorithm to do basic block reordering. It uses the simple greedy approach to maximum weighted matching, where the weights are the predicted execution frequency of the edges. This always finds a solution that is within a factor two of optimal, if you disrega

[PATCH 4/4] bb-reorder: Documentation updates

2015-09-23 Thread Segher Boessenkool
This updates the documentation for the new option and new defaults. 2015-09-23 Segher Boessenkool * doc/invoke.texi (Optimization Options): Add -freorder-blocks-algorithm=. (Optimize Options) <-O>: Add -freorder-blocks. <-O2>: Remove -freorder-blocks. Add -fr

[PATCH 3/4] bb-reorder: Add -freorder-blocks-algorithm= and wire it up

2015-09-23 Thread Segher Boessenkool
This adds an -freorder-blocks-algorithm=[simple|stc] flag, with "simple" as default. For -O2 and up (except -Os) it is switched to "stc" instead. Targets that never want STC can override this. This changes -freorder-blocks to be on at -O1 and up (was -O2 and up). In effect, the changes are for -

Re: [RFC PATCH] parse #pragma GCC diagnostic in libcpp

2015-09-23 Thread Joseph Myers
On Sun, 20 Sep 2015, Manuel López-Ibáñez wrote: > PING^2: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02414.html > > On 21 August 2015 at 19:41, Manuel López-Ibáñez wrote: > > Any comments on this? > > https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02414.html > > > > I don't see any other way

[PATCH] rs6000: Fix -mdebug=stack code for spe_gp_offset

2015-09-23 Thread Segher Boessenkool
This seems like an obvious typo. I cannot test SPE, but I noticed this offset shows up in the debug output for normal configurations. The condition is inverted, compared to all similar ones. Is this okay for trunk? Segher 2015-09-23 Segher Boessenkool * config/rs6000/rs6000.c (deb

[committed, pa] Add long long support to config/pa/linux-atomic.c

2015-09-23 Thread John David Anglin
The attached change re-integrates long long support into linux-atomic.c. This is possible due a kernel fix to the LWS syscall and a middle-end fix to expand_atomic_compare_and_swap. The patch corrects the inverted value returned by __sync_bool_compare_and_swap_##WIDTH. It revises the return va

Re: [PATCH 0/5] RFC: Overhaul of diagnostics (v2)

2015-09-23 Thread David Malcolm
On Wed, 2015-09-23 at 15:36 +0200, Richard Biener wrote: > On Wed, Sep 23, 2015 at 3:19 PM, Michael Matz wrote: > > Hi, > > > > On Tue, 22 Sep 2015, David Malcolm wrote: > > > >> The drawback is that it could bloat the ad-hoc table. Can the ad-hoc > >> table ever get smaller, or does it only ever

[PATCH] update a few places for the change from gimple_statement_base to gimple

2015-09-23 Thread tbsaunde+gcc
From: Trevor Saunders Hi, This fixes up a few remaining references to gimple_statement_base that were just brought up. bootstrapped on x86_64-linux-gnu, but the only non comment / doc change is gdbhooks.py, ok? Trev gcc/ChangeLog: 2015-09-23 Trevor Saunders * doc/gimple.texi: U

[PATCH] DWARF support for AIX v4

2015-09-23 Thread David Edelsohn
Richard and Richard, Appended is the updated version of the DWARF support patch for AIX. I still can split out the length computation into a separate helper function, but, as I mentioned, it won't apply to the instance that uses a delta of two labels. This version sets have_macinfo to False and

Re: [PATCH] rs6000: Fix -mdebug=stack code for spe_gp_offset

2015-09-23 Thread David Edelsohn
On Wed, Sep 23, 2015 at 7:35 PM, Segher Boessenkool wrote: > This seems like an obvious typo. I cannot test SPE, but I noticed > this offset shows up in the debug output for normal configurations. > The condition is inverted, compared to all similar ones. > > Is this okay for trunk? > > > Segher

  1   2   >