Re: Fix PR43404, PR48470, PR64744 ICE on naked functions

2015-06-26 Thread Alexander Basov
2015-06-25 21:47 GMT+03:00 Jeff Law l...@redhat.com: On 06/03/2015 02:15 PM, Alexander Basov wrote: Hello Jeff, please find updated patch attached diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b190f91..c6db8a9 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1382,7 +1382,15

Re: Add .def file for public target instructions

2015-06-26 Thread Markus Trippelsdorf
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. (genprogrtl): Add target-def. * target-insns.def,

C PATCH to use INDIRECT_REF_P

2015-06-26 Thread Marek Polacek
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? 2015-06-25 Marek Polacek pola...@redhat.com * array-notation-common.c (find_rank): Use INDIRECT_REF_P. * c-common.c (c_fully_fold_internal):

C PATCH to use VECTOR_TYPE_P

2015-06-26 Thread Marek Polacek
This patch makes the C FE use the VECTOR_TYPE_P macro where appropriate. The existing code in the last build_binary_op hunk was really weird... Now the question is: do we want e.g. ARRAY_TYPE_P, etc.? Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-06-26 Marek Polacek

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

2015-06-26 Thread Eric Botcazou
The muser-mode flag causes the CASA instruction for LEON3 to use the user mode ASI. This is the correct behavior for almost all LEON3 targets. 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?

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

2015-06-26 Thread Marek Polacek
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's in the latter pattern than usual. Bootstrapped/regtested on

Re: Add .def file for public target instructions

2015-06-26 Thread Richard Sandiford
H.J. Lu hjl.to...@gmail.com writes: On Thu, Jun 25, 2015 at 4:37 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Jun 25, 2015 at 4:00 PM, Andrew Pinski pins...@gmail.com wrote: On Thu, Jun 25, 2015 at 3:57 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu

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: [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 up generating

Re: [PATCH] Use leon3 target for native LEON on Linux

2015-06-26 Thread Eric Botcazou
2015-06-23 Daniel Cederman ceder...@gaisler.com * config/sparc/driver-sparc.c: map /proc/cpuinfo with CPU LEON to leon3 OK for mainline and 5 branch (and 4.9 branch once it reopens), but the ChangeLog entry should be: * config/sparc/driver-sparc.c (cpu_names): Map

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

2015-06-26 Thread Richard Biener
On Thu, 25 Jun 2015, Richard Biener wrote: This shows up in gcc.dg/tree-ssa/reassoc-13.c where the 'reassoc:' case in fold_binary happily handles floats if flag_associative_math. Thus here, too. Bootstrap regtest ongoing on x86_64-unknown-linux-gnu. Applied with the additional

[committed] Use VAR_OR_FUNCTION_DECL_P

2015-06-26 Thread Marek Polacek
As Uros pointed out. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-06-26 Marek Polacek pola...@redhat.com * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P. diff --git gcc/c-family/c-common.c gcc/c-family/c-common.c index 73d0c7f..b11a756 100644 ---

Re: Add .def file for public target instructions

2015-06-26 Thread Richard Sandiford
Markus Trippelsdorf mar...@trippelsdorf.de 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. (genprogrtl):

[PATCH GCC][obvious]Don't reset ssa_name infor in struct iv.

2015-06-26 Thread Bin Cheng
Hi, I applied a patch before to keep ssa_name information in struct iv. Seems this function somehow slipped away. Will apply it to trunk. Thanks, bin 2015-06-26 Bin Cheng bin.ch...@arm.com * tree-ssa-loop-ivopts.c (record_sub_use): Don't reset ssa_name field in struct iv.

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

2015-06-26 Thread Uros Bizjak
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 up generating more references to the original RTX so we won't end up with invalid

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

2015-06-26 Thread Eric Botcazou
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 them? -- Eric Botcazou

Re: [C/C++ PATCH] Implement -Wshift-overflow (PR c++/55095) (take 3)

2015-06-26 Thread Marek Polacek
I'm pinging the C++ parts. On Fri, Jun 19, 2015 at 12:44:36PM +0200, Marek Polacek wrote: Ping. On Fri, Jun 12, 2015 at 11:07:29AM +0200, Marek Polacek wrote: Ping. On Fri, Jun 05, 2015 at 10:55:08AM +0200, Marek Polacek wrote: On Thu, Jun 04, 2015 at 09:04:19PM +, Joseph Myers

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

2015-06-26 Thread Thomas Preud'homme
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. Testsuite ChangeLog entry is as follows: 2015-06-25

[PATCH AArch64]Handle wrong cost for addition of minus immediate in aarch64_rtx_costs.

2015-06-26 Thread Bin Cheng
Hi, The canonical form of subtract of immediate is (add op0 minus_imm), which is supported with addsi3_aarch64 pattern on aarch64. Unfortunately wrong cost (8 rather than 4) is computed by aarch64_rtx_cost because it doesn't honor the fact that it actually is a sub instruction. This patch fixes

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 jiong.w...@arm.com 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 jiong.w...@arm.com gcc/ * config/aarch64/aarch64.md (tlsle_small): Rename to tlsle.

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

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

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 james.greenha...@arm.com *

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 kirill.yuk...@gmail.com 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. *

[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

[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

Re: [PATCH][Revised] Fix PR66509

2015-06-26 Thread H.J. Lu
On Fri, Jun 26, 2015 at 9:09 AM, Jack Howarth howarth.at@gmail.com 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

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Jeff Law l...@redhat.com writes: On 06/23/2015 08:57 AM, Richard Sandiford wrote: At

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Richard Sandiford richard.sandif...@arm.com writes: Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Jeff Law l...@redhat.com writes:

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 Richard Sandiford
Rainer Orth r...@cebitec.uni-bielefeld.de writes: Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Jeff Law l...@redhat.com writes: On 06/23/2015 08:57 AM, Richard Sandiford wrote: At this point all hash_map traits know what kind of key

Re: [PATCH][Revised] Fix PR66509

2015-06-26 Thread Mike Stump
On Jun 26, 2015, at 9:09 AM, Jack Howarth howarth.at@gmail.com 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);

[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) *

[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,

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 matthew.wa...@arm.com 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,

[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 jiong.w...@arm.com 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

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 jiong.w...@arm.com wrote: 2015-05-14 Jiong Wang jiong.w...@arm.com gcc/ * config/aarch64/aarch64.c (aarch64_print_operand): Support tls_size. * config/aarch64/aarch64.md (tlsle): Choose proper instruction sequences. (tlsle_mode): New

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 jiong.w...@arm.com wrote: 2015-05-19 Marcus Shawcroft marcus.shawcr...@arm.com Jiong Wang jiong.w...@arm.com gcc/ * config/aarch64/aarch64-protos.h (arch64_symbol_type): Rename SYMBOL_SMALL_TPREL to SYMBOL_TLSLE.

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 alan.lawre...@arm.com wrote: Sebastian Pop wrote: On Thu, Jun 25, 2015 at 4:43 AM, Richard Biener richard.guent...@gmail.com wrote: when the new scheme triggers vectorization cannot succeed on the result as we get if (cond) *p =

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Richard Sandiford
Rainer Orth r...@cebitec.uni-bielefeld.de writes: Jeff Law l...@redhat.com 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

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

2015-06-26 Thread Marcus Shawcroft
On 21 May 2015 at 17:44, Jiong Wang jiong.w...@arm.com 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

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Rainer Orth
Richard Sandiford richard.sandif...@arm.com writes: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Jeff Law l...@redhat.com 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

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 like

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

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 calling

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 l...@redhat.com 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

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 thinking

[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

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: [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.

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

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: [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: templateclass Arg, 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 =

[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

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

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

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 ja...@redhat.com

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_TYPE

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))) !=

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

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 ja...@redhat.com Date: Fri Jun 26 16:40:56 2015 -0400 PR c++/66684 * typeck2.c

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 use symbol

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 marc.gli...@inria.fr wrote: On Wed, 24 Jun 2015, Richard Biener wrote: On Wed, Jun 24, 2015 at 11:57 AM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Tue, Jun 23, 2015 at 11:27 PM, Marc

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:

[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 pola...@redhat.com * cp-array-notation.c (expand_sec_reduce_builtin): Use INDIRECT_REF_P. * cp-ubsan.c (cp_ubsan_check_member_access_r): Likewise. diff --git

[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

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 pola...@redhat.com * call.c (set_up_extended_ref_temp): Use VAR_P. *

Re: Add .def file for public target instructions

2015-06-26 Thread Richard Sandiford
Richard Sandiford richard.sandif...@arm.com writes: Markus Trippelsdorf mar...@trippelsdorf.de 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.

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 pola...@redhat.com * call.c: Use VECTOR_TYPE_P. * constexpr.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise.

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.

[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 ebotca...@adacore.com * gcc-interface/gigi.h (create_var_decl_1): Rename into... (create_var_decl): ...this. Add default value for last

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

2015-06-26 Thread Oleg Endo
On 26 Jun 2015, at 08:54, Oleg Endo oleg.e...@t-online.de 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

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 ramana.radhakrish...@foss.arm.com wrote: Benedikt, On 25/06/15 08:01, pins...@gmail.com wrote: On Jun 18, 2015, at 5:04 AM, Benedikt Huber benedikt.hu...@theobroma-systems.com wrote: arch64 offers the instructions frsqrte and

Re: [PATCH] 2015-06-15 Benedikt Huber benedikt.hu...@theobroma-systems.com

2015-06-26 Thread Andrew Pinski
On Thu, Jun 18, 2015 at 5:04 AM, Benedikt Huber benedikt.hu...@theobroma-systems.com 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.

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 l...@redhat.com 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

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

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 +++

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] 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

[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

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 #endif

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's in the

[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

[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

[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

[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 jiong.w...@arm.com wrote: Marcus Shawcroft writes: On 20 May 2015 at 11:21, Jiong Wang jiong.w...@arm.com wrote: gcc/ * config/aarch64/aarch64.md: (ldr_got_small_mode): Support new GOT relocation modifiers.

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 ja...@redhat.com 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 typename T

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 l...@redhat.com 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

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 kirill.yuk...@gmail.com 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/

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 james.greenha...@arm.com 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

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 jiong.w...@arm.com 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

Re: [12/12] Simplify uses of hash_map

2015-06-26 Thread Rainer Orth
Jeff Law l...@redhat.com 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

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

2015-06-26 Thread Marcus Shawcroft
On 26 June 2015 at 10:32, Jiong Wang jiong.w...@arm.com 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

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 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

[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

[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

[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

[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 rguent...@suse.de * fold-const.c (fold_binary_loc): Remove -A CMP -B - A CMP B and -A CMP CST - A CMP

  1   2   >