Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-19 Thread Eric Botcazou
> this is patch that reverts the TYPE_MODE mismatch related changes and > adds test to type checker that TYPE_MODE always match with TYPE_CANONICAL. > I have bootstrapped/regtested x86_64-linux, but unfrtunately the regtesting > had some unrelated noise (spawn failures). I am re-testing. I am on a

Re: [PATCH] Fix 67064 - Register asm variable broken

2015-10-19 Thread Jason Merrill
On 09/22/2015 06:03 AM, Jason Merrill wrote: A simple fix would be to just disable the reference games when we're looking at a hard register variable. That would break decltype(auto) for hard register variables, but since they are a GNU extension that isn't a big deal. Like so. Tested x86_64-

Re: Move some bit and binary optimizations in simplify and match

2015-10-19 Thread Hurugalawadi, Naveen
Hi, >> +/* Fold X + (X / CST) * -CST to X % CST. */ >> This one is still wrong Removed. >> I don't understand the point of the FLOAT_TYPE_P check. The check was there in fold-const. So, just had the same check. >> Will we also simplify (A & B) - (A & ~B) into B - (A ^ B) ? Done. >> or maybe in

Re: [RFC VTV] Fix VTV for targets that have section anchors.

2015-10-19 Thread Jeff Law
On 10/13/2015 06:53 AM, Ramana Radhakrishnan wrote: On 12/10/15 21:44, Jeff Law wrote: On 10/09/2015 03:17 AM, Ramana Radhakrishnan wrote: This started as a Friday afternoon project ... It turned out enabling VTV for AArch64 and ARM was a matter of fixing PR67868 which essentially comes fro

Re: [PATCH] c/67925 - update documentation on `inline'

2015-10-19 Thread Jeff Law
On 10/15/2015 06:25 AM, Arkadiusz Drabczyk wrote: On Wed, Oct 14, 2015 at 06:18:03PM -0600, Martin Sebor wrote: >On 10/14/2015 03:42 PM, Arkadiusz Drabczyk wrote: > >On Wed, Oct 14, 2015 at 08:36:43AM -0600, Martin Sebor wrote: > >>On 10/13/2015 04:47 PM, Arkadiusz Drabczyk wrote: > >>>* gcc/

Re: using scratchpads to enhance RTL-level if-conversion: revised patch

2015-10-19 Thread Jeff Law
On 10/14/2015 01:15 PM, Bernd Schmidt wrote: On 10/14/2015 07:43 PM, Jeff Law wrote: Obviously some pessimization relative to current code is necessary to fix some of the problems WRT thread safety and avoiding things like introducing faults in code which did not previously fault. Huh? This pa

Re: [PATCH, rs6000] Pass --secure-plt to the linker

2015-10-19 Thread Alan Modra
On Mon, Oct 19, 2015 at 08:10:32PM +0100, Szabolcs Nagy wrote: > On 19/10/15 14:04, Szabolcs Nagy wrote: > >On 19/10/15 12:12, Alan Modra wrote: > >>On Thu, Oct 15, 2015 at 06:50:50PM +0100, Szabolcs Nagy wrote: > >>>A powerpc toolchain built with (or without) --enable-secureplt > >>>currently crea

C++ PATCH for N4268, constant evaluation of non-type template arguments

2015-10-19 Thread Jason Merrill
N4268 is the last bullet point remaining for C++1z features until Saturday, when presumably more stuff will be added. The basic functionality is quite straightforward: first generalize parsing, then pass all arguments through maybe_constant_value. But to get correct handling of pointers to me

Re: PING^2: [PATCH] Limit alignment on error_mark_node variable

2015-10-19 Thread Bernd Schmidt
On 10/20/2015 12:07 AM, H.J. Lu wrote: On Thu, Jul 09, 2015 at 03:57:31PM +0200, Richard Biener wrote: I don't see why the C FE would need to invoke finish_decl twice here. [...] So I'd rather have the C frontend not invoke rest_of_decl_compilation on this in the first place. Your patch still

C++ PATCH for missing feature test macros

2015-10-19 Thread Jason Merrill
Someone pointed out that we were missing feature test macros for some recently implemented C++1z features; this patch fixes that. Tested x86_64-pc-linux-gnu, applying to trunk. commit cb8271fe1b49b984fa38dc6cf1d3ed25462afd20 Author: Jason Merrill Date: Sun Oct 18 10:15:36 2015 -1000 * c

[PATCH,committed] PR fortran/67900 -- Check for NULL pointer

2015-10-19 Thread Steve Kargl
Committed as 'obvious' after Mikael's comment in PR audit trail. 2015-10-19 Steven G. Kargl * resolve.c (gfc_verify_binding_labels): Check for NULL pointer. 2015-10-19 Steven G. Kargl * gfortran.dg/pr67900.f90: New tests. -- Steve Index: gcc/fortran/resolve.c ===

Re: [PATCH][AArch64] Replace insn to zero up DF register

2015-10-19 Thread Andrew Pinski
On Tue, Oct 20, 2015 at 7:51 AM, Andrew Pinski wrote: > On Tue, Oct 20, 2015 at 7:40 AM, Evandro Menezes > wrote: >> In the existing targets, it seems that it's always faster to zero up a DF >> register with "movi %d0, #0" instead of "fmov %d0, xzr". > > I think for ThunderX 1, this change will

Re: [PATCH] [AArch64] Distinct costs for sign and zero extension

2015-10-19 Thread Andrew Pinski
On Tue, Oct 20, 2015 at 7:10 AM, Evandro Menezes wrote: > Some micro-architectures may favor one of sign or zero extension over the > other in the base plus extended register offset addressing mode. Yes I was going to create the same patch as ThunderX is one of those micro-architectures. Thanks,

Re: [PATCH][AArch64] Replace insn to zero up DF register

2015-10-19 Thread Andrew Pinski
On Tue, Oct 20, 2015 at 7:40 AM, Evandro Menezes wrote: > In the existing targets, it seems that it's always faster to zero up a DF > register with "movi %d0, #0" instead of "fmov %d0, xzr". I think for ThunderX 1, this change will not make a difference. So I am neutral on this change. Thanks,

Re: [PATCH v2] PR rtl-optimization/66790: uninitialized registers handling in REE

2015-10-19 Thread Pierre-Marie de Rodat
On 10/14/2015 09:41 AM, Bernd Schmidt wrote: This one is OK with minor changes. I ran some tests with it, and the mir sets look good this time. Code generation still seems unaffected by it on all my example code (which is as expected). Thank you very much for your help on this and for double-ch

Re: [RFC VTV] Fix VTV for targets that have section anchors.

2015-10-19 Thread Caroline Tice
Sending this again, as the mailer daemon rejected it last time It looks good to me, but I can only approve the files that go into libvtv. In (belated) response to your earlier question about debugging vtv problems, there's a fair amount of useful info for debugging in the User's Guide, off th

[PATCH][AArch64] Replace insn to zero up DF register

2015-10-19 Thread Evandro Menezes
In the existing targets, it seems that it's always faster to zero up a DF register with "movi %d0, #0" instead of "fmov %d0, xzr". This patch modifies the respective pattern. Please, commit if it's alright. Thank you, -- Evandro Menezes >From 429b1d70a7eca76c96250fec6ec5269a7a661a4c Mon Sep

[PATCH] [AArch64] Distinct costs for sign and zero extension

2015-10-19 Thread Evandro Menezes
Some micro-architectures may favor one of sign or zero extension over the other in the base plus extended register offset addressing mode. This patch separates the member "register_extend" of the structure "cpu_addrcost_table" into two, one for sign and the other zero extension. Please, commi

[gomp4] loop cleanup

2015-10-19 Thread Nathan Sidwell
I've committed this to gomp4. 1) small cleanup combining the bodies of two identical conditionals. 2) replace and move the OpenACC thread numbering expanders to be nearer the now sole user. nathan 2015-10-19 Nathan Sidwell * omp-low.c (scan_omp_for): Combine OpenACC conditional. (expan

[PATCH] c++/67913, 67917 - fix new expression with wrong number of elements

2015-10-19 Thread Martin Sebor
This is a patch for two C++ bugs: 67913 - new expression with negative size not diagnosed 67927 - array new expression with excessive number of elements not diagnosed The C++ front end rejects a subset of array declarators with negative bounds or with bounds in excess of some imple

PING^2: [PATCH] Limit alignment on error_mark_node variable

2015-10-19 Thread H.J. Lu
PING On Wed, Sep 30, 2015 at 9:13 AM, H.J. Lu wrote: > PING > > On Fri, Jul 10, 2015 at 5:19 AM, H.J. Lu wrote: >> On Thu, Jul 09, 2015 at 03:57:31PM +0200, Richard Biener wrote: >>> On Thu, Jul 9, 2015 at 1:08 PM, H.J. Lu wrote: >>> > On Thu, Jul 9, 2015 at 2:54 AM, Richard Biener >>> > wrote

Re: [PATCH] Correctly fill up cgraph_node::local.versionable flag.

2015-10-19 Thread Martin Liška
On 10/17/2015 09:49 PM, Jan Hubicka wrote: Hello. I've been working on HSA branch, where we have a cloning pass running with all optimization levels. The patch makes computation of cgraph_node::local.versionability independent on IPA CP and uses the flag to verify that a function can be cloned.

Re: [PATCH] fortran/68019 -- Remove an assert() that prevents error message

2015-10-19 Thread Steve Kargl
Thanks. Patch committed to both 5-branch and trunk. -- steve On Mon, Oct 19, 2015 at 10:02:09PM +0200, Paul Richard Thomas wrote: > Hi Steve, > > Yes, this is OK for trunk. I suggest that it is so obvious that it > should go into 5 branch as well. > > Cheers > > Paul > > On 19 October 2015

[PATCH][AArch64] Fix insn types

2015-10-19 Thread Evandro Menezes
The type assigned to some insn definitions was seemingly not correct: * "movi %d0, %1" was of type "fmov" * "fmov %s0, wzr" was of type "fconstd" * "mov %0, {-1,1}" were of type "csel" This patch changes their types to: * "movi %d0, %1" to type "neon_move" * "fmov %s0, wzr" to type "f_mcr"

Re: [patch] header file re-ordering.

2015-10-19 Thread Jeff Law
On 10/14/2015 08:05 AM, Andrew MacLeod wrote: On 10/12/2015 04:04 AM, Jeff Law wrote: Oh, you must be looking at the original combined patch? Possibly :-) fold-const.h is indirectly included by cp-tree.h, which gets it from including c-common.h. some of the output from show-headers on objc

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-19 Thread Jan Hubicka
Richard, I missed your reply earlier today. > > Therefore I would say that TYPE_CANONICAL determine mode modulo the fact > > that > > incoplete variant of a complete type will have VOIDmode instead of complete > > type's mode (during non-LTO). That is why I allow mode changes for casts > > from

Re: [PATCH] Move cproj simplification to match.pd

2015-10-19 Thread Christophe Lyon
On 19 October 2015 at 15:54, Richard Biener wrote: > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > Hi Richard, This patch caused arm and aarch64 builds of newlib to cause ICEs: In file included from /tmp/884316_1.tmpdir/aci-gcc-fsf/sources/newlib/newlib/libc/include/stdlib.h:

[PATCH] Refactoring sese.h and graphite-poly.h

2015-10-19 Thread Aditya Kumar
Rename scop->region to scop->scop_info Removed conversion constructors for sese_l and dr_info. Removed macros. No functional changed intended. Passes regtest and bootstrap. gcc/ChangeLog: 2015-19-10 Aditya Kumar * graphite-poly.h (struct dr_info): Removed conversion constructor.

Re: [c++-delayed-folding] First stab at convert_to_integer

2015-10-19 Thread Marek Polacek
On Mon, Oct 19, 2015 at 09:59:03AM -1000, Jason Merrill wrote: > >Done. But I can't seem to commit the patch to the c++-delayed-folding > >branch; is that somehow restricted? I'm getting: > > > >svn: E170001: Commit failed (details follow): > >svn: E170001: Authorization failed > >svn: E170001: Y

Re: New power of 2 hash policy

2015-10-19 Thread François Dumont
Is this one ok ? François On 28/09/2015 21:16, François Dumont wrote: > On 25/09/2015 15:28, Jonathan Wakely wrote: >> @@ -501,6 +503,129 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >>> mutable std::size_t_M_next_resize; >>> }; >>> >>> + /// Range hashing function considering that second args

PING: [PATCH] X86: Optimize access to globals in PIE with copy reloc

2015-10-19 Thread H.J. Lu
PING. -- Forwarded message -- From: H.J. Lu Date: Wed, Jul 1, 2015 at 5:11 AM Subject: [PATCH] X86: Optimize access to globals in PIE with copy reloc To: gcc-patches@gcc.gnu.org Normally, with PIE, GCC accesses globals that are extern to the module using GOT. This is two instr

Re: [PATCH] fortran/68019 -- Remove an assert() that prevents error message

2015-10-19 Thread Paul Richard Thomas
Hi Steve, Yes, this is OK for trunk. I suggest that it is so obvious that it should go into 5 branch as well. Cheers Paul On 19 October 2015 at 21:13, Steve Kargl wrote: > The attached patch removes an assert() that prevents gfortran from > issuing an error message. Built and tested on x86_64

Re: [c++-delayed-folding] First stab at convert_to_integer

2015-10-19 Thread Jason Merrill
On 10/19/2015 02:31 AM, Marek Polacek wrote: On Fri, Oct 16, 2015 at 02:07:51PM -1000, Jason Merrill wrote: On 10/16/2015 07:35 AM, Marek Polacek wrote: This code path seems to be for pushing a conversion down into a binary expression. We shouldn't do this at all when we aren't folding. I te

PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-19 Thread H.J. Lu
-- Forwarded message -- From: H.J. Lu Date: Wed, Sep 9, 2015 at 3:02 PM Subject: [PATCH] PR target/67215: -fno-plt needs improvements for x86 To: gcc-patches@gcc.gnu.org prepare_call_address in calls.c is the wrong place to handle -fno-plt. We shoudn't force function address into

Re: [gomp4.1] depend nowait support for target {update,{enter,exit} data}

2015-10-19 Thread Ilya Verbin
On Thu, Oct 15, 2015 at 16:01:56 +0200, Jakub Jelinek wrote: > >void *fn_addr = gomp_get_target_fn_addr (devicep, fn); > > > > + if (flags & GOMP_TARGET_FLAG_NOWAIT) > > +{ > > + gomp_create_target_task (devicep, fn_addr, mapnum, hostaddrs, sizes, > > + kind

Re: [PATCH] Fix partial template specialization syntax in wide-int.h

2015-10-19 Thread H.J. Lu
On Mon, Oct 19, 2015 at 12:39 PM, H.J. Lu wrote: > On Mon, Jul 20, 2015 at 12:15 AM, Mikhail Maltsev wrote: >> On 07/17/2015 07:46 PM, Mike Stump wrote: >>> On Jul 17, 2015, at 2:28 AM, Mikhail Maltsev wrote: The following code (reduced from wide-int.h) is rejected by Intel C++ Compile

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-19 Thread Jan Hubicka
Hi, this is patch that reverts the TYPE_MODE mismatch related changes and adds test to type checker that TYPE_MODE always match with TYPE_CANONICAL. I have bootstrapped/regtested x86_64-linux, but unfrtunately the regtesting had some unrelated noise (spawn failures). I am re-testing. I am on a trip

Re: [PATCH] Fix partial template specialization syntax in wide-int.h

2015-10-19 Thread H.J. Lu
On Mon, Jul 20, 2015 at 12:15 AM, Mikhail Maltsev wrote: > On 07/17/2015 07:46 PM, Mike Stump wrote: >> On Jul 17, 2015, at 2:28 AM, Mikhail Maltsev wrote: >>> The following code (reduced from wide-int.h) is rejected by Intel C++ >>> Compiler (EDG-based): >> >> So, could you test this with the to

[PATCH] fortran/68019 -- Remove an assert() that prevents error message

2015-10-19 Thread Steve Kargl
The attached patch removes an assert() that prevents gfortran from issuing an error message. Built and tested on x86_64-*-freebsd. Althoug probably an "obviously correct" patch, OK to commit? 2015-10-19 Steven G. Kargl PR fortran/68019 * decl.c (add_init_expr_to_sym): Remove a

Re: [PATCH, rs6000] Pass --secure-plt to the linker

2015-10-19 Thread Szabolcs Nagy
On 19/10/15 14:04, Szabolcs Nagy wrote: On 19/10/15 12:12, Alan Modra wrote: On Thu, Oct 15, 2015 at 06:50:50PM +0100, Szabolcs Nagy wrote: A powerpc toolchain built with (or without) --enable-secureplt currently creates a binary that uses bss plt if (1) any of the linked PIC objects have bss

Re: [PATCH, sh][v3] musl support for sh

2015-10-19 Thread Szabolcs Nagy
On 17/10/15 02:14, Oleg Endo wrote: On Fri, 2015-10-16 at 17:06 +0100, Szabolcs Nagy wrote: Revision of https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01636.html The musl dynamic linker name is /lib/ld-musl-sh{-nofpu}{-fdpic}.so.1 New in this revision: Add -fdpic to the name, will be useful wi

Re: [PATCH, libiberty] Fix PR63758 by using the _NSGetEnviron() API on Darwin.

2015-10-19 Thread Mike Stump
On Oct 18, 2015, at 3:42 AM, Iain Sandoe wrote: This seems likely to break cross-compilers to Darwin that do not have the system libraries available. I guess I don't care about that if you don't. >>> >>> I do care about it, but I'm not visualising the case... >>> >>> AFAICS, when

Re: [PATCH] Fix default_binds_local_p_2 for extern protected data

2015-10-19 Thread Richard Henderson
On 07/22/2015 07:01 AM, Szabolcs Nagy wrote: 2015-07-22 Szabolcs Nagy PR target/66912 * varasm.c (default_binds_local_p_2): Turn on extern_protected_data. gcc/testsuite/ChangeLog: 2015-07-22 Szabolcs Nagy PR target/66912 * gcc.target/aarch64/pr66912.c: New.

Re: [Patch] Add OPT_Wattributes to ignored attributes on template args

2015-10-19 Thread Ryan Mansfield
Ping: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg02256.html Regards, Ryan Mansfield On 15-09-29 04:21 PM, Ryan Mansfield wrote: Hi, In canonicalize_type_argument attributes are being discarded with a warning. Should it be added to OPT_Wattributes? 2015-09-29 Ryan Mansfield *

Re: [PATCH] mn10300: Use the STC bb-reorder algorithm at -Os

2015-10-19 Thread Jeff Law
On 10/16/2015 06:53 AM, Segher Boessenkool wrote: For mn10300, STC still gives better results for optimise-for-size than "simple" does. So use STC at -Os as well. Is this okay for trunk? Segher 2015-10-16 Segher Boessenkool * common/config/mn10300/mn10300-common.c (mn103

[gomp4] auto partitioning

2015-10-19 Thread Nathan Sidwell
I've committed this patch to gomp4 branch. It implements handling of the 'auto' clause on a loop. such loops can be implicitly partitioned, if they are (explicitly or implicitly) 'independent'. This patch walks the loop structure after explicit partitioning has been handled, and attempts to a

Re: Move cabs simplifications to match.pd

2015-10-19 Thread Richard Biener
On October 19, 2015 4:42:23 PM GMT+02:00, Richard Sandiford wrote: >The fold code also expanded cabs(x+yi) to fsqrt(x*x+y*y) when >optimising >for speed. tree-ssa-math-opts.c has this transformation too, but >unlike >the fold code, it first checks whether the target implements the sqrt >optab.

[HSA] Class refactoring

2015-10-19 Thread Martin Liška
Hello. Following tarball is made of patches that rename class member variables to respect C++ coding style, where all member variables should begin with 'm_'. Martin hsa-class-refactoring.tar.bz2 Description: application/bzip

Re: [PR fortran/63858] Fix mix of OpenACC and OpenMP sentinels in continuations

2015-10-19 Thread Thomas Schwinge
Hi! Ping... On Fri, 9 Oct 2015 12:15:24 +0200, I wrote: > On Mon, 27 Jul 2015 16:14:17 +0200, I wrote: > > On Tue, 30 Jun 2015 03:39:42 +0300, Ilmir Usmanov wrote: > > > 08.06.2015, 17:59, "Cesar Philippidis" : > > > > On 06/07/2015 02:05 PM, Ilmir Usmanov wrote: > > > >> 08.06.2015, 00:01, "Il

Re: [vec-cmp, patch 7/6] Vector comparison enabling in SLP

2015-10-19 Thread Jeff Law
On 10/19/2015 05:06 AM, Ilya Enkovich wrote: Hi, It appeared our testsuite doesn't have a test which would require vector comparison support in SLP even after boolean pattern disabling. This patch adds such tests and allow comparison for SLP. Is it OK? Thanks, Ilya -- gcc/ 2015-10-19 Ilya

Re: [PATCH 1/3] [ARM] PR63870 Add qualifiers for NEON builtins

2015-10-19 Thread Alan Lawrence
On 14/10/15 23:02, Charles Baylis wrote: On 12 October 2015 at 11:58, Alan Lawrence wrote: > Given we are making changes here to how this all works on bigendian, have you tested armeb at all? I tested on big endian, and it passes, except Well, I asked because it seemed good to make sur

Forwarding -foffload=[...] from the driver (compile-time) to libgomp (run-time)

2015-10-19 Thread Thomas Schwinge
Hi! Ping... On Wed, 30 Sep 2015 17:54:07 +0200, I wrote: > On Tue, 29 Sep 2015 10:18:14 +0200, Jakub Jelinek wrote: > > On Mon, Sep 28, 2015 at 11:39:10AM +0200, Thomas Schwinge wrote: > > > On Fri, 11 Sep 2015 17:43:49 +0200, Jakub Jelinek > > > wrote: > > > > So, do I understand well that yo

Re: OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-19 Thread Ilya Verbin
On Mon, Oct 19, 2015 at 18:24:35 +0200, Thomas Schwinge wrote: > Chung-Lin, would you please have a look at the following (on > gomp-4_0-branch)? Also, anyone else got any ideas off-hand? > > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-2.c > -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SH

Re: [patch] fix gotools cross build

2015-10-19 Thread Ian Lance Taylor
On Wed, May 6, 2015 at 5:34 AM, Matthias Klose wrote: > > Yes, it's documented that there is still some work to do for cross builds, > however a cross build for gotools currently fails. > > The toplevel make always passes the GOC variable in the environment, > overwriting > anything configured in

Re: Fix prototype for print_insn in rtl.h

2015-10-19 Thread Jeff Law
On 10/19/2015 09:14 AM, Jeff Law wrote: On 10/15/2015 10:28 AM, Andrew MacLeod wrote: On 10/13/2015 11:32 AM, Jeff Law wrote: On 10/13/2015 02:21 AM, Nikolai Bozhenov wrote: 2015-10-13 Nikolai Bozhenov * gcc/rtl.h (print_insn): fix prototype Installed on the trunk after bootstrap & reg

OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-19 Thread Thomas Schwinge
Hi! Chung-Lin, would you please have a look at the following (on gomp-4_0-branch)? Also, anyone else got any ideas off-hand? On Tue, 23 Jun 2015 13:51:39 +0200, Jakub Jelinek wrote: > On Tue, Jun 23, 2015 at 02:40:43PM +0300, Ilya Verbin wrote: > > On Sat, Jun 20, 2015 at 00:35:14 +0300, Ilya V

[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

2015-10-19 Thread Jeff Law
If I hack up GCC's old jump threader to avoid threading across backedges and instead let the FSM threader handle that case, then we end up with cases where the FSM threader creates irreducible loops with marginal benefit. This can be seen in ssa-dom-thread-2{d,e,f}.c. We've long avoided such

Re: [mask-vec_cond, patch 3/2] SLP support

2015-10-19 Thread Jeff Law
On 10/19/2015 05:21 AM, Ilya Enkovich wrote: Hi, This patch adds missing support for cond_expr with no embedded comparison in SLP. No new test added because vec cmp SLP test becomes (due to changes in bool patterns by the first patch) a regression test for this patch. Does it look OK? Than

[gomp4] Merge gomp-4_1-branch r224607 (2015-06-18) into gomp-4_0-branch

2015-10-19 Thread Thomas Schwinge
Hi! I have recently merged trunk r228776 (2015-10-13) into gomp-4_0-branch, which is the trunk revision before Jakub's big "Merge from gomp-4_1-branch to trunk", . Instead of attempting to merge that one

Re: config header file reduction patch checked in.

2015-10-19 Thread Andrew MacLeod
On 10/18/2015 05:31 AM, Iain Sandoe wrote: Hi Andrew, On 16 Oct 2015, at 20:49, Andrew MacLeod wrote: On 10/12/2015 04:04 AM, Jeff Law wrote: On 10/08/2015 07:37 AM, Andrew MacLeod wrote: On 10/07/2015 06:02 PM, Jeff Law wrote: I'm slightly concerned about the darwin, windows and solaris bi

[gomp4.5] Add checking that OpenMP loop iterators aren't referenced in the bounds/step expressions

2015-10-19 Thread Jakub Jelinek
Hi! In 4.0 and earlier, there has just been a restriction that the lb, b and incr expressions in the syntax (low/high bounds and step) can't change their values during the loop, but in OpenMP 4.5 we have even stronger restriction, the iterators may not be referenced in there at all, so even if you

[c++-delayed-folding] Use convert_to_integer_nofold

2015-10-19 Thread Marek Polacek
As discussed in the other thread. This is a patch I intend to commit to the branch when I can actually commit stuff. diff --git gcc/cp/semantics.c gcc/cp/semantics.c index 9a8caa7..d15d6f9 100644 --- gcc/cp/semantics.c +++ gcc/cp/semantics.c @@ -5577,7 +5577,8 @@ finish_omp_clauses (tree clauses)

[c++-delayed-folding] Introduce convert_to_pointer_nofold

2015-10-19 Thread Marek Polacek
This patch introduces convert_to_pointer_nofold; a variant that only folds CONSTANT_CLASS_P expressions. In the C++ FE, convert_to_pointer was only used in cp_convert_to_pointer which is only used in cp_convert. Instead of introducing many _nofold variants, I just made cp_convert_to_pointer use t

Re: Split out some tests from builtins-20.c

2015-10-19 Thread Jeff Law
On 10/15/2015 07:18 AM, Richard Sandiford wrote: Stripping unnecessary sign ops at the gimple level means that we're no longer able to optimise: if (cos(y<10 ? -fabs(x) : tan(x<20 ? -x : -fabs(y))) != cos(y<10 ? x : tan(x<20 ? x : y))) link_error (); because we're currently not a

Re: Fix prototype for print_insn in rtl.h

2015-10-19 Thread Jeff Law
On 10/15/2015 10:28 AM, Andrew MacLeod wrote: On 10/13/2015 11:32 AM, Jeff Law wrote: On 10/13/2015 02:21 AM, Nikolai Bozhenov wrote: 2015-10-13 Nikolai Bozhenov * gcc/rtl.h (print_insn): fix prototype Installed on the trunk after bootstrap & regression test. jeff Sorry, a little lat

Re: [gomp4.1] map clause parsing improvements

2015-10-19 Thread Thomas Schwinge
Hi! On Mon, 19 Oct 2015 12:34:08 +0200, Jakub Jelinek wrote: > On Mon, Oct 19, 2015 at 12:20:23PM +0200, Thomas Schwinge wrote: > > > +/* Decrement usage count and deallocate if zero. */ > > > +GOMP_MAP_RELEASE = (GOMP_MAP_FLAG_ALWAYS > > > +

Re: Add a pass to back-propagate use information

2015-10-19 Thread Richard Sandiford
Richard Biener writes: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index de45a2c..7f00e72 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -319,7 +318,7 @@ fold_overflow_warning (const char* gmsgid, enum >>> warn_strict_overflow_code wc) /* Return true if

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

2015-10-19 Thread Michael Matz
Hi, On Fri, 16 Oct 2015, David Malcolm wrote: > This fixes much of the bloat seen for influence.i when sending ranges > through for every token. Yeah, I think that's on the right track. > This was with 8 bits allocated for packed ranges (which is probably > excessive, but it makes debugging e

Move cabs simplifications to match.pd

2015-10-19 Thread Richard Sandiford
The fold code also expanded cabs(x+yi) to fsqrt(x*x+y*y) when optimising for speed. tree-ssa-math-opts.c has this transformation too, but unlike the fold code, it first checks whether the target implements the sqrt optab. The patch simply removes the fold code and keeps the tree-ssa-math-opts.c l

Re: [PATCH][simplify-rtx][2/2] Use constants from pool when simplifying binops

2015-10-19 Thread Kyrill Tkachov
Hi Bernd, On 19/10/15 15:31, Bernd Schmidt wrote: On 10/19/2015 03:57 PM, Kyrill Tkachov wrote: This second patch teaches simplify_binary_operation to return the dereferenced constants from the constant pool in the binary expression if other simplifications failed. This, combined with the 1/2

Re: [PATCH][simplify-rtx][2/2] Use constants from pool when simplifying binops

2015-10-19 Thread Kyrill Tkachov
On 19/10/15 15:31, Segher Boessenkool wrote: Hi Kyrill, Hi Segher, On Mon, Oct 19, 2015 at 02:57:54PM +0100, Kyrill Tkachov wrote: because combine now successfully tries to match: (set (reg/i:SI 0 x0) (fix:SI (mult:SF (reg:SF 32 v0 [ a ]) (const_double:SF 3.2e+1 [0x0.8p+6

Re: Add a pass to back-propagate use information

2015-10-19 Thread Richard Biener
On Mon, Oct 19, 2015 at 2:38 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Thu, Oct 15, 2015 at 3:17 PM, Richard Sandiford >> wrote: >>> This patch adds a pass that collects information that is common to all >>> uses of an SSA name X and back-propagates that information up the stat

Re: [PATCH][simplify-rtx][2/2] Use constants from pool when simplifying binops

2015-10-19 Thread Bernd Schmidt
On 10/19/2015 03:57 PM, Kyrill Tkachov wrote: This second patch teaches simplify_binary_operation to return the dereferenced constants from the constant pool in the binary expression if other simplifications failed. This, combined with the 1/2 patch for aarch64 (https://gcc.gnu.org/ml/gcc-patche

Re: [PATCH][simplify-rtx][2/2] Use constants from pool when simplifying binops

2015-10-19 Thread Segher Boessenkool
Hi Kyrill, On Mon, Oct 19, 2015 at 02:57:54PM +0100, Kyrill Tkachov wrote: > because combine now successfully tries to match: > (set (reg/i:SI 0 x0) > (fix:SI (mult:SF (reg:SF 32 v0 [ a ]) > (const_double:SF 3.2e+1 [0x0.8p+6] > > whereas before it would not try the to use the

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

2015-10-19 Thread Bernd Schmidt
On 01/04/1970 01:02 AM, Benedikt Huber wrote: This tenth revision of the patch: * Removes unnecessary enum. Please fix your clock. Bernd

[PATCH] 2015-10-19 Benedikt Huber Philipp Tomsich

2015-10-19 Thread Benedikt Huber
* config/aarch64/aarch64-builtins.c: Builtins for rsqrt and rsqrtf. * config/aarch64/aarch64-protos.h: Declare. * config/aarch64/aarch64-simd.md: Matching expressions for frsqrte and frsqrts. * config/aarch64/aarch64-tuning-flags.def: Added recip_sqrt.

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

2015-10-19 Thread Benedikt Huber
This tenth revision of the patch: * Removes unnecessary enum. Ok for check in. Benedikt Huber (1): 2015-10-19 Benedikt Huber Philipp Tomsich gcc/ChangeLog | 20 gcc/config/aarch64/aarch64-builtins.c | 115 +

[PATCH][simplify-rtx][2/2] Use constants from pool when simplifying binops

2015-10-19 Thread Kyrill Tkachov
Hi all, This second patch teaches simplify_binary_operation to return the dereferenced constants from the constant pool in the binary expression if other simplifications failed. This, combined with the 1/2 patch for aarch64 (https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01744.html) allow for:

[PATCH][AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

2015-10-19 Thread Kyrill Tkachov
Hi all, The fcvtzs and fcvtzu instructions have a form where they convert to a fixed-point form with a specified number of fractional bits. In practice this has the effect of multiplying the floating point argument by 2^ and then converting the result to integer. We can exploit that behaviour d

[PATCH] Move cproj simplification to match.pd

2015-10-19 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-10-19 Richard Biener * gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function. (gimple_stmt_nonnegative_warnv_p): Use it. * match.pd (CPROJ): New operator list. (cproj (complex .

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-10-19 Thread Mikhail Maltsev
On 10/19/2015 02:13 PM, Bernd Schmidt wrote: > But for normal C conditions the patches end up using flag_checking, so > the CHECKING_P macro buys us nothing over ENABLE_CHECKING. Presumably 'if (CHECKING_P)' can be used for performance-critical parts (in this case the condition will be DCE-d) and a

Re: [PATCH, rs6000] Pass --secure-plt to the linker

2015-10-19 Thread Szabolcs Nagy
On 19/10/15 12:12, Alan Modra wrote: On Thu, Oct 15, 2015 at 06:50:50PM +0100, Szabolcs Nagy wrote: A powerpc toolchain built with (or without) --enable-secureplt currently creates a binary that uses bss plt if (1) any of the linked PIC objects have bss plt relocs (2) or all the linked objects

Re: Move some bit and binary optimizations in simplify and match

2015-10-19 Thread Richard Biener
On Mon, Oct 19, 2015 at 1:14 PM, Hurugalawadi, Naveen wrote: > Hi, > >>> That's not what Richard meant. We already have: > > Done. As per the comments. > > Please find attached the modified patch as per your comments. > > Please review them and let me know if any further modifications are required

Re: Add a pass to back-propagate use information

2015-10-19 Thread Richard Sandiford
Richard Biener writes: > On Thu, Oct 15, 2015 at 3:17 PM, Richard Sandiford > wrote: >> This patch adds a pass that collects information that is common to all >> uses of an SSA name X and back-propagates that information up the statements >> that generate X. The general idea is to use the inform

Re: [c++-delayed-folding] First stab at convert_to_integer

2015-10-19 Thread Marek Polacek
On Fri, Oct 16, 2015 at 02:07:51PM -1000, Jason Merrill wrote: > On 10/16/2015 07:35 AM, Marek Polacek wrote: > >>This code path seems to be for pushing a conversion down into a binary > >>expression. We shouldn't do this at all when we aren't folding. > > > >I tend to agree, but this case is tric

[mask conversion, patch 2/2, i386] Add pack/unpack patterns for scalar masks

2015-10-19 Thread Ilya Enkovich
Hi, This patch adds patterns to be used for vector masks pack/unpack for AVX512. Bootstrapped and tested on x86_64-unknown-linux-gnu. Does it look OK? Thanks, Ilya -- gcc/ 2015-10-19 Ilya Enkovich * config/i386/sse.md (HALFMASKMODE): New attribute. (DOUBLEMASKMODE): New a

Re: Add VIEW_CONVERT_EXPR to operand_equal_p

2015-10-19 Thread Richard Biener
On Sun, Oct 18, 2015 at 7:14 PM, Jan Hubicka wrote: >> >> Adding back the mode check is fine if all types with the same TYPE_CANONICAL >> have the same mode. Otherwise we'd regress here. I thought we do for >> >> Struct x { int i; }; >> Typedef y x __attribute__((packed)); >> >> And then doing

[mask conversion, patch 1/2] Add pattern for mask conversions

2015-10-19 Thread Ilya Enkovich
Hi, This patch adds a vectorization pattern which detects cases where mask conversion is needed and adds it. It is done for all statements which may consume mask. Some additional changes were made to support MASK_LOAD with pattern and allow scalar mode for vectype of pattern stmt. It is appl

Re: Add simple sign-stripping cases to match.pd

2015-10-19 Thread Richard Biener
On Mon, Oct 19, 2015 at 12:48 PM, Richard Sandiford wrote: > Richard Sandiford writes: >> Richard Sandiford writes: >>> Marc Glisse writes: On Thu, 15 Oct 2015, Richard Sandiford wrote: > This patch makes sure that, for every simplification that uses > fold_strip_sign_ops, the

Re: [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE

2015-10-19 Thread Bernd Schmidt
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c - -#ifdef ENABLE_CHECKING - verify_flow_info (); -#endif + checking_verify_flow_info (); This looks misindented. -#ifdef ENABLE_CHECKING cgraph_edge *e; gcc_checking_assert ( !(e = caller->get_edg

Re: [PATCH] tree-scalar-evolution.c: Handle LSHIFT by constant

2015-10-19 Thread Richard Biener
On Fri, Oct 16, 2015 at 5:25 PM, Alan Lawrence wrote: > This lets the vectorizer handle some simple strides expressed using left-shift > rather than mul, e.g. a[i << 1] (whereas previously only a[i * 2] would have > been handled). > > This patch does *not* handle the general case of shifts - neith

Re: [PATCH V3][GCC] Algorithmic optimization in match and simplify

2015-10-19 Thread Richard Biener
On Thu, Oct 15, 2015 at 3:50 PM, Christophe Lyon wrote: > On 9 October 2015 at 18:11, James Greenhalgh wrote: >> On Thu, Oct 08, 2015 at 01:29:34PM +0100, Richard Biener wrote: >>> > Thanks again for the comments Richard! >>> > >>> > A new algorithmic optimisation: >>> > >>> > ((X inner_op C0) ou

Re: Remove fold_strip_sign_ops

2015-10-19 Thread Richard Biener
On Thu, Oct 15, 2015 at 3:28 PM, Richard Sandiford wrote: > This patch deletes fold_strip_sign_ops in favour of the tree-ssa-backprop.c > pass. > > Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. > OK to install? Ok once the pass goes in. Thanks, Richard. > Thanks, > Richar

Re: [PATCH] Use GET_MODE_BITSIZE to get vector natural alignment

2015-10-19 Thread H.J. Lu
On Mon, Oct 19, 2015 at 4:12 AM, Uros Bizjak wrote: > On Mon, Oct 19, 2015 at 1:12 PM, H.J. Lu wrote: >> On Mon, Oct 19, 2015 at 4:05 AM, Uros Bizjak wrote: >>> On Fri, Oct 16, 2015 at 7:42 PM, H.J. Lu wrote: Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment is 4

Re: Move some bit and binary optimizations in simplify and match

2015-10-19 Thread Marc Glisse
+/* Fold X + (X / CST) * -CST to X % CST. */ This one is still wrong. It is extremely similar to X-(X/CST)*CST, and the current version of that one in match.pd is broken, we should fix that one first. +/* Fold (A & ~B) - (A & B) into (A ^ B) - B. */ +(simplify + (minus (bit_and:s @0 (bit_no

Re: Add a pass to back-propagate use information

2015-10-19 Thread Richard Biener
On Thu, Oct 15, 2015 at 3:17 PM, Richard Sandiford wrote: > This patch adds a pass that collects information that is common to all > uses of an SSA name X and back-propagates that information up the statements > that generate X. The general idea is to use the information to simplify > instruction

Re: [PATCH] PR middle-end/68002: introduce -fkeep-static-functions

2015-10-19 Thread H.J. Lu
On Mon, Oct 19, 2015 at 2:18 AM, Richard Biener wrote: > On Sat, Oct 17, 2015 at 5:17 PM, VandeVondele Joost > wrote: >> In some cases (e.g. coverage testing) it is useful to emit code for static >> functions even if they are never used, which currently is not possible at >> -O1 and above. The

[mask-vec_cond, patch 3/2] SLP support

2015-10-19 Thread Ilya Enkovich
Hi, This patch adds missing support for cond_expr with no embedded comparison in SLP. No new test added because vec cmp SLP test becomes (due to changes in bool patterns by the first patch) a regression test for this patch. Does it look OK? Thanks, Ilya -- gcc/ 2015-10-19 Ilya Enkovich

Re: Move some bit and binary optimizations in simplify and match

2015-10-19 Thread Hurugalawadi, Naveen
Hi, Please find attached the modified patch of duplicate patterns which were posted in the earlier part. Please review them and let me know if any further modifications are required. Thanks, Naveendiff --git a/gcc/fold-const.c b/gcc/fold-const.c index de45a2c..b36e2f5 100644 --- a/gcc/fold-const

Re: Move some bit and binary optimizations in simplify and match

2015-10-19 Thread Hurugalawadi, Naveen
Hi, >> That's not what Richard meant. We already have: Done. As per the comments. Please find attached the modified patch as per your comments. Please review them and let me know if any further modifications are required. Thanks, Naveendiff --git a/gcc/fold-const.c b/gcc/fold-const.c index de4

  1   2   >