Re: [PATCH] Fix ldist memset discovery with -0.0 (PR tree-optimization/72824)

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 08:53:54AM +0200, Richard Biener wrote: > Hmm, I don't think we should see -0.0 as +0.0 with -fno-signed-zeros. > As far as I can see this is a memory load/store op and we may not > transform, say, > > double x = a[i]; > b[i] = x; > > into a copy that changes -0.0 to +

Re: [PATCH, COMMITTED] Add branch_changer.py script to maintainer-scripts

2016-08-09 Thread Gerald Pfeifer
On Wed, 3 Aug 2016, Martin Liška wrote: > I've installed (r239066) the script which is used by maintainers to > update PRs in a batch mode. I think it would be good to add a comment at the top that describes what the scripts does and how to invoke the script? Gerald

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Richard Biener
On Mon, 8 Aug 2016, Bernd Edlinger wrote: > Hi! > > > As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71083 > we generate unaligned accesses because tree-predcom rewrites > bitfield and packed accesses in a way that looses the proper > alignment information. > > The attached patch

Re: [PATCH] Fix ldist memset discovery with -0.0 (PR tree-optimization/72824)

2016-08-09 Thread Richard Biener
On Tue, 9 Aug 2016, Jakub Jelinek wrote: > On Tue, Aug 09, 2016 at 08:53:54AM +0200, Richard Biener wrote: > > Hmm, I don't think we should see -0.0 as +0.0 with -fno-signed-zeros. > > As far as I can see this is a memory load/store op and we may not > > transform, say, > > > > double x = a[i];

[PATCH] Fix PR 71802

2016-08-09 Thread Richard Biener
The following fixes a missed CFG cleanup opportunity (requiring its iteration) that ultimatively causes us to create a dead if-converted loop variant (discovered as dead by CFG cleanup run by ifcvt). The issue is that when removing unreachable code CFG cleanup does not schedule predecessors of pa

[PATCH, libgo]: Fix syscall test failure on CentOS 5.11

2016-08-09 Thread Uros Bizjak
Hello! syscall test fails on CentOS 5.11 with: exec_linux_test.go:167:25: error: reference to undefined identifier 'syscall.CLONE_NEWNET' Unshareflags: syscall.CLONE_NEWNET, ^ FAIL: syscall Attached patch fixes the failure by providing CLONE_NEWNET definition. Tested

Re: [PATCH] Improve backwards threading

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Jeff Law wrote: > On 08/05/2016 07:36 AM, Richard Biener wrote: > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > arg); > > if (taken_edge) > > { > > +

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 8 August 2016 at 19:33, Martin Jambor wrote: > Hi, > > thanks for following through. You'll need an approval from Honza, but > I think the code looks good (I have looked at the places that I > believe have changed since the last week). However, I have discovered > one new thing I don't like a

Re: [PATCH][expr.c] PR middle-end/71700: zero-extend sub-word value when widening constructor element

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Kyrill Tkachov wrote: > > On 01/08/16 15:31, Kyrill Tkachov wrote: > > > > On 11/07/16 18:55, Bernd Schmidt wrote: > > > On 07/11/2016 04:52 PM, Kyrill Tkachov wrote: > > > > Based on that, I think that code block is a useful optimisation, we just > > > > need > > > > to take

[PATCH 2/N] Fix usage of POW2 histogram

2016-08-09 Thread Martin Liška
Another small follow-up changes instrumentation of MOD exprs to not instrument divisors different from SSA_NAME. Patch survives: make check -k -j10 RUNTESTFLAGS="tree-prof.exp" Ready for trunk? Thanks, Martin >From 00aecc0dd74c4546a1882bdbbb0f66fbf39a5408 Mon Sep 17 00:00:00 2001 From: marxin Da

Re: [PATCH, LRA] PR71680, Reload of slow mems

2016-08-09 Thread Alan Modra
On Tue, Aug 02, 2016 at 11:02:56PM +0930, Alan Modra wrote: > This is a patch for a problem in lra, triggered by the rs6000 > backend not allowing SImode in floating point registers. Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00113.html Note that to recreate the problem with the comment

Re: [PATCH] PR middle-end/21137: Folding if (((int)x >> 31) & 64) into if ((int)x < 0)

2016-08-09 Thread Richard Biener
On Mon, Aug 8, 2016 at 7:04 PM, Jeff Law wrote: > On 08/08/2016 05:58 AM, Marek Polacek wrote: >> >> On Mon, Aug 08, 2016 at 12:56:20PM +0100, Roger Sayle wrote: >>> >>> >>> The following patch is an attempt to finally fully close PR >>> middle-end/21137. >>> As explained in the PR, my original pa

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-09 Thread Pedro Alves
On 08/06/2016 05:34 AM, ayush goel wrote: > On 5 August 2016 at 4:09:00 AM, Pedro Alves (pal...@redhat.com) wrote: >> On 08/02/2016 12:38 AM, Manuel López-Ibáñez wrote: >>> >>> If there is something wrong or missing, ideally we would like to know >>> so that Ayush can work on fixing it before the S

RE: [PATCH] Fix (parts of) PR68273

2016-08-09 Thread Matthew Fortune
Richard Biener writes: > The following patch avoids overaligned types created from IPA parameter > replacement. It is said to help mipsel which still suffers from the > backend-looks-at-type-alignment-for-parameter-passing-ABI bug. > > Bootstrap and regtest pending on x86_64-unknown-linux-gnu. >

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 12:58 AM, kugan wrote: > Hi Jakub, > > Thanks for the review. > > On 08/08/16 16:40, Jakub Jelinek wrote: >> >> On Mon, Aug 08, 2016 at 01:36:51PM +1000, kugan wrote: >>> >>> diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h >>> index c81b1a1..6e34433 100644 >>> --- a/g

[RS6000] e500 part of pr71680

2016-08-09 Thread Alan Modra
The fallback part of HARD_REGNO_CALLER_SAVE_MODE, choose_hard_reg_mode, returns DFmode for SImode when TARGET_E500_DOUBLE. This confuses lra when attempting to save ctr around a call. Arseny, the bug reporter, has regression tested this patch. OK to apply? PR target/71680 * confi

Re: [Fortran, patch, pr71936, v1] [6/7 Regression] ICE in wide_int_to_tree, at tree.c:1487

2016-08-09 Thread Richard Biener
On Mon, Aug 8, 2016 at 11:58 AM, Andre Vehreschild wrote: > Hi Paul, > > thanks for the review. Committed to trunk as r239237. > > I will commit to gcc-6 in one week. If you want to catch the 6.2 release then please make sure to have it on the branch this Friday. Richard. > Regards, > A

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Richard Biener
On Tue, 9 Aug 2016, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > > Hi, > > > > thanks for following through. You'll need an approval from Honza, but > > I think the code looks good (I have looked at the places that I > > believe have changed since the last week)

Re: [RFC] [ipa bitwise cp] tree-ssa-ccp changes

2016-08-09 Thread Richard Biener
On Mon, 8 Aug 2016, Prathamesh Kulkarni wrote: > Hi Richard, > In the attached version, I tried to address your suggestions from: > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00279.html > > In ccp_finalize we do: > wide_int nonzero_bits = wide_int::from (val->mask, precision, >

Re: [PATCH/AARCH64] Improve ThunderX code generation slightly with load/store pair

2016-08-09 Thread Richard Earnshaw (lists)
On 08/08/16 18:48, Andrew Pinski wrote: > On Fri, Aug 5, 2016 at 12:18 AM, Andrew Pinski wrote: >> Hi, >> On ThunderX, load (and store) pair that does a pair of two word >> (32bits) load/stores is slower in some cases than doing two >> load/stores. For some internal benchmarks, it provides a 2-

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 11:20 AM, Yuri Rumyantsev wrote: > Yes it is impossible since all basic blocks are handled from outer > loops to innermost so we can not have the sequence with wrong > dependence, i.e. we cached that reference is independent (due to > safelen) but the same reference in outer

Re: Implement -Wimplicit-fallthrough (take 2): the rest

2016-08-09 Thread Marek Polacek
On Thu, Aug 04, 2016 at 10:47:27AM -0600, Jeff Law wrote: > On 08/04/2016 06:36 AM, Michael Matz wrote: > > Hi, > > > > On Wed, 27 Jul 2016, Marek Polacek wrote: > > > > > And this is the rest. Either I just adjusted a falls through comment, > > > or I added __builtin_fallthrough (). These were

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 4:51 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > Thanks for the review. > > On 29 April 2016 at 20:47, Richard Biener wrote: >> On Sun, Apr 17, 2016 at 1:14 AM, kugan >> wrote: >>> As explained in PR61839, >>> >>> Following difference results in extra instructions:

Re: Implement -Wimplicit-fallthrough (take 2): the rest

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 12:18:11PM +0200, Marek Polacek wrote: > > > On Wed, 27 Jul 2016, Marek Polacek wrote: > > > > > > > And this is the rest. Either I just adjusted a falls through comment, > > > > or I added __builtin_fallthrough (). These were the cases where I was > > > > fairly sure tha

Re: RFC [1/2] divmod transform

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01867.html Thanks, Prathamesh On 28 July 2016 at 19:05, Prathamesh Kulkarni wrote: > On 8 June 2016 at 19:53, Richard Biener wrote: >> On Fri, 3 Jun 2016, Jim Wilson wrote: >> >>> On Mon, May 30, 2016 at 12:45 AM, Richard Biener wrote: >>> > J

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01969.html Thanks, Prathamesh On 29 July 2016 at 22:13, Prathamesh Kulkarni wrote: > On 29 July 2016 at 05:40, Prathamesh Kulkarni > wrote: >> On 28 July 2016 at 20:14, Ramana Radhakrishnan >> wrote: >>> appear UNSUPPORTED. That's be

Re: divmod transform: add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01869.html Thanks, Prathamesh On 28 July 2016 at 19:07, Prathamesh Kulkarni wrote: > Hi, > The following patch adds test-cases for divmod transform. > I separated the SImode tests into separate file from DImode tests > because certain arm config

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > >> >> +class ipcp_bits_lattice > >> >> +{ > >> >> +public: > >> >> + bool bottom_p () { return lattice_val == IPA_BITS_VARYING; } > >> >> + bool top_p () { return lattice

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-08-09 Thread Paul Richard Thomas
Hi Sandro, As far as I can see, this is OK barring a couple of minor wrinkles and a question: For coarray_failed_images_err.f90 and coarray_image_status_err.f90 you have used the option -fdump-tree-original without making use of the tree dump. Mikael asked you to provide an executable test with

[PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Martin Liška
Hi. As mention in [1], enabling -fprofile-update=atomic when -pthread is logical thing and is quite expected default behavior. Ready for trunk? [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58306#c21 >From 7135fcf5f7b8f2f3c55a6e80048660c1beea5052 Mon Sep 17 00:00:00 2001 From: marxin Date: T

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Yuri Rumyantsev
Richard, The patch proposed by you does not work properly for g++.dg/vect/pr70729-nest.cc test since the reference for this->S_n has been cached as dependent for outer loop and loop is not vectorized: g++ -Ofast -fopenmp -mavx2 pr70729-nest.cc -c -fdump-tree-vect-details grep 'LOOP VECTORIZED' p

Re: protected alloca class for malloc fallback

2016-08-09 Thread Oleg Endo
On Mon, 2016-08-08 at 13:39 -0400, Trevor Saunders wrote: > First sizeof std::string is 32 on x86_64, a char *, a size_t for the > length, and a 16 byte union of a size_t for allocated size and a 16 > byte buffer for short strings. I suppose some of this is required by > the C++ standard, I r

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 1:26 PM, Yuri Rumyantsev wrote: > Richard, > > The patch proposed by you does not work properly for > g++.dg/vect/pr70729-nest.cc test since the reference for this->S_n has > been cached as dependent for outer loop and loop is not vectorized: > > g++ -Ofast -fopenmp -mavx2

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 9 August 2016 at 16:39, Martin Jambor wrote: > Hi, > > On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: >> On 8 August 2016 at 19:33, Martin Jambor wrote: >> >> >> +class ipcp_bits_lattice >> >> >> +{ >> >> >> +public: >> >> >> + bool bottom_p () { return lattice_val == IP

Re: [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions

2016-08-09 Thread Andre Vieira (lists)
On 08/08/16 05:19, Sandra Loosemore wrote: > On 07/25/2016 07:17 AM, Andre Vieira (lists) wrote: >> [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions >> >> Hello, >> >> This is a respin of a previous patch series for ARMv8-M Security >> Extensions. In this version I have removed one patch, rebased

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Yuri Rumyantsev
Richard, I checked that this move helps. Does it mean that I've got approval to integrate it to trunk? 2016-08-09 14:33 GMT+03:00 Richard Biener : > On Tue, Aug 9, 2016 at 1:26 PM, Yuri Rumyantsev wrote: >> Richard, >> >> The patch proposed by you does not work properly for >> g++.dg/vect/pr7072

Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?

2016-08-09 Thread Bernd Schmidt
On 08/08/2016 05:26 PM, Senthil Kumar Selvaraj wrote: I picked out the commit where you'd added SYMBOL_REF handling (rev #190252), and patched that with the below code. Bootstrapped and regtested on x86_64-pc-linux - the results were identical with and without the patch. Is this good enough for

[PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bernd Edlinger
Hi! Due to my recent cleanup of special_function_p the darwin bootstrap is currently broken because the longjmp function misses the noreturn attribute. Therefore I revived an old solaris_longjmp_noreturn fixinclude rule. See the attached patch. Boot-strap on i686-apple-darwin11 and x86_64-apple

Re: Implement -Wimplicit-fallthrough (take 2): the rest

2016-08-09 Thread Marek Polacek
On Tue, Aug 09, 2016 at 12:24:03PM +0200, Jakub Jelinek wrote: > On Tue, Aug 09, 2016 at 12:18:11PM +0200, Marek Polacek wrote: > > > > On Wed, 27 Jul 2016, Marek Polacek wrote: > > > > > > > > > And this is the rest. Either I just adjusted a falls through comment, > > > > > or I added __builtin_

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 2:05 PM, Yuri Rumyantsev wrote: > Richard, > > I checked that this move helps. > Does it mean that I've got approval to integrate it to trunk? Yes, if it survives bootstrap & regtest. Richard. > 2016-08-09 14:33 GMT+03:00 Richard Biener : >> On Tue, Aug 9, 2016 at 1:26 PM

Re: [PATCH] Fix POW2 histogram

2016-08-09 Thread Nathan Sidwell
On 08/08/16 12:56, Martin Liška wrote: Hello. Currently, we utilize pow2 profile histogram to track gimple STMTs like this: ssa_name_x % value. void __gcov_pow2_profiler (gcov_type *counters, gcov_type value) { if (value & (value - 1)) counters[0]++; else counters[1]++; } Although

Re: [PATCH 5/N] Add new *_atomic counter update function, (-fprofile-update=atomic)

2016-08-09 Thread Nathan Sidwell
On 08/08/16 13:03, Martin Liška wrote: v3: fixed wrong defines in libgcc/Makefine.in ok, thanks

Re: [PATCH 2/N] Fix usage of POW2 histogram

2016-08-09 Thread Nathan Sidwell
On 08/09/16 04:41, Martin Liška wrote: Another small follow-up changes instrumentation of MOD exprs to not instrument divisors different from SSA_NAME. Patch survives: make check -k -j10 RUNTESTFLAGS="tree-prof.exp" ok, thanks

[MIPS,committed] Use create_tmp_var_raw in mips_atomic_assign_expand_fenv

2016-08-09 Thread Matthew Fortune
I have applied the MIPS specific fix for PR65345. It is a mechanical change. This fixes the MIPS failures in atomic/pr65345-4.c. gcc/ PR c/65345 * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use create_tmp_var_raw instead of create_tmp_var. Thanks, Matthew diff

Re: [PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Nathan Sidwell
On 08/09/16 07:24, Martin Liška wrote: Hi. As mention in [1], enabling -fprofile-update=atomic when -pthread is logical thing and is quite expected default behavior. Ready for trunk? [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58306#c21 This certainly requires changes to invoke.texi, an

Re: [PATCH] Improve backwards threading

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Jeff Law wrote: > On 08/05/2016 07:36 AM, Richard Biener wrote: > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > arg); > > if (taken_edge) > > { > > +

Re: Ping^2: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-09 Thread DJ Delorie
ayush goel writes: > This patch https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01302.html > is still pending review. The build portions are OK, assuming a global maintainer has approved of adding gnulib in general.

Re: protected alloca class for malloc fallback

2016-08-09 Thread Aldy Hernandez
On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I can write things up in a way you approve of. Take for instance simple uses like all the tree_*check_failed routines, whic

Re: protected alloca class for malloc fallback

2016-08-09 Thread Bernd Schmidt
On 08/09/2016 03:17 PM, Aldy Hernandez wrote: On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I can write things up in a way you approve of. Take for instance simple uses

[PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + unsigned int _18; : _1 =

[PATCH] Fix PR middle-end/71654 (missed shortening of a compare)

2016-08-09 Thread Patrick Palka
Hi, this patch makes match.pd to shorten comparisons that involve a sign-changing cast from a shorter unsigned type to a wider signed type. This should be safe to do because a wider signed type can hold all the possible values of a shorter unsigned type. This change causes vrp23.c and vrp24.c to f

Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp

2016-08-09 Thread James Greenhalgh
On Mon, Aug 08, 2016 at 12:10:00PM +0100, Bin.Cheng wrote: > On Mon, Aug 8, 2016 at 11:40 AM, James Greenhalgh > wrote: > > On Mon, Aug 01, 2016 at 01:18:53PM +, Bin Cheng wrote: > >> Hi, > >> This is the 3rd version patch implementing vcond_mask and vec_cmp patterns > >> on > >> AArch64. Bo

Go patch committed: Rewrite compiler directive support

2016-08-09 Thread Ian Lance Taylor
This patch to the Go frontend rewrites the compiler directive support to recognize all the compiler directives handled by the current gc compiler. They are now turned into flags attached to a function or function declaration, or, for the case of go:linkname, into a map attached to the Lex object.

C++ PATCH for C++17 constexpr lambda

2016-08-09 Thread Jason Merrill
The first patch fixes a constexpr issue whereby we were complaining about passing a non-constant empty class to a constexpr function; this is OK because there's no actual copying involved. The second patch implements the C++17 constexpr lambda proposal. This was mostly pretty straightforward. A

Re: C++ PATCH for c++/56701 (treating 'this' as an rvalue)

2016-08-09 Thread Jason Merrill
On Thu, Mar 28, 2013 at 2:14 PM, Jason Merrill wrote: > When 'this' appears in an expression, it should be an rvalue rather than a > const lvalue; in C++11, the distinction matters. And likewise for &*this. Tested x86_64-pc-linux-gnu, applying to trunk. commit 9258170ab23137c255e656ac76c96736a2e

[hsa-branch] Avoid register moves for unnecessary conversions

2016-08-09 Thread Martin Jambor
Hi, in the first pre-release HSAIL/BRIG specifications, registers had a type which they now don't, they only have size. We have thought about removing it from our internal representation but it is actually useful to know what the type of the stored value is when it is actually necessary to perfor

[hsa-branch] Remove useless build of kernel_dependencies_vector_type

2016-08-09 Thread Martin Jambor
Hi, the type is built twice and the first one is not used. This patch removes it. Thanks, Martin 2016-08-04 Martin Jambor * hsa-brig.c (hsa_output_kernels): Remove unnecessary building of kernel_dependencies_vector_type. --- gcc/hsa-brig.c | 6 +- 1 file changed, 1 ins

[hsa-branch] Remove typedef.*_p from hsa.h

2016-08-09 Thread Martin Jambor
Hi, the rest of hsa code uses direct pointers, which I find preferable (and since we have moved to explicit pointers also for example with the gimple type, I believe I am not alone, so I removed the two _p typedefs we had in hsa.h. They were not in widespread use anyway. Thanks, Martin 2016-08

[hsa-branch] Use hsa_obstack to allocate temporary names

2016-08-09 Thread Martin Jambor
Hi, HSA backend now uses ggc_strdup to allocate name strings for stuff that doesn't have any and therefore we rely on the garbage collector not running. That works but is not nice and since the HSA branch now has an obstack, not necessary. This patch changes the allocation to be from the obstack

[hsa-branch] Make section::add return pointer to data

2016-08-09 Thread Martin Jambor
Hi, when emitting a BRIG function definition, we need to fixup the leading directive after all of the instructions and everything has been added to the section (well, we could pre-compute the value but it is not worth it). At the moment the function emitting code calculates the pointer in an ugly

[hsa-branch] Remove unnecessary operators

2016-08-09 Thread Martin Jambor
Hi, since the HSA branch switched to a simple obstack from alloc-pools, it is not necessary to have a separate new operator for each instruction kind and it is enough if the common ancestor has one. Therefore, this patch removes them. Similarly, I learned that it is enough to make the delete ope

[hsa-branch] Add support for CONST_DECLs

2016-08-09 Thread Martin Jambor
Hi, the HSA/BRIG back-end does not have any support for CONST_DECSs so far. This patch adds it, emitting readonly segment symbols with initializers for them. One complication is that addresses pertaining to HSA readonly segment cannot be converted to flat addresses. So when we need an address of

[PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-09 Thread Martin Liška
Hello. Following enhancement for gcov solves issues when we cannot create a file due to a filesystem path length limit. Selected approach utilizes existing md5sum functions. Patch survives make check -k RUNTESTFLAGS="gcov.exp" on x86_64-linux-gnu. Ready for trunk? Thanks, Martin >From 42393a73

[MIPS, committed] Skip gcc.dg/loop-8.c

2016-08-09 Thread Matthew Fortune
MIPS creates more invariants than gcc.dg/loop-8.c expects. There is no way to represent what the original test was trying to verify given the additional invariants being moved out of the loop. Thanks, Matthew gcc/ PR rtl-optimization/9 * gcc.dg/loop-8.c: Skip for MIPS due to

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-09 Thread Jakub Jelinek
On Mon, Aug 01, 2016 at 12:44:30PM +0200, Richard Biener wrote: > Note that reading the dwarf standard, it looks like it accepts a location > which means we could do an implicit location description using > DW_OP_stack_value which gives us access to arbitrary dwarf > expressions (and thus the possi

[v3 PATCH] Implement LWG 2744 and LWG 2754.

2016-08-09 Thread Ville Voutilainen
Tested on Linux-x64. 2016-08-09 Ville Voutilainen Implement LWG 2744 and LWG 2754. * include/std/any (any(ValueType&&)): Constrain with __is_in_place. (any(in_place_type_t<_ValueType>, _Args&&...)): Use _Decay. (any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&...

Re: [PATCH] Fix PR72772

2016-08-09 Thread Bin.Cheng
On Fri, Aug 5, 2016 at 11:48 AM, Richard Biener wrote: > > This fixes PR72772 by avoing placing a degenerate PHI in each > forwarder block loop init creates when creating simple preheaders. > The solution is to simply split the single loop entry edge which > is also way cheaper than using the forw

[PATCH] Fix a few fall through cases

2016-08-09 Thread Marek Polacek
Testing with -Wimplicit-fallthrough turned up a few spots where fall through is either a bug, or just too confusing. This patch should be desirable even though the warning is still not in. Eric, can you look at the c-ada-spec.c part? Martin, does the hsa-gen.c part look correct? What about the r

Re: Implement -Wimplicit-fallthrough (take 2): questionable code

2016-08-09 Thread Marek Polacek
On Wed, Aug 03, 2016 at 10:56:08AM -0600, Jeff Law wrote: > On 07/27/2016 10:53 AM, Marek Polacek wrote: > > These are the cases where I wasn't sure if the falls through were > > intentional > > or not. > > > > This patch has been tested on powerpc64le-unknown-linux-gnu, > > aarch64-linux-gnu, >

Re: Implement C _FloatN, _FloatNx types [version 3]

2016-08-09 Thread James Greenhalgh
On Thu, Jul 28, 2016 at 10:43:25PM +, Joseph Myers wrote: > On Tue, 19 Jul 2016, James Greenhalgh wrote: > > > These slightly complicate the description you give above as we now want > > two behaviours. Where the 16-bit floating point extensions are available, > > we want to use the native ope

Re: [openacc] add a warning for non-contiguous data clauses

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 02, 2016 at 09:16:00PM -0700, Cesar Philippidis wrote: > 2016-08-02 Cesar Philippidis > > gcc/fortran/ > * openmp.c (resolve_oacc_data_clauses): Emit a warning about a > potentially non-contiguous array pointer. > (resolve_omp_clauses): Extend coverage of Ope

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE

2016-08-09 Thread Jakub Jelinek
On Fri, Jul 29, 2016 at 11:47:18PM +0800, Chung-Lin Tang wrote: > On 2016/7/21 07:13 PM, Jakub Jelinek wrote: > > Better put every && on a separate line if the whole if (...) doesn't fit > > on a single line. > > > >> > + && !n->sym->attr.cray_pointer > >> > +

[PATCH, i386]: Fix PR 72843, ICE in lra_set_insn_recog_data

2016-08-09 Thread Uros Bizjak
Hello! Insn predicates have to allow all constraints during LRA, not only after reload_completed is true. 2016-08-09 Uros Bizjak PR target/72843 * config/i386/i386.md (*movtf_internal): Use lra_in_progress || reload_completed instead of !can_create_pseudo_p in the insn constra

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 05:21:26PM +0200, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-linux and ppc64le-redhat-linux. > > 2016-08-09 Marek Polacek > > PR c/7652 > gcc/c-family/ > * c-ada-spec.c (dump_generic_ada_node): Add return. > gcc/ > * cselib.c (cselib_expan

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-08-09 Thread Bin.Cheng
On Sat, Aug 6, 2016 at 9:20 PM, Andreas Schwab wrote: > On Mi, Jul 13 2016, "Bin.Cheng" wrote: > >> Patch re-tested/applied on trunk as r238301. > > This breaks gcc.dg/vect/vect-117.c on powerpc. Hi Andreas, Sorry for the inconvenience, I will have a look. Thanks, bin > > Andreas. > > -- > Andre

Re: libgo patch committed: Change build procedure to use build tags

2016-08-09 Thread Lynn A. Boger
libgo test results in gcc-testresults for ppc64le & ppc64 are back to what they were before the change. Thanks. On 08/08/2016 03:34 PM, Ian Lance Taylor wrote: On Mon, Aug 8, 2016 at 11:14 AM, Lynn A. Boger wrote: The libgo tests on ppc64le and ppc64 have all been failing in gcc-testresults

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 05:21:26PM +0200, Marek Polacek wrote: > Testing with -Wimplicit-fallthrough turned up a few spots where > fall through is either a bug, or just too confusing. This patch > should be desirable even though the warning is still not in. > > Eric, can you look at the c-ad

Re: Use verify_oacc_routine_clauses for Fortran (was: Use verify_oacc_routine_clauses for C/C++)

2016-08-09 Thread Cesar Philippidis
On 08/01/2016 08:29 AM, Thomas Schwinge wrote: > On Mon, 01 Aug 2016 17:21:37 +0200, I wrote: >> Some checking of OpenACC clauses currently done in the front ends should >> be moved later, and be unified. (Also, I suppose, for supporting of the >> device_type clause, such checking actually *must*

Re: Implement -Wimplicit-fallthrough (take 2): questionable code

2016-08-09 Thread Jakub Jelinek
On Wed, Jul 27, 2016 at 06:53:39PM +0200, Marek Polacek wrote: > --- gcc/gcc/var-tracking.c > +++ gcc/gcc/var-tracking.c > @@ -1056,6 +1056,8 @@ adjust_mems (rtx loc, const_rtx old_rtx, void *data) >? GET_MODE_SIZE (amd->mem_mode) >

[PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Paolo Bonzini
clang recently added a new warning -Wexpansion-to-defined, which warns when `defined' is used outside a #if expression (including the case of a macro that is then used in a #if expression). While I disagree with their inclusion of the warning to -Wall, I think it is a good addition overall. First

[PR ipa/71981] Make get_dynamic_type grok MEM_REF

2016-08-09 Thread Martin Jambor
Hi, in the PR ipa_polymorphic_call_context::get_dynamic_type hits an assert when it tries to figure out dynamic type changes in sequence: _3 = MEM[(char * *)""]; fn1.isra.0 (_3); and gets the MEM_REF as its instance parameter. This patch makes it bail out early instead. Pre-approved by Hon

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Eric Botcazou
> 2016-08-09 Marek Polacek > > PR c/7652 > gcc/c-family/ > * c-ada-spec.c (dump_generic_ada_node): Add return. OK, thanks. -- Eric Botcazou

Re: [PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bruce Korb
Index: fixincludes/fixincl.tpl === --- fixincludes/fixincl.tpl (revision 239193) +++ fixincludes/fixincl.tpl (working copy) @@ -1,7 +1,7 @@ [= AutoGen5 Template -*- Mode: C -*- x=fixincl.x =] [= - (if (version-compar

Re: [PATCH, libgo]: Fix syscall test failure on CentOS 5.11

2016-08-09 Thread Ian Lance Taylor
On Tue, Aug 9, 2016 at 1:03 AM, Uros Bizjak wrote: > > syscall test fails on CentOS 5.11 with: > > exec_linux_test.go:167:25: error: reference to undefined identifier > 'syscall.CLONE_NEWNET' >Unshareflags: syscall.CLONE_NEWNET, > ^ > FAIL: syscall > > Attached patch f

Re: [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions

2016-08-09 Thread Sandra Loosemore
On 08/09/2016 06:01 AM, Andre Vieira (lists) wrote: [snip] The documentation is in the ARMV8-M Security Extensions in: ARM®v8-M Security Extensions: Requirements on Development Tools document I linked in the email above and subsequent emails (http://infocenter.arm.com/help/topic/com.arm.doc.ecm0

C++ PATCHes for abi_tag bugs

2016-08-09 Thread Jason Merrill
The first patch corrects a remaining issue with the GCC 6 fix for ABI tags on template member functions. We were missing tags on them, and I fixed that by setting tags on the template, but the proper fix is to look at the instantiation rather than the template to find the relevant tags, since the

Re: [PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bernd Edlinger
On 08/09/16 18:28, Bruce Korb wrote: > Index: fixincludes/fixincl.tpl > > === > > --- fixincludes/fixincl.tpl (revision 239193) > > +++ fixincludes/fixincl.tpl (working copy) > > @@ -1,7 +1,7 @@ > > [= AutoGen5 Template -*- M

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-09 Thread Richard Biener
On August 9, 2016 4:36:24 PM GMT+02:00, Jakub Jelinek wrote: >On Mon, Aug 01, 2016 at 12:44:30PM +0200, Richard Biener wrote: >> Note that reading the dwarf standard, it looks like it accepts a >location >> which means we could do an implicit location description using >> DW_OP_stack_value which g

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Bernd Edlinger
On 08/09/16 09:29, Richard Biener wrote: > On Mon, 8 Aug 2016, Bernd Edlinger wrote: > >> Hi! >> >> >> As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71083 >> we generate unaligned accesses because tree-predcom rewrites >> bitfield and packed accesses in a way that looses the proper >

Re: protected alloca class for malloc fallback

2016-08-09 Thread Trevor Saunders
On Tue, Aug 09, 2016 at 08:33:49PM +0900, Oleg Endo wrote: > On Mon, 2016-08-08 at 13:39 -0400, Trevor Saunders wrote: > > > > First sizeof std::string is 32 on x86_64, a char *, a size_t for the > > length, and a 16 byte union of a size_t for allocated size and a 16 > > byte buffer for short st

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-08-09 Thread Alessandro Fanfarillo
Thanks Paul, I fixed the unused -fdump-tree-original on the tests. About -fcoarray=single, I agree with Andre about not producing code for failed images functions when running in single-image mode. If you, or anybody else, thing otherwise I can adjust the functions to return a constant value (exc

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: > On 9 August 2016 at 16:39, Martin Jambor wrote: > > ... > > >> Instead of storing arg's precision and sign, we should store > >> parameter's precision and sign in ipa_compute_jump_functions_for_edge (). > >> Diff with resp

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Manuel López-Ibáñez
On 09/08/16 16:59, Paolo Bonzini wrote: Index: gcc/c-family/c-opts.c === --- gcc/c-family/c-opts.c (revision 239276) +++ gcc/c-family/c-opts.c (working copy) @@ -1256,6 +1256,10 @@ sanitize_cpp_opts (void) cpp_opts->un

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Eric Gallager
Hi, I'm just a lurker, but... On 8/9/16, Paolo Bonzini wrote: > Index: gcc/c-family/c.opt > === > --- gcc/c-family/c.opt(revision 239276) > +++ gcc/c-family/c.opt(working copy) > @@ -506,6 +506,10 @@ Wdouble-promotion

Re: [PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Andi Kleen
Martin Liška writes: > Hi. > > As mention in [1], enabling -fprofile-update=atomic when -pthread is logical > thing and is quite expected default behavior. > > Ready for trunk? It could potentially make things a lot slower. I don't think it's a good idea to do this by default. -Andi

Re: Init df for split pass since some target use REG_NOTE in split pattern

2016-08-09 Thread Steven Bosscher
On Mon, Aug 8, 2016 at 9:45 PM, Jeff Law wrote: > > I'm pretty sure we do _not_ want it for split_all_insns_noflow since that's > used when the CFG is not necessarily correct and thus I don't see how we can > reliably have death/unused notes. Actually, trying to initializing DF without a valid CF

Re: [RS6000] e500 part of pr71680

2016-08-09 Thread Segher Boessenkool
On Tue, Aug 09, 2016 at 06:34:46PM +0930, Alan Modra wrote: > The fallback part of HARD_REGNO_CALLER_SAVE_MODE, choose_hard_reg_mode, > returns DFmode for SImode when TARGET_E500_DOUBLE. This confuses > lra when attempting to save ctr around a call. > > Arseny, the bug reporter, has regression te

Re: Implement C _FloatN, _FloatNx types [version 3]

2016-08-09 Thread Joseph Myers
On Tue, 9 Aug 2016, James Greenhalgh wrote: > However, I still have some trouble with TFmode and TImode conversions. In > particular, I'm missing support for the standard names: > > extendhftf2 > trunctfhf2 > floattihf2 > fixhfti > > In addition, where the ARMv8.2-A extensions are not av

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Eric Botcazou
> I think from Eric's comment in get_inner_ref it can be possible > in Ada that the outer object is accidentally byte-aligned > but the inner reference is not. In that case I think it is > better to generate a BIT_FIELD_REF instead of a COMPONENT_REF. The patch says get_bit_range instead... The

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Paolo Bonzini
On 09/08/2016 20:30, Manuel López-Ibáñez wrote: >> >> >> + cpp_opts->warn_expansion_to_defined = cpp_warn_expansion_to_defined; >> + if (cpp_warn_expansion_to_defined == -1) >> +cpp_warn_expansion_to_defined = pedantic || extra_warnings; >> + > > Instead of the above, plase use LangEnabled

  1   2   >