[PATCH] unify -posix/-pthread cpp handling for gnu-user targets

2015-05-28 Thread Mike Frysinger
Many Linux targets duplicate the cpp spec macros for turning -posix/-thread into the right defines. Some Linux targets forget to do this entirely and can be hard to notice. Add common definitions to the gnu headers (since these are really in relation to the C library) and drop the duplications

Re: [PATCH] Extend -fno-plt to normal non-PIC branches on x86

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 10:37:53AM -0700, H.J. Lu wrote: This patch extends -fno-plt to normal non-PIC calls on x86. -fno-plt works in 64-bit mode with the existing binutils. For 32-bit, we need the updated assembler and linker to support call/jmp *foo@GOT with a new relocation different

Re: debug mode maintenance patch

2015-05-28 Thread François Dumont
On 25/05/2015 20:41, Jonathan Wakely wrote: On 25/05/15 15:31 +0200, François Dumont wrote: Hi This is a patch to clean the debug mode code. I have introduced a new debug header, assertions.h, so that headers that only need _GLIBCXX_DEBUG_ASSERT do not have to include the big debug.h.

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
On 05/28/2015 04:42 PM, Jan Hubicka wrote: As for optimization changing type representation, I suppose one case is when function with varray type gets inlined and the array bound happens to be a different expression afterwards. We produce a new copy of the original type with different bounds

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree member;

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 12:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 11:42 AM, H.J. Lu hjl.to...@gmail.com wrote:

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 2:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 12:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam tmsri...@google.com wrote: On

Re: [PR65768] Check rtx_cost when propagating constant

2015-05-28 Thread Jeff Law
On 05/13/2015 11:46 PM, Kugan wrote: ping? Thanks, Kugan On 15/04/15 17:53, Kugan wrote: As mentioned in PR65768, ARM gcc generates suboptimal code for constant Uses in loop. Part of the reason is cprop is undoing what loop invariant code motion did. Zhenqiang posted a patch at to fix this

Re: [PR65768] Check rtx_cost when propagating constant

2015-05-28 Thread Jeff Law
I've CC'd Ilya as he's been looking at related issues in the x86 backend, but from the other direction and I think he ought to be aware of the interactions of this potential change and his work. In particular depending on the costing in the x86 backend we may see fewer propagations of GOTOFF

Re: [PATCH, PR target/65103, 2/3] Propagate address constants into loops for i386

2015-05-28 Thread Jeff Law
On 05/05/2015 05:05 AM, Ilya Enkovich wrote: 2015-04-21 8:52 GMT+03:00 Jeff Law l...@redhat.com: On 04/17/2015 02:34 AM, Ilya Enkovich wrote: On 15 Apr 14:07, Ilya Enkovich wrote: 2015-04-14 8:22 GMT+03:00 Jeff Law l...@redhat.com: On 03/15/2015 02:30 PM, Richard Sandiford wrote: Ilya

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 04:42 PM, Jan Hubicka wrote: As for optimization changing type representation, I suppose one case is when function with varray type gets inlined and the array bound happens to be a different expression afterwards. We produce a new copy of the original type with different bounds

arm memcpy of aligned data

2015-05-28 Thread Mike Stump
So, the arm memcpy code of aligned data isn’t as good as it can be. void *memcpy(void *dest, const void *src, unsigned int n); void foo(char *dst, int i) { memcpy (dst, i, sizeof (i)); } generates horrible code, but, it we are willing to notice the src or the destination are aligned, we can

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 2:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 12:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On

Re: [PATCH, FT32] initial support

2015-05-28 Thread Eric Botcazou
Thanks very much. ChangeLog entry: 2015-05-14 James Bowman james.bow...@ftdichip.com * configure.ac: FT32 target added * libgcc/config.host: FT32 target added * gcc/config/ft32/: FT32 target added * libgcc/config/ft32/: FT32 target added *

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
hello, only providing you the testcase why I need transitive closure of contains pointer via the extra child I noticed that there is extra symmetry to handle: struct a {void *ptr;} char **ptr = (char **)a.ptr; ptr = ... This one doesn't really fly with my extra subset code,

Re: [patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Jason Merrill
OK, thanks. Jason

[patch] libstdc++/66327 don't pass null pointers to memcmp

2015-05-28 Thread Jonathan Wakely
std::equal((int*)0, (int*)0, p) and std::equal(p, p, (int*)0) are valid for any input iterator p, and must not pass a null pointer to memcpy. Similarly, std::lexicographical_compare((int*)0, (int*)0, p, q) and std::lexicographical_compare(p, q, (int*)0, (int*)0) are valid for any input iterators

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Trevor Saunders
On Thu, May 28, 2015 at 08:47:16PM +0200, Martin Liška wrote: On 05/28/2015 08:03 PM, Jakub Jelinek wrote: On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: But we've been trying to avoid this. And the jit might not be too happy about it either. Yeah, we should certainly try

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 12:05 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 11:42 AM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam tmsri...@google.com wrote:

Re: fix pr65369.c testcase

2015-05-28 Thread DJ Delorie
Done. Thanks!

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + determine anscestry later. */ ancestry Fixed. +static bool early_dwarf_dumping; Sorry for the late bikeshedding, but dumping suddently strikes me as odd, since there is no output as with

Re: [patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Eric Botcazou
This patch restores bootstrap on i386-*-freebsd*. The build was failing after the introduction of -std=c++98 configure/build flag. The -std=c++98 enables strict_ansi and on FreeBSD the libc function atoll is not defined for this. Solaris (x86 and SPARC) is also broken in various ways: for

[PATCH] Extend -fno-plt to normal non-PIC branches on x86

2015-05-28 Thread H.J. Lu
This patch extends -fno-plt to normal non-PIC calls on x86. -fno-plt works in 64-bit mode with the existing binutils. For 32-bit, we need the updated assembler and linker to support call/jmp *foo@GOT with a new relocation different from R_386_GOT32 to indicate that this relocation applies to

Re: [PATCH 3/4, libitm, sh]: Change gtm_futex_{wait,wake} to int

2015-05-28 Thread Uros Bizjak
On Thu, May 28, 2015 at 12:52 AM, Kaz Kojima kkoj...@rr.iij4u.or.jp wrote: * config/linux/sh/futex_bits.h (sys_futex0) Change operands op and val to int. Untested. OK for mainline? OK. Although it looks obvious, I've confirmed that there is no build issue/regression on

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Richard Biener
On May 28, 2015 7:06:36 PM GMT+02:00, Jeff Law l...@redhat.com wrote: On 05/28/2015 04:42 AM, David Malcolm wrote: Am I right in thinking that this is a statically-allocated object with a non-trivial constructor? i.e. that this constructor has to run before main is entered? Do our coding

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: But we've been trying to avoid this. And the jit might not be too happy about it either. Yeah, we should certainly try to avoid them, especially if it would affect many variables having to be constructed. Jakub

Re: [PATCH][ARM/AArch64 Testsuite] Cleanup advsimd-intrinsics.exp, removing unnecessary loop

2015-05-28 Thread Christophe Lyon
On 28 May 2015 at 18:45, Alan Lawrence alan.lawre...@arm.com wrote: I've tested this on aarch64, aarch64_be, and arm, and in all cases, the same tests are executed (whether running the whole advsimd-intrinsics.exp, or manually specifying a single file). AFAICT the loop, explicit

Re: [PATCH, RFC] New memory usage statistics infrastructure

2015-05-28 Thread Jeff Law
On 05/28/2015 06:29 AM, Martin Liška wrote: Hello. Thank you for pointing about missing copyright. Following patch adds that. Ready for trunk? Yes. jeff

Re: [Patch, fortran, PR44672, v6] [F08] ALLOCATE with SOURCE and no array-spec

2015-05-28 Thread Mikael Morin
Le 28/05/2015 17:29, Andre Vehreschild a écrit : *** resolve_allocate_expr (gfc_expr *e, gfc_ *** 7103,7112 --- 7103,7123 if (!ref2 || ref2-type != REF_ARRAY || ref2-u.ar.type == AR_FULL || (dimension ref2-u.ar.dimen == 0)) { + /* F08:C633. */

Re: [PATCH v3] libiberty: cleanup Makefile.in

2015-05-28 Thread Bernhard Reutner-Fischer
On 28 May 2015 at 17:48, Ian Lance Taylor i...@google.com wrote: On Thu, May 28, 2015 at 1:57 AM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: +stamp-pic-ofiles: $(CFILES:%=$(srcdir)/%) To the best of my knowledge, in POSIX make variable substitutions of this form do not recognize

Re: [PATCH 01/35] Introduce new type-based pool allocator.

2015-05-28 Thread Jeff Law
On 05/28/2015 06:49 AM, Martin Liška wrote: . This mechanism has been just adapted. I find it quite useful as we have examples in source code where we allocate same struct/class types from a various pool. For debugging purpose, it helps to identify if release operation is called for a correct

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Martin Liška
On 05/28/2015 08:03 PM, Jakub Jelinek wrote: On Thu, May 28, 2015 at 07:57:39PM +0200, Richard Biener wrote: But we've been trying to avoid this. And the jit might not be too happy about it either. Yeah, we should certainly try to avoid them, especially if it would affect many variables

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree member; + for (member = TYPE_FIELDS (type);

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Jeff Law
On 05/28/2015 04:42 AM, David Malcolm wrote: Am I right in thinking that this is a statically-allocated object with a non-trivial constructor? i.e. that this constructor has to run before main is entered? Do our coding guidelines allow for this? (I've been burned by this before, on a buggy

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam tmsri...@google.com wrote: I have attached a patch that adds the new attribute noplt. Please review. * config/i386/i386.c (avoid_plt_to_call): New function. (ix86_output_call_insn): Generate indirect call for functions marked with noplt

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
I have attached a patch that adds the new attribute noplt. Please review. * config/i386/i386.c (avoid_plt_to_call): New function. (ix86_output_call_insn): Generate indirect call for functions marked with noplt attribute. (attribute_spec ix86_attribute_): Define new attribute noplt. *

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 11:42 AM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam tmsri...@google.com wrote: I have attached a patch that adds the new attribute noplt. Please review. * config/i386/i386.c (avoid_plt_to_call): New function.

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 11:50 AM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 11:42 AM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam tmsri...@google.com wrote: I have attached a patch that adds the new attribute noplt. Please

Re: [PATCH] Optimize (CST1 A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Marek Polacek wrote: This PR points out that we weren't able to optimize 1 x == 2 to just x == 1. Side note: if we are looking for extra patterns to simplify, llvm has an almost unlimited supply. Here are a few we don't seem to have (there are more where those came

[patch] fix bootstrap on FreeBSD i386/arm

2015-05-28 Thread Andreas Tobler
All, This patch restores bootstrap on i386-*-freebsd*. The build was failing after the introduction of -std=c++98 configure/build flag. The -std=c++98 enables strict_ansi and on FreeBSD the libc function atoll is not defined for this. But the configure always stated atoll available. A

Re: [CHKP, PATCH] Fix instrumented indirect calls with propagated pointers

2015-05-28 Thread Jan Hubicka
2015-04-14 Ilya Enkovich ilya.enkov...@intel.com PR target/65527 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Add redirection for instrumented calls. * lto-wrapper.c (merge_and_complain): Merge -fcheck-pointer-bounds.

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread Sriraman Tallam
On Thu, May 28, 2015 at 2:52 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 2:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 1:54 PM, Sriraman Tallam tmsri...@google.com wrote: On

[expmed] Avoid clobbering a yet-to-be-used base/index register.

2015-05-28 Thread DJ Delorie
20040625-1 fails on targets with pointers bigger than WORD_SIZE (rl78, msp430/-mlarge) because the base register is clobbered, partially rebuilt with the new value, then used as a base for the second part of the calculation. Ok? * expmed.c (extract_bit_field_1): Avoid clobbering a

Re: [RFC][PATCH][X86_64] Eliminate PLT stubs for specified external functions via -fno-plt=

2015-05-28 Thread H.J. Lu
On Thu, May 28, 2015 at 4:54 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 2:52 PM, H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 28, 2015 at 2:27 PM, Sriraman Tallam tmsri...@google.com wrote: On Thu, May 28, 2015 at 2:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
Looks good. Jason

Re: Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread Trevor Saunders
On Thu, May 28, 2015 at 06:42:57AM -0400, David Malcolm wrote: On Wed, 2015-05-27 at 15:56 +0200, mliska wrote: gcc/ChangeLog: 2015-04-30 Martin Liska mli...@suse.cz * ira-color.c (init_update_cost_records): Use new type-based pool allocator. (get_update_cost_record):

Re: [CHKP, PATCH] Fix LTO cgraph merge for instrumented functions

2015-05-28 Thread Jan Hubicka
Ping I am really sorry for ignoring this so long - I would like to reorg the code and replace instrumentaiton thunks by the notion of transparent aliases, but did not have time to do that yet. Have quite busy time now. 2015-04-14 Ilya Enkovich ilya.enkov...@intel.com * ipa.c

Re: [debug-early] fix problem with template parameter packs

2015-05-28 Thread Richard Biener
On Wed, May 27, 2015 at 9:34 PM, Jason Merrill ja...@redhat.com wrote: OK, I see the issue. We're calling debug_abstract_function to build debug info for the abstract instance of a function that we already built from dwarf2out_early_global_decl. It occurs to me that the early-dwarf work

Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-05-28 Thread Bernhard Reutner-Fischer
On 3 February 2015 at 01:07, Mike Stump mikest...@comcast.net wrote: On Feb 2, 2015, at 3:22 PM, Bernhard Reutner-Fischer rep.dot@gmail.com wrote: Untested draft patch I looked it over, seems to slot in nicely. + gfc_error (%GCC unroll% directive does not commence a loop at

Re: fix pr65369.c testcase

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 7:11 AM, DJ Delorie d...@redhat.com wrote: Copied the way other tests get uint32_t. Ok? Ok. * gcc.c-torture/execute/pr65369.c: Don't assume int is 32 bits. Index: gcc.c-torture/execute/pr65369.c

[PATCH v3] libiberty: cleanup Makefile.in

2015-05-28 Thread Bernhard Reutner-Fischer
* configure.ac (TARGETLIB_PIC, TARGETLIB_NOASAN): New variables. * configure: Regenerate. * maint-tool: Refactor pic/ and noasan/ handling. * Makefile.in: Likewise. Regenerate dependencies. --- The below does the same but attempts to be limited to what POSIX

[PATCH] auto-wipe dump files, part1, manual stuff

2015-05-28 Thread Bernhard Reutner-Fischer
Ontop of this patch you would have to git grep -l -E (cleanup-.*-dump|cleanup-saved-temps) \ | egrep -v (ChangeLog|/lib/) \ | sed -e s|[^/]*$|| | sort | uniq \ | while read d; do find $d -type f -exec \ sed -i -e /cleanup-[^-]*[-]*dump/d;/cleanup-saved-temps/d {} + done --- I had to

[PATCH] Refactor vectorizer cost model

2015-05-28 Thread Richard Biener
This refactors the vectorizer cost model to call it when everything is ready, avoiding some fixups. It also fixes cost compute for SLP reductions. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-05-28 Richard Biener rguent...@suse.de * tree-vectorizer.h

Commit: RX: Better use of PUSHM and POPM

2015-05-28 Thread Nick Clifton
Hi Guys, I am applying the patch below to enhance the RX backend so that it will push and pop multiple groups of registers using the PUSHM and POPM instructions, thus reducing code size and increasing performance. Cheers Nick gcc/ChangeLog 2015-05-28 Nick Clifton ni...@redhat.com

Re: [patch] libjava signal handling for FreeBSD (amd64/i386)

2015-05-28 Thread Andrew Haley
On 27/05/15 20:53, Andreas Tobler wrote: Is this ok for trunk? Excellent, thanks. Andrew.

[Ada] Speed improvements for controlled types

2015-05-28 Thread Arnaud Charlet
This patch changes the implementation of controlled types so that in simple cases, they are just as efficient as noncontrolled types where initialization and cleanup is done by hand. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-05-27 Bob Duff d...@adacore.com * exp_ch3.adb

[Ada] Visibility error of selected component in instance body

2015-05-28 Thread Arnaud Charlet
This patch fixes a spurious visibility error on a selected component in an instance body, when the type of the prefix of the selected component is an actual of the instance, and the desired component is inherited through one or more derivations The package derived.ads below must compile quietly:

Statically-allocated objects with non-trivial ctors (was Re: [PATCH 33/35] Change use to type-based pool allocator in ira-color.c.)

2015-05-28 Thread David Malcolm
On Wed, 2015-05-27 at 15:56 +0200, mliska wrote: gcc/ChangeLog: 2015-04-30 Martin Liska mli...@suse.cz * ira-color.c (init_update_cost_records): Use new type-based pool allocator. (get_update_cost_record): Likewise. (free_update_cost_record_list): Likewise.

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-28 Thread Christophe Lyon
On 28 May 2015 at 12:22, Alan Lawrence alan.lawre...@arm.com wrote: Christophe Lyon wrote: On 26 May 2015 at 18:25, Alan Lawrence alan.lawre...@arm.com wrote: I don't see this symptom - I am able to execute such subsets with either my, or Sandra's, advsimd-intrinsics.exp. I didn't try to

[gomp4, committed] Remove superfluous main in kernels-loop-n.c

2015-05-28 Thread Tom de Vries
Hi, this patch removes a superfluous main function from a test-case. Committed. Thanks, - Tom Remove superfluous main in kernels-loop-n.c 2015-05-27 Tom de Vries t...@codesourcery.com * c-c++-common/goacc/kernels-loop-n.c (main): Remove. diff --git

[gomp4, committed] Enable parallelization of kernels-loop-n.c

2015-05-28 Thread Tom de Vries
Hi, I've committed this patch. It enables parallelization of the kernels-loops-n.c testcase. This is now possible, due the commit of the fix for PR65637 to the gomp-4_0-branch ( https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01569.html ). Thanks, - Tom Enable parallelization of

Re: [Patch AArch64] PR target/66200 - gcc / libstdc++ TLC for weak memory models.

2015-05-28 Thread James Greenhalgh
On Wed, May 20, 2015 at 02:58:09PM +0100, Ramana Radhakrishnan wrote: Hi, Someone privately pointed out that the ARM and AArch64 ports do not define TARGET_RELAXED_ORDERING given that the architecture(s) mandates a weak memory model. This patch fixes it for AArch64, the ARM patch

Re: [PATCH] Fix PR66142

2015-05-28 Thread Richard Biener
On Wed, 27 May 2015, Kyrill Tkachov wrote: Hi Richard, On 26/05/15 14:54, Richard Biener wrote: The following fixes the testcase in PR66142 Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-05-26 Richard Biener rguent...@suse.de

Re: [PATCH, RFC] New memory usage statistics infrastructure

2015-05-28 Thread Thomas Schwinge
Hi! On Fri, 15 May 2015 16:38:40 +0200, Martin Liška mli...@suse.cz wrote: Following patch attempts to rewrite memory reports for GCC's internal allocations [...] (Got commtited to trunk in r223748.) * hash-map-traits.h: New file. In that one you added a copyright/licensing header,

Re: [Patch V2]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Tristan Gingold
Hello, #define BACKTRACE_SUPPORTS_THREADS @BACKTRACE_SUPPORTS_THREADS@ + +/* BACKTRACE_SUPPORTS_DATA will be #defined'd as 1 if the backtrace library + also handles data symbols, 0 if not. */ + +#define BACKTRACE_SUPPORTS_DATA @BACKTRACE_SUPPORTS_DATA@ End users are expected to read

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-28 Thread Alan Lawrence
Christophe Lyon wrote: On 26 May 2015 at 18:25, Alan Lawrence alan.lawre...@arm.com wrote: I don't see this symptom - I am able to execute such subsets with either my, or Sandra's, advsimd-intrinsics.exp. I didn't try to run with your patch, I thought it was an oversight of yours. Sorry,

[PATCH] Simple fix to enhance outer-loop vectorization.

2015-05-28 Thread Yuri Rumyantsev
Hi All, Here is a simple patch which removes restriction on outer-loop vectorization - allow references in inner-loop with zero step. This case was found in one important benchmark. Bootstrap and regression testing did not show any new failures. Is it OK for trunk. ChangeLog: 2015-05-28 Yuri

Re: acc_on_device for device_type_host_nonshm

2015-05-28 Thread H.J. Lu
On Thu, May 21, 2015 at 4:10 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, May 21, 2015 at 01:02:12PM +0200, Thomas Schwinge wrote: Hi! On Thu, 7 May 2015 19:32:26 +0100, Julian Brown jul...@codesourcery.com wrote: Here's a new version of the patch [...] OK for trunk? Makes sense

[patch] libstdc++/65352 fix ubsan errors in std::arrayT, 0

2015-05-28 Thread Jonathan Wakely
Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::arrayT, 0 anyway. Tested powerpc64le-linux, committed to trunk. commit 0d999cf16b8f6a0d9bbf4bfe96b29e7b73a259e4 Author: Jonathan

[gomp4] Expand OpenACC thread builtins inline

2015-05-28 Thread Julian Brown
For partitioned loops, we're currently calling library functions (in libgcc) to determine the cardinality of the set of threads a particular loop is distributed over (given a set of gang/worker/vector toggles), and the index of the current thread within that set. This patch reimplements those two

Re: [patch] testsuite enable PIE tests on FreeBSD

2015-05-28 Thread Thomas Schwinge
Hi! On Wed, 20 May 2015 14:30:38 -0600, Jeff Law l...@redhat.com wrote: On 05/20/2015 11:04 AM, Andreas Tobler wrote: the attached patch enables some PIE tests on FreeBSD. Wouldn't it be better to remove the target selector and instead add: /* { dg-require-effective-target pie } */ In

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Tristan Gingold
On 27 May 2015, at 15:36, Jeff Law l...@redhat.com wrote: +static int +coff_is_symbol (const b_coff_internal_symbol *isym) +{ + return isym-type == 0x20 isym-sec 0; +} You probably want const or enum so that you can have a symbolic name rather than 0x20 here. It also seems like the

Re: [PATCH/RFC] Make loop-header-copying more aggressive, rerun before tree-if-conversion

2015-05-28 Thread Richard Biener
On Fri, May 22, 2015 at 5:42 PM, Alan Lawrence alan.lawre...@arm.com wrote: This example which I wrote to test ifconversion, currently fails to if-convert or vectorize: int foo () { for (int i = 0; i 32 ; i++) { int m = (a[i] i) ? 5 : 4; b[i] = a[i] * m; } }

Re: [PATCH] Fix PR66142

2015-05-28 Thread Andreas Schwab
Richard Biener rguent...@suse.de writes: * gcc.dg/tree-ssa/ssa-fre-44.c: New testcase. On ia64: $ grep -c return 3.0 ssa-fre-44.c.035t.fre1 3 $ tail ssa-fre-44.c.035t.fre1 _19 = _8-u.x; _23 = _8-u.y; f_24 = _19 + _23; bar (p); p ={v} {CLOBBER}; return f_24; } Andreas.

Re: [Patch AArch64] PR target/66200 - gcc / libstdc++ TLC for weak memory models.

2015-05-28 Thread James Greenhalgh
On Thu, May 21, 2015 at 09:54:19AM +0100, Ramana Radhakrishnan wrote: And here's an additional patch for the testsuite which was missed in the original posting. This is a testism that's testing code generation as per TARGET_RELAXED_ORDERING being false and therefore needs to be adjusted

Re: [PATCH] Simple fix to enhance outer-loop vectorization.

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 1:00 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi All, Here is a simple patch which removes restriction on outer-loop vectorization - allow references in inner-loop with zero step. This case was found in one important benchmark. Bootstrap and regression testing

Re: [Patch]: libbacktrace - add support of PE/COFF

2015-05-28 Thread Tristan Gingold
On 28 May 2015, at 02:26, Ian Lance Taylor i...@google.com wrote: The #include windows.h will break cross-compilers. It's not OK for trunk until that is fixed. I am confused by this comment, for two reasons: - I don’t see how that would break cross-compilers. Cross compilers hosted on

Re: [PATCH 13/14][ARM/AArch64 testsuite] Use gcc-dg-runtest in advsimd-intrinsics.exp

2015-05-28 Thread Christophe Lyon
On 28 May 2015 at 13:32, Christophe Lyon christophe.l...@linaro.org wrote: On 28 May 2015 at 12:22, Alan Lawrence alan.lawre...@arm.com wrote: Christophe Lyon wrote: On 26 May 2015 at 18:25, Alan Lawrence alan.lawre...@arm.com wrote: I don't see this symptom - I am able to execute such

Re: [PATCH, RFC] New memory usage statistics infrastructure

2015-05-28 Thread Martin Liška
On 05/28/2015 01:15 PM, Thomas Schwinge wrote: Hi! On Fri, 15 May 2015 16:38:40 +0200, Martin Liška mli...@suse.cz wrote: Following patch attempts to rewrite memory reports for GCC's internal allocations [...] (Got commtited to trunk in r223748.) * hash-map-traits.h: New file.

Re: [PATCH v2] Handle OS X deployment targets correctly

2015-05-28 Thread Mike Stump
On May 20, 2015, at 2:57 PM, Lawrence Velázquez v...@larryv.me wrote: 2015-05-15 Lawrence Velázquez v...@larryv.me PR target/63810 * gcc/config/darwin-c.c (version_components): New global enum. (parse_version, version_as_legacy_macro) (version_as_modern_macro,

Re: [patch] Make std::string default constructor conditionally noexcept

2015-05-28 Thread Jonathan Wakely
On 13/05/15 14:36 +0100, Jonathan Wakely wrote: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2455 Voted into the WP in Lenexa. We already did the right thing for vector, so only basic_string needs to change. Tested powerpc64le-linux, committed to trunk. Also committed

Re: [patch] libstdc++/65352 fix ubsan errors in std::arrayT, 0

2015-05-28 Thread Jonathan Wakely
On 28/05/15 12:53 +0100, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::arrayT, 0 anyway. Tested powerpc64le-linux, committed to trunk. And gcc-5-branch.

Re: [patch] Rename template parameter of std::__alloc_rebind

2015-05-28 Thread Jonathan Wakely
On 01/05/15 16:23 +0100, Jonathan Wakely wrote: The name of this alias template is a copypaste error, it should be _Alloc. Tested powerpc64le-linux, committed to trunk. Also committed to gcc-5-branch. commit a772309ec9fc300e57edd750fa32b8320d68004a Author: Jonathan Wakely jwak...@redhat.com

Re: acc_on_device for device_type_host_nonshm

2015-05-28 Thread Julian Brown
On Thu, 28 May 2015 04:48:58 -0700 H.J. Lu hjl.to...@gmail.com wrote: On Thu, May 21, 2015 at 4:10 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, May 21, 2015 at 01:02:12PM +0200, Thomas Schwinge wrote: Hi! On Thu, 7 May 2015 19:32:26 +0100, Julian Brown jul...@codesourcery.com

Re: [PATCH] Optimize (CST1 A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 02:15:45PM +0200, Marek Polacek wrote: This PR points out that we weren't able to optimize 1 x == 2 to just x == 1. This is my attempt to fix that: if we see (CST1 A) == CST2 and CST2 is a multiple of CST1, use log2 to get rid of the shift, but only if the result of

Re: [PATCH 01/35] Introduce new type-based pool allocator.

2015-05-28 Thread Martin Liška
On 05/27/2015 07:44 PM, Jeff Law wrote: On 05/27/2015 07:56 AM, mliska wrote: Hello. Following patch set attempts to replace old-style pool allocator to a type-based one. Moreover, as we utilize classes and structs that are used just by a pool allocator, these types have overwritten ctors and

RE: [Patch MIPS] Enable TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS hook

2015-05-28 Thread Robert Suchanek
Hi Matthew, + +/* Implement TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS. */ + +static reg_class_t +mips_ira_change_pseudo_allocno_class (int regno, reg_class_t +allocno_class) { + if (FLOAT_MODE_P (PSEUDO_REGNO_MODE (regno)) || allocno_class != ALL_REGS) +return allocno_class;

[PATCH][5/n] Reduction vectorization improvements

2015-05-28 Thread Richard Biener
The following patch fixes loop vectorization of SLP reduction chains that involve patterns. The issue here is that pattern recog runs after reduction detection and this screws things up. Re-ordering this created interesting side-effects so I didn't explore this further (for now) but instead fix

Re: [PATCH] Optimize (CST1 A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 2:15 PM, Marek Polacek pola...@redhat.com wrote: This PR points out that we weren't able to optimize 1 x == 2 to just x == 1. This is my attempt to fix that: if we see (CST1 A) == CST2 and CST2 is a multiple of CST1, use log2 to get rid of the shift, but only if the

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on

[PATCH] Optimize (CST1 A) == CST2 (PR tree-optimization/66299)

2015-05-28 Thread Marek Polacek
This PR points out that we weren't able to optimize 1 x == 2 to just x == 1. This is my attempt to fix that: if we see (CST1 A) == CST2 and CST2 is a multiple of CST1, use log2 to get rid of the shift, but only if the result of the shift is a natural number (including zero). If CST2 is not a

[Ada] Avoid use of secondary stack

2015-05-28 Thread Arnaud Charlet
This patch avoids the use of the secondary stack, and the corresponding cleanup handlers, in many cases. For example, access discriminants no longer force functions to return on the secondary stack. This is a speed improvement. It is particularly relevant to the Ada.Containers. Tested on

Re: [patch] libstdc++/65352 fix ubsan errors in std::arrayT, 0

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::arrayT, 0 anyway. Should return *static_cast_Tp*(nullptr); be replaced with

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
Hi, here is updated version of patch. It makes alias_set_subset_of to be symmetric for ptr_type_node and other pointer type and moves the logic of creating subsets to get_alias_set. I tested that perlbmk works when built at -O3 x86_64 Bootstrapped/regtested x86_64-linux, OK? Honza *

Re: [patch] libstdc++/65352 fix ubsan errors in std::arrayT, 0

2015-05-28 Thread Jonathan Wakely
On 28/05/15 14:38 +0100, Jonathan Wakely wrote: On 28/05/15 15:26 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid

Re: [patch] libstdc++/65352 fix ubsan errors in std::arrayT, 0

2015-05-28 Thread Jonathan Wakely
On 28/05/15 15:26 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Unsurprisingly ubsan doesn't like referencing a null pointer. With this change __array_traits::_S_ref is only used to access an element, which is invalid for std::arrayT, 0 anyway. Should return

Re: [gomp4] Preserve NVPTX reconvergence points

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 4:06 PM, Julian Brown jul...@codesourcery.com wrote: For NVPTX, it is vitally important that the divergence of threads within a warp can be controlled: in particular we must be able to generate code that we know reconverges at a particular point. Unfortunately GCC's

PATCH: Mention --enable-default-pie in gcc-6/changes.html

2015-05-28 Thread H.J. Lu
OK to install? H.J. --- Index: gcc-6/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.10 diff -u -p -r1.10 changes.html --- gcc-6/changes.html 26 May 2015 10:12:08 - 1.10 +++

[PATCH, libgomp, x86]: Optimize i386 futex_wake syscall

2015-05-28 Thread Uros Bizjak
Hello! This patch avoids unnecessary clearing of 4th argument for futex_wake syscall for 32bit targets. 2015-05-28 Uros Bizjak ubiz...@gmail.com * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function. (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0.

  1   2   >