[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 * tree-vectorizer.h (struct _slp_insta

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 * config/r

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 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 should make > de

Re: fix pr65369.c testcase

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 7:11 AM, DJ Delorie 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 > === > --

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 * exp_ch3.adb (Build_Array_Init_

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

[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

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

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 wrote: > On Feb 2, 2015, at 3:22 PM, Bernhard Reutner-Fischer > wrote: >> Untested draft patch > > I looked it over, seems to slot in nicely. > > > + gfc_error ("% directive does not commence a loop at %C”); > > So, don’t like commence here. Does an

Re: [PATCH] Fix PR66142

2015-05-28 Thread Andreas Schwab
Richard Biener 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. -- Andreas S

[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 * c-c++-common/goacc/kernels-loop-n.c (main): Remove. diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-loop-n.c b/gcc/tes

[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 kernels-loop-

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 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, indeed I've just checked

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

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

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 > > * ira-color.c (init_update_cost_records): Use new type-based pool > allocator. > (get_update_cost_record): Likewise. > (free_update_cost_record_list): Likewise. > (finish_

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

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 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, but... >

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

[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 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 wrote: > Christophe Lyon wrote: >> >> On 26 May 2015 at 18:25, Alan Lawrence 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

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 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 did not show

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 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 >> wrote: >> > Here's a new version of the patch [...] >> >> > OK for trunk? >> >> Makes sense to me (with just a

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 expec

[patch] libstdc++/65352 fix ubsan errors in std::array

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::array anyway. Tested powerpc64le-linux, committed to trunk. commit 0d999cf16b8f6a0d9bbf4bfe96b29e7b73a259e4 Author: Jonathan Wakely

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

2015-05-28 Thread Tristan Gingold
> On 27 May 2015, at 15:36, Jeff Law 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 th

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 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; > } > } > > ...becaus

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

2015-05-28 Thread Tristan Gingold
> On 28 May 2015, at 02:26, Ian Lance Taylor wrote: > The #include 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 windows are not impacted

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

2015-05-28 Thread Mike Stump
On May 28, 2015, at 2:02 AM, Bernhard Reutner-Fischer wrote: > > Does anybody have a better suggestion? > > directive not at the start of a loop at %C > directive not followed by a loop at %C I prefer either of these. I have a slight preference for the first. > Mike, did you tweak the one or

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 wrote: > On 28 May 2015 at 12:22, Alan Lawrence wrote: >> Christophe Lyon wrote: >>> >>> On 26 May 2015 at 18:25, Alan Lawrence wrote: I don't see this symptom - I am able to execute such subsets with either my, or Sandra's, advsimd-in

[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

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

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 wrote: > 2015-05-15 Lawrence Velázquez > > PR target/63810 > * gcc/config/darwin-c.c (version_components): New global enum. > (parse_version, version_as_legacy_macro) > (version_as_modern_macro, macosx_version_as_macro): N

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 t

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

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::array anyway. Tested powerpc64le-linux, committed to trunk. And gcc-5-branch. co

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 copy&paste error, it should be _Alloc. Tested powerpc64le-linux, committed to trunk. Also committed to gcc-5-branch. commit a772309ec9fc300e57edd750fa32b8320d68004a Author: Jonathan Wakely Date: Fri May 1

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 res

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

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

[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 x86_64-pc

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

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" wrote: > On Thu, May 21, 2015 at 4:10 AM, Jakub Jelinek > 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 > >> wrote: > >> > Here's a new version of the pa

[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 x86_64-pc

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

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::array anyway. Should return *static_cast<_Tp*>(nullptr); be replaced with __builtin

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

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 for

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

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::array anyway. Should return *static_cast

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

2015-05-28 Thread Alan Lawrence
Christophe Lyon wrote: So in fact, except for the comment about '-w' it seems you initial patch was mostly OK, right? Well, my removing a bunch of that c-torture-init stuff, was what was causing the "-Og -g" variant to go missing, but apart from that, yes. --Alan

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

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Marc Glisse
On Thu, 28 May 2015, Jonathan Wakely wrote: Would there be a danger of an object compiled with gcc-5.1 that calls array::data() finding the _S_ref from an object compiled with gcc-5.2 and hitting the __builtin_unreachable in vali code? At -O0, maybe. To be safe you would need to give this _S_r

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Richard Biener
On Thu, 28 May 2015, Jan Hubicka wrote: > 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 > >

Re: backport the fixes of PR target/64011 and /61749 to 4.9 gcc

2015-05-28 Thread James Greenhalgh
On Wed, May 27, 2015 at 03:49:24AM +0100, weixiangyu wrote: > Hi, Hi, > The first patch backports the fix of PR > target/64011(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64011) to the 4.9 > branch from trunk r219717, I can't approve this patch to be backported, so please do not commit it witho

[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 * config/linux/x86/futex.h (sys_futex0) [!__x86_64__]: Remove function. (futex_wait) [!__x86_64__]: Use __asm operand instead of sys_futex0. (futex_wake)

[gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Julian Brown
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 middle-end optimisers can cause this property to be violated, which causes problems

Re: [PATCH] hppa-linux: add missing cpp specs

2015-05-28 Thread Mike Frysinger
On 27 May 2015 14:20, John David Anglin wrote: > On 2015-05-27 1:50 PM, Mike Frysinger wrote: > > since i'm not looped into gcc development normally, which branches are those > > currently ? naively reading gcc.gnu.org homepage makes me think none since > > they're labled "regression fixes" and af

Re: Do less generous pointer globbing in alias.c

2015-05-28 Thread Jan Hubicka
> > +alias_set_entry > > +init_alias_set_entry (alias_set_type set) > > +{ > > + alias_set_entry ase = ggc_cleared_alloc (); > > no need to use cleared_alloc if you also init ->is_pointer to false. OK, will update the patch. > > > + ase->alias_set = set; > > + ase->children > > += hash_map

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

2015-05-28 Thread Jonathan Wakely
On 28/05/15 15:52 +0200, Marc Glisse wrote: On Thu, 28 May 2015, Jonathan Wakely wrote: Would there be a danger of an object compiled with gcc-5.1 that calls array::data() finding the _S_ref from an object compiled with gcc-5.2 and hitting the __builtin_unreachable in vali code? At -O0, maybe

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 03:06:35PM +0100, Julian Brown 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 middle-end op

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Richard Biener
On Thu, May 28, 2015 at 4:06 PM, Julian Brown 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 middle-end optimisers

Re: [patch] libstdc++/65352 fix ubsan errors in std::array

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::array anyway. Tested powerpc64le-linux, committed to trunk. I forgot the debug and

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Thomas Schwinge
Hi! On Thu, 28 May 2015 16:20:11 +0200, Jakub Jelinek wrote: > On Thu, May 28, 2015 at 03:06:35PM +0100, Julian Brown wrote: > > [...] > I think the lowering of this already at ompexp time is premature Yes, we're aware of this "wart". :-| > I think much better would be to have a function attr

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-28 Thread Mikael Morin
Le 27/05/2015 23:09, Steve Kargl a écrit : > On Wed, May 27, 2015 at 06:24:25PM +0200, Mikael Morin wrote: >> Le 27/05/2015 16:07, Andre Vehreschild a ?crit : >>> Hi Paul, hi Mikael, >>> >>> about renaming the identifier emitted: I would like to keep it short. >>> Remember, >>> there is always a n

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-05-28 Thread Andre Vehreschild
On Thu, 28 May 2015 16:58:44 +0200 Mikael Morin wrote: > Le 27/05/2015 23:09, Steve Kargl a écrit : > > On Wed, May 27, 2015 at 06:24:25PM +0200, Mikael Morin wrote: > >> Le 27/05/2015 16:07, Andre Vehreschild a ?crit : > >>> Hi Paul, hi Mikael, > >>> > >>> about renaming the identifier emitted:

Re: [gomp4] Preserve NVPTX "reconvergence" points

2015-05-28 Thread Jakub Jelinek
On Thu, May 28, 2015 at 04:49:43PM +0200, Thomas Schwinge wrote: > > I think much better would be to have a function attribute (or cgraph > > flag) that would be set for functions you want to compile this way > > (plus a targetm flag that the targets want to support it that way), > > plus a flag in

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

2015-05-28 Thread Ian Lance Taylor
On Thu, May 28, 2015 at 5:01 AM, Tristan Gingold wrote: > >> On 28 May 2015, at 02:26, Ian Lance Taylor wrote: > >> The #include 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 c

Re: [PATCH] Don't combine param and return value copies

2015-05-28 Thread Segher Boessenkool
On Tue, May 26, 2015 at 04:37:46PM +0930, Alan Modra wrote: > On powerpc64le, modifying the way combine treats function parameters > and call arguments results in some regressions. > > For instance, this testcase from varasm.c > > extern int foo3 (void *, ...); > extern void foo4 (void *, const c

[Ada] Fix ICEs with function returning variable-sized type

2015-05-28 Thread Eric Botcazou
This fixes various cases of a common pattern that would result in an ICE in the gimplifier because it is trying to create a temporary of variable size. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcazou * gcc-interface/gigi.h (gnat_stabilize_reference): A

[gomp4, committed, PR65419] Add IFN_GOACC_DATA_END_WITH_ARG

2015-05-28 Thread Tom de Vries
Hi, this patch fixes PR65419. Consider this test-case: ... void f (void) { int i; #pragma acc data copyout (i) { } } ... When compiling the oacc data region, the start and end are marked with GOACC_data_start and GOACC_data_end: ... .omp_data_arr.1.i = &i; GOACC_data_start (-1, 1,

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

2015-05-28 Thread Andre Vehreschild
Hi Mikael, thanks for the comments so far. > I don't understand why one of your previous patches was factoring the > source expression evaluation to a temporary in gfc_trans_allocate, and > now with this patch you do the same thing in gfc_resolve_allocate, not > reusing the part in gfc_trans_allo

[Ada] Tidy up gnat_pushdecl

2015-05-28 Thread Eric Botcazou
And more precisely the block of code at the end responsible for setting the name of types and creating associated typedefs if necessary. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcazou * gcc-interface/utils.c (gnat_pushdecl): Reunify the handling of ar

[Ada] Fix bogus Constraint_Error raised for Max_Size_In_Storage_Elements

2015-05-28 Thread Eric Botcazou
We raise bogus Constraint_Error for the Max_Size_In_Storage_Elements attribute applied to unconstrained array types and types derived from them. This very likely was introduced when sizetype was changed to unsigned. Tested on x86_64-suse-linux, applied on the mainline. 2015-05-28 Eric Botcaz

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

2015-05-28 Thread Ian Lance Taylor
On Thu, May 28, 2015 at 1:57 AM, Bernhard Reutner-Fischer wrote: > > +stamp-pic-ofiles: $(CFILES:%=$(srcdir)/%) To the best of my knowledge, in POSIX make variable substitutions of this form do not recognize % specially. In POSIX make this kind of substitution can only be used to change the file

Re: [Ada] Avoid use of secondary stack

2015-05-28 Thread Eric Botcazou
> 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. It also unc

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

2015-05-28 Thread Yuri Rumyantsev
Richard, First of all, I don't think that it is possible to write out test for outer-loop vectorization with zero-step reference because of possible loop-carried dependencies and run-time aliasing is not supported for outer-loop. If there are no such dependencies pre or pdse does hoisting (sinking

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

2015-05-28 Thread Alan Lawrence
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 runtest_file_p, and gcc_set_parallelization_enable, all stem from a point where we w

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

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

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

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

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, 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)) > { > + /* F0

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

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

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

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". * doc/ex

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 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" attribute. > (at

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 havin

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 wrote: > On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam 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 c

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); memb

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 wrote: > On Thu, May 28, 2015 at 11:42 AM, H.J. Lu wrote: >> On Thu, May 28, 2015 at 11:34 AM, Sriraman Tallam >> wrote: >>> I have attached a patch that adds the new attribute "noplt". Please review. >>> >>> * config/i386/i386.c (avoid_plt_to_

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 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 > runtest_file_p, and gcc_set_para

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 fr

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

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 ce

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

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

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.

  1   2   >