Re: [gomp4] OpenACC reduction tests

2015-11-07 Thread Thomas Schwinge
Hi! On Wed, 23 Sep 2015 09:56:44 +0200, I wrote: > On Fri, 18 Sep 2015 10:11:25 +0200, I wrote: > > On Fri, 17 Jul 2015 11:13:59 -0700, Cesar Philippidis > > wrote: > > > This patch updates the libgomp OpenACC reduction test cases [...] > > Given the following > >

Re: [PATCH 1/7] New obstack_next_free is not an lvalue

2015-11-07 Thread Richard Sandiford
Alan Modra writes: > diff --git a/gcc/gensupport.c b/gcc/gensupport.c > index 0480e17..484ead2 100644 > --- a/gcc/gensupport.c > +++ b/gcc/gensupport.c > @@ -2253,7 +2253,7 @@ htab_eq_string (const void *s1, const void *s2) > and a permanent heap copy of STR is created. */

Combined constructs' clause splitting (was: [gomp4] backport trunk FE changes)

2015-11-07 Thread Thomas Schwinge
Hi! On Fri, 6 Nov 2015 15:31:23 -0800, Cesar Philippidis wrote: > I've applied this patch to gomp-4_0-branch which backports most of my > front end changes from trunk. Note that I found a regression while > testing, which is also present in trunk. It looks like >

Add internal bitcount functions

2015-11-07 Thread Richard Sandiford
This patch adds internal function equivalents of all the INT_FN functions. Unlike the math functions, these functions never set errno and the internal functions should be exactly equivalent to the built-in ones. The reason for defining the internal functions is so that we can extend the

Use combined_fn in tree-ssa-reassoc.c

2015-11-07 Thread Richard Sandiford
Another patch to extend uses of built_in_function to combined_fn, this time in tree-ssa-reassoc.c. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * tree-ssa-reassoc.c: Include case-cfn-macros.h. (stmt_is_power_of_op):

Use combined_fn in tree-ssa-math-opts.c

2015-11-07 Thread Richard Sandiford
Another patch to extend uses of built_in_function to combined_fn, this time in tree-ssa-math-opts.c. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * tree-ssa-math-opts.c: Include case-cfn-macros.h.

Extend tree-call-cdce to calls whose result is used

2015-11-07 Thread Richard Sandiford
For -fmath-errno, builtins.c currently expands calls to sqrt to: y = sqrt_optab (x); if (y != y) [ sqrt (x); or errno = EDOM; ] The drawbacks of this are: - the call to sqrt is protected by the result of the optab rather than the input. It would be better to check !(x >= 0),

Re: [sh] Add flag_unsafe_math_optimizations to sincossf3

2015-11-07 Thread Oleg Endo
On Sat, 2015-11-07 at 13:27 +, Richard Sandiford wrote: > builtins.c uses the following code to guard expansions involving > optabs: > > CASE_FLT_FN (BUILT_IN_EXP): > CASE_FLT_FN (BUILT_IN_EXP10): > CASE_FLT_FN (BUILT_IN_POW10): > CASE_FLT_FN (BUILT_IN_EXP2): > CASE_FLT_FN

Re: [Fortran, patch, pr68218, v1] ALLOCATE with size given by a module function

2015-11-07 Thread Paul Richard Thomas
Dear Andre, OK for trunk. I understand that you have investigated the issue(s) reported to you by Dominique and can find no sign of them. Thanks Paul On 5 November 2015 at 15:29, Andre Vehreschild wrote: > Hi all, > > attached is a rather trivial patch to prevent multiple

[RFC] [PATCH V2]: RE: [RFC] [Patch] Relax tree-if-conv.c trap assumptions.

2015-11-07 Thread Kumar, Venkataramanan
Hi Richard, > -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: Friday, October 30, 2015 5:00 PM > To: Kumar, Venkataramanan > Cc: Andrew Pinski; gcc-patches@gcc.gnu.org > Subject: Re: [RFC] [Patch] Relax tree-if-conv.c trap assumptions. > > On Fri,

Add a combined_fn enum

2015-11-07 Thread Richard Sandiford
I'm working on a patch series that needs to be able to treat built-in functions and internal functions in a similar way. This patch adds a new enum, combined_fn, that combines the two together. It also adds utility functions for seeing which combined_fn (if any) is called by a given CALL_EXPR or

Add internal math functions

2015-11-07 Thread Richard Sandiford
This patch adds internal functions for simple FLT_FN built-in functions, in cases where an associated optab already exists. Unlike some of the built-in functions, these internal functions never set errno. LDEXP is an odd-one out in that its second operand is an integer. All the others operate on

Make more use of combined_fn

2015-11-07 Thread Richard Sandiford
This patch generalises fold-const.[hc] routines to use combined_fn instead of built_in_function. It also updates gimple-ssa-backprop,c since the update is simple and it avoids churn on the call to negate_mathfn_p. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to

Add null identifiers to genmatch

2015-11-07 Thread Richard Sandiford
This patch adds a null identifier that can never match anything and can never be generated. It is only valid in operator lists and fors. Later patches will add uses of it. The idea is to allow operator lists for maths functions that have four entries: - float built-in - double built-in - long

OpenACC Firstprivate

2015-11-07 Thread Nathan Sidwell
Jakub, this patch implements firstprivate support for openacc. This is pretty straight forwards -- they're just regular auto variables, but with an initialization value from the host. The gimplify.c implementation is somewhat different to gomp4 branch, as I've added new bits to enum

[gomp4] Merge trunk r229809 (2015-11-05) into gomp-4_0-branch

2015-11-07 Thread Thomas Schwinge
Hi! Committed to gomp-4_0-branch in r229929: commit f782e15f314aa57eb7bca3bfdea54fba6c48e929 Merge: eb7d11e e103794 Author: tschwinge Date: Sat Nov 7 13:42:07 2015 + svn merge -r 229770:229809 svn+ssh://gcc.gnu.org/svn/gcc/trunk

[PATCH] Complete cxa_atexit for AIX

2015-11-07 Thread David Edelsohn
IBM xlC++ compiler provides its own implementation of atexit() to provide correct interaction between atexit() and destructors. GCC needs to provide the same through libgcc. I previously added partial support based on the implementation in GLIBC (copied with FSF permission) and confirmed that

RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)

2015-11-07 Thread Kelvin Nilsen
This is a draft patch to partially address the concerns described in bugzilla problem report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68212). The patch is incomplete in the sense that there are some known shortcomings with nested loops which I am still working on. I am sending this out

Extend fold_const_call to combined_fn

2015-11-07 Thread Richard Sandiford
This patch extends fold_const_call so that it can handle internal as well as built-in functions. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * fold-const-call.h (fold_const_call): Replace built_in_function arguments

Use combined_fn in tree-vrp.c

2015-11-07 Thread Richard Sandiford
Another patch to extend uses of built_in_function to combined_fn, this time in tree-vrp.c. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * tree-vrp.c: Include case-cfn-macros.h. (extract_range_basic): Switch on

Short-cut generation of simple built-in functions

2015-11-07 Thread Richard Sandiford
This patch short-circuits the builtins.c expansion code for a particular gimple call if: - the function has an associated internal function - the target implements that internal function - the call has no side effects This allows a later patch to remove the builtins.c code, once calls with side

Add basic support for direct_optab internal functions

2015-11-07 Thread Richard Sandiford
This patch adds a concept of internal functions that map directly to an optab (here called "direct internal functions"). The function can only be used if the associated optab can be used. We currently have four functions like that: - LOAD_LANES - STORE_LANES - MASK_LOAD - MASK_STORE so the

Add gencfn-macros.c

2015-11-07 Thread Richard Sandiford
This patch automatically generates case macros such as: CASE_CFN_SQRT for each {F,,L} floating-point built-in function and each {,L,LL,IMAX} integer built-in function. The macros match the same built-in functions as CASE_FLT_FN and CASE_INT_FN but in addition include the associated internal

Extend mathfn_built_in to handle combined_fn

2015-11-07 Thread Richard Sandiford
This patch extends mathfn_built_in to handle combined_fn, but keeps the old built_in_function interface around since it's a common case. Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi. OK to install? Thanks, Richard gcc/ * builtins.h (mathfn_built_in): Add a

Replace match.pd DEFINE_MATH_FNs with auto-generated lists

2015-11-07 Thread Richard Sandiford
This patch autogenerates the operator lists for maths functions like SQRT, adding an additional entry for internal functions. E.g.: (define_operator_list SQRT BUILT_IN_SQRTF BUILT_IN_SQRT BUILT_IN_SQRTL IFN_SQRT) and: (define_operator_list CABS

Re: improved RTL-level if conversion using scratchpads [half-hammock edition]

2015-11-07 Thread Bernhard Reutner-Fischer
On November 6, 2015 5:27:44 PM GMT+01:00, Bernd Schmidt wrote: >On 11/06/2015 04:52 PM, Sebastian Pop wrote: > >>> opinion). If you want a half-finished redzone allocator, I can send >you a >>> patch. >> >> Yes please. Let's get it work. > >Here you go. This is

Use combined_fn in tree-vect-patterns.c

2015-11-07 Thread Richard Sandiford
Another patch to extend uses of built_in_function to combined_fn, this time in tree-vect-patterns.c. The old code didn't handle the long double pow variants, but I think that's because noone had a target that would benefit rather than because the code would mishandle them. Tested on

[sh] Add flag_unsafe_math_optimizations to sincossf3

2015-11-07 Thread Richard Sandiford
builtins.c uses the following code to guard expansions involving optabs: CASE_FLT_FN (BUILT_IN_EXP): CASE_FLT_FN (BUILT_IN_EXP10): CASE_FLT_FN (BUILT_IN_POW10): CASE_FLT_FN (BUILT_IN_EXP2): CASE_FLT_FN (BUILT_IN_EXPM1): CASE_FLT_FN (BUILT_IN_LOGB): CASE_FLT_FN

Re: Add null identifiers to genmatch

2015-11-07 Thread Pedro Alves
Hi Richard, Passerby comment below. On 11/07/2015 01:21 PM, Richard Sandiford wrote: > -/* Lookup the identifier ID. */ > +/* Lookup the identifier ID. Allow "null" if ALLOW_NULL. */ > > id_base * > -get_operator (const char *id) > +get_operator (const char *id, bool allow_null = false) >

[PATCH 5/7] Modify obstack.[hc] to avoid having to include other gnulib files

2015-11-07 Thread Alan Modra
Using the standard gnulib obstack source requires importing quite a lot of other files from gnulib, and requires build changes. If one did want to use gnulib obstack directly, then it would need to go in a sub-directory and after ".../gnulib-tool --import obstack" we'd have the following: ./lib:

[PATCH 6/7] Silence obstack.c -Wc++compat warning

2015-11-07 Thread Alan Modra
Fixes warning: request for implicit conversion from ‘void *’ to ‘struct _obstack_chunk *’ not permitted in C++ [-Wc++-compat] I moved the assignment to h->chunk to fix an overlong line, then decided it would be better after the alloc failure check just to do things the same way as in

[gomp4, committed] Revert "Add counter inits to zero_iter_bb in expand_omp_for_init_counts"

2015-11-07 Thread Tom de Vries
Hi, this patch reverts "Add counter inits to zero_iter_bb in expand_omp_for_init_counts". We no longer split off the kernels region in ssa-mode, so there's no need for this patch anymore. Committed to gomp-4_0-branch. Thanks, - Tom Revert "Add counter inits to zero_iter_bb in

Re: [PATCH] i386: Use the STC bb-reorder algorithm at -Os (PR67864)

2015-11-07 Thread Uros Bizjak
On Sat, Nov 7, 2015 at 3:34 AM, Segher Boessenkool wrote: > Adding x86 maintainer, ping? > > On Fri, Oct 16, 2015 at 05:53:41AM -0700, Segher Boessenkool wrote: >> For x86, STC still gives better results for optimise-for-size than >> "simple" does. So use STC at -Os

[gomp4, committed] Make formatting resemble trunk in f95-lang.c

2015-11-07 Thread Tom de Vries
Hi, this patch removes formatting differences with trunk. Committed to gomp-4_0-branch. Thanks, - Tom Make formatting resemble trunk in f95-lang.c 2015-11-07 Tom de Vries * f95-lang.c: Make formatting resemble trunk. --- gcc/fortran/f95-lang.c | 1 + 1 file

[gomp4, committed] Cleanup formatting of DEF_GOACC_BUILTINs

2015-11-07 Thread Tom de Vries
Hi, this patch removes formatting differences with trunk. Committed to gomp-4_0-branch. Thanks, - Tom >From a77fd266102498a909886cecde1b57adf9350d90 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 6 Nov 2015 22:11:08 +0100 Subject: [PATCH 2/4] Cleanup formatting

[gomp4, committed] Remove no_overflow_tree_code

2015-11-07 Thread Tom de Vries
Hi, this patch removes dead code from gomp-4_0-branch. Committed to gomp-4_0-branch. Thanks, - Tom Remove no_overflow_tree_code 2015-11-07 Tom de Vries * tree.c (no_overflow_tree_code): Remove. * tree.h (no_overflow_tree_code): Remove. --- gcc/tree.c | 24

[PATCH 4/7] Copy gnulib obstack files

2015-11-07 Thread Alan Modra
This copies obstack.[ch] from gnulib, and updates the docs. The next patch should be applied if someone repeats the import at a later date. include/ PR gdb/17133 * obstack.h: Import current gnulib file. libiberty/ PR gdb/17133 * obstack.c: Import current gnulib

[PATCH 3/7] Update libsanitizer obstack interceptors

2015-11-07 Thread Alan Modra
New obstack uses sensible types, size_t instead of int for length params. Since libsanitizer does not use prototypes from obstack.h to call the real functions, it's necessary to update the libsanitizer function declarations emitted by the INTERCEPTOR macro. As per the comment added to

[PATCH 2/7] Correct libvtv obstack use

2015-11-07 Thread Alan Modra
Fixes a compile error with both old and new obstacks due to obstack_chunk_free having the wrong signature. Also, setting chunk size and alignment before obstack_init is pointless since they are overwritten. * vtv_malloc.cc (obstack_chunk_free): Correct param type.

[PATCH 7/7] Configury changes for obstack optimization

2015-11-07 Thread Alan Modra
Provides defines used to determine whether glibc obstacks are compatible. Generally speaking, 32-bit targets won't need to use obstack.o from libiberty if glibc is used, while 64-bit targets will, until glibc gets the new obstack code. * configure.ac: Check size of size_t. *

***ping*** [Patch, fortran] PR68196 [4.9/5/6 Regression] ICE on function result with procedure pointer component

2015-11-07 Thread Paul Richard Thomas
***ping*** On 4 November 2015 at 16:03, Paul Richard Thomas wrote: > Dear All, > > The patch for these PRs is fully explained by the the comments and/or > changelogs. PR66465 has no connection with PR68196, other than Damian > asking if it is connected! > >

Re: [AArch64] Fix vqtb[lx][234] on big-endian

2015-11-07 Thread James Greenhalgh
On Fri, Nov 06, 2015 at 09:37:17PM +0100, Christophe Lyon wrote: > On 6 November 2015 at 18:03, James Greenhalgh > wrote: > > On Fri, Nov 06, 2015 at 02:49:38PM +0100, Christophe Lyon wrote: > >> Hi, > >> > >> As mentioned by James a few weeks ago, the vqtbl[lx][234]

[gomp4, committed] Undo cgraph_node::release_body workaround

2015-11-07 Thread Tom de Vries
Hi, this patch removes a workaround that's no longer needed, now that we split off the kernels region at the first omp-expand pass. Committed to gomp-4_0-branch. Thanks, - Tom >From 5e9a609006b45c51598a3d52d5ab55b72a186f67 Mon Sep 17 00:00:00 2001 From: Tom de Vries

[PATCH 0/7] 64-bit obstack support in libiberty

2015-11-07 Thread Alan Modra
This patchset imports new obstack support to libiberty, to better support 64-bit systems, and fix an old gdb bug. Most of the necessary changes outside of libiberty were committed October last year, but a few more incompatibilities have crept in since then. The first three patches fix these

[PATCH 1/7] New obstack_next_free is not an lvalue

2015-11-07 Thread Alan Modra
New obstack.h casts obstack_next_free to (void *), resulting in it being a non-lvalue, and warnings on pointer arithmetic. gcc/ * gensupport.c (add_mnemonic_string): Make len param a size_t. (gen_mnemonic_setattr): Make "size" var a size_t. Use obstack_blank_fast to

Re: [PATCH] Add -fchecking

2015-11-07 Thread Gerald Pfeifer
On Tue, 27 Oct 2015, Richard Biener wrote: > This adds -fchecking as a way to enable internal consistency checks > even in release builds (or disable checking with -fno-checking - up to > a certain extent - with checking enabled). How (much) do we want to advertize this? Gerald

[PATCH] PR fortran/68244 -- Check for NULL() in an array spec.

2015-11-07 Thread Steve Kargl
NULL() can only appear in a few situations. It cannot be part of an array spec. See testcase for example. OK to commit? 2015-11-07 Steven G. Kargl PR fortran/68224 * array.c (match_array_element_spec): Check of invalid NULL(). While here, fix nearby

Re: [Patch, fortran] PR68196 [4.9/5/6 Regression] ICE on function result with procedure pointer component

2015-11-07 Thread Steve Kargl
On Wed, Nov 04, 2015 at 04:03:10PM +0100, Paul Richard Thomas wrote: > > 2015-11-04 Paul Thomas > > PR fortran/68196 > * class.c (has_finalizer_component): Prevent infinite recursion > through this function if the derived type and that of its > component are

Re: [gomp4] backport trunk FE changes

2015-11-07 Thread Cesar Philippidis
On 11/07/2015 04:30 AM, Thomas Schwinge wrote: > Hi! > > On Fri, 6 Nov 2015 15:31:23 -0800, Cesar Philippidis > wrote: >> I've applied this patch to gomp-4_0-branch which backports most of my >> front end changes from trunk. > >> --- a/gcc/cp/pt.c >> +++ b/gcc/cp/pt.c

Re: Combined constructs' clause splitting

2015-11-07 Thread Cesar Philippidis
On 11/07/2015 03:45 AM, Thomas Schwinge wrote: > Hi! > > On Fri, 6 Nov 2015 15:31:23 -0800, Cesar Philippidis > wrote: >> I've applied this patch to gomp-4_0-branch which backports most of my >> front end changes from trunk. Note that I found a regression while >>

[PATCH 1/4] [ARM] PR63870 Add qualifiers for NEON builtins

2015-11-07 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog: Charles Baylis PR target/63870 * config/arm/arm-builtins.c (enum arm_type_qualifiers): New enumerator qualifier_struct_load_store_lane_index. (builtin_arg): New

Re: [PATCH] Add support for ARM embedded multilibs

2015-11-07 Thread Jasmin J.
Hello Ramana and Tejas! The patch is originally from Terry Guo (see https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00729.html). SVN commit r210320 on svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch . The original was using "with_multilib_list" instead of TM_MULTILIB_CONFIG. Moreover,

Re: [PATCH 1/9] ENABLE_CHECKING refactoring

2015-11-07 Thread Gerald Pfeifer
On Wed, 21 Oct 2015, Jeff Law wrote: > I might even claim it's already helping. While we're still seeing > syntax errors in the conditionally compiled code, it doesn't feel like > we're seeing it as often as in the past. That's purely anecdotal based > on what I've seen fly by over the last

Re: [PATCH] Add -fchecking

2015-11-07 Thread Jeff Law
On 11/07/2015 01:47 PM, Gerald Pfeifer wrote: On Tue, 27 Oct 2015, Richard Biener wrote: This adds -fchecking as a way to enable internal consistency checks even in release builds (or disable checking with -fno-checking - up to a certain extent - with checking enabled). How (much) do we want

[committed] gcc.dg/Wno-frame-address.c: Skip on hppa*-*-*

2015-11-07 Thread John David Anglin
We need to skip on hppa since it's not possible to access arbitrary frames. Dave -- John David Anglin dave.ang...@bell.net 2015-11-07 John David Anglin * gcc.dg/Wno-frame-address.c: Skip on hppa*-*-*. Index: gcc.dg/Wno-frame-address.c

[SPARC] Add missing final period

2015-11-07 Thread Eric Botcazou
Applied on the mainline. 2015-11-07 Eric Botcazou * config/sparc/sparc.opt (mfix-at697f): Add final period. -- Eric BotcazouIndex: config/sparc/sparc.opt === --- config/sparc/sparc.opt (revision

Re: [PATCH] c/67882 - improve -Warray-bounds for invalid offsetof

2015-11-07 Thread Segher Boessenkool
On Tue, Oct 20, 2015 at 10:10:44PM +, Joseph Myers wrote: > > typedef struct FA5_7 { > > int i; > > char a5_7 [5][7]; > > } FA5_7; > > > > __builtin_offsetof (FA5_7, a5_7 [0][7]), // { dg-warning > > "index" } > > __builtin_offsetof (FA5_7, a5_7 [1][7]), // {

[PATCH 4a/4] [ARM] PR63870 Use internal_error() for invalid lane numbers

2015-11-07 Thread charles . baylis
From: Charles Baylis Charles Baylis * config/arm/neon.md (neon_vld1_lane): Use internal_error for invalid lane number. (neon_vst1_lane): Likewise. (neon_vld2_lane): Likewise. (neon_vst2_lane):

[PATCH 4b/4] [ARM] PR63870 Remove error for invalid lane numbers

2015-11-07 Thread charles . baylis
From: Charles Baylis Charles Baylis * config/arm/neon.md (neon_vld1_lane): Remove error for invalid lane number. (neon_vst1_lane): Likewise. (neon_vld2_lane): Likewise. (neon_vst2_lane): Likewise.

[PATCH 2/4] [ARM] PR63870 Mark lane indices of vldN/vstN with appropriate qualifier

2015-11-07 Thread charles . baylis
From: Charles Baylis gcc/ChangeLog: Charles Baylis PR target/63870 * config/arm/arm-builtins.c: (arm_load1_qualifiers) Use qualifier_struct_load_store_lane_index. (arm_storestruct_lane_qualifiers)

[PATCH v3 0/4] [ARM] PR63870 vldN_lane/vstN_lane error messages

2015-11-07 Thread charles . baylis
From: Charles Baylis Previous discussion: https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00657.html This is a minor update to the previous patch set, fixing one coding style issue in the first patch, and adding a fourth patch for which there are two options, described

Re: [PATCH PR52272]Be smart when adding iv candidates

2015-11-07 Thread Bin.Cheng
On Fri, Nov 6, 2015 at 9:24 PM, Richard Biener wrote: > On Wed, Nov 4, 2015 at 11:18 AM, Bin Cheng wrote: >> Hi, >> PR52272 reported a performance regression in spec2006/410.bwaves once GCC is >> prevented from representing address of one memory