Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs

2016-04-29 Thread Jasmin J.
Hi! I would really like to see this in GCC, because this is the base for the next patch "Add multilib support for bare-metal ARM architectures". BR Jasmin * On 04/27/2016 04:17 PM, Thomas Preudhomme wrote: Ping? Best rega

Re: [ping][patch] update handling of 'acc parallel loop' reductions for PR70626

2016-04-29 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 03:49:13PM -0700, Cesar Philippidis wrote: > 2016-04-15 Cesar Philippidis > > gcc/c-family/ > PR middle-end/70626 > * c-common.h (c_oacc_split_loop_clauses): Add boolean argument. > * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate >

Re: Allow embedded timestamps by C/C++ macros to be set externally (3)

2016-04-29 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 08:29:56PM +0200, Dhole wrote: > There is the Wdate-time flag, that warns on using __DATE__, __TIME__ and > __TIMESTAMP__. Although that alone will not make the compilation fail > unless it's used with Werror. > > The reason behind using fatal_error (rather than a warning)

Re: [PATCH, ARM, 3/3] Add multilib support for bare-metal ARM architectures

2016-04-29 Thread Jasmin J.
Hi! Ping! Attached is a rebased version of my patch with a small change, which converts some spaces to TABs. > Please note, that the patch >"[PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs" >from 12/16/2015 12:58 PM > needs to be applied before my new version of this patc

Re: [patch] cleanup *finish_omp_clauses

2016-04-29 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 10:42:49AM -0700, Cesar Philippidis wrote: > > That said, the above names are just weird, it is non-obvious > > what they mean at all. What is C_ORT_NONE for? We surely don't > > have any clauses that aren't OpenMP, nor Cilk+, nor OpenACC > > (ok, maybe the simd attribute,

Re: [RFC patch, i386]: Use STV pass to load/store any TImode constant using SSE insns

2016-04-29 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 01:45:36PM +0300, Ilya Enkovich wrote: > > Where does the 2 come from? Is it that the STV pass right now supports only > > 2 * wordsize modes? Also, I don't think we should treat equally constants > > that fit into the 32-bit immediates and constants that don't, the latter

Re: check-target-libgomp wall time, without vs. with offloading

2016-04-29 Thread Jakub Jelinek
On Thu, Apr 28, 2016 at 12:43:43PM +0200, Thomas Schwinge wrote: > commit 3b521f3e35fdb4b320e95b5f6a82b8d89399481a > Author: Thomas Schwinge > Date: Thu Apr 21 11:36:39 2016 +0200 > > libgomp: Unconfuse offload plugins vs. offload targets I don't like this patch at all, rather than unconfu

Re: [PATCH] Update gmp/mpfr/mpc in-tree versions

2016-04-29 Thread Richard Biener
On Thu, 28 Apr 2016, Bernd Edlinger wrote: > On 28.04.2016 16:29, Richard Biener wrote: > > > > Another option would be to try if mini-gmp is enough for our > > (in-tree) use and what the performance impact would be if we'd > > use that (in-tree). > > > > Yes, we would certainly never need more t

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Eric Botcazou
> While looking at the insn enable condition, I noticed that we don't > use "probe_stack" pattern any more, as the stack check loop is now > implemented in a different way. Yes, we do, probe_stack is a standard pattern called by the middle-end. > 2016-04-28 Uros Bizjak > > * config/i386/i

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 9:47 AM, Eric Botcazou wrote: >> While looking at the insn enable condition, I noticed that we don't >> use "probe_stack" pattern any more, as the stack check loop is now >> implemented in a different way. > > Yes, we do, probe_stack is a standard pattern called by the midd

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Eric Botcazou
> We can put it back, but prehaps implemented as unspec, so it won't > interfere with peepholes? No strong opinion, as long as the final assembly is the same as before. -- Eric Botcazou

Re: [RFA][PATCH] Adding missing calls to bitmap_clear

2016-04-29 Thread Richard Biener
On Thu, Apr 28, 2016 at 9:35 PM, Jeff Law wrote: > On 03/22/2016 03:37 AM, Richard Biener wrote: >> >> On Mon, Mar 21, 2016 at 9:32 PM, Jeff Law wrote: >>> >>> On 03/21/2016 01:10 PM, Bernd Schmidt wrote: On 03/21/2016 08:06 PM, Jeff Law wrote: > > > > As noted last

fix libsanitizer build on ppc-linux

2016-04-29 Thread Olivier Hainque
Hello, Attempts to bootstrap on our powerpc-linux hosts fail on libsanitizer with symptoms like: In file included from ../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:29:0: /usr/include/asm/posix_types.h:72:51: error: '__kernel_fd_set' has not been declared

Re: Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd

2016-04-29 Thread Richard Biener
On Thu, Apr 28, 2016 at 10:15 PM, Marc Glisse wrote: > On Wed, 27 Apr 2016, Richard Biener wrote: > >>> --- trunk4/gcc/fold-const.h (revision 235452) >>> +++ trunk4/gcc/fold-const.h (working copy) >>> @@ -13,20 +13,22 @@ WARRANTY; without even the implied warra >>> FITNESS FOR A PARTICULA

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-29 Thread Eric Botcazou
> The following works (for the testcase): > > Index: gcc/cp/decl.c > === > --- gcc/cp/decl.c (revision 235547) > +++ gcc/cp/decl.c (working copy) > @@ -10393,8 +10393,11 @@ grokdeclarator (const cp_declarator *dec >

Re: [PATCH] Fix type field walking in gimplifier unsharing

2016-04-29 Thread Richard Biener
On Fri, 29 Apr 2016, Eric Botcazou wrote: > > The following works (for the testcase): > > > > Index: gcc/cp/decl.c > > === > > --- gcc/cp/decl.c (revision 235547) > > +++ gcc/cp/decl.c (working copy) > > @@ -10393,8 +1039

[PATCH] Fix PR13962 somewhat

2016-04-29 Thread Richard Biener
The PR asks that we optimize pointer comparisons using PTA information. This patch implements the bits that are possible without adjusting PTA to be more precise about things like points-to-null or points-to-string (or points-to-label/function). This also fixes PR65686 where it avoids a bogus un

Re: fix libsanitizer build on ppc-linux

2016-04-29 Thread Jakub Jelinek
On Fri, Apr 29, 2016 at 10:08:07AM +0200, Olivier Hainque wrote: > Hello, > > Attempts to bootstrap on our powerpc-linux hosts fail > on libsanitizer with symptoms like: > > > In file included from > ../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:29:0: > /u

RE: [PATCH] [ARC] Fix unwanted match for sign extend 16-bit constant.

2016-04-29 Thread Claudiu Zissulescu
Committed r235623. Thanks, Claudiu > -Original Message- > From: Joern Wolfgang Rennecke [mailto:g...@amylaar.uk] > Sent: Thursday, April 28, 2016 10:57 PM > To: Claudiu Zissulescu; Claudiu Zissulescu; gcc-patches@gcc.gnu.org > Cc: francois.bed...@synopsys.com; jeremy.benn...@embecosm.com

[PATCH] Fix gcc.dg/tree-ssa/pr18589-10.c

2016-04-29 Thread Richard Biener
The following adjusts gcc.dg/tree-ssa/pr18589-10.c after my match.pd patch to add + /* Simplify powi(x,y) * powi(z,y) -> powi(x*z,y). */ + (simplify + (mult (POWI:s @0 @1) (POWI:s @2 @1)) + (POWI (mult @0 @2) @1)) which now generates one multiplication less (assembly is the same). Committed

Re: [RFC] Update gmp/mpfr/mpc minimum versions

2016-04-29 Thread Rainer Orth
Hi Bernd, >> would this version combo (gmp 6.0.0, mpfr 3.1.1, mpc 0.9) also work on >> the active release branches (gcc-5 and gcc-6, gcc-4.9 is on it's way >> out)? Having to install two different sets of the libraries for trunk >> and branch work would be extremely tedious. >> >> Rainer >>

Re: Allow redefinition of libcilkrts debug macros

2016-04-29 Thread Rainer Orth
Hi Jeff, > On 04/26/2016 08:04 AM, Rainer Orth wrote: >> When working on a couple of Cilk Plus issues lately (PRs target/60290, >> target/68945), I noticed that you have to modify the libcilkplus sources >> to enable various debugging output. This seems silly, and the following >> patch allows de

Re: [Patch] Fix PR 60040

2016-04-29 Thread Bernd Schmidt
On 04/28/2016 10:07 AM, Senthil Kumar Selvaraj wrote: Here's the patch with the extra bits removed. To get it some additional test coverage, I've tested it on gcc-4_7-branch (with another backport so that it applies) with an x86_64 bootstrap and test. That worked, so I installed it on trunk.

[PATCH][C++] Build DECL_EXPRs for anonymous VLAs

2016-04-29 Thread Richard Biener
The following makes sure that the gimplifier properly unshares the type fields in anonymous VLA types by inserting a DECL_EXPR for it instead of just forcing a TYPE_SIZE evaluation. This avoids turning those fields in to garbage during gimplification. Bootstrapped and tested on x86_64-unknown-li

RE: [PATCHv2 0/7] ARC: Add support for nps400 variant

2016-04-29 Thread Claudiu Zissulescu
Hi Andrew, I see the next tests failing: FAIL: gcc.target/arc/movb-1.c scan-assembler movb[ \t]+r[0-5]+, *r[0-5]+, *r[0-5]+, *19, *21, *8 FAIL: gcc.target/arc/movb-2.c scan-assembler movb[ \t]+r[0-5]+, *r[0-5]+, *r[0-5]+, *23, *23, *9 FAIL: gcc.target/arc/movb-5.c scan-assembler movb[ \t]+r[0-5

[PATCH][Fortran] Properly generate DECL_EXPRs for temporary arrays

2016-04-29 Thread Richard Biener
The following makes sure to create DECL_EXPRs for VLA types built for temporary arrays to properly allow the gimplifier to unshare expression in its type fields when required. This avoids turing those fields into garbage. With a patch to allow the gimplifier to introduce SSA names it avoids ICEs

[Committed] S/390: Memory constraint cleanup

2016-04-29 Thread Andreas Krebbel
This fixes an issue with the long displacement memory address constraints S and T. These were defined to only accept long displacement addresses. This is wrong since a memory constraint must not reject an address with a 0 displacement. Reload relies on being able to turn an invalid memory addres

[Committed] S/390: Replace LDER with LDR.

2016-04-29 Thread Andreas Krebbel
For performance reasons it is important to write the full 64 bits of an FPR target reg even when dealing with 32 bit values. So we chose lder over ler for 32 bit float register moves. lder zero-extends the 32 bit value from the source reg to 64 bit in the target. However, since it actually doesn

Re: [PATCH] PR/68089: C++-11: Ingore "alignas(0)".

2016-04-29 Thread Andreas Krebbel
On 12/31/2015 12:50 PM, Dominik Vogt wrote: > The attached patch fixes C++-11 handling of "alignas(0)" which > should be ignored but currently generates an error message. A > test case is included; the patch has been tested on S390x. Since > it's a language issue it should be independent of the b

Re: [PATCH] S/390: Improve documentation of s390_reload_costs.

2016-04-29 Thread Andreas Krebbel
On 04/27/2016 09:53 AM, Dominik Vogt wrote: > The attached patch improves some S/390 function documentation. Applied. Thanks! -Andreas-

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.

2016-04-29 Thread Andreas Krebbel
On 04/27/2016 09:50 AM, Dominik Vogt wrote: > The attached patch cleans up some (mostly unnecessary) dg-do > directives in the gcc.dg and gcc.target test cases. Applied. Thanks! -Andreas-

Re: [PATCH][SMS] SMS use loop induction variable analysis instead of depending on doloop optimization

2016-04-29 Thread Bernd Schmidt
On 04/28/2016 08:06 AM, Shiva Chen wrote: Could anyone help me to review the patch? Any suggestion would be very helpful. You might want to split it up if there are several logically independent pieces. I can't quite make sense of it all, and I'm not too familiar with SMS anyway, so the foll

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 9:58 AM, Eric Botcazou wrote: >> We can put it back, but prehaps implemented as unspec, so it won't >> interfere with peepholes? > > No strong opinion, as long as the final assembly is the same as before. I'm testing the attached patch. Does it fix your ada failures? Uros

Re: [PATCH] Take known zero bits into account when checking extraction.

2016-04-29 Thread Dominik Vogt
On Wed, Apr 27, 2016 at 10:24:21PM -0600, Jeff Law wrote: > On 04/27/2016 02:20 AM, Dominik Vogt wrote: > > * combine.c (make_compound_operation): Take known zero bits into > > account when checking for possible zero_extend. > I'd strongly recommend writing some tests for this. Extra credi

Re: [RFC patch, i386]: Use STV pass to load/store any TImode constant using SSE insns

2016-04-29 Thread Uros Bizjak
On Thu, Apr 28, 2016 at 12:36 PM, Ilya Enkovich wrote: > That's what I have in my draft for DImode immediates: > > @@ -3114,6 +3123,20 @@ scalar_chain::build (bitmap candidates, > unsigned insn_uid) >BITMAP_FREE (queue); > } > > +/* Return a cost of building a vector costant > + instead of

Re: [PATCH] Fix PR tree-optimization/51513

2016-04-29 Thread Richard Biener
On Fri, Apr 29, 2016 at 1:35 AM, Peter Bergner wrote: > This patch fixes PR tree-optimization/51513, namely the generation of > wild branches due to switch case statements that only contain calls to > __builtin_unreachable(). For example, compiling using -O2 -fjump-tables > --param case-values-th

[PATCH][COMMITTED] [ARC] Fix obsolete constraint.

2016-04-29 Thread Claudiu Zissulescu
The defines in longlong.h were using obsolete 'J' constraint. I've replace them with 'Cal' constraint, and push the patch as obvious. Cheers, Claudiu include/ 2016-04-29 Claudiu Zissulescu * longlong.h (add_ss): Replace obsolete 'J' constraint with 'Cal' constraint.

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Eric Botcazou
int 0 [0]) ] UNSPEC_PROBE_STACK)) (clobber (reg:CC 17 flags)) ]) /home/eric/svn/gcc/gcc/testsuite/gnat.dg/opt49.adb:17 -1 (nil)) +===GNAT BUG DETECTED==+ | 7.0.0 20160429 (experimental) [trunk revision 235619] (x86_64-suse-linux) G

[PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Claudiu Zissulescu
This is the updated patch on handling FPX NaNs. Ok to apply? Claudiu gcc/ 2016-04-18 Claudiu Zissulescu * testsuite/gcc.target/arc/ieee_eq.c: New test. libgcc/ 2016-04-18 Claudiu Zissulescu * config/arc/ieee-754/eqdf2.S: Handle FPX NaN. --- gcc/testsuite/gcc.target/arc/

Re: [PATCHv2 0/7] ARC: Add support for nps400 variant

2016-04-29 Thread Andrew Burgess
* Claudiu Zissulescu [2016-04-29 09:03:53 +]: > I see the next tests failing: > > FAIL: gcc.target/arc/movb-1.c scan-assembler movb[ \t]+r[0-5]+, *r[0-5]+, > *r[0-5]+, *19, *21, *8 > FAIL: gcc.target/arc/movb-2.c scan-assembler movb[ \t]+r[0-5]+, *r[0-5]+, > *r[0-5]+, *23, *23, *9 > FAIL:

Re: [PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Joern Wolfgang Rennecke
On 29/04/16 11:16, Claudiu Zissulescu wrote: This is the updated patch on handling FPX NaNs. Ok to apply? Claudiu OK.

Re: [PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Joern Wolfgang Rennecke
P.S.: the .d suffix on the branch was there just for scheduling purposes - not sure if that actually helped any chip's pipeline, or if it was just a bug in the documentation.

RE: [PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Claudiu Zissulescu
It should do the job, at least for EM where the jump takes 2 cycle, and by means of using delay slots we can make all the cycles count. HS has a branch prediction mechanism, hence, filling up the delay slot doesn't have such a big impact like in EM or even earlier cpus. //Claudiu > -Origin

Re: [PATCH] Fixup nb_iterations_upper_bound adjustment for vectorized loops

2016-04-29 Thread Ilya Enkovich
On 28 Apr 15:59, Richard Biener wrote: > On Thu, Apr 28, 2016 at 3:26 PM, Ilya Enkovich wrote: > > On 27 Apr 16:05, Richard Biener wrote: > >> >> > >> >> I'd like to see testcases covering the corner-cases - have them have > >> >> upper bound estimates by adjusting known array sizes and also cover

Re: [PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Joern Wolfgang Rennecke
On 29/04/16 11:31, Claudiu Zissulescu wrote: It should do the job, at least for EM where the jump takes 2 cycle, and by means of using delay slots we can make all the cycles count. HS has a branch prediction mechanism, hence, filling up the delay slot doesn't have such a big impact like in E

Re: fix libsanitizer build on ppc-linux

2016-04-29 Thread Olivier Hainque
> On Apr 29, 2016, at 10:34 , Jakub Jelinek wrote: > > > No, for these files we aren't upstream and just periodically merge stuff > from there. So, you should try to discuss this in asan upstream and get > a fix committed there and we can then merge it and/or cherry-pick it. > Please see libsa

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > The removal of SH5 support from GCC has been announced here > https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html > > The attached patch removes support for SH5 in the compiler back end. > There are still some leftovers and new simplification o

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-04-29 Thread Richard Biener
On Sun, Apr 17, 2016 at 1:14 AM, kugan wrote: > As explained in PR61839, > > Following difference results in extra instructions: > - c = b != 0 ? 486097858 : 972195717; > + c = a + 972195718 >> (b != 0); > > As suggested in PR, attached patch converts CST BINOP COND_EXPR to COND_EXPR > ? (CST BI

RE: [PATCH] [ARC] Handle FPX NaN within optimized floating point library.

2016-04-29 Thread Claudiu Zissulescu
> > It should do the job, at least for EM where the jump takes 2 cycle, and by > means of using delay slots we can make all the cycles count. HS has a branch > prediction mechanism, hence, filling up the delay slot doesn't have such a big > impact like in EM or even earlier cpus. > No, the alternat

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 12:17 PM, Eric Botcazou wrote: >> I'm testing the attached patch. Does it fix your ada failures? > > No, it totally breaks stack checking. :-( Eh, I was trying to be too clever. Attached patch was actually tested on a couple of cases. It generates the same assembly as bef

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-04-29 Thread Richard Biener
On Thu, Apr 28, 2016 at 2:56 PM, Bin Cheng wrote: > Hi, > Tree if-conversion sometimes cannot convert conditional array reference into > unconditional one. Root cause is GCC conservatively assumes newly introduced > array reference could be out of array bound and thus trapping. This patch > i

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Eric Botcazou
> Attached patch was actually tested on a couple of cases. It generates > the same assembly as before. Note that you could just remove the second ":W" in the define_insn pattern. That's better, but not quite it because this segfaults at -O2: #0 memory_operand (op=0xabababababababab, mode=mode@e

Re: [RFC patch, i386]: Use STV pass to load/store any TImode constant using SSE insns

2016-04-29 Thread Ilya Enkovich
2016-04-29 12:48 GMT+03:00 Uros Bizjak : > On Thu, Apr 28, 2016 at 12:36 PM, Ilya Enkovich > wrote: > >> That's what I have in my draft for DImode immediates: >> >> @@ -3114,6 +3123,20 @@ scalar_chain::build (bitmap candidates, >> unsigned insn_uid) >>BITMAP_FREE (queue); >> } >> >> +/* Retu

Re: [PATCH] Re-use cc1-checksum.c for stage-final

2016-04-29 Thread Richard Biener
On Thu, 28 Apr 2016, Jeff Law wrote: > On 04/28/2016 02:49 AM, Richard Biener wrote: > > > > The following prototype patch re-uses cc1-checksum.c from the > > previous stage when compiling stage-final. This eventually > > allows to compare cc1 from the last two stages to fix the > > lack of a tr

Re: Allow redefinition of libcilkrts debug macros

2016-04-29 Thread Ilya Verbin
Hi Rainer! On Fri, Apr 29, 2016 at 10:58:25 +0200, Rainer Orth wrote: > > On 04/26/2016 08:04 AM, Rainer Orth wrote: > >> When working on a couple of Cilk Plus issues lately (PRs target/60290, > >> target/68945), I noticed that you have to modify the libcilkplus sources > >> to enable various debu

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 1:23 PM, Eric Botcazou wrote: >> Attached patch was actually tested on a couple of cases. It generates >> the same assembly as before. > > Note that you could just remove the second ":W" in the define_insn pattern. Eh, then the build yawns about the missing mode of the inp

Re: [RFC patch, i386]: Use STV pass to load/store any TImode constant using SSE insns

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 1:26 PM, Ilya Enkovich wrote: > 2016-04-29 12:48 GMT+03:00 Uros Bizjak : >> On Thu, Apr 28, 2016 at 12:36 PM, Ilya Enkovich >> wrote: >> >>> That's what I have in my draft for DImode immediates: >>> >>> @@ -3114,6 +3123,20 @@ scalar_chain::build (bitmap candidates, >>> un

[PATCH 2/3] Add profiling support for IVOPTS

2016-04-29 Thread marxin
gcc/ChangeLog: 2016-04-25 Martin Liska * tree-ssa-loop-ivopts.c (struct comp_cost): Introduce m_cost_scaled and m_frequency fields. (comp_cost::operator=): Assign to m_cost_scaled. (operator+): Likewise. (comp_cost::operator+=): Likewise. (comp_c

[PATCH 3/3] Enhance dumps of IVOPTS

2016-04-29 Thread marxin
gcc/ChangeLog: 2016-04-25 Martin Liska * tree-ssa-loop-ivopts.c (struct ivopts_data): Add inv_expr_map. (tree_ssa_iv_optimize_init): Initialize it. (get_expr_id): Assign expressions to the map. (iv_ca_dump): Dump invariant expressions. (create_new_ivs):

[PATCH 0/3] IVOPTS: support profiling

2016-04-29 Thread marxin
Hello. As profile-guided optimization can provide very useful information about basic block frequencies within a loop, following patch set leverages that information. It speeds up a single benchmark from upcoming SPECv6 suite by 20% (-O2 -profile-generate/-fprofile use) and I think it can also imp

Re: [PATCHv2 2/7] gcc/arc: Replace rI constraint with r & Cm2 for ld and update insns

2016-04-29 Thread Andrew Burgess
* Joern Wolfgang Rennecke [2016-04-28 18:06:42 +0100]: > On 21/04/16 12:39, Andrew Burgess wrote: > > > > * config/arc/arc.md (*loadqi_update): Replace use of 'rI' > > constraint with separate 'r' and 'Cm2' constraints. > > > Why don't you use simply rCm2 ? You are absolutely correc

[PATCH 1/3] Encapsulate comp_cost within a class with methods.

2016-04-29 Thread marxin
gcc/ChangeLog: 2016-04-25 Martin Liska * tree-ssa-loop-ivopts.c(comp_cost::operator=): New function. (comp_cost::infinite_cost_p): Likewise. (operator+): Likewise. (comp_cost::operator+=): Likewise. (comp_cost::operator-=): Likewise. (comp_cost::

[PATCH] Fix warn_for_memset ICE (PR c/70852)

2016-04-29 Thread Marek Polacek
Here, we segv because we're checking TYPE_MAXVAL of domain that is actually null for "extern int a[];". The fix is trivial. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-04-29 Marek Polacek PR c/70852 * c-common.c (warn_for_memset): Check domain before accessing

[PATCH, i386]: Fix constm1_operand predicate

2016-04-29 Thread Uros Bizjak
Brown-paper bag bug ... >> Do I misuse constm1_operand? > > No, it is just a typo that crept in constm1_operand: > > ;; Match exactly -1. > (define_predicate "constm1_operand" > (and (match_code "const_int") >(match_test "op = constm1_rtx"))) > > There should be a test, not an assignment

Re: Allow redefinition of libcilkrts debug macros

2016-04-29 Thread Rainer Orth
Hi Ilya, >> >> 2016-04-07 Rainer Orth >> >> >> >> * runtime/except-gcc.cpp (DEBUG_EXCEPTIONS): Allow redefinition. >> >> * runtime/cilk_fiber.h (FIBER_DEBUG): Likewise. >> >> * runtime/scheduler.h (REDPAR_DEBUG): Likewise. >> > Ilya will have to chime in here -- we're a downstream consume

Re: [PATCH] Fix warn_for_memset ICE (PR c/70852)

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 02:01 PM, Marek Polacek wrote: Here, we segv because we're checking TYPE_MAXVAL of domain that is actually null for "extern int a[];". The fix is trivial. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-04-29 Marek Polacek PR c/70852 * c-common.c (w

Re: [PATCHv2 2/7] gcc/arc: Replace rI constraint with r & Cm2 for ld and update insns

2016-04-29 Thread Joern Wolfgang Rennecke
On 29/04/16 12:58, Andrew Burgess wrote: * config/arc/arc.md (*loadqi_update): Replace use of 'rI' constraint with 'rCm2' constraints to limit possible immediate size. (*load_zeroextendqisi_update): Likewise. (*load_signextendqisi_update): Likewise.

Re: Cilk Plus testsuite needs massive cleanup (PR testsuite/70595)

2016-04-29 Thread Dominique d'Humières
Any reason why the dg-additional-options "*-lcilkrts" have been removed? AFAICT they are needed for darwin. TIA Dominique

Re: [PATCH] Fix PR tree-optimization/51513

2016-04-29 Thread Peter Bergner
On Fri, 2016-04-29 at 11:56 +0200, Richard Biener wrote: > Your testcase passes '2' where it passes just fine. If I pass 3 as which > I indeed get an abort () but you can't reasonably expect it to return 13 then. Bah, I added an extra case and didn't change the argument. :-( Let me fix that and

[PATCH][genrecog] Fix warning about potentially uninitialised use of label

2016-04-29 Thread Kyrill Tkachov
Hi all, I'm getting a warning when building genrecog that 'label' may be used uninitialised in: uint64_t label = 0; if (d->test.kind == rtx_test::CODE && d->if_statement_p (&label) && label == CONST_INT) This is because if_statement_p looks like this: inline bool dec

Support <, <=, > and >= for offset_int and widest_int

2016-04-29 Thread Richard Sandiford
offset_int and widest_int are supposed to be at least one bit wider than all the values they need to represent, with the extra bits being signs. Thus offset_int is effectively int128_t and widest_int is effectively intNNN_t, for target-dependent NNN. Because the types are signed, there's not real

Support << and >> for offset_int and widest_int

2016-04-29 Thread Richard Sandiford
Following on from the comparison patch, I think it makes sense to support << and >> for offset_int (int128_t) and widest_int (intNNN_t), with >> being arithmetic shift. It doesn't make sense to use logical right shift on a potentially negative offset_int, since the precision of 128 bits has no mea

Add a wi::to_wide helper function

2016-04-29 Thread Richard Sandiford
As Richard says, we ought to have a convenient way of converting an INTEGER_CST to a wide_int of a particular precision without having to extract the sign of the INTEGER_CST's type each time. This patch adds a wi::to_wide helper for that, alongside the existing wi::to_offset and wi::to_widest. Tes

Simplify cst_and_fits_in_hwi

2016-04-29 Thread Richard Sandiford
While looking at the use of cst_and_fits_in_hwi in tree-ssa-loop-ivopts.c, I had difficulty working out what the function actually tests. The final NUNITS check seems redundant, since it asks about the number of HWIs in the _unextended_ constant. We've already checked that the unextended constant

Re: [ubsan PATCH] Fix compile-time hog with &TARGET_EXPRs (PR sanitizer/70342)

2016-04-29 Thread Marek Polacek
On Thu, Apr 28, 2016 at 04:15:41PM +0200, Jakub Jelinek wrote: > On Thu, Apr 28, 2016 at 04:10:01PM +0200, Marek Polacek wrote: > > That works too, though it of course affects all users, not just ubsan. > > Here's > > Of course, but I think that is a good thing ;) > > > the patch with your sugg

Re: Support << and >> for offset_int and widest_int

2016-04-29 Thread H.J. Lu
On Fri, Apr 29, 2016 at 5:30 AM, Richard Sandiford wrote: > Following on from the comparison patch, I think it makes sense to > support << and >> for offset_int (int128_t) and widest_int (intNNN_t), > with >> being arithmetic shift. It doesn't make sense to use > logical right shift on a potentia

Re: Cilk Plus testsuite needs massive cleanup (PR testsuite/70595)

2016-04-29 Thread Rainer Orth
Hi Dominique, > Any reason why the dg-additional-options "*-lcilkrts" have been removed? > AFAICT they are needed for darwin. -fcilkplus does (and should) include -lcilkrts when linking. It certainly does on Solaris and Linux. Everything else is a usability nightmare: you don't need to link For

Re: Enabling -frename-registers?

2016-04-29 Thread David Edelsohn
How has this show general benefit for all architectures to deserve enabling it by default at -O2? As an aside, this change seems to be the source of a new code generation bug affecting the PPC kernel. Thanks, David

Re: [PATCH] Update gmp/mpfr/mpc in-tree versions

2016-04-29 Thread Bernd Edlinger
On 29.04.2016 09:46, Richard Biener wrote: > On Thu, 28 Apr 2016, Bernd Edlinger wrote: > >> On 28.04.2016 16:29, Richard Biener wrote: >>> >>> Another option would be to try if mini-gmp is enough for our >>> (in-tree) use and what the performance impact would be if we'd >>> use that (in-tree). >>>

Re: Enabling -frename-registers?

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to deserve enabling it by default at -O2? It should improve postreload scheduling in general, and it can also help clear up bad code generation left behind by register allocation. As an asi

Re: Enabling -frename-registers?

2016-04-29 Thread David Edelsohn
On Fri, Apr 29, 2016 at 9:32 AM, Bernd Schmidt wrote: > On 04/29/2016 03:02 PM, David Edelsohn wrote: >> >> How has this show general benefit for all architectures to deserve >> enabling it by default at -O2? > > > It should improve postreload scheduling in general, and it can also help > clear up

Re: [PATCH, rs6000] Add support for vector element-reversal built-ins

2016-04-29 Thread Segher Boessenkool
Hi Bill, On Mon, Apr 25, 2016 at 09:09:03AM -0500, Bill Schmidt wrote: > Here's the fix for the obvious pasto separated out. CCing Richi and > Jakub as I'd appreciate release manager approval to include this in > gcc-6-branch. This fixes some cases where built-in functions are > connected to the

Re: Enabling -frename-registers?

2016-04-29 Thread David Edelsohn
On Fri, Apr 29, 2016 at 9:44 AM, Bernd Schmidt wrote: > > > On 04/29/2016 03:42 PM, David Edelsohn wrote: >> >> On Fri, Apr 29, 2016 at 9:32 AM, Bernd Schmidt >> wrote: >>> >>> On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to

[PATCH] Reduce compile time hog in symbol-summary.h

2016-04-29 Thread Martin Liška
Hello. For every created function_summary, we validate (with flag_checking) that all cgraph_nodes have summary_uid > 0. It produces a compile hog. It's sufficient to validate that for nodes that really utilize a function summary. Patch can bootstrap®test on ppc64le-linux-gnu. Ready for trunk? M

Re: Enabling -frename-registers?

2016-04-29 Thread Bernd Schmidt
On 04/29/2016 03:42 PM, David Edelsohn wrote: On Fri, Apr 29, 2016 at 9:32 AM, Bernd Schmidt wrote: On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to deserve enabling it by default at -O2? It should improve postreload scheduling in g

Re: [C++ Patch] PR 66644

2016-04-29 Thread Jason Merrill
On 04/28/2016 08:18 PM, Paolo Carlini wrote: else if (ANON_AGGR_TYPE_P (type)) { - tree fields; - - for (fields = TYPE_FIELDS (type); fields; fields = DECL_CHAIN (fields)) + for (tree fields = TYPE_FIELDS (type); fields; + fields = DECL_CHAIN (fields)) if

[Openacc] Adjust automatic loop partitioning

2016-04-29 Thread Nathan Sidwell
Jakub, currently automatic loop partitioning assigns from the innermost loop outwards -- that was the simplest thing to implement. A better algorithm is to assign the outermost loop to the outermost available axis, and then assign from the innermost loop outwards. That way we (generally) get

Re: [SH][committed] Remove SH5 support in compiler

2016-04-29 Thread Oleg Endo
On Fri, 2016-04-29 at 19:45 +0900, Oleg Endo wrote: > On Thu, 2016-04-28 at 10:27 +0900, Oleg Endo wrote: > > > The removal of SH5 support from GCC has been announced here > > https://gcc.gnu.org/ml/gcc/2015-08/msg00101.html > > > > The attached patch removes support for SH5 in the compiler back

Re: Enabling -frename-registers?

2016-04-29 Thread Richard Biener
On April 29, 2016 3:48:37 PM GMT+02:00, David Edelsohn wrote: >On Fri, Apr 29, 2016 at 9:44 AM, Bernd Schmidt >wrote: >> >> >> On 04/29/2016 03:42 PM, David Edelsohn wrote: >>> >>> On Fri, Apr 29, 2016 at 9:32 AM, Bernd Schmidt >>> wrote: On 04/29/2016 03:02 PM, David Edelsohn wrote:

RE: [PATCH] [ARC] Add new ARCv2 instructions.

2016-04-29 Thread Claudiu Zissulescu
> > (arc_dwarf_register_span): Remove enum keyword. > That bit should be separate. About this small one, I will make a new patch and commit it as obvious. //Claudiu

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Eric Botcazou
> Eh, then the build yawns about the missing mode of the input operand. Every good back-end has at least an example of this. ;-) > This is getting a bit frustrating, but attached patch should solve > this failure. Again lightly tested, regtest in progress. Everything is back to normal with this

[PATCH] [ARC] Add new ARCv2 instructions.

2016-04-29 Thread Claudiu Zissulescu
Please find the updated patch. Ok to commit? Claudiu gcc/ 2016-04-20 Claudiu Zissulescu * config/arc/arc-protos.h (compact_memory_operand_p): Declare. * config/arc/arc.c (arc_output_commutative_cond_exec): Consider bmaskn instruction. (arc_dwarf_register_span):

[PATCH, i386]: Some more cleanup of peephole2 patterns

2016-04-29 Thread Uros Bizjak
No functional changes. 2016-04-29 Uros Bizjak * config/i386/i386.md (operations with memory inputs setting flags peephole2): Remove uneeded REG_P checks. Cleanup pattern generation. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Committed to mainline SVN. Uros.

[PATCH][ARM][gas] Fix warnings about uninitialised uses and unused const variables

2016-04-29 Thread Kyrill Tkachov
Hi all, I recently upgraded my host compiler to GCC 6.1.0 and while trying to build a cross toolchain for arm-none-eabi I've encountered some -Werror errors in tc-arm.c This patch fixes them. Some static const variables that are unused are marked with ATTRIBUTE_UNUSED. In parse_neon_el_struct_l

Re: [PATCH][ARM][gas] Fix warnings about uninitialised uses and unused const variables

2016-04-29 Thread Kyrill Tkachov
This was supposed to go to the binutils list :( Please ignore. Kyrill On 29/04/16 15:37, Kyrill Tkachov wrote: Hi all, I recently upgraded my host compiler to GCC 6.1.0 and while trying to build a cross toolchain for arm-none-eabi I've encountered some -Werror errors in tc-arm.c This patch fi

Re: [PATCH, i386]: Extend TARGET_READ_MODIFY{,_WRITE} peepholes to all integer modes

2016-04-29 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 4:30 PM, Eric Botcazou wrote: >> Eh, then the build yawns about the missing mode of the input operand. > > Every good back-end has at least an example of this. ;-) > >> This is getting a bit frustrating, but attached patch should solve >> this failure. Again lightly tested,

Re: [PATCH] Improve detection of constant conditions during jump threading

2016-04-29 Thread Jeff Law
On 04/28/2016 06:08 PM, Patrick Palka wrote: The glitch in that plan is there is no easy linkage between the use of b_5 in bb4 and the ASSERT_EXPR in bb3. That's something Aldy, Andrew and myself are looking at independently for some of Aldy's work. I see.. One other deficiency I noticed in

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-04-29 Thread Bin.Cheng
On Fri, Apr 29, 2016 at 12:16 PM, Richard Biener wrote: > On Thu, Apr 28, 2016 at 2:56 PM, Bin Cheng wrote: >> Hi, >> Tree if-conversion sometimes cannot convert conditional array reference into >> unconditional one. Root cause is GCC conservatively assumes newly >> introduced array reference

Re: [arm-embedded][PATCH, GCC/ARM, 2/3] Error out for incompatible ARM multilibs

2016-04-29 Thread Kyrill Tkachov
On 27/04/16 15:17, Thomas Preudhomme wrote: Ping? Best regards, Thomas On Thursday 17 December 2015 17:32:48 Thomas Preud'homme wrote: Hi, We decided to apply the following patch to the ARM embedded 5 branch. Best regards, Thomas -Original Message- From: gcc-patches-ow...@gcc.gn

Re: [PATCH v2] gcov: Runtime configurable destination output

2016-04-29 Thread Aaron Conole
Nathan Sidwell writes: > On 04/27/16 16:59, Aaron Conole wrote: >> Apologies for the top post. Pinging on this again. It still applies >> cleanly, so no need to resubmit, I think. Is there anything else missing >> or required before this can go in? > > I'm not convinced this is a desirable featur

  1   2   >