Re: Fix PR43404, PR48470, PR64744 ICE on naked functions

2015-06-25 Thread Alexander Basov
2015-06-25 21:47 GMT+03:00 Jeff Law : > On 06/03/2015 02:15 PM, Alexander Basov wrote: >> >> Hello Jeff, >> please find updated patch attached >> diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b190f91..c6db8a9 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -138

Re: Add .def file for public target instructions

2015-06-25 Thread H.J. Lu
On Thu, Jun 25, 2015 at 4:37 PM, H.J. Lu wrote: > On Thu, Jun 25, 2015 at 4:00 PM, Andrew Pinski wrote: >> On Thu, Jun 25, 2015 at 3:57 PM, H.J. Lu wrote: >>> On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu wrote: On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford wrote: > [A fair bit

[SH][committed] Fix PR 65979 / PR 66611

2015-06-25 Thread Oleg Endo
Hi, This fixes the problem of emitting an insn from within a peephole pattern which can't be recognized due to mismatching operand constraints. Tested by Kaz on sh4-linux. Committed to trunk as r224987. Backport to GCC 5 will follow. Cheers, Oleg gcc/ChangeLog: PR target/65979

Re: Add .def file for public target instructions

2015-06-25 Thread H.J. Lu
On Thu, Jun 25, 2015 at 4:00 PM, Andrew Pinski wrote: > On Thu, Jun 25, 2015 at 3:57 PM, H.J. Lu wrote: >> On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu wrote: >>> On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford >>> wrote: [A fair bit later than promised, sorry...] Mikhail posted

Re: Add .def file for public target instructions

2015-06-25 Thread Andrew Pinski
On Thu, Jun 25, 2015 at 3:57 PM, H.J. Lu wrote: > On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu wrote: >> On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford >> wrote: >>> [A fair bit later than promised, sorry...] >>> >>> Mikhail posted a patch to make genflags generate the default HAVE_foo >>> and

Re: Add .def file for public target instructions

2015-06-25 Thread H.J. Lu
On Thu, Jun 25, 2015 at 1:09 PM, H.J. Lu wrote: > On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford > wrote: >> [A fair bit later than promised, sorry...] >> >> Mikhail posted a patch to make genflags generate the default HAVE_foo >> and gen_foo definitions that have recently been added to defa

Re: [Patch, fortran] PR52846 - [F2008] Support submodules

2015-06-25 Thread Paul Richard Thomas
Dear Reinhold, That looks like a very strange bug. I am out of the loop until Sunday evening and so cannot look at it until then. Thanks, this really helps Paul On 25 June 2015 at 23:21, Bader, Reinhold wrote: > Looks much better. > > Attached another test case that fails compilation. The func

Re: Remove redundant AND from count reduction loop

2015-06-25 Thread Marc Glisse
On Wed, 24 Jun 2015, Richard Biener wrote: On Wed, Jun 24, 2015 at 11:57 AM, Richard Sandiford wrote: Richard Biener writes: On Tue, Jun 23, 2015 at 11:27 PM, Marc Glisse wrote: On Tue, 23 Jun 2015, Richard Sandiford wrote: +/* Vector comparisons are defined to produce all-one or all-zer

[PATCH 3/4] Manual fixes for PASS_DATA_INIT missed by the script

2015-06-25 Thread David Malcolm
gcc/ChangeLog: * auto-profile.c (pass_data_ipa_auto_profile): Use PASS_DATA_INIT macro and supply a value for "classname". * ipa-chkp.c (pass_data_ipa_chkp_versioning): Likewise. (pass_data_ipa_chkp_early_produce_thunks): Likewise. (pass_data_ipa_chkp_produce

[PATCH 4/4] Print pass metadata at the start and end of dumpfiles

2015-06-25 Thread David Malcolm
This patch adds information to the top and bottom of dumpfiles giving metadata on the pass that they're associated with e.g.: ; start of dump from pass_forwprop (../../src/gcc/tree-ssa-forwprop.c:2103) (dump goes here) ; end of dump from pass_forwprop (../../src/gcc/tree-ssa-forwprop.c:2103) My

[PATCH 1/4] Add classname/filename/line metadata to struct pass_data

2015-06-25 Thread David Malcolm
gcc/ChangeLog: * tree-pass.h (struct pass_data): Add fields "classname", "filename", "line_num". (PASS_DATA_INIT): New macro. --- gcc/tree-pass.h | 27 +++ 1 file changed, 27 insertions(+) diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 4545556

[PATCH 0/4] Add source-location metadata to GCC passes

2015-06-25 Thread David Malcolm
Whilst investigating a missed optimization and poring over numerous dumpfiles I found it awkward to go from dumpfile to the related pass. For example, given dumpfiles: foo.c.038t.cddce1 foo.c.079t.fre2 where are the corresponding passes implemented? Assuming my level of GCC expertise or less,

AW: [Patch, fortran] PR52846 - [F2008] Support submodules

2015-06-25 Thread Bader, Reinhold
Looks much better. Attached another test case that fails compilation. The function result as declared in the module procedure interface is not propagated to the submodule that uses the argument/resultless form in the implementation. Cheers Reinhold > -Ursprüngliche Nachricht- > Von: P

Re: [gomp4.1] document omp_get_max_task_priority and OMP_MAX_TASK_PRIORITY

2015-06-25 Thread Jakub Jelinek
On Thu, Jun 25, 2015 at 02:11:56PM -0700, Aldy Hernandez wrote: > commit 98e12d99f2e83cd235af0aebe6435a25c69e3137 > Author: Aldy Hernandez > Date: Thu Jun 25 14:07:26 2015 -0700 > > * libgomp.texi: Document omp_get_max_task_priority and > OMP_MAX_TASK_PRIORITY. Ok, thanks; with a m

[gomp4.1] document omp_get_max_task_priority and OMP_MAX_TASK_PRIORITY

2015-06-25 Thread Aldy Hernandez
While looking around the OMP4.1 party, I noticed that OMP_MAX_TASK_PRIORITY and friends are not documented in the library. Attached is a patch adding said support. (Don't look at me, the whole documentation layout was ugly when I got here.) Tested by building libgomp. OK for branch? commit

Re: [patch] Remove fold-const.h as a dependency for gimple.h

2015-06-25 Thread Jeff Law
On 06/25/2015 02:31 PM, Andrew MacLeod wrote: I proposed including fold-const.h into gimple.h, but didn't notice that its actually only needed by one inline function. Moving that function to gimple.c means its no longer required. 160 places need cgraph.h, so by removing this dependency, the numb

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Eric Botcazou
> There were some defined but not used warnings (??) that caused it to > fail, especially since I didn't configure with --disable-werror. Weird. I bootstrap the compiler in default mode every day and I haven't had a bootstrap failure for at least a month. -- Eric Botcazou

Re: [PATCH] Validate -pie if PIE is enabled by default

2015-06-25 Thread Joseph Myers
On Thu, 25 Jun 2015, H.J. Lu wrote: > When PIE is enabled by default, -pie is treated as nop in driver. We > should simply validate it, instead of issue an error. > > OK for trunk? OK. -- Joseph S. Myers jos...@codesourcery.com

[patch] Remove fold-const.h as a dependency for gimple.h

2015-06-25 Thread Andrew MacLeod
I proposed including fold-const.h into gimple.h, but didn't notice that its actually only needed by one inline function. Moving that function to gimple.c means its no longer required. 160 places need cgraph.h, so by removing this dependency, the number of those files which still need fold-cons

Re: [gomp4.1] Initial support for some OpenMP 4.1 construct parsing

2015-06-25 Thread Jakub Jelinek
On Thu, Jun 25, 2015 at 10:45:29PM +0300, Ilya Verbin wrote: > So, as I understood, three tasks will be generated almost simultaneously in > foo1: one on host and two on target. > Target task 1 will be executed immediately. > Host task will wait for task 1 to be completed on target. > (Or it is not

Re: Add .def file for public target instructions

2015-06-25 Thread H.J. Lu
On Tue, Jun 23, 2015 at 11:41 AM, Richard Sandiford wrote: > [A fair bit later than promised, sorry...] > > Mikhail posted a patch to make genflags generate the default HAVE_foo > and gen_foo definitions that have recently been added to defaults.h: > > https://gcc.gnu.org/ml/gcc-patches/2015-06/

Re: [PATCH 2/2] jit: add switch statements

2015-06-25 Thread David Malcolm
On Thu, 2015-06-25 at 21:47 +0200, Basile Starynkevitch wrote: > On 06/25/2015 09:13 PM, David Malcolm wrote: > > Some interpreters/VMs support a switch statement (for example the JVM > > has opcodes "lookupswitch" and "tableswitch"). GCC has a set of > > optimizations for efficiently handling swi

Re: [PATCH] i386: Do not modify existing RTL (PR66412)

2015-06-25 Thread Segher Boessenkool
On Thu, Jun 25, 2015 at 11:59:28AM +0200, Richard Biener wrote: > On Thu, Jun 25, 2015 at 7:11 AM, Segher Boessenkool > wrote: > > On Wed, Jun 24, 2015 at 09:40:28PM -0600, Jeff Law wrote: > >> On 06/24/2015 05:29 PM, Segher Boessenkool wrote: > >> >A few define_split's in the i386 backend modify

Re: [PATCH 2/2] jit: add switch statements

2015-06-25 Thread Basile Starynkevitch
On 06/25/2015 09:13 PM, David Malcolm wrote: Some interpreters/VMs support a switch statement (for example the JVM has opcodes "lookupswitch" and "tableswitch"). GCC has a set of optimizations for efficiently handling switch statements, so it makes sense to directly expose switch statements in t

Re: [gomp4.1] Initial support for some OpenMP 4.1 construct parsing

2015-06-25 Thread Ilya Verbin
On Tue, Jun 09, 2015 at 22:24:26 +0200, Jakub Jelinek wrote: > On Tue, Jun 09, 2015 at 09:36:08PM +0300, Ilya Verbin wrote: > > I don't quite understand from "If a depend clause is present, then it is > > treated > > as if it had appeared on the implicit task construct that encloses the > > targe

Re: [PATCH 1/2] Add gcc/typed-splay-tree.h

2015-06-25 Thread Jeff Law
On 06/25/2015 01:13 PM, David Malcolm wrote: I found when implementing switch statements for the jit that it was much easier to work with libiberty's splay-tree.h by first wrapping it in a C++ wrapper to add typesafety. This patch adds such a wrapper, implementing the methods I needed. It's unu

Re: [PATCH 2/2] jit: add switch statements

2015-06-25 Thread Jeff Law
On 06/25/2015 01:13 PM, David Malcolm wrote: * It extends the libgccjit API. It's not clear to me yet how to manage extensions of the libgccjit API: should I use symbol maps and versioning, or bump the SONAME? I'm thinking of providing precanned feature macros within libgccji

Re: [PATCH] top-level for libvtv: use normal (not raw_cxx) target exports

2015-06-25 Thread Jeff Law
On 06/09/2015 08:22 AM, Michael Haubenwallner wrote: Hi build machinery maintainers, since we always build the C++ compiler now, I fail to see the need to still use RAW_CXX_TARGET_EXPORTS for libvtv. But why is vtv special here? Wouldn't this also apply to libstdc++-v3 which would still have r

[PATCH 2/2] jit: add switch statements

2015-06-25 Thread David Malcolm
Some interpreters/VMs support a switch statement (for example the JVM has opcodes "lookupswitch" and "tableswitch"). GCC has a set of optimizations for efficiently handling switch statements, so it makes sense to directly expose switch statements in the libgccjit API. This patch implements a swit

[PATCH 1/2] Add gcc/typed-splay-tree.h

2015-06-25 Thread David Malcolm
I found when implementing switch statements for the jit that it was much easier to work with libiberty's splay-tree.h by first wrapping it in a C++ wrapper to add typesafety. This patch adds such a wrapper, implementing the methods I needed. It's unused in this patch, but is used in the followup

Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX

2015-06-25 Thread Jeff Law
On 06/05/2015 08:01 AM, Ilya Enkovich wrote: On 04 Jun 15:53, Joseph Myers wrote: On Thu, 4 Jun 2015, Ilya Enkovich wrote: 2015-06-03 18:59 GMT+03:00 Joseph Myers : You could, for example, have #if SOMETHING #define MSG "%nsome msg" #else #define MSG "" #endif and have another spec using MS

Re: Fix PR43404, PR48470, PR64744 ICE on naked functions

2015-06-25 Thread Jeff Law
On 06/03/2015 02:15 PM, Alexander Basov wrote: Hello Jeff, please find updated patch attached diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index b190f91..c6db8a9 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1382,7 +1382,15 @@ expand_one_var (tree var, bool toplevel, bool really_expa

Re: C/C++ PATCH to smarten up -Wswitch-bool (PR c/66322)

2015-06-25 Thread Jeff Law
On 06/10/2015 12:02 PM, Marek Polacek wrote: Linus's kind words here prodded me to improving the -Wswitch-bool warning. In particular, this patch makes the warning not warn when the case values aren't outside bool range. But it will still warn about Linus b

Re: [VRP] Improve value ranges for unsigned division

2015-06-25 Thread Jeff Law
On 06/24/2015 12:36 AM, Kugan wrote: On 23/06/15 01:09, Richard Biener wrote: On Sat, Jun 20, 2015 at 9:12 AM, Kugan wrote: As discussed in PR64130, this patch improves the VRP value ranges for unsigned division. Bootstrapped and regression tested on x86_64-linux-gnu and regression tested o

Re: Do not take address of empty string front

2015-06-25 Thread Jonathan Wakely
On 23/06/15 22:04 +0200, François Dumont wrote: On 22/06/2015 17:10, Jonathan Wakely wrote: On 20/06/15 12:59 +0100, Jonathan Wakely wrote: On 20/06/15 12:03 +0200, François Dumont wrote: Hi 2 experimental tests are failing in debug mode because __do_str_codecvt is sometimes taking address

Re: [05/13] Add nofree_ptr_hash

2015-06-25 Thread Jeff Law
On 06/25/2015 11:33 AM, Richard Sandiford wrote: Jeff Law writes: On 06/25/2015 03:49 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 5:19 AM, Jeff Law wrote: On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law writes: So I'm holding off on approving this one pending further dis

Re: [PATCH 03/17] Add test-cfg.c to gcc/unittests

2015-06-25 Thread David Malcolm
On Tue, 2015-06-23 at 13:17 -0600, Jeff Law wrote: > On 06/10/2015 09:24 AM, David Malcolm wrote: > > gcc/unittests/ChangeLog: > > * test-cfg.c: New file. > > --- > > gcc/unittests/test-cfg.c | 319 > > +++ > > 1 file changed, 319 insertions(+) >

Re: Move target-def.h includes after main include block

2015-06-25 Thread Richard Sandiford
Jeff Law writes: > On 06/23/2015 12:29 PM, Richard Sandiford wrote: >> This moves target-def.h includes to the end of the include list, so that >> the file sees the same header files as the targetm initialisation itself. >> I've left a gap to emphasise that the placement is deliberate. >> >> This

Re: [05/13] Add nofree_ptr_hash

2015-06-25 Thread Richard Sandiford
Jeff Law writes: > On 06/25/2015 03:49 AM, Richard Biener wrote: >> On Thu, Jun 25, 2015 at 5:19 AM, Jeff Law wrote: >>> On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law writes: > > So I'm holding off on approving this one pending further discussion of > the use of

Re: [s390] Revert TPF C++ library changes

2015-06-25 Thread Jeff Law
On 06/05/2015 04:40 PM, DJ Delorie wrote: IBM made changes to no longer require 2 versions of libstdc++, so this patch changes things back to the previous (compatible) way. Also, TPF debuggers don't support discriminators, despite what GAS supports, so disable them. Ok? * config/s390/t

[ARM] Optimize compare against smin/umin

2015-06-25 Thread Michael Collison
This patch is designed to optimize constructs such as: #define min(x, y) ((x) <= (y)) ? (x) : (y) unsignedint foo (unsignedint i, unsignedint x ,unsignedint y) { return i < (min (x, y)); } int bar (int i,int x,int y) { return i < (min (x, y)); } Patch was tested on arm-linux-gnu

[RFC] Initial header file re-work proposal

2015-06-25 Thread Andrew MacLeod
Now that I have a good chunk of the major crap dependencies removed, I'd like to consolidate a few things, and reintroduce certain includes back to a few header files. First, the methodology I used. I completely flattened a branch (no header file includes any other header file), and focused o

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Jason Merrill
On 06/24/2015 11:12 PM, Aldy Hernandez wrote: The problem here is that we are trying to call dwarf2out_late_global_decl() on a static variable in a template which has a type of TEMPLATE_TYPE_PARM: template class A { static __thread T a; }; We are calling late_global_decl because we are abou

Re: [patch 4/4] Remove options.h/tm.h and function.h as dependencies and include compile time prerequisites in cgraph.h

2015-06-25 Thread Andrew MacLeod
On 06/25/2015 12:22 PM, Jeff Law wrote: On 06/25/2015 07:27 AM, Andrew MacLeod wrote: ipa_opt_pass is given a forward declaration in function.h, but it really consumed by cgraph.h By moving that forward declaration to cgraph, it no longer requires function.h to be in the include path. It ac

Re: [12/12] Simplify uses of hash_map

2015-06-25 Thread Jeff Law
On 06/23/2015 08:57 AM, Richard Sandiford wrote: At this point all hash_map traits know what kind of key they're dealing with, so we can make that a traits typedef, like it is for hash_table traits. Then, if we make the default hash traits for T be T, we can use hash_table-style traits as the fi

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-25 Thread Kumar, Venkataramanan
I got around ~12% gain with -Ofast -mcpu=cortex-a57. Regards, Venkat. > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Dr. Philipp Tomsich > Sent: Thursday, June 25, 2015 9:13 PM > To: Kumar, Venkataramanan > Cc: Bened

Re: [11/12] Remove default_hashmap_traits

2015-06-25 Thread Jeff Law
On 06/23/2015 08:56 AM, Richard Sandiford wrote: The previous patches removed all uses of default_hashmap_traits, so this patch deletes the definition. gcc/ * hash-map-traits.h (default_hashmap_traits): Delete. Ok :-) jeff

Re: [10/12] Add helper class for valued-based empty and deleted slots

2015-06-25 Thread Jeff Law
On 06/23/2015 08:55 AM, Richard Sandiford wrote: part_traits in cfgexpand.c needs to use the value rather than the key to represent empty and deleted slots. What it's doing is pretty generic, so this patch adds a helper class to hash-map-traits.h. gcc/ * hash-map-traits.h (unbounded_ha

Re: [09/12] Remove all but one use of default_hashmap_traits

2015-06-25 Thread Jeff Law
On 06/23/2015 08:53 AM, Richard Sandiford wrote: After the previous patches in the series, there are three remaining hash traits that use the key to represent empty and deleted entries. This patch makes them use simple_hashmap_traits. gcc/ * ipa-icf.h (symbol_compare_hash): New class.

Re: [08/12] Add common traits for integer hash keys

2015-06-25 Thread Jeff Law
On 06/23/2015 08:51 AM, Richard Sandiford wrote: Several places define hash traits for integers, using particular integer values as "empty" and "deleted" markers. This patch defines them in terms of a single int_hash class. I also needed to extend gengtype to accept "+" in template arguments.

Re: [07/12] Use new string hasher for MIPS

2015-06-25 Thread Jeff Law
On 06/23/2015 08:50 AM, Richard Sandiford wrote: Use the string hasher from patch 6 for MIPS. I split this out because local_alias_traits doesn't actually need to use SYMBOL_REF rtxes as the map keys, since the only data used is the symbol name. gcc/ * config/mips/mips.c (mips16_flip_t

Re: [06/12] Consolidate string hashers

2015-06-25 Thread Jeff Law
On 06/23/2015 08:49 AM, Richard Sandiford wrote: This patch replaces various string hashers with a single copy in hash-traits.h. gcc/ * hash-traits.h (string_hash, nofree_string_hash): New classes. * genmatch.c (capture_id_map_hasher): Use nofree_string_hash. * passes.c

Re: [04/12] Move ssa_name hasher to header file

2015-06-25 Thread Jeff Law
On 06/23/2015 08:46 AM, Richard Sandiford wrote: Another tree hasher, this time for SSA names. Again there's only one copy at the moment, but the idea seems general. gcc/ * tree-hash-traits.h (tree_ssa_name_hasher): New class. * sese.c: Include tree-hash-traits.h. (rena

Re: [02/12] Move tree operand hashers to a new header file

2015-06-25 Thread Jeff Law
On 06/23/2015 08:44 AM, Richard Sandiford wrote: There were three tree operand hashers, so move them to their own header file. The typedefs in this and subsequent patches are temporary and get removed in patch 12. gcc/ * tree-hash-traits.h: New file. (tree_operand_hash): New cl

Re: [03/12] Move decl hasher to header file

2015-06-25 Thread Jeff Law
On 06/23/2015 08:45 AM, Richard Sandiford wrote: Like the previous patch, but for decl hashers. There's only one copy of this so far, but the idea seems general. gcc/ * tree-hash-traits.h (tree_decl_hash): New class. * tree-ssa-strlen.c: Include tree-hash-traits.h. (str

Re: [05/12] Move TREE_HASH hasher to header file

2015-06-25 Thread Jeff Law
On 06/23/2015 08:47 AM, Richard Sandiford wrote: One more tree hasher, this time based on TREE_HASH. gcc/ * tree-hash-traits.h (tree_hash): New class. * except.c: Include tree-hash-traits.h. (tree_hash_traits): Use tree_hash. OK. jeff

Re: [01/12] Add hash_map traits that use existing hash_table-like traits

2015-06-25 Thread Jeff Law
On 06/23/2015 08:42 AM, Richard Sandiford wrote: This patch defines a class that converts hash_table-style traits into hash_map traits. It can be used as the default traits for all hash_maps that don't specify their own traits (i.e. this patch does work on its own). By the end of the series thi

Re: [05/13] Add nofree_ptr_hash

2015-06-25 Thread Jeff Law
On 06/25/2015 03:49 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 5:19 AM, Jeff Law wrote: On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law writes: So I'm holding off on approving this one pending further discussion of the use of multiple inheritance for nofree_ptr_hash. I

Re: [Committed] Remove 'unsigned' in header comment canonicalize_loop_ivs

2015-06-25 Thread Jeff Law
On 06/25/2015 05:27 AM, Tom de Vries wrote: Hi, this patch fixes the header comment of canonicalize_loop_ivs. The generated IV is not guaranteed to be unsigned since the fix for PR49471. Thanks, - Tom 0001-Remove-unsigned-in-header-comment-canonicalize_loop_.patch Remove 'unsigned' in header

Re: [PATCH] Make debug_tree() print the length of a TREE_VEC

2015-06-25 Thread Jeff Law
On 06/25/2015 10:22 AM, Patrick Palka wrote: When printing a TREE_VEC, this patch makes its length get printed alongside its prefix, e.g. Without a reference to its length, an all-NULL TREE_VEC otherwise looks like an empty TREE_VEC, since NULL elts don't get printed. This makes debuggin

Re: C PATCH to use is_global_var

2015-06-25 Thread Jeff Law
On 06/25/2015 06:44 AM, Marek Polacek wrote: On Wed, Jun 24, 2015 at 05:16:33PM +, Joseph Myers wrote: On Wed, 24 Jun 2015, Marek Polacek wrote: diff --git gcc/c/c-decl.c gcc/c/c-decl.c index fc1fdf9..ab54db9 100644 --- gcc/c/c-decl.c +++ gcc/c/c-decl.c @@ -2650,9 +2650,8 @@ merge_decls (t

[PATCH] Make debug_tree() print the length of a TREE_VEC

2015-06-25 Thread Patrick Palka
When printing a TREE_VEC, this patch makes its length get printed alongside its prefix, e.g. Without a reference to its length, an all-NULL TREE_VEC otherwise looks like an empty TREE_VEC, since NULL elts don't get printed. This makes debugging such TREE_VECs pretty confusing. Is this OK t

Re: [patch 4/4] Remove options.h/tm.h and function.h as dependencies and include compile time prerequisites in cgraph.h

2015-06-25 Thread Jeff Law
On 06/25/2015 07:27 AM, Andrew MacLeod wrote: ipa_opt_pass is given a forward declaration in function.h, but it really consumed by cgraph.h By moving that forward declaration to cgraph, it no longer requires function.h to be in the include path. It actually defined in tree-pass.h, the the *r

Re: [patch 3/4] Finally remove tm.,h and options.h as dependencies on tree-core.h and tree.h

2015-06-25 Thread Jeff Law
On 06/25/2015 07:23 AM, Andrew MacLeod wrote: This patch turns the cl_optimization structure from an OPTIMIZATION_NODE into a pointer inmstead of an actual instance. This is analgous to what I did in a previously checked in patch for target optimizations (https://gcc.gnu.org/ml/gcc-patches/2015-

Re: [patch 2/4] Remove tm.h and options.h as dependencies for function.h

2015-06-25 Thread Jeff Law
On 06/25/2015 07:21 AM, Andrew MacLeod wrote: This patch finally removes tm.h as a compile dependency for function.h struct incoming_args was declared in function.h, and had an instance of CUMULATIVE_ARGS from tm.h The only consumer of incoming_args is rtl-data which is now located in emit-rtl

Re: [patch 1/4] Reduce alias.h dependencies

2015-06-25 Thread Jeff Law
On 06/25/2015 07:19 AM, Andrew MacLeod wrote: This patch moves the alias_set_type typedef from alias.h into coretypes. Many common header files depend on the type, such as (but not limited to) gimple.h tree_ssa_alias.h rtl.h tree_core.h emit_rtl.h asan.h langhooks.h A fully

[hsa] Fix register allocator

2015-06-25 Thread Martin Liška
Hi. The following patch fixes HSA register allocator which hasn't visited all insns that belong to a call block insn. As a result, the allocator hasn't passed correct registers to a called function. Martin >From 1d0f5dce43f7af5a65bbfb5aef9545a3f1c0af27 Mon Sep 17 00:00:00 2001 From: mliska Date:

Re: Re: [PATCH IRA] save a bitmap check

2015-06-25 Thread Zhouyi Zhou
Thanks Vladimir and Jeff for reviewing and doing performance tests for me. I am focusing on IRA in my off hours for years because it is in the middle of compiler backend which doesn't depend on specific programming language nor application binary interface, and is very delicate. Hope I can

Re: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-25 Thread Dr. Philipp Tomsich
Kumar, what is the relative gain that you see on Cortex-A57? Thanks, Philipp. > On 25 Jun 2015, at 17:35, Kumar, Venkataramanan > wrote: > > Changing to "1 step for float" and "2 steps for double" gives better gains > now for gromacs on cortex-a57. > > Regards, > Venkat. >> -Original M

RE: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-25 Thread Kumar, Venkataramanan
Changing to "1 step for float" and "2 steps for double" gives better gains now for gromacs on cortex-a57. Regards, Venkat. > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Benedikt Huber > Sent: Thursday, June 25, 2015 4:09

Re: [PATCH] Use PIE_SPEC/NO_PIE_SPEC for crtend.o/crtendS.o

2015-06-25 Thread H.J. Lu
On Thu, Jun 25, 2015 at 4:37 AM, H.J. Lu wrote: > On Wed, Jun 10, 2015 at 6:20 AM, Rainer Orth > wrote: >> "H.J. Lu" writes: >> >>> On Tue, May 19, 2015 at 8:33 AM, Joseph Myers >>> wrote: On Tue, 19 May 2015, H.J. Lu wrote: > > I think the whole thing should be posted as one pat

Re: [Patch, fortran] PR52846 - [F2008] Support submodules

2015-06-25 Thread Paul Richard Thomas
Dear All, Please find attached an updated version of the submodule patch. Reinhold Bader uncovered a couple of bugs, which have now been fixed: (i) IMPORT is no longer permitted in module_procedure interface bodies, as required by F2008(C1210). Instead, import occurs automatically; and (ii) The en

Re: [PATCH IRA] save a bitmap check

2015-06-25 Thread Vladimir Makarov
On 06/25/2015 11:08 AM, Vladimir Makarov wrote: On 06/24/2015 05:54 AM, Zhouyi Zhou wrote: In function assign_hard_reg, checking the bit of conflict_a in consideration_allocno_bitmap is unneccesary, because when retry_p is false, conflicting objects are always inside of the same loop_node (this

Re: [PATCH IRA] save a bitmap check

2015-06-25 Thread Vladimir Makarov
On 06/24/2015 05:54 AM, Zhouyi Zhou wrote: In function assign_hard_reg, checking the bit of conflict_a in consideration_allocno_bitmap is unneccesary, because when retry_p is false, conflicting objects are always inside of the same loop_node (this is ensured in function process_bb_node_lives whic

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Aldy Hernandez
On 06/25/2015 02:48 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 5:12 AM, Aldy Hernandez wrote: The problem here is that we are trying to call dwarf2out_late_global_decl() on a static variable in a template which has a type of TEMPLATE_TYPE_PARM: template class A { static __thread T a

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Aldy Hernandez
On 06/25/2015 06:53 AM, Eric Botcazou wrote: Tested with --enable-languages=all. Ada had other issues, so I skipped it. What other issues exactly? It's fine at r224930 for example. There were some defined but not used warnings (??) that caused it to fail, especially since I didn't configu

Re: [PATCH] Do not constrain on REAL_TYPE

2015-06-25 Thread Tobias Grosser
On 06/25/2015 04:27 PM, Sebastian Pop wrote: On Thu, Jun 25, 2015 at 5:00 AM, Richard Biener wrote: Yes, it looks good. What about COMPLEX_CST and VECTOR_CST and their types? The question came around also when we were looking at these problems: we really only care for integer_cst constants (

Re: [PATCH] Do not constrain on REAL_TYPE

2015-06-25 Thread Sebastian Pop
On Thu, Jun 25, 2015 at 5:00 AM, Richard Biener wrote: > Yes, it looks good. What about COMPLEX_CST and VECTOR_CST and > their types? The question came around also when we were looking at these problems: we really only care for integer_cst constants (I in ISL stands for integer ;-) I think we ca

Re: fix PR46029: reimplement if conversion of loads and stores

2015-06-25 Thread Sebastian Pop
On Thu, Jun 25, 2015 at 4:43 AM, Richard Biener wrote: > when the new scheme triggers vectorization cannot succeed on the > result as we get > > if (cond) > *p = val; > > if-converted to > > tem = cond ? p : &scratch; > *tem = val; That's correct. > > and > >if (cond) > val =

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

2015-06-25 Thread Ilya Enkovich
Ping 2015-06-01 15:26 GMT+03:00 Ilya Enkovich : > 2015-05-29 1:15 GMT+03:00 Jeff Law : >> >> Right, but you're blindly propagating. The right thing to do is look at >> some kind of metric to estimate when it's profitable to propagate the >> constant back in vs leave it hoisted out. > > No, the pa

Re: [PATCH][1/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
On Thu, 25 Jun 2015, Richard Biener wrote: > > A first pattern moved from fold-const.c - albeit a very twisted one. > It triggers in gcc.dg/tree-ssa/pr52631.c. > > I've tried a nearly 1:1 translation (cut&paste and convert the > code structure to withs/ifs and then replace tree ops accordingly).

Minor cleanup in DFS::hash_scc

2015-06-25 Thread Eric Botcazou
This fixes a few typos and formatting glitches, i.e. no functional change. Tested on x86_64-suse-linux, applied on the mainline as obvious. 2015-06-25 Eric Botcazou * lto-streamer-out.c (DFS::hash_scc): Fix typos and formatting glitches. -- Eric BotcazouIndex: lto-streamer-out.c =

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-25 Thread Bernd Schmidt
On 06/25/2015 03:53 PM, Eric Botcazou wrote: I'd be happiest if we had an assert on almost all targets. regrename has been designed in such a way that the replacements can't fail, if the constraints on the insns are correct. If there are ports which have borderline insns where that doesn't hold m

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Eric Botcazou
> Tested with --enable-languages=all. Ada had other issues, so I skipped it. What other issues exactly? It's fine at r224930 for example. -- Eric Botcazou

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-25 Thread Eric Botcazou
> I'd be happiest if we had an assert on almost all targets. regrename has > been designed in such a way that the replacements can't fail, if the > constraints on the insns are correct. If there are ports which have > borderline insns where that doesn't hold maybe we ought to have a target > hook t

[PING] PR33661 Fix problem with register asm in templates

2015-06-25 Thread Andreas Krebbel
On 06/12/2015 10:52 AM, Andreas Krebbel wrote: > Yes that's better. I've adjusted the testcase as you proposed and > have tested it on x86_64, ppc, and s390x with -m32(-m31) and -m64. > > Bye, > > -Andreas- > > gcc/cp/ > > 2015-06-12 Andreas Krebbel > > PR c++/33661 > * decl.c

Re: Re: [PATCH] [PATCH][ARM] Fix split-live-ranges-for-shrink-wrap.c testcase.

2015-06-25 Thread Ramana Radhakrishnan
On Mon, Jun 22, 2015 at 5:56 PM, Alex Velenko wrote: > On 20/05/15 21:14, Joseph Myers wrote: >> >> Again, the condition you propose to add doesn't make sense. arm_arch_X_ok >> is only appropriate for tests using an explicit -march=X. Testing with >> -march=armv7* should automatically skip this

Re: [PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Jakub Jelinek
On Thu, Jun 25, 2015 at 03:24:33PM +0200, Richard Biener wrote: > > This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c > > I'll eventually massage it according to Jakubs suggestion to do a > > #ifndef HAVE_canonicalize_funcptr_for_compare > #define HAVE_canonicalize_funcptr_f

[patch 4/4] Remove options.h/tm.h and function.h as dependencies and include compile time prerequisites in cgraph.h

2015-06-25 Thread Andrew MacLeod
This patch removes a couple more dependencies cgraph.h has. The function address_can_be_compared_p makes reference to flag_merge_constants which comes from options.h via tm.h. By moving it to cgraph.c instead of inlining it in the header file, options.h and thus tm.h is no longer needed. ipa

Re: [PATCH] [aarch64] Implemented reciprocal square root (rsqrt) estimation in -ffast-math

2015-06-25 Thread Michael Matz
Hi, On Thu, 25 Jun 2015, Benedikt Huber wrote: > > This is NOT a win on thunderX at least for single precision because > > you have to do the divide and sqrt in the same time as it takes 5 > > multiples (estimate and step are multiplies in the thunderX pipeline). > > Doubles is 10 multiplies

[PATCH][4/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
This moves fold_sign_changed_comparison. Shows up in gcc.dg/pr55833.c I'll eventually massage it according to Jakubs suggestion to do a #ifndef HAVE_canonicalize_funcptr_for_compare #define HAVE_canonicalize_funcptr_for_compare 0 #endif somewhere (defaults.h should work I guess). Bootstrap an

[patch 3/4] Finally remove tm.,h and options.h as dependencies on tree-core.h and tree.h

2015-06-25 Thread Andrew MacLeod
This patch turns the cl_optimization structure from an OPTIMIZATION_NODE into a pointer inmstead of an actual instance. This is analgous to what I did in a previously checked in patch for target optimizations (https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01152.html), I just missed this one t

[PATCH][3/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
This allows (p + 1) + 2 to be combined to p + 3 (also a good sign on why that single_use stuff is "bad" - bad in case we have restricted simplifications to a single stmt as result anyway). This shows up in gcc.dg/20020415-1.c (and more places) Bootstrap and regtest running on x86_64-unknown-linu

[patch 2/4] Remove tm.h and options.h as dependencies for function.h

2015-06-25 Thread Andrew MacLeod
This patch finally removes tm.h as a compile dependency for function.h struct incoming_args was declared in function.h, and had an instance of CUMULATIVE_ARGS from tm.h The only consumer of incoming_args is rtl-data which is now located in emit-rtl.h, so I moved the decl to there. The remai

[patch 1/4] Reduce alias.h dependencies

2015-06-25 Thread Andrew MacLeod
This patch moves the alias_set_type typedef from alias.h into coretypes. Many common header files depend on the type, such as (but not limited to) gimple.h tree_ssa_alias.h rtl.h tree_core.h emit_rtl.h asan.h langhooks.h A fully flattened branch requires alias.h in 294 source files

[PATCH[2/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
This shows up in gcc.dg/tree-ssa/reassoc-13.c where the 'reassoc:' case in fold_binary happily handles floats if flag_associative_math. Thus here, too. Bootstrap & regtest ongoing on x86_64-unknown-linux-gnu. Richard. 2015-06-25 Richard Biener * match.pd: Allow associating FLOAT_TYP

[PATCH][1/n] Remove GENERIC stmt combining from SCCVN

2015-06-25 Thread Richard Biener
A first pattern moved from fold-const.c - albeit a very twisted one. It triggers in gcc.dg/tree-ssa/pr52631.c. I've tried a nearly 1:1 translation (cut&paste and convert the code structure to withs/ifs and then replace tree ops accordingly). One might question if the narrowing case should better

Re: Remove redundant AND from count reduction loop

2015-06-25 Thread Richard Biener
On Thu, Jun 25, 2015 at 1:51 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Thu, Jun 25, 2015 at 10:15 AM, Richard Sandiford >>> Index: gcc/match.pd >>> === >>> --- gcc/match.pd2015-06-24 20:24:31.344998571 +0100

Re: C/C++ PATCH to smarten up -Wswitch-bool (PR c/66322)

2015-06-25 Thread Marek Polacek
Ping. On Thu, Jun 18, 2015 at 01:50:34PM +0200, Marek Polacek wrote: > Ping. > > On Wed, Jun 10, 2015 at 08:02:01PM +0200, Marek Polacek wrote: > > Linus's kind words here prodded > > me to improving the -Wswitch-bool warning. In particular, this patch > > m

Re: C PATCH to use is_global_var

2015-06-25 Thread Marek Polacek
On Wed, Jun 24, 2015 at 05:16:33PM +, Joseph Myers wrote: > On Wed, 24 Jun 2015, Marek Polacek wrote: > > > diff --git gcc/c/c-decl.c gcc/c/c-decl.c > > index fc1fdf9..ab54db9 100644 > > --- gcc/c/c-decl.c > > +++ gcc/c/c-decl.c > > @@ -2650,9 +2650,8 @@ merge_decls (tree newdecl, tree olddecl

  1   2   >