Re: [RFC] Do not consider volatile asms as optimization barriers #1

2014-03-11 Thread Hans-Peter Nilsson
On Mon, 3 Mar 2014, Richard Sandiford wrote: AIUI: Reading back the references don't yield any dissenting flash-backs, FWIW. So, a (use fp) then a (clobber fp)? That was probably just too weird for me to think of, much like a hypercorrect ending of the previous clause. :) Thanks for dealing

[Build, Driver] Add -lcilkrts for -fcilkplus

2014-03-11 Thread Tobias Burnus
When using Cilk Plus (-fcilkplus), it makes sense to automatically link the run-time library (-lcilkrts). This patch mimics libgomp by adding a .spec file; I am not 100% sure whether the .spec file is needed, but the pthread tests in libgomp imply that it makes sense. (libgomp also checks for

RE: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Thomas Preud'homme
From: Jakub Jelinek [mailto:ja...@redhat.com] n-size = n1.size; + for (i = 0, mask = 0xff; i n-size; i++, mask = 8) This should be mask = BITS_PER_UNIT for consistency. Indeed. And, as has been said earlier, the testcase should be a runtime testcase (in

[linaro/gcc-4_8-branch] Merge from gcc-4_8-branch

2014-03-11 Thread Yvan Roux
Hi, we have merged the gcc-4_8-branch into linaro/gcc-4_8-branch up to revision 208264 as r208471. This will be part of our 2014.03 release. Yvan

Re: [PATCH] Use the LTO linker plugin by default

2014-03-11 Thread Richard Biener
On Mon, 10 Mar 2014, Rainer Orth wrote: Richard Biener rguent...@suse.de writes: Ouch. But as lto-plugin is a host module it should link against the host libgcc, no? During stage1, that is. So the question is why does it use the gcc/ compiler? For me it's using the host gcc:

Re: [PATCH, libjava]: Avoid suggest parentheses around comparison in operand of '|' in java/lang/natObject.cc

2014-03-11 Thread Andrew Haley
On 03/10/2014 08:13 PM, Uros Bizjak wrote: OK for mainline SVN and release branches? Sure. You don't need approval for pa Thanks, Andrew.

Re: [PATCH, libjava]: Avoid suggest parentheses around comparison in operand of '|' in java/lang/natObject.cc

2014-03-11 Thread Andrew Haley
On 03/10/2014 08:13 PM, Uros Bizjak wrote: OK for mainline SVN and release branches? Sure. You don't need approval for patches that are obviously correct/trivial. Thanks, Andrew.

[PATCH, nios2] Fix frame pointer calculation

2014-03-11 Thread Chung-Lin Tang
The current Nios II prologue/epilogue code has a bug where the frame pointer points to the start of the register save area, rather than the frame slot where FP is saved (as specified the Nios II ABI). This was only discovered relatively recently, as dwarf-based unwinding is used most of the time,

Re: [Patch, fortran] PR 60392 wrong descriptor when passing a transposed array to a contiguous assumed shape dummy.

2014-03-11 Thread Janus Weil
Hi Mikael, here is a fix for a wrong code issue, where we pass a descriptor with broken bounds when the actual argument is a transposed array and the dummy an assumed shape dummy. The bug comes from the interaction of the transpose optimization, which creates a descriptor with transposed

Re: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Jakub Jelinek
On Tue, Mar 11, 2014 at 02:53:39PM +0800, Thomas Preud'homme wrote: +2014-03-10 Thomas Preud'homme thomas.preudho...@arm.com + + PR tree-optimization/60454 + * gcc.c-torture/execute/pr60454.c (fake_swap32): Testcase to track + regression of PR60454. The ChangeLog entry is

Re: [PATCH] ARM: Weaker memory barriers

2014-03-11 Thread Will Deacon
Hi John, On Tue, Mar 11, 2014 at 02:54:18AM +, John Carr wrote: A comment in arm/sync.md notes We should consider issuing a inner shareability zone barrier here instead. Here is my first attempt at a patch to emit weaker memory barriers. Three instructions seem to be relevant for user

RE: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Thomas Preud'homme
From: Jakub Jelinek [mailto:ja...@redhat.com] The ChangeLog entry is wrong, the file is new, so you should just say: * gcc.c-torture/execute/pr60454.c: New test. Done. But more importantly: --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr60454.c @@ -0,0 +1,25 @@

Re: [PATCH GCC]Fix a latent bug in cfgcleanup by updating loop's latch info if necessary

2014-03-11 Thread Richard Biener
On Mon, Mar 10, 2014 at 10:29 AM, bin.cheng bin.ch...@arm.com wrote: Hi, When I investigating PR60363 which is caused by previous patch for PR60280, I found there is a latent bug in remove_forwarder_block_with_phi because GCC doesn't update loop's latch information. Without this patch,

Re: [PATCH, libgcc]: Avoid warning: array subscript is above array bounds when compiling crtstuff.c

2014-03-11 Thread Richard Biener
On Mon, Mar 10, 2014 at 11:14 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Mar 10, 2014 at 11:10:05AM +0100, Uros Bizjak wrote: Well, better is non-obvious, while it is smaller (which is good for initialization and thus rarely executed code), the common case is that *jcr_list is 0 (gcj

Re: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Jakub Jelinek
On Tue, Mar 11, 2014 at 06:48:37PM +0800, Thomas Preud'homme wrote: I also added a typedef unsigned uint32_t for when sizeof(unsigned) == 4. I hope it's right. In theory you could have __CHAR_BIT__ different from 8 and what you care about is that uint32_t has exactly 32 bits, so the check

Re: [PATCH][AArch64] Fix default CPU configurations

2014-03-11 Thread Kyrill Tkachov
Ping^2 http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01487.html Kyrill On 05/03/14 09:37, Kyrill Tkachov wrote: Ping? On 25/02/14 10:08, Kyrill Tkachov wrote: Hi all, The problem solved in this patch is that when gcc is configured with --with-arch=armv8-a gcc will go into

Re: [PATCH (for next stage 1)] Add return type to gimple function dumps

2014-03-11 Thread Richard Biener
On Mon, Mar 10, 2014 at 8:22 PM, David Malcolm dmalc...@redhat.com wrote: Gimple function dumps contain the types of parameters, but not of the return type. The attached patch fixes this omission; here's an example of the before/after diff: $ diff -up /tmp/pr23401.c.004t.gimple.old

Re: [PATCH][AArch64] Fix default CPU configurations

2014-03-11 Thread Marcus Shawcroft
On 25 February 2014 10:08, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, The problem solved in this patch is that when gcc is configured with --with-arch=armv8-a gcc will go into aarch64-arches.def, pick the representative CPU (Cortex-A53 for ARMv8-A) and use that CPUs ISA flags. Now

Re: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Michael Eager
On 03/11/14 03:48, Thomas Preud'homme wrote: diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 748805e..b6d7d93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-03-07 Thomas Preud'homme thomas.preudho...@arm.com + + PR tree-optimization/60454 + *

Re: [PATCH][AArch64] Fix default CPU configurations

2014-03-11 Thread Kyrill Tkachov
Hi Marcus, On 11/03/14 11:25, Marcus Shawcroft wrote: On 25 February 2014 10:08, Kyrill Tkachov kyrylo.tkac...@arm.com wrote: Hi all, The problem solved in this patch is that when gcc is configured with --with-arch=armv8-a gcc will go into aarch64-arches.def, pick the representative CPU

Re: [PATCH, libgcc]: Avoid warning: array subscript is above array bounds when compiling crtstuff.c

2014-03-11 Thread Jakub Jelinek
On Tue, Mar 11, 2014 at 11:58:01AM +0100, Richard Biener wrote: On Mon, Mar 10, 2014 at 11:14 AM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Mar 10, 2014 at 11:10:05AM +0100, Uros Bizjak wrote: Well, better is non-obvious, while it is smaller (which is good for initialization and thus

Re: [PATCH] Update -flto docs wrt option handling

2014-03-11 Thread Richard Biener
On Sat, 8 Mar 2014, Gerald Pfeifer wrote: Thanks for the time and diligence writing this up, Richi! On Thu, 6 Mar 2014, Richard Biener wrote: -files; if @option{-flto} is not passed to the linker, no -interprocedural optimizations are applied. +files; if @option{-fno-lto} is not passed

[PATCH] Fix PRs 60429 and 60485, PTA offset constraints

2014-03-11 Thread Richard Biener
This fixes offsetted constraint handling in the constraint builder and the solver. The existing code didn't consider non-equal-sized fields and thus missed including all those that are overlapping a offsetted variable. Fixed like the following, bootstrapped and tested on

[PATCH] Fix error message from -Wcast-qual when casting away volatile

2014-03-11 Thread Magnus Reftel
Currently, castring away volatile from a pointer makes -Wcast-qual claim that __attribute__((noreturn)) was cast away (see bugzilla 55383). The attached patch, originally written by Manuel López-Ibáñez and updated to match trunk by me, correctes that. No regressions on gcc from applying this patch

Re: [C++ Patch/RFC] PR 60389

2014-03-11 Thread Jason Merrill
On 03/11/2014 08:03 AM, Paolo Carlini wrote: + if (DECL_INHERITED_CTOR_BASE (fun) + TREE_CODE (fun) == TEMPLATE_DECL) +{ + ret = false; + if (complain) + error (inherited constructors inherit %constexpr% from + the designated base); +} To correct my

[PATCH][match-and-simplify] Move constant folding to gimple_match_and_simplify

2014-03-11 Thread Richard Biener
This moves handling of constant folding and operand order canonicalization to the folding worker instead of doing that only when building a stmt as fallback. Matches what fold_unary vs. fold_build does. Applied to branch. Richard. 2014-03-11 Richard Biener rguent...@suse.de *

PATCH to add -std=c++14

2014-03-11 Thread Ed Smith-Rowland
Why not also -std=gnu++14?

[PATCH][match-and-simplify] Convert SCCVN

2014-03-11 Thread Richard Biener
This converts remaining parts of SCCVN to use the gimple_match_and_simplify interface. Most importantly (apart from one legacy case) we no longer build GENERIC trees from GIMPLE to do simplification nor track whether it's maybe worthwhile doing so. Committed to branch (a few more optimization

[PATCH] Fix __builtin_unreachable related regression (PR middle-end/60482)

2014-03-11 Thread Jakub Jelinek
Hi! As described in the PR, the r208165 change regressed following test. The problem is that VRP inserts a useless ASSERT_EXPR right before __builtin_unreachable () (obviously, the uses of the ASSERT_EXPR lhs aren't and can't be used by anything), which then prevents

[PATCH] Improve ifcombine

2014-03-11 Thread Jakub Jelinek
Hi! This patch fixes the ssa-ifcombine-10.c regression. The thing is that the uselessly added ASSERT_EXPR makes vrp1 change the cfg slightly like this: bb 2: _4 = x_3(D) 1; if (_4 == 0) goto bb 5; else goto bb 3; bb 3: _5 = x_3(D) 4; if (_5 != 0) -goto bb 5;

Re: [C++ Patch/RFC] PR 60389

2014-03-11 Thread Paolo Carlini
Hi, On 03/11/2014 02:10 PM, Jason Merrill wrote: On 03/11/2014 08:03 AM, Paolo Carlini wrote: + if (DECL_INHERITED_CTOR_BASE (fun) + TREE_CODE (fun) == TEMPLATE_DECL) +{ + ret = false; + if (complain) +error (inherited constructors inherit %constexpr% from +

Re: [PATCH] Fix error message from -Wcast-qual when casting away volatile

2014-03-11 Thread Gerald Pfeifer
On Tue, 11 Mar 2014, Magnus Reftel wrote: Currently, castring away volatile from a pointer makes -Wcast-qual claim that __attribute__((noreturn)) was cast away (see bugzilla 55383). The attached patch, originally written by Manuel López-Ibáñez and updated to match trunk by me, correctes that.

Re: [PATCH] Fix error message from -Wcast-qual when casting away volatile

2014-03-11 Thread Jakub Jelinek
On Tue, Mar 11, 2014 at 05:10:45PM +0100, Gerald Pfeifer wrote: On Tue, 11 Mar 2014, Magnus Reftel wrote: Currently, castring away volatile from a pointer makes -Wcast-qual claim that __attribute__((noreturn)) was cast away (see bugzilla 55383). The attached patch, originally written by

Re: [C++ Patch/RFC] PR 60389

2014-03-11 Thread Jason Merrill
OK. Jason

[patch] fix libstdc++/60499

2014-03-11 Thread Jonathan Wakely
This is a 4.9 regression due to a non-uglified name being used in debug mode containers. Tested x86_64-linux, normal and debug mode, committed to trunk. commit 39cc9a9e195aa90027fcc40083b913016b83f0e5 Author: Jonathan Wakely jwak...@redhat.com Date: Tue Mar 11 10:47:52 2014 + PR

[jit] Cleanup base_types

2014-03-11 Thread David Malcolm
Committed to branch dmalcolm/jit: I tracked down the crash in dwarf2out.c mentioned in the commit message for 6e624036e3f47c6ca4ae2e99974b74aa29f11eca: base_types wasn't being flushed between invocations, leading to it containing garbage that might be collected (it's not GTY-labelled), and

Re: [Build, Driver] Add -lcilkrts for -fcilkplus

2014-03-11 Thread Joseph S. Myers
On Tue, 11 Mar 2014, Tobias Burnus wrote: When using Cilk Plus (-fcilkplus), it makes sense to automatically link the run-time library (-lcilkrts). This patch mimics libgomp by adding a .spec file; I am not 100% sure whether the .spec file is needed, but the pthread tests in libgomp imply

Re: [PATCH] Fix error message from -Wcast-qual when casting away volatile

2014-03-11 Thread Joseph S. Myers
On Tue, 11 Mar 2014, Magnus Reftel wrote: Currently, castring away volatile from a pointer makes -Wcast-qual claim that __attribute__((noreturn)) was cast away (see bugzilla 55383). The attached patch, originally written by Manuel L?pez-Ib??ez and updated to match trunk by me, correctes that.

[jit] Fix state issue in gcse.c

2014-03-11 Thread David Malcolm
Committed to branch dmalcolm/jit: Turning optimizations up from 0 to 3 showed a segfault on the 2nd iteration of test-linked-list.c in get_data_from_adhoc_loc whilst garbage-collecting. Investigation revealed the issue to be a CFG from the previous compile being kept alive by this GC root in

[patch] Backport fixes for allocator handling in std::vector move assign

2014-03-11 Thread Jonathan Wakely
This patch backports the important parts of three commits from trunk to the 4.8 branch. Tested x86_64-linux, committed to the 4.8 branch. commit 48a2f3af4fcff86695e6f12c1490833f5679ad44 Author: Jonathan Wakely jwak...@redhat.com Date: Tue Mar 11 18:20:47 2014 + Backport from

Re: [patch] fix libstdc++/59215

2014-03-11 Thread Jonathan Wakely
On 27/01/14 17:58 +, Jonathan Wakely wrote: This fixes a tsan warning in shared_ptr by replacing the non-atomic load with a call to _M_get_use_count() which does a relaxed atomic load. Tested x86_64-linux, committed to trunk. Will commit to 4.8 soon too. Here's the commit to the 4.8

Re: RFA: New ipa-devirt PATCH for c++/58678 (devirt vs. KDE)

2014-03-11 Thread Jan Hubicka
This patch fixes the latest 58678 testcase by avoiding speculative devirtualization to the destructor of an abstract class, which can never succeed: you can't create an object of an abstract class, so the pointer must point to an object of a derived class, and the derived class necessarily

Re: [PATCH] ARM: Weaker memory barriers

2014-03-11 Thread John Carr
Will Deacon will.dea...@arm.com wrote: Hi John, On Tue, Mar 11, 2014 at 02:54:18AM +, John Carr wrote: A comment in arm/sync.md notes We should consider issuing a inner shareability zone barrier here instead. Here is my first attempt at a patch to emit weaker memory barriers.

Re: Fix PR59586

2014-03-11 Thread Mircea Namolaru
Hi, I think that NULL pointer checks should be added for all pointers must_raw, may_raw etc, not only for the *_no_source ones. This will make the function more robust and easier to maintain. Indeed in the current code only the *_no_source pointers may be NULL, but this may change in the

Re: [RFC] Do not consider volatile asms as optimization barriers #1

2014-03-11 Thread Richard Sandiford
Hans-Peter Nilsson h...@bitrange.com writes: On Mon, 3 Mar 2014, Richard Sandiford wrote: AIUI: Reading back the references don't yield any dissenting flash-backs, FWIW. So, a (use fp) then a (clobber fp)? That was probably just too weird for me to think of, much like a hypercorrect

Re: [patch] fix libstdc++/59680

2014-03-11 Thread Jonathan Wakely
On 9 January 2014 23:39, Jonathan Wakely wrote: PR libstdc++/59680 * src/c++11/thread.cc (__sleep_for): Fix call to ::sleep. Tested x86_64-linux, and tested again with a hacked c++config.h to use ::sleep(), committed to trunk. Also backported to the 4.8 branch now. commit

[PATCH] Fix reassoc of vectors (PR tree-optimization/60502)

2014-03-11 Thread Jakub Jelinek
Hi! build_low_bits_mask doesn't work for vector types (even TYPE_PRECISION alone on it is meaningless), but what we actually want is a constant with all bits set. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-03-11 Jakub Jelinek ja...@redhat.com Marc

[google/main] Fix arm build broken

2014-03-11 Thread 沈涵
Hi current google/main fails to build for arm because of duplicated head file entries in gtyp-input.list. Fixed by removing duplication in macro tm_file. This only affects arm platform. Tested by successfully build for arm. Patch below --- config.gcc.orig 2014-03-11 15:10:26.849602409

Re: [google/main] Fix arm build broken

2014-03-11 Thread Dehao Chen
Looks good to me. Dehao On Tue, Mar 11, 2014 at 3:22 PM, Hán Shěn (沈涵) shen...@google.com wrote: Hi current google/main fails to build for arm because of duplicated head file entries in gtyp-input.list. Fixed by removing duplication in macro tm_file. This only affects arm platform. Tested

[PATCH] Fix PR60505

2014-03-11 Thread Cong Hou
This patch is fixing PR60505 in which the vectorizer may produce unnecessary epilogues. Bootstrapped and tested on a x86_64 machine. OK for trunk? thanks, Cong diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e1d8666..f98e628 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@

[GOOGLE] Writes annotation info in elf section.

2014-03-11 Thread Dehao Chen
During AutoFDO annotation, we want to record the annotation stats into an elf section, so that we can calculate how much percentage of the profile is annotated, which can be used as an indicator whether code has changed significantly comparing with the profiled source. Bootstrapped and

Re: [PATCH][AARCH64]PR60034

2014-03-11 Thread Kugan
Ping ? gcc/ 2014-03-03 Kugan Vivekanandarajah kug...@linaro.org PR target/60034 * aarch64/aarch64.c (aarch64_classify_address): Fix alignment for section anchor. gcc/testsuite/ 2014-03-03 Kugan Vivekanandarajah kug...@linaro.org PR

Re: [patch,libfortran] [4.7/4.8/4.9 Regression] PR38199 missed optimization: I/O performance

2014-03-11 Thread Jerry DeLisle
On 03/09/2014 05:39 PM, Jerry DeLisle wrote: Hi all, This final patch does two things. First: In read.c it implements a simple space skipping scheme in read_decimal where I found a lot of repeated next_char calls happening. This gives a pretty good boost in performance and is applicable

Re: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Joey Ye
4.8 also has this bug. OK to backport? On Tue, Mar 11, 2014 at 6:59 PM, Jakub Jelinek ja...@redhat.com wrote: On Tue, Mar 11, 2014 at 06:48:37PM +0800, Thomas Preud'homme wrote: I also added a typedef unsigned uint32_t for when sizeof(unsigned) == 4. I hope it's right. In theory you could

RE: [PATCH] Fix incorrect byte swap detection (PR tree-optimization/60454)

2014-03-11 Thread Thomas Preud'homme
From: Jakub Jelinek [mailto:ja...@redhat.com] In theory you could have __CHAR_BIT__ different from 8 and what you care about is that uint32_t has exactly 32 bits, so the check would need to be if (sizeof (uint32_t) * __CHAR_BIT__ != 32) return 0; I could go with: In = (0x12

libgo patch committed: Compile math library with -ffp-contract=off

2014-03-11 Thread Ian Lance Taylor
The bug report http://golang.org/issue/7074 shows that math.Log2(1) produces the wrong result on Aarch64, because the Go math package is compiled to use a fused multiply-add instruction. This patch to the libgo configure script will use -ffp-contract=off when compiling the math package on