Re: [PATCH] Don't peel extra copy of loop in unroller for loops with exit at end

2016-10-14 Thread Andrew Pinski
On Fri, Oct 14, 2016 at 8:28 PM, Andrew Pinski wrote: > On Thu, Sep 22, 2016 at 12:10 PM, Pat Haugen > wrote: >> I noticed the loop unroller peels an extra copy of the loop before it enters >> the switch block code to round the iteration count to

Re: [PATCH] Don't peel extra copy of loop in unroller for loops with exit at end

2016-10-14 Thread Andrew Pinski
On Thu, Sep 22, 2016 at 12:10 PM, Pat Haugen wrote: > I noticed the loop unroller peels an extra copy of the loop before it enters > the switch block code to round the iteration count to a multiple of the > unroll factor. This peeled copy is only needed for the case

Re: [PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-14 Thread Segher Boessenkool
On Sat, Oct 15, 2016 at 03:00:20AM +, Segher Boessenkool wrote: > 2016-10-15 Segher Boessenkool > > * config/rs6000/rs6000.c (rs6000_get_separate_components): Do not > make LR a separately shrink-wrapped component if savres_strategy > contains

[PATCH] rs6000: Fix shrink-wrap-separate for AIX

2016-10-14 Thread Segher Boessenkool
All out-of-line register save routines need LR, so we cannot wrap the LR component if there are out-of-line saves. This didn't show up for testing on Linux because none of the tests there use out-of-line FPR saves without also using out-of-line GPR saves, which we did handle. This patch fixes

Re: [PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-14 Thread kugan
Hi Bin, On 15/10/16 00:15, Bin Cheng wrote: +/* Test for likely overcommitment of vector hardware resources. If a + loop iteration is relatively large, and too large a percentage of + instructions in the loop are vectorized, the cost model may not + adequately reflect delays from

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-14 Thread Bernhard Reutner-Fischer
On 14 October 2016 22:41:25 CEST, Janne Blomqvist wrote: >On Fri, Oct 14, 2016 at 8:01 PM, Bernhard Reutner-Fischer > wrote: >> On 13 October 2016 22:08:21 CEST, Jerry DeLisle > wrote: >>>On 10/13/2016 08:16 AM, Janne

Re: [PATCH] PR fortran/77978 -- STOP code fixes

2016-10-14 Thread Steve Kargl
On Fri, Oct 14, 2016 at 05:24:53PM -0700, Steve Kargl wrote: > For the code > > program foo > stop merge(667, 668, .true.) > end > > gfortran with either -std=f95 or -std=f2003 should reject > this code. My patch does not fix this issue, because it > would (1) require a complete

Go patch committed: copy runtime package time code from Go 1.7 runtime

2016-10-14 Thread Ian Lance Taylor
This patch to the Go frontend and libgo copies the runtime package time code from the Go 1.7 runtime. This tweaks the frontend to fix the handling of function values for -fgo-c-header to generate FuncVal*, not simply FuncVal. While we're here change runtime.nanotime to use clock_gettime with

[PATCH] PR fortran/77978 -- STOP code fixes

2016-10-14 Thread Steve Kargl
The attach patch fixes a number of shortcomings with STOP codes in gfortran. The updated comment in the code nicely summarizes the problem. /* Match a number or character constant after an (ERROR) STOP or PAUSE - statement. */ + statement. The requirements for a stop-code differs in the

Re: [PATCH, rs6000] pr65479 Add option to fix failing asan test cases.

2016-10-14 Thread Segher Boessenkool
On Fri, Oct 14, 2016 at 02:37:42PM -0500, Bill Seurer wrote: > [PATCH, rs6000] pr65479 Add option to fix failing asan test cases. > > This patch adds the -fasynchronous-unwind-tables option to several of the asan > test cases. The option causes a full strack trace to be produced when the >

Re: [PATCH] Improve DWARF constant attribute langhooks

2016-10-14 Thread Jason Merrill
OK. On Fri, Oct 14, 2016 at 1:29 PM, Jakub Jelinek wrote: > Hi! > > Before early dwarf changes, if we wanted to note some decl property so that > some corresponding DWARF attribute can be emitted, we had to use some > generic IL bit for that. Now a langhook can be used instead

C++ PATCH for P0017, C++17 aggregates with bases

2016-10-14 Thread Jason Merrill
Implementing this proposal was a pretty straightforward matter of changing the definition of aggregate and treating artificial base fields as initializable in aggregate initialization. For this to work with empty bases, I needed to create base fields for them, which we haven't done in the past.

[PATCH, libfortran] PR 48587 Newunit allocator

2016-10-14 Thread Janne Blomqvist
Currently GFortran newer reuses unit numbers allocated with NEWUNIT=, instead having a simple counter that is decremented each time such a unit is opened. For a long running program which repeatedly opens files with NEWUNIT= and closes them, the counter can wrap around and cause an abort. This

Re: [wwwdocs, coding conventions] Mention OVERRIDE/FINAL

2016-10-14 Thread Pedro Alves
On 10/14/2016 10:28 PM, David Malcolm wrote: > I propose that we update our coding conventions to mention the OVERRIDE > and FINAL macros in the paragraph that discusses virtual funcs. > > The attached patch (to the website) does so. > Good idea, I like it. GDB is following GCC's C++ coding

[wwwdocs, coding conventions] Mention OVERRIDE/FINAL

2016-10-14 Thread David Malcolm
On Fri, 2016-10-14 at 16:27 +0100, Pedro Alves wrote: > On 10/12/2016 03:13 PM, Bernd Schmidt wrote: > > On 10/12/2016 04:09 PM, Pedro Alves wrote: > > > > > > Thanks. Here's a follow up patch that I was just testing. > > > > > > Need this if building with "g++ -std=gnu++11", with gcc < 4.7. >

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-14 Thread Janne Blomqvist
On Fri, Oct 14, 2016 at 8:01 PM, Bernhard Reutner-Fischer wrote: > On 13 October 2016 22:08:21 CEST, Jerry DeLisle wrote: >>On 10/13/2016 08:16 AM, Janne Blomqvist wrote: > >>> >>> Regtested on x86_64-pc-linux-gnu. Ok for trunk? >>> >> >>Yes, OK,

Re: fix -fmax-errors & notes

2016-10-14 Thread David Malcolm
On Fri, 2016-10-14 at 15:50 -0400, Nathan Sidwell wrote: > On 10/14/16 15:17, David Malcolm wrote: > > > "Limits the maximum number of error messages to @var{n}, at which > > point > > GCC bails out rather than attempting to continue processing the > > source > > code. If @var{n} is 0 (the

Re: [PATCH v2,rs6000] Add built-in function support for Power9 string operations

2016-10-14 Thread Segher Boessenkool
On Thu, Oct 13, 2016 at 09:45:22AM -0600, Kelvin Nilsen wrote: > 3. Replace magic number 74 with CR6_REGNO in vsx.md (2 occurrences) >and vector.md (3 occurrences). Some remain, see below. > +moves bytes 16 - @code{len} to 15 of the corresponding vector. For the > +the element to be

Re: [PATCH] (v2) Tweaks to print_rtx_function

2016-10-14 Thread Bernd Schmidt
On 10/14/2016 10:12 PM, David Malcolm wrote: gcc/ChangeLog: * print-rtl-function.c (print_edge): Omit "(flags)" when none are set. (print_rtx_function): Update example in comment for... * print-rtl.c (print_rtx_operand_code_r): In compact mode, print

Re: fix -fmax-errors & notes

2016-10-14 Thread Nathan Sidwell
On 10/14/16 15:17, David Malcolm wrote: "Limits the maximum number of error messages to @var{n}, at which point GCC bails out rather than attempting to continue processing the source code. If @var{n} is 0 (the default), there is no limit on the number of error messages produced. If

[PATCH] For -gdwarf-5 emit DW_OP_{implicit_pointer,entry_value,*_type,convert,reinterpret}

2016-10-14 Thread Jakub Jelinek
Hi! Another set of GNU extensions that were accepted into DWARF5, so we should emit them even for -gstrict-dwarf -gdwarf-5, and for -gdwarf-5 should use the accepted standard opcodes instead of the corresponding GNU ones. Bootstrapped/regtested on x86_64-linux and i686-linux on top of the

Re: [patch, libstdc++] std::shuffle: Generate two swap positions at a time if possible

2016-10-14 Thread Jonathan Wakely
On 02/09/16 20:53 +0200, Eelis wrote: On 2016-09-02 20:20, Eelis van der Weegen wrote: On 2016-08-31 14:45, Jonathan Wakely wrote: Is this significantly faster than just using uniform_int_distribution<_IntType>{0, __bound - 1}(__g) so we don't need to duplicate the logic? (And people

[PATCH] (v2) Tweaks to print_rtx_function

2016-10-14 Thread David Malcolm
On Thu, 2016-10-13 at 16:18 +0200, Bernd Schmidt wrote: > On 10/13/2016 04:08 PM, David Malcolm wrote: > > I thought it might be useful to brainstorm [1] some ideas on this, > > so here are various possible ways it could be printed for this use > > -case: > > > > * Offset by

[PATCH] Resolve ambiguities in std::experimental::sample test

2016-10-14 Thread Jonathan Wakely
With --target_board=unix/-std=gnu++17 this test fails, because std::sample is defined too. * testsuite/experimental/algorithm/sample.cc: Qualify calls to resolve ambiguity between std::sample and std::experimental::sample. Tested x86_64-linux, committed to trunk. commit

[PATCH] For -gdwarf-5 emit DWARF5 .debug_macro

2016-10-14 Thread Jakub Jelinek
Hi! The GNU DW_AT_GNU_macros and .debug_macro* extensions were added to DWARF5, so we should emit those even in -gstrict-dwarf -gdwarf-5 mode. Bootstrapped/regtested on x86_64-linux and i686-linux on top of the dwarf2.{def,h} patch, ok for trunk? 2016-10-14 Jakub Jelinek

[PATCH, rs6000] pr65479 Add option to fix failing asan test cases.

2016-10-14 Thread Bill Seurer
[PATCH, rs6000] pr65479 Add option to fix failing asan test cases. This patch adds the -fasynchronous-unwind-tables option to several of the asan test cases. The option causes a full strack trace to be produced when the sanitizer detects an error. Without the full trace the 3 test cases fail.

Re: [PATCH] Add "__RTL" to cc1 (v2)

2016-10-14 Thread David Malcolm
On Fri, 2016-10-14 at 21:27 +0200, Bernd Schmidt wrote: > On 10/14/2016 09:25 PM, David Malcolm wrote: > > > > The behavior probably should be that it runs the remainder of the > > RTL > > passes from some specified point, and generates valid assembler (so > > that we can have dg-do DejaGnu

Re: [PATCH] Fix expansion ICE on store to CONST_DECL (PR middle-end/77959)

2016-10-14 Thread Richard Biener
On October 14, 2016 7:20:43 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >The following (invalid) testcase ICEs, because we try to store into >CONST_DECL's FIELD. Normally in GIMPLE we have MEM_REF[] and >writes to that expand gracefully into a MEM, but as soon as we use

Re: [PATCH] Add "__RTL" to cc1 (v2)

2016-10-14 Thread Bernd Schmidt
On 10/14/2016 09:25 PM, David Malcolm wrote: The behavior probably should be that it runs the remainder of the RTL passes from some specified point, and generates valid assembler (so that we can have dg-do DejaGnu tests). Actually I had imagined that tests would specify before and after RTL

Re: [PATCH] Add "__RTL" to cc1 (v2)

2016-10-14 Thread David Malcolm
On Fri, 2016-10-14 at 11:33 +0200, Richard Biener wrote: > On Thu, Oct 13, 2016 at 3:51 PM, Bernd Schmidt > wrote: > > On 10/13/2016 03:49 PM, Richard Biener wrote: > > > > > > Does it really run a single pass only? Thus you can't do a { dg > > > -do run } > > > test > > >

Re: [PATCH] Add "__RTL" to cc1 (v2)

2016-10-14 Thread David Malcolm
On Thu, 2016-10-13 at 15:49 +0200, Richard Biener wrote: > On Fri, Oct 7, 2016 at 5:58 PM, David Malcolm > wrote: > > On Wed, 2016-10-05 at 16:09 +, Joseph Myers wrote: > > > On Wed, 5 Oct 2016, David Malcolm wrote: > > > > > > > @@ -1752,6 +1759,35 @@

Re: fix -fmax-errors & notes

2016-10-14 Thread David Malcolm
On Thu, 2016-10-13 at 06:48 -0400, Nathan Sidwell wrote: > On 10/11/16 16:07, David Malcolm wrote: > > > This logic is running when the next diagnostic is about to be > > emitted. > > But what if the user has selected -Wfatal-errors and there's a > > single > > error and no further diagnostics?

[PATCH] xtensa: add HW FPU sequences for DIV/SQRT/RECIP/RSQRT

2016-10-14 Thread Max Filippov
Use new FPU instruction sequences documented in the ISA book to implement __divsf3, __divdf3, __recipsf2, __recipdf2, __rsqrtsf2, __rsqrtdf2 and __ieee754_sqrtf and __ieee754_sqrt. 2013-02-12 Ding-Kai Chen libgcc/ * config/xtensa/ieee754-df.S (__recipdf2,

[SPARC] Use new pass registration mechanism

2016-10-14 Thread Eric Botcazou
Tested on SPARC/Solaris, applied on the mainline. 2016-10-14 Eric Botcazou * config/sparc/sparc-passes.def: New file. * config/sparc/t-sparc (PASSES_EXTRA): Add sparc-passes.def. * config/sparc/sparc-protos.h (make_pass_work_around_errata): New.

[PATCH] Make std::bind use std::invoke

2016-10-14 Thread Jonathan Wakely
I think this is the last place where we weren't using std::__invoke() for something the standard defines in terms of INVOKE. This should make all our call wrappers and functional stuff consistent in terms of support for invoking a pointer-to-member, reference_wrapper etc. This means we can

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-14 Thread Wilco Dijkstra
Hi, > Split-stack prologue on function entry is as follow (this goes before the > usual function prologue): > mrsx9, tpidr_el0 > movx10, - As Jiong already remarked, the nop won't work. Do we know the maximum adjustment that the linker is allowed to make? If so, and we can

Re: [C++ PATCH] DR 1511 - const volatile variables and ODR

2016-10-14 Thread Jason Merrill
OK. On Fri, Oct 14, 2016 at 1:23 PM, Jakub Jelinek wrote: > Hi! > > We weren't implementing this DR, in the past all non-extern const vars > (and non-inline) at namespace scope had internal linkage, but now only > non-volatile const var. > > Fixed thusly, bootstrapped/regtested

Re: New option -flimit-function-alignment

2016-10-14 Thread Bernd Schmidt
On 10/12/2016 09:27 PM, Denys Vlasenko wrote: Yes, something like "if max_skip >= func_size, temporarily lower max_skip to func_size-1" (because otherwise we can create padding bigger-or-equal to the entire function in size, which is stupid - it's better to just put the function in that space).

[testsuite] Small tweaks to gnat.dg/debug[789].adb

2016-10-14 Thread Eric Botcazou
This removes redundant switches, reorders them and adds missing final -margs. Tested on x86_64-suse-linux and SPARC/Solaris, applied on the mainline. 2016-10-14 Eric Botcazou * gnat.dg/debug7.adb (dg-options): Remove -g. * gnat.dg/debug8.adb

[PATCH] read-md.c: Move various state to within class rtx_reader

2016-10-14 Thread David Malcolm
On Wed, 2016-10-12 at 22:57 +0100, Richard Sandiford wrote: > Sorry, haven't had time to read the full series yet, but: > > David Malcolm writes: > > On Wed, 2016-10-05 at 17:51 +0200, Bernd Schmidt wrote: > > > On 10/05/2016 06:14 PM, David Malcolm wrote: > > > > The

[PATCH] Add various DWARF5 constants to dwarf2.{h,def}

2016-10-14 Thread Jakub Jelinek
Hi! Now that DWARF5 public review draft has been released, I went through the document looking for double dagger marked constants and added them to dwarf2.{def,h}. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-14 Jakub Jelinek *

[PATCH] Emit DW_AT_inline for C++17 inline variables

2016-10-14 Thread Jakub Jelinek
Hi! This also uses the infrastructure of the langhook patch I've sent earlier. It emits (if not strict dwarf) DW_AT_inline on explicit or implicit inline variables, and also tweaks dwarf2out so that for inline static data members we consider in-class declarations as definitions (emit

[PATCH] Emit DW_AT_const_expr for constexpr variables

2016-10-14 Thread Jakub Jelinek
Hi! This relies on the previous langhook patch (which greatly simplifies it). I'm only handling variables for now, DW_AT_const_expr is just weird on functions/methods, it is supposed to appear only on DW_TAG_inlined_subroutine? Bootstrapped/regtested on x86_64-linux and i686-linux, ok for

[PATCH] Improve DWARF constant attribute langhooks

2016-10-14 Thread Jakub Jelinek
Hi! Before early dwarf changes, if we wanted to note some decl property so that some corresponding DWARF attribute can be emitted, we had to use some generic IL bit for that. Now a langhook can be used instead (hopefully for 7.x even with LTO), but having a single langhook for each such bit

[C++ PATCH] DR 1511 - const volatile variables and ODR

2016-10-14 Thread Jakub Jelinek
Hi! We weren't implementing this DR, in the past all non-extern const vars (and non-inline) at namespace scope had internal linkage, but now only non-volatile const var. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-14 Jakub Jelinek

libgo patch committed: just do flie/line lookup in C, move Func to Go

2016-10-14 Thread Ian Lance Taylor
In order to port stack backtraces to Go, we need the ability to look up file/line information for PC values without allocating memory. This libgo patch moves the handling of Func from C code to Go code, and simplifies the C code to just look up function/file/line/entry information for a PC.

[PATCH] Fix expansion ICE on store to CONST_DECL (PR middle-end/77959)

2016-10-14 Thread Jakub Jelinek
Hi! The following (invalid) testcase ICEs, because we try to store into CONST_DECL's FIELD. Normally in GIMPLE we have MEM_REF[] and writes to that expand gracefully into a MEM, but as soon as we use get_inner_reference in expand_assignment (even if the MEM is just reverse order, or we just want

libgo patch committed: support SPARC64/ELF relocs

2016-10-14 Thread Ian Lance Taylor
This patch by James Clarke adds support for SPARC64/ELF relocs to the debug/elf package in libgo. This is a backport of https://golang.org/cl/30870 from the master library. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [Patch AArch64 11/11] Enable _Float16

2016-10-14 Thread James Greenhalgh
On Fri, Sep 30, 2016 at 06:03:57PM +0100, James Greenhalgh wrote: > Hi, > > Finally, this patch adds the back-end wiring to get AArch64 support for > the _Float16 type working. > > Bootstrapped on AArch64 with no issues. > > OK? I spotted a bug in the way I'd written aarch64_promoted_type. We

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-14 Thread Bernhard Reutner-Fischer
On 13 October 2016 22:08:21 CEST, Jerry DeLisle wrote: >On 10/13/2016 08:16 AM, Janne Blomqvist wrote: >> >> Regtested on x86_64-pc-linux-gnu. Ok for trunk? >> > >Yes, OK, clever! Thanks! Is 32 something a typical program uses? I'd have started at 8 and had not doubled

Re: [Patch 6/11] Migrate excess precision logic to use TARGET_EXCESS_PRECISION

2016-10-14 Thread James Greenhalgh
On Fri, Sep 30, 2016 at 05:32:01PM +, Joseph Myers wrote: > On Fri, 30 Sep 2016, James Greenhalgh wrote: > > >/* float.h needs to know this. */ > > + /* We already have the option -fno-fp-int-builtin-inexact to ensure > > + certain built-in functions follow TS 18661-1 semantics. It

Re: [Patch 4/11] Implement TARGET_C_EXCESS_PRECISION for m68k

2016-10-14 Thread James Greenhalgh
On Fri, Sep 30, 2016 at 11:28:28AM -0600, Jeff Law wrote: > On 09/30/2016 11:01 AM, James Greenhalgh wrote: > > > >Hi, > > > >This patch ports the logic from m68k's TARGET_FLT_EVAL_METHOD to the new > >target hook TARGET_C_EXCESS_PRECISION. > > > >Patch tested by building an m68k-none-elf

Re: [Patch 3/11] Implement TARGET_C_EXCESS_PRECISION for s390

2016-10-14 Thread James Greenhalgh
Hi, On Fri, Oct 07, 2016 at 10:34:25AM +0200, Andreas Krebbel wrote: > On 10/04/2016 03:42 PM, Joseph Myers wrote: > > On Tue, 4 Oct 2016, Andreas Krebbel wrote: > > > >>> (b) Handling EXCESS_PRECISION_TYPE_IMPLICIT like > >>> EXCESS_PRECISION_TYPE_FAST would accurately describe what the back

Re: [Patch 1/11] Add a new target hook for describing excess precision intentions

2016-10-14 Thread James Greenhalgh
On Fri, Sep 30, 2016 at 05:56:53PM +0100, James Greenhalgh wrote: > > This patch introduces TARGET_C_EXCESS_PRECISION. This hook takes a tri-state > argument, one of EXCESS_PRECISION_TYPE_IMPLICIT, > EXCESS_PRECISION_TYPE_STANDARD, EXCESS_PRECISION_TYPE_FAST. Which relate to > the implicit extra

[PATCH 2/8] nvptx: implement predicated instructions

2016-10-14 Thread Alexander Monakov
This patch wires up generation of predicated instruction forms in nvptx.md and fixes their handling in nvptx.c. This is a prerequisite for the following patch. On its own it doesn't affect generated code because COND_EXEC instructions are created by if-conversion only after register allocation,

[PATCH 7/8] nvptx backend: new insns for OpenMP SIMD-via-SIMT

2016-10-14 Thread Alexander Monakov
This patch implements in nvptx.md a few new instruction patterns that are used for OpenMP SIMD code. * config/nvptx/nvptx-protos.h (nvptx_shuffle_kind): Move enum declaration from nvptx.c. (nvptx_gen_shuffle): Declare. * config/nvptx/nvptx.c (nvptx_shuffle_kind):

[PATCH 6/8] new target hook: TARGET_SIMT_VF

2016-10-14 Thread Alexander Monakov
This patch adds a new target hook and implements it in a straightforward manner on NVPTX to indicate that the target is running in SIMT fashion with 32 threads in a synchronous group ("warp"). For use in OpenMP transforms. * config/nvptx/nvptx.c (nvptx_simt_vf): New.

[PATCH 0/8] NVPTX offloading to NVPTX: backend patches

2016-10-14 Thread Alexander Monakov
Hi, I'm resending the patch series with backend prerequisites for OpenMP offloading to the NVIDIA PTX ISA. The patches are rebased on trunk. Could a global reviewer have a look at patch 6 (new TARGET_SIMT_VF hook) please? Documentation changes in doc/invoke.texi have already been reviewed by

[PATCH 8/8] nvptx: handle OpenMP "omp target entrypoint"

2016-10-14 Thread Alexander Monakov
This patch implements emission of OpenMP target region entrypoints: the compiler emits the target function with '$impl' appended to the name, and under the original name it emits a short entry sequence that sets up shared memory arrays and calls the target function via 'gomp_nvptx_main' (which is

[PATCH 5/8] nvptx mkoffload: pass -mgomp for OpenMP offloading

2016-10-14 Thread Alexander Monakov
This patch wires up use of alternative -mgomp multilib for OpenMP offloading via nvptx mkoffload. It makes OpenACC and OpenMP incompatible for simultaneous offloading compilation, so I've added a diagnostic for that. * config/nvptx/mkoffload.c (main): Check that either OpenACC or OpenMP

[PATCH 1/8] nvptx -msoft-stack

2016-10-14 Thread Alexander Monakov
This patch implements '-msoft-stack' code generation variant for NVPTX. The goal is to avoid relying on '.local' memory space for placement of automatic data, and instead have an explicitely-maintained stack pointer (which can be set up to point to preallocated global memory space). This allows

[PATCH 4/8] nvptx -mgomp

2016-10-14 Thread Alexander Monakov
This patch adds option -mgomp which enables -msoft-stack plus -muniform-simt, and wires up the corresponding multilib variant. This codegen convention is used for OpenMP offloading. * config/nvptx/nvptx.c (diagnose_openacc_conflict): New. Use it... (nvptx_option_override):

[PATCH 3/8] nvptx -muniform-simt

2016-10-14 Thread Alexander Monakov
This patch implements -muniform-simt code generation option, which is used to emit code for OpenMP offloading. The goal is to emit code that can either execute "normally", or can execute in a way that keeps all lanes in a given warp active, their local state synchronized, and observable effects

[PATCH] Avoid copies in std::scoped_allocator_adaptor piecewise construction

2016-10-14 Thread Jonathan Wakely
While looking at LWG 2511 I realised that we can prevent scoped_allocator_adaptor::construct(pair*, ...) from making any copies internally. The transformed tuples that get passed to the std::pair constructor (with additional allocator arguments) can be tuples of references even if the

Re: Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h

2016-10-14 Thread Pedro Alves
On 10/12/2016 03:13 PM, Bernd Schmidt wrote: > On 10/12/2016 04:09 PM, Pedro Alves wrote: >> >> Thanks. Here's a follow up patch that I was just testing. >> >> Need this if building with "g++ -std=gnu++11", with gcc < 4.7. > > Lovely. That's ok too if the other one goes in. FYI, I pushed these

Re: [patch,avr] Introduce absdata attribute to allow LDS /STS on Tiny

2016-10-14 Thread Denis Chertykov
2016-10-12 14:32 GMT+03:00 Georg-Johann Lay : > This patch introduces a new variable attribute "absdata". > > Reduced Tiny cores have only a limited range of addresses 0x40..0xbf which > can be handled by LDS / STS directly. The attribute allows the user to > assert that it is

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-14 Thread Jiong Wang
Hi Adhemerval, On 06/10/16 22:54, Adhemerval Zanella wrote: + bool split_stack_arg_pointer_used = split_stack_arg_pointer_used_p (); if (flag_stack_usage_info) current_function_static_stack_size = frame_size; @@ -3220,6 +3264,10 @@ aarch64_expand_prologue (void)

[Patch][MIPS} [Committed] Fix gcc.dg/pch.exp failures for microMIPS multilibs

2016-10-14 Thread Moore, Catherine
I've committed this patch to fix failures in g++.dg/pch.exp and gcc.dg/pch.exp tests when compiling with -mmicromips. Invalid data was being read from the precompiled-header causing a segfault while trying to switch compression context. This patch fixes that segfault by initializing

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Bill Schmidt
Markus, thanks for fixing this during my night. Appreciate it! Bill > On Oct 14, 2016, at 6:08 AM, Markus Trippelsdorf > wrote: > > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: >> Hi Bill, >> >>> Here are torture test cases for >>>

[v3] Remove more 'test' variables from the testcases

2016-10-14 Thread Paolo Carlini
Hi, the below, once again trivial, patch takes care of three additional directories. Tested x86_64-linux. Thanks, Paolo. /// 2016-10-14 Paolo Carlini * testsuite/26_numerics/accumulate/1.cc: Remove 'test' variables. *

Re: [PATCH, ARM 7/7, ping2] Enable ARMv8-M atomic and synchronization support for ARMv8-M Baseline

2016-10-14 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 03/10/16 17:46, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:50, Thomas Preudhomme wrote: Hi, This patch is part of a patch series to add support for atomic operations on ARMv8-M Baseline targets in GCC. This specific patch enables

Re: [PATCH] Fix PR77937

2016-10-14 Thread Bill Schmidt
Hi Richard, > On Oct 14, 2016, at 4:19 AM, Richard Biener > wrote: > > On Thu, Oct 13, 2016 at 5:38 PM, Bill Schmidt > wrote: >> The previous patch for >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937 is necessary, but not >>

Re: [PATCH, ARM 5/7, ping2] Adapt other atomic operations to ARMv8-M Baseline

2016-10-14 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 03/10/16 17:45, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:47, Thomas Preudhomme wrote: Hi, This patch is part of a patch series to add support for atomic operations on ARMv8-M Baseline targets in GCC. This specific patch adds support

Re: [PATCH, ARM 3/7, ping] Refactor atomic compare_and_swap to make it fit for ARMv8-M Baseline

2016-10-14 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 03/10/16 17:44, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:44, Thomas Preudhomme wrote: Hi, This patch is part of a patch series to add support for atomic operations on ARMv8-M Baseline targets in GCC. This specific patch refactors

Re: [PATCH, ARM 4/7, ping] Adapt atomic compare and swap to ARMv8-M Baseline

2016-10-14 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 03/10/16 17:45, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:46, Thomas Preudhomme wrote: Hi, This patch is part of a patch series to add support for atomic operations on ARMv8-M Baseline targets in GCC. This specific patch makes the

Re: [PATCH, ARM 2/7, ping2] Adapt atomic and exclusive load and store to ARMv8-M Baseline

2016-10-14 Thread Thomas Preudhomme
Ping? Best regards, Thomas On 03/10/16 17:42, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:41, Thomas Preudhomme wrote: Hi, This patch is part of a patch series to add support for atomic operations on ARMv8-M Baseline targets in GCC. This specific patch adapts

[PATCH AArch64]Penalize vector cost for large loops with too many vect insns.

2016-10-14 Thread Bin Cheng
Hi, It is suspected that for some large loops with too many vect_insns after vectorization, the performance will be regressed because of various reasons. Two possible reasons are: 1) Suggested by powerpc backend, large loops with too many vect_insns may jam vector unit's pipeline. 2)

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-10-14 Thread Richard Biener
On Fri, Oct 14, 2016 at 1:12 AM, kugan wrote: > Hi Richard, > > > On 13/10/16 20:44, Richard Biener wrote: >> >> On Thu, Oct 13, 2016 at 6:49 AM, kugan >> wrote: >>> >>> Hi Richard, >>> what does this try to do?

[PATCH] Fix PR77979

2016-10-14 Thread Richard Biener
The following fixes PR77979, yet another case where the jump-threading code in VRP makes things difficult. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2016-10-14 Richard Biener PR tree-optimization/77979 * tree-vrp.c

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Bernd Schmidt
On 10/14/2016 01:33 PM, Markus Trippelsdorf wrote: Thanks. ChangeLog entries for the testsuite are not mandatory. They are actually. Bernd

Re: Compile-time improvement for if conversion.

2016-10-14 Thread Yuri Rumyantsev
Richard, Here is updated patch with the changes proposed by you. Bootstrapping and regression testing did not show any new failures. Is it OK for trunk? ChangeLog: 2016-10-14 Yuri Rumyantsev * dominance.c (dom_info::dom_info): Add new constructor for region presented by

[PATCH] Do not move outer binds block for -finstrument-functions or TSAN

2016-10-14 Thread Richard Biener
I've encountered another case where the assumption that only a bind vars and its block vars may share a common chain -- for -finstrument-functions or TSAN the gimplifier violates this, making the chain shared between different binds vars and block. This can cause BLOCK_VARs to be dropped (I

[PATCH] PR65122 extended alignment support in allocators

2016-10-14 Thread Jonathan Wakely
Now that the warning in PR77742 is fixed we can make std::allocator use aligned new for types with extended alignment. This only changes the allocators that actually allocate memory themselves. The others (array, extptr, the testsuite ones) don't need any changes because they simply forward

Re: [PATCH] Test folding of str{n}{case}cmp and memchr (simplified version 4)

2016-10-14 Thread Richard Biener
On Thu, Oct 13, 2016 at 5:26 PM, Martin Liška wrote: > Simplified version of tests, where I added tests for side effects. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? Ok. Richard. > Martin

Re: [PATCH] Fold __builtin_memchr (simplified version 4)

2016-10-14 Thread Richard Biener
On Thu, Oct 13, 2016 at 5:26 PM, Martin Liška wrote: > Simplified version that supports only valid null-terminated string constants. > Apart from that, I added checking for constant folding of expressions that > have side effects. > > Patch can bootstrap on ppc64le-redhat-linux

Re: [PATCH] Fold __builtin_str{n}{case}cmp functions (simplified version 4)

2016-10-14 Thread Richard Biener
On Thu, Oct 13, 2016 at 5:24 PM, Martin Liška wrote: > Simplified version that just supports only null-terminated strings. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? Ok. Richard. > Martin

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-14 Thread Richard Biener
On Fri, Oct 14, 2016 at 1:12 PM, Martin Liška wrote: > On 10/13/2016 11:39 AM, Richard Biener wrote: >> Yes, as said, the patch is ok as-is. >> >> Richard. > > Installed, I've just tested the patch on 5 and 6 branch. > May I install it as well? Yes please. Ricahrd. > M.

Re: [PATCH] Tree-level fix for PR 69526

2016-10-14 Thread Richard Biener
On Tue, Sep 20, 2016 at 2:31 PM, Robin Dapp wrote: > Hi, > >> I meant to do sth like >> >> Index: tree-ssa-propagate.c >> === >> --- tree-ssa-propagate.c(revision 240133) >> +++ tree-ssa-propagate.c

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Rainer Orth
Hi Markus, >> You should have added a ChangeLog entry for that change. Unfortunately, >> neither the original testcases nor the fixed ones can ever have been >> properly tested: there's no such thing as dg-do options, leading to >> horrendous errors in mail-report.log: >> >> ERROR:

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Markus Trippelsdorf
On 2016.10.14 at 13:28 +0200, Rainer Orth wrote: > Hi Markus, > > > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: > >> Hi Bill, > >> > >> > Here are torture test cases for > >> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > >> > kindly provided the source for the

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Rainer Orth
Hi Markus, > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: >> Hi Bill, >> >> > Here are torture test cases for >> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf >> > kindly provided the source for the tests and verified the correct >> > dejagnu options on

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-14 Thread Martin Liška
On 10/13/2016 11:39 AM, Richard Biener wrote: > Yes, as said, the patch is ok as-is. > > Richard. Installed, I've just tested the patch on 5 and 6 branch. May I install it as well? M.

Re: [PATCH] Check \0-termination of string in c_getstr (simplified version)

2016-10-14 Thread Martin Liška
On 10/14/2016 11:38 AM, Richard Biener wrote: > On Thu, Oct 13, 2016 at 5:23 PM, Martin Liška wrote: >> Hello. >> >> After receiving feedback from Richi and Wilco Dijkstra, I decided to fully >> not >> support not null-terminated strings. It brings more complications and the >>

Re: [PATCH] Test cases for PR77937

2016-10-14 Thread Markus Trippelsdorf
On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: > Hi Bill, > > > Here are torture test cases for > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > > kindly provided the source for the tests and verified the correct > > dejagnu options on x86_64-pc-linux-gnu.

Re: basic_block flags, BB_VISITED

2016-10-14 Thread Richard Biener
On Fri, Oct 14, 2016 at 12:57 PM, Bernd Schmidt wrote: > On 10/14/2016 11:26 AM, Richard Biener wrote: >> >> On Fri, Oct 14, 2016 at 11:15 AM, Bernd Schmidt >> wrote: >>> >>> So maybe it should just call clear_bb_flags instead of doing the loop >>>

Re: basic_block flags, BB_VISITED

2016-10-14 Thread Richard Biener
On Fri, Oct 14, 2016 at 1:00 PM, Nathan Sidwell wrote: > On 10/14/16 05:28, Richard Biener wrote: > >> The BB_VISITED flag has indetermined state at the beginning of a pass. >> You have to ensure it is cleared yourself. > > > In that case the openacc (?) passes should be modified

Re: basic_block flags, BB_VISITED

2016-10-14 Thread Nathan Sidwell
On 10/14/16 05:28, Richard Biener wrote: The BB_VISITED flag has indetermined state at the beginning of a pass. You have to ensure it is cleared yourself. In that case the openacc (?) passes should be modified to clear the flags at their start, rather than at their end. nathan

Re: [PATCH] Remove x86 pcommit instruction

2016-10-14 Thread Andrew Senkevich
> That said - why do we need to remove pcommit support on the branches at all? I think it is better to have old branches updated because pcommit will not be implemented in hardware. -- WBR, Andrew

Re: Questionable code in gcov-io.c

2016-10-14 Thread Nathan Sidwell
On 10/13/16 18:10, Andrew Pinski wrote: /home/jenkins/workspace/BuildToolchainAARCH64_thunder_elf_upstream/toolchain/scripts/../src/libgcc/libgcov-driver.c:53:0: /home/jenkins/workspace/BuildToolchainAARCH64_thunder_elf_upstream/toolchain/scripts/../src/libgcc/../gcc/gcov-io.c: In function

[Ada] Fix PR ada/77968

2016-10-14 Thread Eric Botcazou
As reported by Richard, the LTO-specific change I made on 07/11 can yield ICEs on simple testcases with -flto, so the attached patch simply backs it out and adds an appropriate LTO testcase, as well as a couple of other LTO testcases which currently fail with a bogus warning. Tested on

  1   2   >