Re: [PATCH] 2015-06-15 Benedikt Huber

2015-06-26 Thread Andrew Pinski
On Thu, Jun 18, 2015 at 5:04 AM, Benedikt Huber wrote: A few comments about the patch itself besides the cost model issue and iteration issue mentioned in the other email thread. >* config/aarch64/aarch64-builtins.c: Builtins for rsqrt and rsqrtf. >* config/aarch64/aarch64-protos.

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

2015-06-26 Thread Andrew Pinski
On Thu, Jun 25, 2015 at 1:24 AM, Ramana Radhakrishnan wrote: > Benedikt, > > On 25/06/15 08:01, pins...@gmail.com wrote: >> >> >> >> >> >>> On Jun 18, 2015, at 5:04 AM, Benedikt Huber >>> wrote: >>> >>> arch64 offers the instructions frsqrte and frsqrts, for rsqrt estimation >>> and >>> a Newton-

Re: [SH][committed] Fix PR 65979 / PR 66611

2015-06-26 Thread Oleg Endo
On 26 Jun 2015, at 08:54, Oleg Endo wrote: > Hi, > > This fixes the problem of emitting an insn from within a peephole pattern > which can't be recognized due to mismatching operand constraints. Tested by > Kaz on sh4-linux. Committed to trunk as r224987. Backport to GCC 5 will > follow.

Re: [PING 2] Re: [PATCH] warn for unsafe calls to __builtin_return_address

2015-06-26 Thread Martin Sebor
Is this patch okay for trunk? On 06/18/2015 11:15 AM, Martin Sebor wrote: Are there any concerns with or suggestions for changes to the following patch? https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00886.html Thanks Martin

Re: [patch] Remove fold-const.h as a dependency for gimple.h

2015-06-26 Thread Jeff Law
On 06/26/2015 11:59 AM, Andrew MacLeod wrote: On 06/26/2015 05:40 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 10:57 PM, Jeff Law wrote: On 06/25/2015 02:31 PM, Andrew MacLeod wrote: I proposed including fold-const.h into gimple.h, but didn't notice that its actually only needed by one i

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-26 Thread Jeff Law
On 06/26/2015 03:24 AM, Richard Biener wrote: On Thu, 25 Jun 2015, Richard Biener wrote: This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c I'll eventually massage it according to Jakubs suggestion to do a #ifndef HAVE_canonicalize_funcptr_for_compare #define HAVE_canonic

Re: [PATCH] PR c++/65750

2015-06-26 Thread Jason Merrill
On 06/24/2015 06:55 AM, Paolo Carlini wrote: I'm finishing retesting the amended patch and, if everything goes well, I will apply it to trunk, as approved by Jason (only additional minor tweak: testcase in cpp0x instead of cpp1y). What about gcc-5-branch? It's a regression. I think this is saf

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-26 Thread Jason Merrill
On 06/26/2015 05:37 AM, Richard Biener wrote: Can we defer TLS model setting to template instantiation? We need to represent somehow that __thread (or thread_local) was used in the declaration, but DECL_THREAD_LOCAL_P was changed to refer to the TLS model. Jason

Re: [Patch, C++, PR65882] Check tf_warning flag in build_new_op_1

2015-06-26 Thread Jason Merrill
On 06/24/2015 04:28 PM, Mikhail Maltsev wrote: It can probably be fixed like this: diff --git a/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C b/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C index cb16b4c..f658c1d 100644 --- a/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C +++ b/gcc/tests

C++ PATCH for c++/66216 (ICE with aligned attribute)

2015-06-26 Thread Jason Merrill
We weren't properly propagating the alignment to other variants after applying it, so we ended up with two const-qualified variants with different alignment. Tested x86_64-pc-linux-gnu, applying to trunk and 5. commit ffea563209dfc6daf1054fffc6f8d726e440f1dc Author: Jason Merrill Date: Fri J

C++ PATCH for c++/66684 (ICE with noexcept mismatch)

2015-06-26 Thread Jason Merrill
We shouldn't ICE because of a mismatch after we give an error about the mismatch. Tested x86_64-pc-linux-gnu, applying to trunk. commit 24e0467a1a5c0099b24aea8c7ec81f49b88f6a2c Author: Jason Merrill Date: Fri Jun 26 16:40:56 2015 -0400 PR c++/66684 * typeck2.c (merge_exception_spec

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-26 Thread Jeff Law
On 06/26/2015 08:57 AM, Richard Biener wrote: Another possibility is to not share them and make sure to insert clobbers for them when they become dead so later stack slot sharing can merge them again. We've certainly had cases in the past where re-using a stack slot for an object that has gone

Re: [PATCH GCC][refacor]Manage allocation of struct iv in obstack.

2015-06-26 Thread Jeff Law
On 06/26/2015 03:02 AM, Bin Cheng wrote: Hi, GCC avoids multi-pointers/dangling-pointers of struct iv by allocating multiple copies of the structure. This patch is an obvious fix to the issue by managing iv structures in obstack. Bootstrap on x86_64, will apply to trunk if no objection. Thanks

Re: C PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Jeff Law
On 06/26/2015 11:57 AM, Marek Polacek wrote: On Fri, Jun 26, 2015 at 06:02:22PM +0200, Marc Glisse wrote: On Fri, 26 Jun 2015, Marek Polacek wrote: - if (TREE_CODE (TREE_TYPE (mask)) != VECTOR_TYPE + if (!VECTOR_TYPE_P (TREE_TYPE (mask)) || TREE_CODE (TREE_TYPE (TREE_TYPE (mask))) != I

Re: C++ PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Jason Merrill
OK. Jason

Re: C++ PATCH to use VAR_P

2015-06-26 Thread Jason Merrill
OK. Jason

Re: C PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Joseph Myers
On Fri, 26 Jun 2015, Marek Polacek wrote: > On Fri, Jun 26, 2015 at 06:02:22PM +0200, Marc Glisse wrote: > > On Fri, 26 Jun 2015, Marek Polacek wrote: > > > > >- if (TREE_CODE (TREE_TYPE (mask)) != VECTOR_TYPE > > >+ if (!VECTOR_TYPE_P (TREE_TYPE (mask)) > > > || TREE_CODE (TREE_TYPE (TREE

C++ PATCH for c++/66654 (ICE with copying NSDMI)

2015-06-26 Thread Jason Merrill
My recently added checking code to make sure that we didn't miss calling reshape_init for an aggregate initializer wasn't limiting itself to aggregate classes. Tested x86_64-pc-linux-gnu, applying to trunk. commit bb4c1b72737952ae714f1586c0577f62b39337bc Author: Jason Merrill Date: Wed Jun 2

C++ PATCH for c++/66255 (ICE with non-type template parameter of typedef type)

2015-06-26 Thread Jason Merrill
My checking code to make sure that we've stripped all appropriate typedefs wasn't considering that the parameter might have a typedef type, requiring the argument to match. Tested x86_64-pc-linux-gnu, applying to trunk. commit 63f562788d442b1139d1158a26129b781c16b07a Author: Jason Merrill Date

C++ PATCH for c++/66067 (ICE with alias of typename)

2015-06-26 Thread Jason Merrill
This bug was caused by a combination of bugs: 1) An alias template where the expansion is a typename template-id, used as a template template argument, was being mangled with the template arguments tacked on. 2) Trying to mangle a zero-length explicit template argument list was causing a cra

[v3 patch] Implement N4258: Cleaning-up noexcept in the library

2015-06-26 Thread Jonathan Wakely
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4258.pdf This implements N4258 except for the basic_string parts, which I'm still working on (because I forgot to do allocator propagation properly in the new string). Since the new is_always_equal trait is inspired by the _S_always_equal(

Re: C PATCH to use INDIRECT_REF_P

2015-06-26 Thread Joseph Myers
On Fri, 26 Jun 2015, Marek Polacek wrote: > We have INDIRECT_REF_P macro, so let's use it to make the code a bit > more clear. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? OK. -- Joseph S. Myers jos...@codesourcery.com

Re: Managing ABI compatibility (was Re: [PATCH 2/2] jit: add switch statements)

2015-06-26 Thread David Malcolm
On Fri, 2015-06-26 at 13:57 -0400, David Malcolm wrote: > On Thu, 2015-06-25 at 13:16 -0600, Jeff Law wrote: > > On 06/25/2015 01:13 PM, David Malcolm wrote: > > > > > >* It extends the libgccjit API. It's not clear to me yet how to > > > manage extensions of the libgccjit API: should I u

Managing ABI compatibility (was Re: [PATCH 2/2] jit: add switch statements)

2015-06-26 Thread David Malcolm
On Thu, 2015-06-25 at 13:16 -0600, Jeff Law wrote: > On 06/25/2015 01:13 PM, David Malcolm wrote: > > > >* It extends the libgccjit API. It's not clear to me yet how to > > manage extensions of the libgccjit API: should I use symbol maps > > and versioning, or bump the SONAME? I'm t

Re: [patch] Remove fold-const.h as a dependency for gimple.h

2015-06-26 Thread Andrew MacLeod
On 06/26/2015 05:40 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 10:57 PM, Jeff Law wrote: On 06/25/2015 02:31 PM, Andrew MacLeod wrote: I proposed including fold-const.h into gimple.h, but didn't notice that its actually only needed by one inline function. Moving that function to gimple.

Re: C PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Marek Polacek
On Fri, Jun 26, 2015 at 06:02:22PM +0200, Marc Glisse wrote: > On Fri, 26 Jun 2015, Marek Polacek wrote: > > >- if (TREE_CODE (TREE_TYPE (mask)) != VECTOR_TYPE > >+ if (!VECTOR_TYPE_P (TREE_TYPE (mask)) > > || TREE_CODE (TREE_TYPE (TREE_TYPE (mask))) != INTEGER_TYPE) > > This one looks lik

Re: [Patch SRA] Fix PR66119 by calling get_move_ratio in SRA

2015-06-26 Thread Jakub Jelinek
On Fri, Jun 26, 2015 at 06:03:34PM +0100, James Greenhalgh wrote: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/pr66119.C I think generally testcases shouldn't be added into g++.dg/ directly, but subdirectories. So g++.dg/opt/ ? > @@ -0,0 +1,69 @@ > +/* PR66119 - MOVE_RATIO is not constant in a c

Re: [Patch SRA] Fix PR66119 by calling get_move_ratio in SRA

2015-06-26 Thread James Greenhalgh
On Thu, Jun 25, 2015 at 05:05:22AM +0100, Jeff Law wrote: > On 06/23/2015 09:42 AM, James Greenhalgh wrote: > > > > On Tue, Jun 23, 2015 at 09:52:01AM +0100, Jakub Jelinek wrote: > >> On Tue, Jun 23, 2015 at 09:18:52AM +0100, James Greenhalgh wrote: > >>> This patch fixes the issue by always calli

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Richard Sandiford writes: > Richard Sandiford writes: >> Rainer Orth writes: >>> Richard Sandiford writes: >>> Rainer Orth writes: > Jeff Law writes: > >> On 06/23/2015 08:57 AM, Richard Sandiford wrote: >>> At this point all hash_map traits know what kind of key they're

Re: [PATCH][Revised] Fix PR66509

2015-06-26 Thread Mike Stump
On Jun 26, 2015, at 9:09 AM, Jack Howarth wrote: > The attached revised patch adjusts the tests for the filds and fists > mnemonics to use the assembly... > > filds (%ebp); fists (%ebp) > > and the test for the fildq and fistq mnemonics to use the assembly... > > fildq (%ebp); fistpq (%ebp) >

[patch] Add noexcept to default constructors of std::map, std::set etc.

2015-06-26 Thread Jonathan Wakely
Howard pointed out that we're missing some noexcept guarantees on the default constructors of RB trees, where libc++ has them. Up with this I will not put. I'm committing this to trunk and gcc-5-branch, tested powerpc64le-linux. commit 56134d0ab24c603ed62fdff199008ac55804d61a Author: Jonathan

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Richard Sandiford writes: > Rainer Orth writes: >> Richard Sandiford writes: >> >>> Rainer Orth writes: Jeff Law writes: > On 06/23/2015 08:57 AM, Richard Sandiford wrote: >> At this point all hash_map traits know what kind of key they're >> dealing with, so we can make t

[PATCH] Move X - (X / Y) * Y folding to match.pd

2015-06-26 Thread Marek Polacek
This is an attempt to move one pattern from fold-const.c to match.pd. It ought to be 1:1, but is not, e.g. with this patch we won't fold e.g. int f (int a, int b) { return a - (unsigned) ((a / b) * b) } anymore, but we're able to fold int ff (int a, unsigned int b) { return a - ((a / b) * b)

Re: [PATCH][Revised] Fix PR66509

2015-06-26 Thread H.J. Lu
On Fri, Jun 26, 2015 at 9:09 AM, Jack Howarth wrote: > The attached revised patch adjusts the tests for the filds and fists > mnemonics to use the assembly... > > filds (%ebp); fists (%ebp) > > and the test for the fildq and fistq mnemonics to use the assembly... > > fildq (%ebp); fistpq (%ebp)

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Rainer Orth writes: > Richard Sandiford writes: > >> Rainer Orth writes: >>> Jeff Law writes: >>> On 06/23/2015 08:57 AM, Richard Sandiford wrote: > At this point all hash_map traits know what kind of key they're > dealing with, so we can make that a traits typedef, like it is for

[PATCH][Revised] Fix PR66509

2015-06-26 Thread Jack Howarth
The attached revised patch adjusts the tests for the filds and fists mnemonics to use the assembly... filds (%ebp); fists (%ebp) and the test for the fildq and fistq mnemonics to use the assembly... fildq (%ebp); fistpq (%ebp) which will assemble for both 64-bit and 32-bit mode. This is requi

Re: C PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Marc Glisse
On Fri, 26 Jun 2015, Marek Polacek wrote: - if (TREE_CODE (TREE_TYPE (mask)) != VECTOR_TYPE + if (!VECTOR_TYPE_P (TREE_TYPE (mask)) || TREE_CODE (TREE_TYPE (TREE_TYPE (mask))) != INTEGER_TYPE) This one looks like !VECTOR_INTEGER_TYPE_P -- Marc Glisse

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Mikhail Maltsev
On 06/26/2015 04:37 PM, Rainer Orth wrote: > /vol/gcc/src/hg/trunk/local/gcc/hash-map.h:173:8: note: template bool (* f)(tree_node*&, tree_node* const&, Arg)> void hash_map::traverse(Arg) > const [with Arg = Arg; bool (* f)(typename Traits::key_type&, const Value&, > Arg) = f; KeyId = tree_node*;

Re: [AArch64][TLSLE][N/N] Implement local executable mode for all memory model

2015-06-26 Thread Marcus Shawcroft
On 21 May 2015 at 17:49, Jiong Wang wrote: > 2015-05-14 Jiong Wang > gcc/ > * config/aarch64/aarch64.c (aarch64_print_operand): Support tls_size. > * config/aarch64/aarch64.md (tlsle): Choose proper instruction > sequences. > (tlsle_): New define_insn. > (tlsle_movsym_): Ditto. > *

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Rainer Orth
Richard Sandiford writes: > Rainer Orth writes: >> Jeff Law writes: >> >>> On 06/23/2015 08:57 AM, Richard Sandiford wrote: At this point all hash_map traits know what kind of key they're dealing with, so we can make that a traits typedef, like it is for hash_table traits. Then,

Re: [AArch64][TLSLE][5/N] Recognize -mtls-size

2015-06-26 Thread Marcus Shawcroft
On 21 May 2015 at 17:44, Jiong Wang wrote: > > This patch add -mtls-size option for AArch64. This option let user to do > finer control on code generation for various TLS model on AArch64. > > For example, for TLS LE, user can specify smaller tls-size, for example > 4K which is quite usual, to let

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-26 Thread Richard Biener
On June 26, 2015 2:21:22 PM GMT+02:00, Alan Lawrence wrote: >Sebastian Pop wrote: >> On Thu, Jun 25, 2015 at 4:43 AM, Richard Biener >> wrote: >>> when the new scheme triggers vectorization cannot succeed on the >>> result as we get >>> >>> if (cond) >>> *p = val; >>> >>> if-converted to >

Re: [AArch64][TLSLE][2/N] Rename "tlsle_small" to "tlsle"

2015-06-26 Thread Marcus Shawcroft
On 20 May 2015 at 12:19, Jiong Wang wrote: > > Similar to the rename from SYMBOL_SMALL_TPREL to SYMBOL_TLSLE, this > patch rename the rtl pattern name. > > ok for trunk? > > 2015-05-19 Jiong Wang > gcc/ > * config/aarch64/aarch64.md (tlsle_small): Rename to tlsle. > (tlsle_small_): Rename t

Re: [AArch64][TLSLE][3/N] Add UNSPEC_TLSLE

2015-06-26 Thread Marcus Shawcroft
On 20 May 2015 at 12:21, Jiong Wang wrote: > > Add new unspec name UNSPEC_TLSLE, use it for all tlsle pattern. > > ok for trunk? > > 2015-05-19 Jiong Wang > > gcc/ > * config/aarch64/aarch64.md (UNSPEC_TLSLE): New enumeration. > (tlsle): Use new unspec name. > (tlsle_): Ditto. OK /Marcus

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Rainer Orth writes: > Jeff Law writes: > >> On 06/23/2015 08:57 AM, Richard Sandiford wrote: >>> At this point all hash_map traits know what kind of key they're >>> dealing with, so we can make that a traits typedef, like it is for >>> hash_table traits. Then, if we make the default hash traits

Re: [AArch64][TLSLE][1/N] Rename SYMBOL_SMALL_TPREL to SYMBOL_TLSLE

2015-06-26 Thread Marcus Shawcroft
On 20 May 2015 at 11:56, Jiong Wang wrote: > 2015-05-19 Marcus Shawcroft > Jiong Wang > > gcc/ > * config/aarch64/aarch64-protos.h (arch64_symbol_type): Rename > SYMBOL_SMALL_TPREL to SYMBOL_TLSLE. > (aarch64_symbol_context): Ditto. > * config/aarch64/aarch64.c (aarch64_l

Re: [Aarch64] Expand +rdma documentation, small changes to march and mcpu text.

2015-06-26 Thread Marcus Shawcroft
On 22 June 2015 at 17:17, Matthew Wahab wrote: > Hello, > > The documentation for the ARMv8.1 +rdma option doesn't mention that enabling > it > also implies enabling Adv.SIMD. This patch fixes that. > > The documentation for the -march and -mcpu options are also a little messy, > this > patch trie

[hsa] C++ification of operands and instructions

2015-06-26 Thread Martin Jambor
Hello, the following patch provides constructors and operators new for (almost) all classes representing operands, instructions and basic-blocks in HSA. There were three reasons for this. First and foremost, some classes already contained auto_vec fields which meant they had constructors, whic

[AArch64/wwwdoc] Document -fpic support for small memory model

2015-06-26 Thread Jiong Wang
Marcus Shawcroft writes: > On 26 June 2015 at 10:32, Jiong Wang wrote: >> >> This patch respin https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01804.html. >> >> A new symbol classification "SYMBOL_SMALL_GOT_28K" added to represent symbol >> which needs go through GOT table and it's under -fpic/-mc

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Rainer Orth
Jeff Law writes: > On 06/23/2015 08:57 AM, Richard Sandiford wrote: >> At this point all hash_map traits know what kind of key they're >> dealing with, so we can make that a traits typedef, like it is for >> hash_table traits. Then, if we make the default hash traits for >> T be T, we can use ha

[gomp4.1] Add support for non-static data member iterators

2015-06-26 Thread Jakub Jelinek
Hi! As private/lastprivate/linear clauses now allow non-static data members in C++, it (unfortunately) means that also the iterator variables of distribute/for/simd/taskloop loops can be non-static data members. This patch implements it; tested on x86_64-linux, committed to gomp-4_1-branch. 2015

Re: [AArch64][1/2] Rename SYMBOL_SMALL_GOT to SYMBOL_SMALL_GOT_4G

2015-06-26 Thread Marcus Shawcroft
On 26 June 2015 at 10:23, Jiong Wang wrote: > OK. Reworked this patch. Removed those redundant memory model check by > adding new symbol classification. Patch splitted into two: > > * [1/2] Rename SYMBOL_SMALL_GOT to SYMBOL_SMALL_GOT_4G > * [2/2] Implement -fpic for -mcmodel=small > > This is

Re: [AArch64][2/2] Implement -fpic for -mcmodel=small

2015-06-26 Thread Marcus Shawcroft
On 26 June 2015 at 10:32, Jiong Wang wrote: > > This patch respin https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01804.html. > > A new symbol classification "SYMBOL_SMALL_GOT_28K" added to represent symbol > which needs go through GOT table and it's under -fpic/-mcmodel-small. the > "_28K" > suffi

Re: [Patch AArch64 4/4] Add -moverride tuning command, and wire it up for control of fusion and fma-steering

2015-06-26 Thread Marcus Shawcroft
On 23 June 2015 at 09:49, James Greenhalgh wrote: > > Hi, > > This final patch adds support for the new command line option > "-moverride". The purpose of this command line is to allow expert-level users > of the compiler, and those comfortable with experimenting with the compiler, > *unsupported*

Re: [Patch AArch64 3/4] De-const-ify struct tune_params

2015-06-26 Thread Marcus Shawcroft
On 23 June 2015 at 09:49, James Greenhalgh wrote: > > Hi, > > If we want to overwrite parts of this structure, we're going to need it > to be more malleable than it is presently. > > Run through and remove const from each of the members, create a non-const > tuning structure we can modify, and set

Re: [Patch AArch64 2/4] Control the FMA steering pass in tuning structures rather than as core property

2015-06-26 Thread Marcus Shawcroft
On 23 June 2015 at 09:49, James Greenhalgh wrote: > > Hi, > > The FMA steering pass should be enabled through the tuning structures > rather than be an intrinsic property of the core. This patch moves > the control of the pass to the tuning structures - turning it off for > everything other than

Re: [Patch AArch64 1/4] Define candidates for instruction fusion in a .def file

2015-06-26 Thread Marcus Shawcroft
On 23 June 2015 at 09:49, James Greenhalgh wrote: > > Hi, > > This patch moves the instruction fusion pairs from a set of #defines > to an enum which we can generate from a .def file. > > We'll use that .def file again, and the friendly names it introduces > shortly. > > OK? > > Thanks, > James >

[gomp4] openacc id builtin

2015-06-26 Thread Nathan Sidwell
I discovered a latent bug in the openacc thread id builtin and associated unspec. They should not be treated as constant functions, because that causes the compiler to consider them constant across threads. Which of course they are not. Applied to gomp4 branch nathan 2015-06-26 Nathan Sidw

[nvptx] small cleanup patch

2015-06-26 Thread Nathan Sidwell
Bernd, I've applied this small patch to trunk. It removes some unused variables in the ptx md file and silences some build warnings. nathan -- Nathan Sidwell 2015-06-26 Nathan Sidwell * config/nvptx/nvptx.md (call_operation): Remove unused variables. Index: config/nvptx/nvptx.md

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-26 Thread Alan Lawrence
Sebastian Pop wrote: On Thu, Jun 25, 2015 at 4:43 AM, Richard Biener wrote: when the new scheme triggers vectorization cannot succeed on the result as we get if (cond) *p = val; if-converted to tem = cond ? p : &scratch; *tem = val; That's correct. and if (cond) val =

[PATCH 4/4][PR target/65697][5.1][Aarch64] Backport tests for __sync_builtins.

2015-06-26 Thread Matthew Wahab
This patch backports the tests added for the code generated by the Aarch64 backend for the __sync builtins. The trunk patch submission is at https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01992.html The commit is at https://gcc.gnu.org/ml/gcc-cvs/2015-06/msg00079.html Tested the series for aarch

[PATCH 3/4][PR target/65697][5.1][Aarch64] Backport stronger barriers for __sync,compare-and-swap builtins.

2015-06-26 Thread Matthew Wahab
This patch backports the changes made to strengthen the barriers emitted for the __sync compare-and-swap builtins. The trunk patch submission is at https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01990.html The commit is at https://gcc.gnu.org/ml/gcc-cvs/2015-06/msg00077.html Tested the series for

[PATCH, i386]: Fix PR 66648, incorrect memcpy expansion with unrolled_loop strategy

2015-06-26 Thread Uros Bizjak
Hello! As explained in the PR [1], we have to emit check for main loop execution UNLESS we guarantee that min_size is at least equal to size_needed. In this testcase, VRP declared minimum copying size, and after unaligned prologue adjustment, min_size was still non-zero. The !min_size check didn't

[PATCH 2/4][PR target/65697][5.1][Aarch64] Backport stronger barriers for __sync,fetch-op builtins.

2015-06-26 Thread Matthew Wahab
This patch backports the changes made to strengthen the barriers emitted for the __sync fetch-and-op/op-and-fetch builtins. The trunk patch submission is at https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01989.html The commit is at https://gcc.gnu.org/ml/gcc-cvs/2015-06/msg00076.html Tested the

Re: [PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

2015-06-26 Thread Daniel Cederman
On 2015-06-26 09:45, Eric Botcazou wrote: Early variants of LEON3, revision 0, do not support the CASA instruction. This patch adds two new targets, leon3r0 and leon3r0v7, that are equivalent to leon3 and leon3v7, except that they do not support CASA. Why not use leon instead of leon3 for the

Re: [PATCH] Make muser-mode the default for LEON3

2015-06-26 Thread Daniel Cederman
Do they lack the CASA instruction with supervisor-mode ASI? What happens when the CASA instruction with user-mode ASI is executed in supervisor mode? For all LEON3 (with CASA support) the CASA instruction works in supervisor-mode regardless of ASI used. In user-mode CASA only works with the

[PATCH 1/4][PR target/65697][5.1] Backport stronger barriers for GCC,__sync builtins on Aarch64

2015-06-26 Thread Matthew Wahab
Hello, The __sync builtins are implemented using barriers that are too weak for ARMv8 targets, this has been fixed on trunk for Aarch64. Since GCC-5.1 is also generating the incorrect code, it should also be fixed. The fix on trunk involved changes to the way that memory orders represent barrier

[PATCH] Fix PR c++/30044

2015-06-26 Thread Patrick Palka
Here is a more modest approach to fixing this PR. Instead of updating current_template_parms with each newly processed template parameter, this patch just updates it with a "dummy" parameter level once per parameter list. So now in tsubst(), to fix the reported ICE we just have to avoid substitut

[PATCH] Fix PR66677

2015-06-26 Thread Richard Biener
Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2015-06-26 Richard Biener PR tree-optimization/66677 * tree-vect-stmts.c (vect_transform_stmt): Make assert about STMT_VINFO_VEC_STMT clobbering less strict. * gcc.dg/vect/pr66677.c: New testca

Re: [PATCH PR66638]Fix assertion failure by skip the case.

2015-06-26 Thread Richard Biener
On Fri, Jun 26, 2015 at 1:03 PM, Bin Cheng wrote: > Hi, > This patch fixes GCC's profiled bootstrap failure. As comment added by in > patch, it may still be possible to prove no overflow information for some > scev, unfortunately it's a rare case observed during GCC profiled bootstrap. > So for n

[PATCH PR66638]Fix assertion failure by skip the case.

2015-06-26 Thread Bin Cheng
Hi, This patch fixes GCC's profiled bootstrap failure. As comment added by in patch, it may still be possible to prove no overflow information for some scev, unfortunately it's a rare case observed during GCC profiled bootstrap. So for now I just skip it. Is this OK? Thanks, bin 2015-06-26 Bin

Re: [i386, PATCH, 3/3] IA MCU psABI support: testsuite.

2015-06-26 Thread Uros Bizjak
On Tue, Jun 23, 2015 at 11:38 AM, Kirill Yukhin wrote: > Hello, > This patch introduces tests for new psABI. > > gcc/testsuite/ > * gcc.target/i386/iamcu/abi-iamcu.exp: New file. > * gcc.target/i386/iamcu/args.h: Likewise. > * gcc.target/i386/iamcu/asm-support.S: Likewise.

[PATCH][5/n] Remove GENERIC stmt combining from SCCVN

2015-06-26 Thread Richard Biener
This moves some equality comparison patterns from fold-const.c to match.pd. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-06-26 Richard Biener * fold-const.c (fold_binary_loc): Remove -A CMP -B -> A CMP B and -A CMP CST -> A CMP -CST which is r

Re: [i386, PATCH, 2/3] IA MCU psABI support: changes to libraries.

2015-06-26 Thread Uros Bizjak
On Mon, Jun 22, 2015 at 5:39 PM, Kirill Yukhin wrote: > Hello, > Patch in the bottom adds support of IA MCU psABI to libgcc > (enables soft-fp) and libdecnumber (enables it for IA MCU). > > Bootstrapped and regtested on top of [1/3] patch. > > config/ > * dfp.m4 (enable_decimal_float): Als

Re: [patch] Fix PR middle-end/66633

2015-06-26 Thread Jakub Jelinek
On Fri, Jun 26, 2015 at 12:38:48PM +0200, Eric Botcazou wrote: > this is a regression present on the mainline and 5 branch. For the attached > Fortran testcase, the GIMPLE verifier stops the compiler on an error mark > inserted by omp-low.c:omp_copy_decl for a FRAME variable created during the

RE: [PATCH, ARM] Restrict pr65647 testcase to ARMv6-M effective target

2015-06-26 Thread Thomas Preud'homme
> From: James Greenhalgh [mailto:james.greenha...@arm.com] > Sent: Friday, June 26, 2015 6:15 PM > > This should already have been covered by: > > https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01105.html > > 2015-06-16 James Greenhalgh > > * gcc.target/arm/pr65647.c: Do not ove

[patch] Fix PR middle-end/66633

2015-06-26 Thread Eric Botcazou
Hi, this is a regression present on the mainline and 5 branch. For the attached Fortran testcase, the GIMPLE verifier stops the compiler on an error mark inserted by omp-low.c:omp_copy_decl for a FRAME variable created during the nested function lowering pass because it is not marked as shared

Re: [i386, PATCH, 1/3] IA MCU psABI support: GCC changes.

2015-06-26 Thread Uros Bizjak
On Mon, Jun 22, 2015 at 4:36 PM, Kirill Yukhin wrote: > Hello, > This patch introduces basic support into GCC. > > Bootstrapped and regtested. > > / > * configure.ac (ospace_frag): Enable for i?86*-*-elfiamcu > target. > * configure: Regenerate. > gcc/ > * config.gc

[Ada] Defer compilation of global variables

2015-06-26 Thread Eric Botcazou
In gigi we defer the generation of debug info for global types, so we need to arrange to emit (again) the debug info for global variables after that, otherwise the debug info can be incorrect. 2015-06-26 Eric Botcazou * gcc-interface/gigi.h (note_types_used_by_globals): Delete.

[Ada] Housekeeping work in gigi

2015-06-26 Thread Eric Botcazou
Mainly for the set of create_* functions in utils.c. Tested on x86_64-suse-linux, applied on the mainline. 2015-06-26 Eric Botcazou * gcc-interface/gigi.h (create_var_decl_1): Rename into... (create_var_decl): ...this. Add default value for last parameter. (create_ty

Re: [PATCH, ARM] Restrict pr65647 testcase to ARMv6-M effective target

2015-06-26 Thread James Greenhalgh
On Fri, Jun 26, 2015 at 09:50:33AM +0100, Richard Earnshaw wrote: > On 26/06/15 09:45, Thomas Preud'homme wrote: > > Hi, > > > > Testcase for PR65647 assumes that the compiler can compile for ARMv6-M > > which might not be the case if passing some extra options via > > RUNTESTFLAGS (eg. -marm/-mcp

Re: Add .def file for public target instructions

2015-06-26 Thread Richard Sandiford
Richard Sandiford writes: > Markus Trippelsdorf writes: >> On 2015.06.23 at 19:41 +0100, Richard Sandiford wrote: >>> >>> gcc/ >>> * Makefile.in (TARGET_DEF): Add target-insns.def. >>> (.PRECIOUS, simple_rtl_generated_h): Add insn-target-def.h. >>> (build/gentarget-def.o): New rule.

C++ PATCH to use VAR_P

2015-06-26 Thread Marek Polacek
Since Gaby's cleanup in 2013 many uses of TREE_CODE (decl) == VAR_DECL have crept back in. This is another cleanup in this area. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-06-26 Marek Polacek * call.c (set_up_extended_ref_temp): Use VAR_P. * class.c: Use VAR_P

C++ PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Marek Polacek
This patch makes the C++ FE use VECTOR_TYPE_P where appropriate. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-06-26 Marek Polacek * call.c: Use VECTOR_TYPE_P. * constexpr.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likew

[Ada] Implement custom version of -Waggressive-loop-optimizations

2015-06-26 Thread Eric Botcazou
-Waggressive-loop-optimizations only warns in very specific cases, notably only if the bounds of the loop are constant, and this is not sufficient to catch all the interesting cases in Ada. Hence this custom implementation. Tested on x86_64-suse-linux, applied on the mainline. 2015-06-26 Eri

[committed] C++ PATCH to use INDIRECT_REF_P

2015-06-26 Thread Marek Polacek
As the subject says. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-06-26 Marek Polacek * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P. * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise. diff --git gcc/cp/cp-array-notation.c gcc/c

Re: [Patch, C++, PR65882] Check tf_warning flag in build_new_op_1

2015-06-26 Thread James Greenhalgh
On Wed, Jun 24, 2015 at 09:28:34PM +0100, Mikhail Maltsev wrote: > On 06/24/2015 06:52 PM, Christophe Lyon wrote: > > Hi Mikhail, > > > > In the gcc-5-branch, I can see that your new inhibit-warn-2.C test > > fails (targets ARM and AArch64). > > > > I can see this error message in g++.log: > > /a

Re: Remove redundant AND from count reduction loop

2015-06-26 Thread Richard Biener
On Fri, Jun 26, 2015 at 12:39 AM, Marc Glisse wrote: > On Wed, 24 Jun 2015, Richard Biener wrote: > >> On Wed, Jun 24, 2015 at 11:57 AM, Richard Sandiford >> wrote: >>> >>> Richard Biener writes: On Tue, Jun 23, 2015 at 11:27 PM, Marc Glisse wrote: > > On Tue, 23 Jun 2015

Re: [patch] Remove fold-const.h as a dependency for gimple.h

2015-06-26 Thread Richard Biener
On Thu, Jun 25, 2015 at 10:57 PM, Jeff Law wrote: > On 06/25/2015 02:31 PM, Andrew MacLeod wrote: >> >> I proposed including fold-const.h into gimple.h, but didn't notice that >> its actually only needed by one inline function. Moving that function to >> gimple.c means its no longer required. >> >

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-26 Thread Richard Biener
On Thu, Jun 25, 2015 at 6:56 PM, Jason Merrill wrote: > On 06/24/2015 11:12 PM, Aldy Hernandez wrote: >> >> The problem here is that we are trying to call >> dwarf2out_late_global_decl() on a static variable in a template which >> has a type of TEMPLATE_TYPE_PARM: >> >> template class A >> { >>

[AArch64][2/2] Implement -fpic for -mcmodel=small

2015-06-26 Thread Jiong Wang
This patch respin https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01804.html. A new symbol classification "SYMBOL_SMALL_GOT_28K" added to represent symbol which needs go through GOT table and it's under -fpic/-mcmodel-small. the "_28K" suffix can reflect the symbol's attribute better, and by introd

[AArch64][1/2] Rename SYMBOL_SMALL_GOT to SYMBOL_SMALL_GOT_4G

2015-06-26 Thread Jiong Wang
Marcus Shawcroft writes: > On 23 June 2015 at 14:02, Jiong Wang wrote: >> >> Marcus Shawcroft writes: >> >>> On 20 May 2015 at 11:21, Jiong Wang wrote: >>> gcc/ * config/aarch64/aarch64.md: (ldr_got_small_): Support new GOT relocation modifiers. (ldr_got_small_si

Re: match.pd: Optimize (x | y) & ~(x & y) and (x | y) & (~x ^ y)

2015-06-26 Thread Richard Biener
On Fri, 26 Jun 2015, Marek Polacek wrote: > The following patch adds optimizing of > (x | y) & ~(x & y) > and > (x | y) & (~x ^ y) > to a single operation. > > No +/-/* in those, so I think we don't have to worry about saturating types > this time around. > > For some reason I had to use more :c

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-26 Thread Richard Biener
On Thu, 25 Jun 2015, Richard Biener wrote: > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > I'll eventually massage it according to Jakubs suggestion to do a > > #ifndef HAVE_canonicalize_funcptr_for_compare > #define HAVE_canonicalize_funcptr_for_compare 0 > #endi

[Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions.

2015-06-26 Thread Ramana Radhakrishnan
As part of the work on PR66192 I promised a doc update at some point - here's that - hopefully better late than never. I also wonder if this is worth putting into the documentation in addition to our release notes though I couldn't convince myself that standards.texi was the right place for it

[Patch ARM] Fix thinko in use of TARGET_UNIFIED_ASM

2015-06-26 Thread Ramana Radhakrishnan
While paving the way to turn on unified syntax in ARM state I came across this use of TARGET_UNIFIED_ASM that really doesn't make sense. The idea that pop has different encoding sizes is a property of the Thumb instruction set rather than a property of which form of unified syntax was used. I

[PATCH GCC][refacor]Manage allocation of struct iv in obstack.

2015-06-26 Thread Bin Cheng
Hi, GCC avoids multi-pointers/dangling-pointers of struct iv by allocating multiple copies of the structure. This patch is an obvious fix to the issue by managing iv structures in obstack. Bootstrap on x86_64, will apply to trunk if no objection. Thanks, bin 2015-06-26 Bin Cheng * t

Re: [PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-26 Thread Segher Boessenkool
On Fri, Jun 26, 2015 at 09:42:06AM +0200, Uros Bizjak wrote: > Hello! > > > > > [ I see i386 also does PUT_CODE in a few more splitters, hrm. ] > > > > > > I think the splitters need to be fixed but I also think that > > > shallow_copy_rtx should > > > be enough, no? combine will not actually end

Re: [PATCH, ARM] Restrict pr65647 testcase to ARMv6-M effective target

2015-06-26 Thread Richard Earnshaw
On 26/06/15 09:45, Thomas Preud'homme wrote: > Hi, > > Testcase for PR65647 assumes that the compiler can compile for ARMv6-M > which might not be the case if passing some extra options via > RUNTESTFLAGS (eg. -marm/-mcpu=cortex-a9). This patch restricts the > testcase to ARMv6-M effective targets

Re: Add .def file for public target instructions

2015-06-26 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, Jun 25, 2015 at 4:37 PM, H.J. Lu wrote: >> On Thu, Jun 25, 2015 at 4:00 PM, Andrew Pinski wrote: >>> On Thu, Jun 25, 2015 at 3:57 PM, H.J. Lu wrote: On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu wrote: > On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford >

  1   2   >