[PATCH, 1/2] Merge rewrite_virtuals_into_loop_closed_ssa from gomp4 branch

2015-06-25 Thread Tom de Vries
Hi, this patch merges rewrite_virtuals_into_loop_closed_ssa (originally submitted here: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01236.html ) to trunk. Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom Merge rewrite_virtuals_into_loop_closed_ssa from gomp4 branch

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

2015-06-25 Thread pinskia
On Jun 18, 2015, at 5:04 AM, Benedikt Huber benedikt.hu...@theobroma-systems.com wrote: arch64 offers the instructions frsqrte and frsqrts, for rsqrt estimation and a Newton-Raphson step, respectively. There are ARMv8 implementations where this is faster than using fdiv and rsqrt.

[PATCH, 2/2][PR66642] Add empty loop exit block in transform_to_exit_first_loop_alt

2015-06-25 Thread Tom de Vries
Hi, I ran into a failure with parloops for reduction loop testcase libgomp/testsuite/libgomp.c/parloops-exit-first-loop-alt-3.c. When we exercise the low iteration count loop, the test-case fails. To understand the problem, let's first look at what happens when we use

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 seg...@kernel.crashing.org 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

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 switch

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

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 the

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

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

2015-06-25 Thread Richard Biener
The following series will remove GENERIC stmt combining from SCCVN and make it rely on match-and-simplify instead. Thus the start of the series moves patterns from fold-const.c to match.pd (in theory all patterns with an expression depth of one or two apply). I'm generating this series from

[PATCH] Fix 187.facerec ICE

2015-06-25 Thread Richard Biener
The following fixes a vectorizer ICE in 187.facerec with -Ofast -mavx. It occurs because we wreck hybrid SLP vectorization by setting STMT_VINFO_VEC_STMT from the SLP vectorization side. Fixed as follows. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2015-06-25 Richard Biener

[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

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 ebotca...@adacore.com * lto-streamer-out.c (DFS::hash_scc): Fix typos and formatting glitches. -- Eric

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

2015-06-25 Thread Benedikt Huber
Andrew, 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 which is just the same as what the patch does (but

[Committed] Remove 'unsigned' in header comment canonicalize_loop_ivs

2015-06-25 Thread Tom de Vries
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 Remove 'unsigned' in header comment canonicalize_loop_ivs 2015-06-25 Tom de Vries t...@codesourcery.com * tree-ssa-loop-manip.c

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

2015-06-25 Thread H.J. Lu
On Wed, Jun 10, 2015 at 6:20 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: H.J. Lu hjl.to...@gmail.com writes: On Tue, May 19, 2015 at 8:33 AM, Joseph Myers jos...@codesourcery.com wrote: On Tue, 19 May 2015, H.J. Lu wrote: I think the whole thing should be posted as one patch,

[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 (cutpaste and convert the code structure to withs/ifs and then replace tree ops accordingly). One might question if the narrowing case should better

[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

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 that

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: Remove redundant AND from count reduction loop

2015-06-25 Thread Richard Biener
On Thu, Jun 25, 2015 at 1:51 PM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Thu, Jun 25, 2015 at 10:15 AM, Richard Sandiford Index: gcc/match.pd === --- gcc/match.pd

[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

[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

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

2015-06-25 Thread H.J. Lu
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? Thanks. H.J. --- * gcc.c (driver_handle_option): Validate -pie if PIE is enabled by default. --- gcc/gcc.c | 5 + 1 file changed, 5

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

2015-06-25 Thread Benedikt Huber
I did not look at execute_cse_reciprocals_1(), yet. However, with the recip-patch applied: double recipd (double a, double b) { return a/b; } translates to recipd: frecpe d2, d1 frecps d3, d2, d1 fmul d2, d2, d3 frecps d3, d2, d1 fmul d2, d2, d3 frecps d1, d2, d1 fmul

[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 rguent...@suse.de * match.pd: Allow

[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

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

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 which

Re: Remove redundant AND from count reduction loop

2015-06-25 Thread Richard Sandiford
Richard Biener richard.guent...@gmail.com 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 +++ gcc/match.pd2015-06-24

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

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 alex.vele...@arm.com 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

[PATCH] Fix hybrid SLP vectorization

2015-06-25 Thread Richard Biener
The following patch catches more similar cases as in the 187.facerec case and adds checking to vect_transform_stmt. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2015-06-25 Richard Biener rguent...@suse.de * tree-vect-stmts.c (vectorizable_conversion): Do not set

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 https://lkml.org/lkml/2015/5/27/941 prodded me to improving the -Wswitch-bool warning. In particular, this patch makes the

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

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

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

2015-06-25 Thread Bernd Schmidt
On 06/25/2015 05:46 AM, Jeff Law wrote: As Eric mentioned, please put an assert to verify that the call from the c6x backend never fails. 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

[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 kreb...@linux.vnet.ibm.com PR c++/33661

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 target

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 rdsandif...@googlemail.com 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:

[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

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

2015-06-25 Thread Richard Biener
On Thu, Jun 25, 2015 at 7:11 AM, Segher Boessenkool seg...@kernel.crashing.org 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 RTL in place. This does not work. This patch fixes

Re: [PATCH] Do not constrain on REAL_TYPE

2015-06-25 Thread Richard Biener
On Thu, Jun 25, 2015 at 9:13 AM, Sebastian Pop seb...@gmail.com wrote: On Wed, Jun 24, 2015 at 5:24 PM, Aditya Kumar hiradi...@msn.com wrote: From: Aditya Kumar aditya...@samsung.com gcc/ChangeLog: 2015-06-24 Aditya Kumar aditya...@samsung.com Sebastian Pop s@samsung.com

Re: Remove redundant AND from count reduction loop

2015-06-25 Thread Richard Biener
On Thu, Jun 25, 2015 at 10:15 AM, Richard Sandiford richard.sandif...@arm.com wrote: Richard Biener richard.guent...@gmail.com writes: On Wed, Jun 24, 2015 at 3:37 PM, Richard Sandiford richard.sandif...@arm.com wrote: There is precedence for different expansion paths dependent on optabs (or

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

[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

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:

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 al...@redhat.com Date: Thu Jun 25 14:07:26 2015 -0700 * libgomp.texi: Document omp_get_max_task_priority and OMP_MAX_TASK_PRIORITY. Ok,

[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

[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

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

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

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

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 al...@redhat.com 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 typename T class

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 hjl.to...@gmail.com wrote: On Wed, Jun 10, 2015 at 6:20 AM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: H.J. Lu hjl.to...@gmail.com writes: On Tue, May 19, 2015 at 8:33 AM, Joseph Myers jos...@codesourcery.com wrote: On Tue, 19 May 2015, H.J.

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 PM

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

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] Do not constrain on REAL_TYPE

2015-06-25 Thread Sebastian Pop
On Thu, Jun 25, 2015 at 5:00 AM, Richard Biener richard.guent...@gmail.com 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

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

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 (cutpaste and convert the code structure to withs/ifs and then replace tree ops accordingly).

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 enkovich@gmail.com: 2015-05-29 1:15 GMT+03:00 Jeff Law l...@redhat.com: 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

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 richard.guent...@gmail.com 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)

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 richard.guent...@gmail.com 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

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 venkataramanan.ku...@amd.com wrote: Changing to 1 step for float and 2 steps for double gives better gains now for gromacs on cortex-a57. Regards, Venkat.

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

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

[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

[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

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

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. gcc/

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

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

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

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

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 typename T class A { static __thread T a; }; We are calling late_global_decl because

[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. tree_vec 0x76a4d0a0 length 2 elt 0 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

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

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

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

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

Re: [05/13] Add nofree_ptr_hash

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

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

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 l...@redhat.com wrote: On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law l...@redhat.com writes: So I'm holding off on approving this one pending further discussion of the use of multiple

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.

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

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.

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: [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. tree_vec 0x76a4d0a0 length 2 elt 0 Without a reference to its length, an all-NULL TREE_VEC otherwise looks like an empty TREE_VEC,

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

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

[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

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

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(+) create

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

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 l...@redhat.com writes: On 06/25/2015 03:49 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 5:19 AM, Jeff Law l...@redhat.com wrote: On 06/24/2015 02:23 AM, Richard Sandiford wrote: Jeff Law l...@redhat.com writes: So I'm holding

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

  1   2   >