Re: [PATCH 11/18] add some utility methods to vec

2016-04-20 Thread Trevor Saunders
On Wed, Apr 20, 2016 at 11:13:42AM +0200, Richard Biener wrote: > On Wed, Apr 20, 2016 at 8:22 AM, wrote: > > From: Trevor Saunders > > > > Later patches use these functions, and I believe Mikhail has mentioned > > before > > he'd like to

[PATCH] opts-global.c: Include gimple.h for LAST_AND_UNUSED_GIMPLE_CODE.

2016-04-20 Thread Khem Raj
gcc/: 2016-04-16 Khem Raj * opts-global.c: Include gimple.h for LAST_AND_UNUSED_GIMPLE_CODE. Fixes build errors e.g. | ../../../../../../../work-shared/gcc-6.0.0-r0/git/gcc/lto-streamer.h:159:34: error: 'LAST_AND_UNUSED_GIMPLE_CODE' was not declared in this scope

Re: [PATCH] vrp: remove rendundant has_single_use tests

2016-04-20 Thread Patrick Palka
On Wed, Apr 20, 2016 at 6:45 PM, Patrick Palka wrote: > During assert-location discovery, if an SSA name is live according to > live_on_edge() on some outgoing edge E, then the SSA name definitely has > at least two uses: the use on the outgoing edge, and the use in some BB

Re: [PATCH][cilkplus] fix c++ implicit conversions with cilk_spawn (PR/69024, PR/68997)

2016-04-20 Thread Ryan Burn
Can we push this now that the gcc 7 branch is open? On Wed, Feb 10, 2016 at 1:00 PM, Jeff Law wrote: > On 01/20/2016 10:57 AM, Ryan Burn wrote: >> >> This patch follows on from >> https://gcc.gnu.org/ml/gcc-patches/2015-12/msg02142.html >> >> As discussed, it creates a separate

Re: [PATCH 00/18] towards removing rtx_insn_list and rtx_expr_list

2016-04-20 Thread Trevor Saunders
On Wed, Apr 20, 2016 at 06:03:01AM -0700, Andi Kleen wrote: > tbsaunde+...@tbsaunde.org writes: > > > I have some more patches that almost completely eliminate these, but I > > haven't > > tested the rest yet, and this is already a long series so it would be nice > > to > > get some of it out

[PATCH] vrp: remove rendundant has_single_use tests

2016-04-20 Thread Patrick Palka
During assert-location discovery, if an SSA name is live according to live_on_edge() on some outgoing edge E, then the SSA name definitely has at least two uses: the use on the outgoing edge, and the use in some BB dominating E->src from which the SSA_NAME and the potential assertion was

Re: [PATCH, rs6000] Expand vec_ld and vec_st during parsing to improve performance

2016-04-20 Thread Mike Stump
> On Apr 20, 2016, at 6:55 AM, Bill Schmidt wrote: > Looking into this a bit more reminded me why things are the way they > are. The AltiVec interfaces were designed way back to be overloaded > functions, which isn't valid C99. Thus they can't be declared in >

[PATCHv2, rs6000] Expand vec_ld and vec_st during parsing to improve performance

2016-04-20 Thread Bill Schmidt
Hi, Thanks to Richard for help with the POINTER_PLUS_EXPR and BIT_AND_EXPR changes. This version of the patch is identical to the previous one, except that the logic for expanding these expressions is now greatly simplified. Eventually we will want to remove the overload handling from

Re: [PATCH 10/18] merge adjust_cost and adjust_cost_2 target hooks

2016-04-20 Thread Trevor Saunders
On Wed, Apr 20, 2016 at 07:17:03AM -0500, Segher Boessenkool wrote: > On Wed, Apr 20, 2016 at 02:22:14AM -0400, tbsaunde+...@tbsaunde.org wrote: > > * config/microblaze/microblaze.c (microblaze_adjust_cost): > > * Likewise. > > Stray * (here and elsewhere). > > > ---

[PATCH] Allow all 1s of integer as standard SSE constants

2016-04-20 Thread H.J. Lu
Since all 1s in TImode is standard SSE2 constants, all 1s in OImode is standard AVX2 constants and all 1s in XImode is standard AVX512F constants, pass mode to standard_sse_constant_p and standard_sse_constant_opcode to check if all 1s is available for target. Tested on Linux/x86-64. OK for

Re: [PATCHES] Update avx256-unaligned-load-1.c and avx256-unaligned-store-2.c

2016-04-20 Thread Uros Bizjak
On Wed, Apr 20, 2016 at 5:35 PM, H.J. Lu wrote: > On Wed, Apr 20, 2016 at 4:19 AM, Uros Bizjak wrote: > >> BTW: There are a couple of regressions in the testsuite [1] when >> configured --with-arch=corei7. Can you please look at the testcases, >> if scan

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 4:19 AM, Marek Polacek wrote: > On Wed, Apr 20, 2016 at 12:54:12PM +0200, Richard Biener wrote: >> On Wed, Apr 20, 2016 at 12:37 PM, Jakub Jelinek wrote: >> > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: >> >> > ---

match.pd patch: max(int_min, x)->x

2016-04-20 Thread Marc Glisse
Hello, this simple transformation is currently done in RTL, sometimes also in VRP if we have any kind of range information (even on the wrong side, but not with VR_VARYING). It seems more natural to complete the match.pd pattern than make VRP understand this case. Bootstrap+regtest on

Re: [patch] libstdc++/69703 ignore endianness in codecvt_utf8

2016-04-20 Thread Jonathan Wakely
On 19/04/16 19:07 +0100, Jonathan Wakely wrote: This was reported as a bug in the Filesystem library, but it's actually a problem in the codecvt_utf8 facet that it uses. The fix had a silly typo meaning it didn't work for big endian targets, which was revealed by the improved tests I added.

[PATCH] nvptx libgcc changes

2016-04-20 Thread Alexander Monakov
Rewrite libgcc/config/nvptx from PTX assembly to C, to allow building it for -mgomp multilib. Previously posted here: [gomp-nvptx 6/9] nvptx libgcc: rewrite in C https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00120.html [gomp-nvptx 2/7] nvptx libgcc: use attribute shared

[PATCH] nvptx mkoffload changes

2016-04-20 Thread Alexander Monakov
Handle OpenMP offloading in NVPTX mkoffload. Previously posted here: [gomp-nvptx 7/9] nvptx mkoffload: pass -mgomp for OpenMP offloading https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00121.html 2015-12-09 Alexander Monakov * config/nvptx/mkoffload.c (main):

[PATCH] nvptx omp target entrypoint handling

2016-04-20 Thread Alexander Monakov
This patch adds OpenMP-specific kernel entry code emission. There's a corresponding omp-low.c patch that makes OpenACC use "omp acc target entrypoint" to disambiguate OpenACC and OpenMP target regions. 2015-12-09 Alexander Monakov * config/nvptx/nvptx.c

[PATCH] nvptx -mgomp multilib

2016-04-20 Thread Alexander Monakov
Wire up -mgomp multilib for OpenMP offloading, in a straightforward way. Changes in nvptx.opt and invoke.texi adding -msoft-stack and -muniform-simt are originally from the patches that introduced those. Doc additions in invoke.texi will probably change; I've asked Sandra Loosemore to have a

[PATCH] nvptx -muniform-simt codegen variant

2016-04-20 Thread Alexander Monakov
This patch implements a code generation variant needed for OpenMP, where all lanes in each warp can be kept active outside of SIMD regions, with observable execution effects as if only one lane was active, and local state (program counter and registers) synchronized among lanes, under

[PATCH] nvptx per-warp compiler-defined stacks (-msoft-stack)

2016-04-20 Thread Alexander Monakov
This patch implements per-warp compiler-defined stacks under -msoft-stack option, and implements alloca on top of that. In a few obvious places, changes from -muniform-simt patch are present in the hunks. Previously posted here: [PATCH] nvptx: implement automatic storage in custom stacks

[PATCH] add support for placing variables in shared memory

2016-04-20 Thread Alexander Monakov
Allow using __attribute__((shared)) to place static variables in '.shared' memory space. Previously posted here: [gomp-nvptx 04/13] nvptx backend: add support for placing variables in shared memory https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01546.html [gomp-nvptx] doc: document nvptx shared

[PATCH] new target hook: TARGET_SIMT_VF

2016-04-20 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. Previously posted here: [gomp-nvptx 5/9] new target hook: TARGET_SIMT_VF

[PATCH] new patterns for OpenMP SIMD-via-SIMT

2016-04-20 Thread Alexander Monakov
This patch adds a few insn patterns used for OpenMP SIMD reduction/lastprivate/ordered lowering for SIMT execution. OpenMP lowering produces GOMP_SIMT_... internal functions when lowering SIMD constructs that can be offloaded to a SIMT device. After lto stream-in, those internal functions are

OpenMP offloading to NVPTX: backend patches

2016-04-20 Thread Alexander Monakov
Hello! In responses to this email, I'll be posting 9 NVPTX-specific patches that are required for enabling OpenMP offloading. I intend to post corresponding libgomp and middle-end changes that make these useful a bit later. The patches are generated by taking a diff on amonakov/gomp-nvptx git

Re: [PATCH] [AArch64] support -mfentry feature for arm64

2016-04-20 Thread Szabolcs Nagy
On 20/04/16 02:25, AKASHI Takahiro wrote: > On Tue, Apr 19, 2016 at 09:39:39AM +0300, Alexander Monakov wrote: >> On Tue, 19 Apr 2016, AKASHI Takahiro wrote: > But if Szabolcs' two-instruction > sequence in the adjacent subthread is sufficient, this is moot. . It can also be

Re: [PATCH PR69489/02]Handle PHI which can be degenerated to two arguments node in tree ifcvt.

2016-04-20 Thread Bin.Cheng
On Tue, Mar 22, 2016 at 10:41 AM, Richard Biener wrote: > On Mon, Mar 21, 2016 at 4:22 PM, Bin Cheng wrote: >> Hi, >> The second issue revealed by PR69489 is tree ifcvt could not convert PHI >> nodes with more than 2 arguments. Among these nodes,

Re: [PATCH][CilkPlus] Fix PR69363

2016-04-20 Thread Ilya Verbin
On Wed, Feb 17, 2016 at 15:46:00 +0100, Jakub Jelinek wrote: > On Wed, Feb 17, 2016 at 05:32:58PM +0300, Ilya Verbin wrote: > > This patch fixes > > Bootstrap and make check passed. OK for... stage 1? > > Ok for stage1, with a few nits.

Re: [PING][PATCH] libgcc: Fix typos in comments for ARM FP emulation routines

2016-04-20 Thread Sandra Loosemore
On 04/20/2016 06:38 AM, Martin Galvan wrote: On Wed, Apr 20, 2016 at 1:44 AM, Sandra Loosemore wrote: Or, do you need someone to check this in for you because you don't have write access to the repository? Hi! Yeah, I don't have write access. If you could commit this

[PATCHES] Update avx256-unaligned-load-1.c and avx256-unaligned-store-2.c

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 4:19 AM, Uros Bizjak wrote: > BTW: There are a couple of regressions in the testsuite [1] when > configured --with-arch=corei7. Can you please look at the testcases, > if scan patterns need to be adjusted? They are caused by -mtune=slm. > FAIL:

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-20 Thread Jason Merrill
On 04/08/2016 07:51 AM, Marek Polacek wrote: This is my attempt to fix at least a part of this PR. I haven't been able to come up with a fix that fixes the other part involving templates. We were ICEing on code such as struct S { enum E : int; enum S::E : int { foo } e; }; Clang

Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 7:53 AM, Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 07:43:27AM -0700, H.J. Lu wrote: >> From 12c6ddcf67593ed7137764ca74043f1a9c2d8fda Mon Sep 17 00:00:00 2001 >> From: "H.J. Lu" >> Date: Wed, 30 Mar 2016 05:56:08 -0700 >>

[PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-20 Thread Bin Cheng
Hi, As reported in PR70715, GCC failed to prove no-overflows of IV([n]) for simple example like: int foo (char *p, unsigned n) { while(n--) { p[n]='A'; } return 0; } Actually, code has already been added to handle this form loops when fixing PR68529. Problem with this case is

Re: [PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 07:45:44AM -0700, H.J. Lu wrote: > On Wed, Apr 20, 2016 at 12:02 AM, Uros Bizjak wrote: > >> > >> That is why I submitted my patches. Since -m32 passes -march=x86-64 > >> to cc1 on x86-64, we shouldn't pass -march=i486 to cc1. It is undesirable > >>

Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 7:53 AM, Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 07:43:27AM -0700, H.J. Lu wrote: >> From 12c6ddcf67593ed7137764ca74043f1a9c2d8fda Mon Sep 17 00:00:00 2001 >> From: "H.J. Lu" >> Date: Wed, 30 Mar 2016 05:56:08 -0700 >>

Re: [PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 7:54 AM, Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 07:45:44AM -0700, H.J. Lu wrote: >> On Wed, Apr 20, 2016 at 12:02 AM, Uros Bizjak wrote: >> >> >> >> That is why I submitted my patches. Since -m32 passes -march=x86-64 >> >> to

Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 07:43:27AM -0700, H.J. Lu wrote: > From 12c6ddcf67593ed7137764ca74043f1a9c2d8fda Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date: Wed, 30 Mar 2016 05:56:08 -0700 > Subject: [PATCH 2/3] Don't build 32-bit libgomp with -march=i486 on x86-64 > > Gcc

Re: [PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 12:02 AM, Uros Bizjak wrote: >> >> That is why I submitted my patches. Since -m32 passes -march=x86-64 >> to cc1 on x86-64, we shouldn't pass -march=i486 to cc1. It is undesirable >> especially when --with-arch= is used. I noticed the issue when

Re: [PATCH] Don't build 32-bit libitm with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Tue, Apr 19, 2016 at 8:08 AM, H.J. Lu wrote: > Gcc uses the same -march= for both -m32 and -m64 on x86-64 unless > --with-arch-32= is used. There is no need for -march=i486 to compile > 32-bit libitm on x86-64. > > Tested on x86-64. OK for trunk? > > > H.J. > --- >

Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64

2016-04-20 Thread H.J. Lu
On Tue, Apr 19, 2016 at 8:08 AM, H.J. Lu wrote: > Gcc uses the same -march= for both -m32 and -m64 on x86-64 unless > --with-arch-32= is used. There is no need for -march=i486 to compile > 32-bit libgomp on x86-64. > > Tested on x86-64. OK for trunk? > > H.J. > --- >

[PATCH, i386]: Use explicit mode iterators in LEA splitters

2016-04-20 Thread Uros Bizjak
Substantial cleanups without functional changes. 2016-04-20 Uros Bizjak * config/i386/i386.md (*lea_general_1): Rename from *lea_general_1. Use explicit SWI12 mode interator. (*lea_general_2): Rename from *lea_general_2. Use explicit SWI12 mode interator.

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Wilco Dijkstra
Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 11:17:06AM +, Wilco Dijkstra wrote: >> Can you quantify "don't like"? I benchmarked rawmemchr on a few targets >> and it's slower than strlen, so it's hard to guess what you don't like about >> it. > > This is the same stuff as has been discussed

Re: [PATCH] Fix missed DSE opportunity with operator delete.

2016-04-20 Thread Richard Biener
On Tue, Apr 19, 2016 at 10:48 PM, Mikhail Maltsev wrote: > On 04/18/2016 12:14 PM, Richard Biener wrote: >> >> Enlarging tree_function_decl is bad. > Probably using 3 bits for malloc_flag, operator_new_flag and free_flag is > redundant. I packed the state into 2 bits. >> >>

Re: [PATCH, rs6000] Expand vec_ld and vec_st during parsing to improve performance

2016-04-20 Thread Bill Schmidt
On Tue, 2016-04-19 at 08:10 -0500, Bill Schmidt wrote: > On Tue, 2016-04-19 at 10:09 +0200, Richard Biener wrote: > > > > x86 nowadays has intrinsics implemented as inlines - they come from > > header files. It seems for ppc the intrinsics are somehow magically > > there, w/o a header file? > >

RE: [PATCH] x86 interrupt attribute patch [1/2]

2016-04-20 Thread Koval, Julia
Sorry, here is the right patch. -Original Message- From: Koval, Julia Sent: Wednesday, April 20, 2016 4:42 PM To: 'gcc-patches@gcc.gnu.org' Cc: Lu, Hongjiu ; 'vaalfr...@gmail.com' ; 'ubiz...@gmail.com'

[PATCH] x86 interrupt attribute patch [2/2]

2016-04-20 Thread Koval, Julia
Hi, Here is the new version of interrupt attribute patch. Bootstraped/regtested for Linux/x86_64. Ok for trunk? The interrupt and exception handlers are called by x86 processors. X86 hardware pushes information onto stack and calls the handler. The requirements are 1. Both interrupt and

Re: [PATCH] Simplify ix86_expand_vector_move_misalign

2016-04-20 Thread H.J. Lu
On Wed, Apr 20, 2016 at 4:19 AM, Uros Bizjak wrote: > On Wed, Apr 20, 2016 at 1:09 PM, Uros Bizjak wrote: >> On Tue, Apr 19, 2016 at 4:48 PM, H.J. Lu wrote: >>> Since mov_internal patterns handle both aligned/unaligned load >>> and

Re: [PATCH][AArch64] Work around PR target/64971

2016-04-20 Thread Richard Biener
On Wed, 20 Apr 2016, Kyrill Tkachov wrote: > > On 15/04/16 17:27, James Greenhalgh wrote: > > On Fri, Apr 15, 2016 at 03:12:58PM +0100, Kyrill Tkachov wrote: > > > On 15/04/16 15:10, Kyrill Tkachov wrote: > > > > Hi all, > > > > > > > > This is a repost of Andrew's fix for PR target/64971 that

Re: [PATCH 00/18] towards removing rtx_insn_list and rtx_expr_list

2016-04-20 Thread Andi Kleen
tbsaunde+...@tbsaunde.org writes: > I have some more patches that almost completely eliminate these, but I haven't > tested the rest yet, and this is already a long series so it would be nice to > get some of it out of my tree and reviewed. > > patches individually bootstrapped and regtested on

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 11:17:06AM +, Wilco Dijkstra wrote: > Can you quantify "don't like"? I benchmarked rawmemchr on a few targets > and it's slower than strlen, so it's hard to guess what you don't like about > it. This is the same stuff as has been discussed for mempcpy, rawmemchr is

[committed, PATCH] Replace -skip-rax-setup with -mskip-rax-setup

2016-04-20 Thread H.J. Lu
This fixed a typo. Checked into trunk. H.J. --- Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 235274) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2016-04-20 H.J. Lu + + *

Re: [PATCH 18/18] make last_pending_memory_flush a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:22AM -0400, tbsaunde+...@tbsaunde.org wrote: > --- a/gcc/sched-rgn.c > +++ b/gcc/sched-rgn.c > @@ -2620,12 +2620,8 @@ deps_join (struct deps_desc *succ_deps, struct > deps_desc *pred_deps) >concat_mem_list (pred_deps->pending_write_mems, >

Re: [PATCH 17/18] make pending_{read,write}_insns vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:21AM -0400, tbsaunde+...@tbsaunde.org wrote: > (add_insn_mem_dependence): Likewise. Likewise. Likewise! > @@ -1614,22 +1644,22 @@ remove_from_dependence_list (rtx_insn *insn, > rtx_insn_list **listp) > /* Same as above, but process two lists at once. */ >

[PATCH] Fix GENERICizing of BIT_FIELD_REF

2016-04-20 Thread Richard Biener
This fixes a latent issue in maybe_build_generic_op. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-04-20 Richard Biener * gimple-match.h (maybe_build_generic_op): Adjust prototype. * gimple-match-head.c

Re: [PATCH 16/18] make forced labels a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:20AM -0400, tbsaunde+...@tbsaunde.org wrote: > * function.h (struct expr_status): make x_forced_labels a vector. Capital M. > --- a/gcc/cfgrtl.c > +++ b/gcc/cfgrtl.c > @@ -115,7 +115,8 @@ can_delete_label_p (const rtx_code_label *label) >return

Re: [PING][PATCH] libgcc: Fix typos in comments for ARM FP emulation routines

2016-04-20 Thread Martin Galvan
On Wed, Apr 20, 2016 at 1:44 AM, Sandra Loosemore wrote: > Or, do you need someone to check this in for you because you don't have > write access to the repository? Hi! Yeah, I don't have write access. If you could commit this for me it would be great. Thanks!

Re: [PATCH 15/18] make nonlocal_goto_handler_labels a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:19AM -0400, tbsaunde+...@tbsaunde.org wrote: > --- a/gcc/cfgrtl.c > +++ b/gcc/cfgrtl.c > @@ -157,7 +157,14 @@ delete_insn (rtx uncast_insn) > } > } > > - remove_node_from_insn_list (insn, _goto_handler_labels); > + > + unsigned int len =

Re: [PATCH v2] [libatomic] Add RTEMS support

2016-04-20 Thread Sebastian Huber
Hello, I know that I am pretty late, but is there a chance to get this into the GCC 6.1 release? On 19/04/16 14:56, Sebastian Huber wrote: v2: Do not use architecture configuration due to broken ARM libatomic support. gcc/ * config/rtems.h (LIB_SPEC): Add -latomic. libatomic/

Re: [PATCH 11/18] add some utility methods to vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:15AM -0400, tbsaunde+...@tbsaunde.org wrote: > +template > +inline bool > +vec_safe_contains (vec *v, const T ) > +{ > + return v? v->contains (search) : false; > +} Missing space. Segher

Re: [PATCH 10/18] merge adjust_cost and adjust_cost_2 target hooks

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:14AM -0400, tbsaunde+...@tbsaunde.org wrote: > * config/microblaze/microblaze.c (microblaze_adjust_cost): > * Likewise. Stray * (here and elsewhere). > --- a/gcc/config/alpha/alpha.c > +++ b/gcc/config/alpha/alpha.c > @@ -4758,14 +4758,15 @@

[PATCH] [ARC] Add new ARCv2 instructions.

2016-04-20 Thread Claudiu Zissulescu
This patch adds new instruction variants as introduced by the ARCv2 architecture. OK to apply? Claudiu gcc/ 2016-04-20 Claudiu Zissulescu * config/arc/arc-protos.h (compact_memory_operand_p): Declare. * config/arc/arc.c

Re: [PATCH][AArch64] Work around PR target/64971

2016-04-20 Thread Kyrill Tkachov
On 15/04/16 17:27, James Greenhalgh wrote: On Fri, Apr 15, 2016 at 03:12:58PM +0100, Kyrill Tkachov wrote: On 15/04/16 15:10, Kyrill Tkachov wrote: Hi all, This is a repost of Andrew's fix for PR target/64971 that was originally posted at:

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 1:56 PM, Wilco Dijkstra wrote: > Richard Biener wrote: >> Better - comments below. Jakub objections to the usefulness of the transform >> remain - we do have the strlen pass that uses some global knowledge to decide >> on profitability. One could

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Wilco Dijkstra
Richard Biener wrote: > Better - comments below. Jakub objections to the usefulness of the transform > remain - we do have the strlen pass that uses some global knowledge to decide > on profitability. One could argue that for -Os doing the reverse transform is > profitable? In what way would it

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 1:19 PM, Marek Polacek wrote: > On Wed, Apr 20, 2016 at 12:54:12PM +0200, Richard Biener wrote: >> On Wed, Apr 20, 2016 at 12:37 PM, Jakub Jelinek wrote: >> > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: >> >> > ---

Re: [PATCH 05/18] make stores rtx_insn_list a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:09AM -0400, tbsaunde+...@tbsaunde.org wrote: > 2016-04-19 Trevor Saunders > > * gcse.c (struct ls_expr): make stores field a vector. Capital M. > @@ -3604,7 +3604,7 @@ ldst_entry (rtx x) >ptr->expr = NULL; >

Re: [PATCH 03/18] make antic_stores a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:07AM -0400, tbsaunde+...@tbsaunde.org wrote: > @@ -163,7 +162,7 @@ st_expr_entry (rtx x) > static void > free_st_expr_entry (struct st_expr * ptr) > { > - free_INSN_LIST_list (& ptr->antic_stores); > + ptr->antic_stores.release (); >

libgomp: Make GCC 5 OpenACC offloading executables work (was: Openacc launch API)

2016-04-20 Thread Thomas Schwinge
Hi! On Mon, 28 Sep 2015 15:38:57 -0400, Nathan Sidwell wrote: > On 09/24/15 04:40, Jakub Jelinek wrote: > > Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback > > anyway because of the incompatible PTX version I do agree that it's reasonable to require

Re: [PATCH 02/18] make avail_stores a vec

2016-04-20 Thread Segher Boessenkool
On Wed, Apr 20, 2016 at 02:22:06AM -0400, tbsaunde+...@tbsaunde.org wrote: > +void > +print_rtx_insn_vec (FILE *file, const vec ) > +{ > + fputc('{', file); > + > + unsigned int len = vec.length (); > + for (unsigned int i = 0; i < len; i++) > +{ > + print_rtl (file, vec[i]); > +

Re: [PATCH] Simplify ix86_expand_vector_move_misalign

2016-04-20 Thread Uros Bizjak
On Wed, Apr 20, 2016 at 1:09 PM, Uros Bizjak wrote: > On Tue, Apr 19, 2016 at 4:48 PM, H.J. Lu wrote: >> Since mov_internal patterns handle both aligned/unaligned load >> and store, we can simplify ix86_avx256_split_vector_move_misalign and >>

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Marek Polacek
On Wed, Apr 20, 2016 at 12:54:12PM +0200, Richard Biener wrote: > On Wed, Apr 20, 2016 at 12:37 PM, Jakub Jelinek wrote: > > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: > >> > --- gcc/tree-if-conv.c > >> > +++ gcc/tree-if-conv.c > >> > @@ -262,6 +262,16 @@

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Wilco Dijkstra
Jakub Jelinek wrote: > I still don't like this transformation and would very much prefer to see > using rawmemchr instead on targets that provide it, and also this is > something that IMHO should be done in the tree-ssa-strlen.c pass together > with the other optimizations in there. Similarly to

Re: [PATCH] Simplify ix86_expand_vector_move_misalign

2016-04-20 Thread Uros Bizjak
On Tue, Apr 19, 2016 at 4:48 PM, H.J. Lu wrote: > Since mov_internal patterns handle both aligned/unaligned load > and store, we can simplify ix86_avx256_split_vector_move_misalign and > ix86_expand_vector_move_misalign. > > Tested on x86-64. OK for trunk? > > H.J. > --- >

Re: [PATCH, i386] Relax target requirement for vec_unpacks_lo_hi

2016-04-20 Thread Kirill Yukhin
Hi Ilya, On 19 Apr 19:09, Ilya Enkovich wrote: > Hi, > > vec_unpacks_lo_[si,hi,di] patterns for scalar masks don't need to extend > mask elements. It means a simple register copy is good enough. > > Currently vec_unpacks_lo_hi pattern uses kmovb instruction which requires > AVX512DQ target.

[Ada] Spurious discriminant check on type with unknown discriminants

2016-04-20 Thread Arnaud Charlet
This patch removes a spurious discriminant check on an generated assignment statement in an iterator loop, when the cursor type is a type with unknown discriminants, when the full view has discriminants with defaults. Executing: gnatmake -f -q -g date_iteration_test.adb date_iteration_test

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 12:37 PM, Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: >> > --- gcc/tree-if-conv.c >> > +++ gcc/tree-if-conv.c >> > @@ -262,6 +262,16 @@ ifc_temp_var (tree type, tree expr, >> > gimple_stmt_iterator *gsi) >> >

[Ada] Illegal use of current instance in attribute reference

2016-04-20 Thread Arnaud Charlet
The current instance of a type in an aspect specification is an object of the type. If the type is scalar, it cannot be the prefix of an attribute reference such as 'First, whose prefix must an array object (even though it can be a scalar type in other contexts). Compiling foo.adb must yield:

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 12:33 PM, Jakub Jelinek wrote: > On Wed, Apr 20, 2016 at 11:44:08AM +0200, Richard Biener wrote: >> (simplify >> (BUILT_IN_STRCHR @0 integer_zerop) >> (pointer_plus @0 (BUILT_IN_STRLEN:size_type_node @0))) > > I still don't like this transformation and

Re: [PATCH GCC]Support BIT_AND_EXPR in scalar evolution

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 12:22 PM, Bin.Cheng wrote: > On Wed, Apr 20, 2016 at 9:55 AM, Richard Biener > wrote: >> On Tue, Apr 19, 2016 at 7:00 PM, Bin Cheng wrote: >>> Hi, >>> Type conversion from integer to smaller unsigned

[Ada] Leak with function returning String in exception handler

2016-04-20 Thread Arnaud Charlet
This patch modifies the transient scope mechanism to ignore blocks generated for exception handlers with a choice parameter when propagating secondary stack information up the scope stack. Such blocks are not physically present in the tree and can never release the secondary stack on exit.

[Ada] Spurious error on binary operator in instance

2016-04-20 Thread Arnaud Charlet
This patch updates the mechanism which qualifies universal literals that act as operands of binary or unary operators to avoid the partial qualification of the subtype_mark when the immediate scope of the corresponding actual parameter is a generic unit. No simple reproducer possible. Tested on

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: > > --- gcc/tree-if-conv.c > > +++ gcc/tree-if-conv.c > > @@ -262,6 +262,16 @@ ifc_temp_var (tree type, tree expr, > > gimple_stmt_iterator *gsi) > >return new_name; > > } > > > > +/* Return true when COND is a false predicate.

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 11:44:08AM +0200, Richard Biener wrote: > (simplify > (BUILT_IN_STRCHR @0 integer_zerop) > (pointer_plus @0 (BUILT_IN_STRLEN:size_type_node @0))) I still don't like this transformation and would very much prefer to see using rawmemchr instead on targets that provide it,

[Ada] Missing style warning on overlong line is task subunit

2016-04-20 Thread Arnaud Charlet
This patch restores a warning message on an overlong line in a subunit that is a task body, when compiling the parent unit. Compiling: gcc -c -gnatyM50 par.adb must yield: par-separated_task.adb:6:51: (style) this line is too long --- opackage Par is task type Separated_Task is

[Ada] Constraint_Error on spurious ambiguity in instance

2016-04-20 Thread Arnaud Charlet
This patch updates the instantiation machinery to properly preserve a reference to a global type in a qualified expression used to convert a universal literal to a specific type, and propagate it to the instantiated template. -- Source -- -- types.ads package Types is

Re: Remove unused openacc call

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 10:46:38AM +0200, Thomas Schwinge wrote: > On Mon, 9 Nov 2015 16:58:48 -0500, Nathan Sidwell wrote: > > I've committed this to trunk. It nuke the now unused > > GOACC_GET_NUM_THREADS and > > GOACC_GET_THREAD_NUM calls. > > > * omp-low.c: [...] > >

[Ada] Spurious discriminant error on aggregate for derived type

2016-04-20 Thread Arnaud Charlet
This patch extends the mechanism used to provide discriminants values for an aggregate of a derived type that constrains some parent discriminants and renames others, when the type of the target is unconstrained. No simple test available. Tested on x86_64-pc-linux-gnu, committed on trunk

Re: Resolve idempotency issue with libgomp's config.h/libgomp.h

2016-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2016 at 09:55:35AM +0200, Thomas Schwinge wrote: > diff --git libgomp/config.h.in libgomp/config.h.in > index 226ac53..1ef51ca 100644 > --- libgomp/config.h.in > +++ libgomp/config.h.in > @@ -1,5 +1,11 @@ > /* config.h.in. Generated from configure.ac by autoheader. */ > > + >

Re: [PATCH GCC]Support BIT_AND_EXPR in scalar evolution

2016-04-20 Thread Bin.Cheng
On Wed, Apr 20, 2016 at 9:55 AM, Richard Biener wrote: > On Tue, Apr 19, 2016 at 7:00 PM, Bin Cheng wrote: >> Hi, >> Type conversion from integer to smaller unsigned type could be transformed >> into BIT_AND_EXPR in compilation. For example, >>

[Ada] Constraint_Error on spurious ambiguity in instance

2016-04-20 Thread Arnaud Charlet
This match modifies the processing of generics to aid overload resolution of binary and unary operators in instances. This is achieved by installing type conversions in the form of qualified expressions for each operand that yields a universal type. -- Source -- --

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-20 Thread Marek Polacek
Ping. On Fri, Apr 08, 2016 at 01:51:02PM +0200, Marek Polacek wrote: > This is my attempt to fix at least a part of this PR. I haven't been able to > come up with a fix that fixes the other part involving templates. > > We were ICEing on code such as > > struct S > { > enum E : int; > enum

[Ada] Better error message for illegal aspect

2016-04-20 Thread Arnaud Charlet
This patch improves on the error message for an aspect whose expression freezes the entity to which it applies. Compiling BD11002.adb must yield: bd11002.adb:3:02: aspect specification causes premature freezing of "Size" --- procedure BD11002 is Sizer : constant Natural := Integer'Size

[Ada] Crash on configuration pragma Check_Policy.

2016-04-20 Thread Arnaud Charlet
There are two different syntaxes for this pragma, and the analysis of the pragma in the new syntax results in the construction of one or more pragmas in the older form. If the original pragma appears in a configuration file the generated ones must be inserted in the same file because

Re: [PATCH] [AArch64] support -mfentry feature for arm64

2016-04-20 Thread Szabolcs Nagy
On 20/04/16 01:36, AKASHI Takahiro wrote: > On Tue, Apr 19, 2016 at 09:44:37AM +0300, Alexander Monakov wrote: >> On Tue, 19 Apr 2016, AKASHI Takahiro wrote: looking at [2] i don't see why func: mov x9, x30 bl _tracefunc >>> >>> Actually, >>> mov x9, x30

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Marek Polacek
On Wed, Apr 20, 2016 at 11:47:07AM +0200, Richard Biener wrote: > On Wed, Apr 20, 2016 at 11:42 AM, Marek Polacek wrote: > > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: > >> On Tue, Apr 19, 2016 at 8:35 PM, Marek Polacek wrote: > >> >

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 11:42 AM, Marek Polacek wrote: > On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: >> On Tue, Apr 19, 2016 at 8:35 PM, Marek Polacek wrote: >> > While predicate_mem_writes has a check to skip conditions that were >> >

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 10:45 AM, Richard Biener wrote: > On Tue, Apr 19, 2016 at 6:32 PM, Wilco Dijkstra > wrote: >> Richard Biener wrote: >>> >>> This folding should be added to gimple-fold.c:gimple_fold_builtin instead, >>> the builtins.c

Re: [PATCH] Fix ICE in predicate_mem_writes (PR tree-optimization/70725)

2016-04-20 Thread Marek Polacek
On Wed, Apr 20, 2016 at 11:04:08AM +0200, Richard Biener wrote: > On Tue, Apr 19, 2016 at 8:35 PM, Marek Polacek wrote: > > While predicate_mem_writes has a check to skip conditions that were > > evaluated > > to true, it's lacking the same check for false, so we hit an

[Ada] Wrong resolution of intrinsic in postcondition

2016-04-20 Thread Arnaud Charlet
This patch ensures that intrinsic operators that act as generic actuals are properly resolved and rewritten in the instance when the context is a fully analyzed and expanded pre/postcondition. Prior to this change the rewriting guard was too restrictive and led to erroneous resolution.

Re: [PATCH 11/18] add some utility methods to vec

2016-04-20 Thread Richard Biener
On Wed, Apr 20, 2016 at 8:22 AM, wrote: > From: Trevor Saunders > > Later patches use these functions, and I believe Mikhail has mentioned before > he'd like to have begin / end () on vec before. begin() / end () is fine. But contains ()?

[Ada] Do not use secondary stack in some cases

2016-04-20 Thread Arnaud Charlet
The compiler is no longer using the secondary stack in the case of "for ... of" loops over arrays. No small test case is available. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-04-20 Bob Duff * sem_ch5.adb (Analyze_Iterator_Specification): Do not use

  1   2   >