[committed] Add var in push_fields_onto_fieldstack

2015-10-27 Thread Tom de Vries
Hi, this patch adds a new variable in push_fields_onto_fieldstack, improving readability. Bootstrapped and reg-tested on x86_64. Committed to trunk as obvious. Thanks, - Tom Add var in push_fields_onto_fieldstack 2015-10-27 Tom de Vries * tree-ssa-structalias.c (push_fields_onto_fields

[PATCH, PR67742] Handle restrict struct fields recursively

2015-10-27 Thread Tom de Vries
[ was: Re: [PATCH, 1/2] Add handle_param parameter to create_variable_info_for_1 ] On 26/10/15 17:23, Tom de Vries wrote: Why does create_variable_info_for_1 only handle the single-field case? That is, I expected this to be handled by c_v_r_f_1 fully. Yep, that's the goal of PR67742. I've

Re: [OpenACC 5/11] C++ FE changes

2015-10-27 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 03:35:20PM -0700, Cesar Philippidis wrote: > I used that generic message for all of those clauses except for _GANG, > _WORKER and _VECTOR. The gang clause, at the very least, needed it to > disambiguate the static and num arguments. If you want I can handle > _WORKER and _VE

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-27 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 03:32:45PM -0700, Nathan Sidwell wrote: > Richard, Jakub, > this updates patch 1 to use the target-insns.def mechanism of detecting > conditionally-implemented instructions. Otherwise it's the same as > yesterday's patch. To recap: > > 1) Moved the subcodes to an enumerat

Re: [OpenACC 7/11] execution model

2015-10-27 Thread Jakub Jelinek
On Mon, Oct 26, 2015 at 04:11:20PM -0700, Nathan Sidwell wrote: > Jakub, Richard, > This is the updated version of patch 7, using target-insns.def for the new > insns. Otherwise same as yesterday's, which had the following changes: > > The significant change is that now the head/tail unique marke

Re: Drop types_compatible_p from operand_equal_p

2015-10-27 Thread Richard Biener
On Mon, 26 Oct 2015, Jan Hubicka wrote: > > On Sat, 24 Oct 2015, Jan Hubicka wrote: > > > > > Hi, as discussed earlier, the types_compatible_p in operand_equal_p > > > seems redundant. (it is callers work to figure out how much of type > > > matching it wants. If not, we probably want to treat

Re: [PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++

2015-10-27 Thread Thomas Schwinge
Hi! On Thu, 8 Oct 2015 18:39:25 +0200, I wrote: > Some bits extracted out of gomp-4_0-branch, and some other bits > rewritten; here is a patch to support OpenACC Combined Directives in C, > C++. (The Fortran front end already does support these.) > > As far as I know, Jakub is not available at t

[PATCH] Remove push/pop_cfun around cgraph::release_function_body

2015-10-27 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-10-27 Richard Biener * cfg.c (free_edge): Add function argument and use it instead of cfun. (clear_edges): Likewise. * cfg.h (clear_edges): Adjust prototype. * cfgexpand.c (pa

Re: [PR 67794] Also remap SSA_NAMEs defined in ASMs in IPA-SRA

2015-10-27 Thread Christophe Lyon
On 9 October 2015 at 09:46, Richard Biener wrote: > On Thu, 8 Oct 2015, Martin Jambor wrote: > >> Hi, >> >> the following fixes PR 67794 by properly remapping SSA_NAMEs which are >> based on PARM_DECLs which are about to be removed as unnecessary. And >> by "properly" I mean also when they are de

[RFC, PATCH v2] Disable -fprofile-use related optimizations if corresponding .gcda file not found.

2015-10-27 Thread Maxim Ostapenko
Hi! As was pointed out in previous thread (https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00723.html), sometimes PGO-built binaries can actually introduce performance regressions. We could identify affected object files and disable PGO for them by simply removing corresponding .gcda file. My

Re: [testsuite, committed, PR68063] Add missing private clause in libgomp.c++/member-2.C

2015-10-27 Thread Thomas Schwinge
Hi Jakub! On Fri, 23 Oct 2015 12:48:57 +0200, Tom de Vries wrote: > this patch adds a missing private clause in libgomp.c++/member-2.C (as > you suggested in the PR). > > This allows the test to succeed consistently. I'm seeing occasional (very rarely) failure of libgomp.c++/member-1.C (withou

Fold comparisons between sqrt and zero

2015-10-27 Thread Richard Sandiford
Richard Biener writes: > On Mon, Oct 26, 2015 at 10:36 AM, Richard Sandiford > wrote: >> An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). >> This is unusual in that it could trigger in the gimplifier but would >> require new SSA names to be created. This patch makes sure that we

Re: [testsuite, committed, PR68063] Add missing private clause in libgomp.c++/member-2.C

2015-10-27 Thread Jakub Jelinek
On Tue, Oct 27, 2015 at 10:15:11AM +0100, Thomas Schwinge wrote: > ... looks a bit as if it might need to get the same patch applied that > Tom has applied to libgomp.c++/member-2.C: You're right, member-2.C is a templatized version of member-1.C, a change to add private (R::r) to that correspondi

[Patch, Contrib] Download ISL 0.15 by download_prerequisites

2015-10-27 Thread Tobias Burnus
Hi all, recently, support for ISL 0.15 was added to GCC and also ftp://gcc.gnu.org/pub/gcc/infrastructure/ now contains ISL 0.15. Hence, there is no reason not to download the newest version by download_prerequisites. OK for the trunk? (One could also add it to GCC 5 as the ISL 0.15 patches land

Re: [testsuite, committed, PR68063] Add missing private clause in libgomp.c++/member-2.C

2015-10-27 Thread Thomas Schwinge
Hi! On Tue, 27 Oct 2015 11:08:15 +0100, Jakub Jelinek wrote: > On Tue, Oct 27, 2015 at 10:15:11AM +0100, Thomas Schwinge wrote: > > ... looks a bit as if it might need to get the same patch applied that > > Tom has applied to libgomp.c++/member-2.C: > > You're right, member-2.C is a templatized

Re: [PATCH][AArch64] Enable autoprefetcher modelling in the scheduler

2015-10-27 Thread James Greenhalgh
On Thu, Oct 22, 2015 at 05:05:26PM +0100, Kyrill Tkachov wrote: > Hi all, > > This patch enables the autoprefetcher heuristic for scheduling in AArch64. > It is enabled for the Cortex-A53, Cortex-A57 cores and is off for the other > cores, > leaving their behaviour unchanged. > > When enabled, t

Re: [PATCH] Use subreg_regno instead of subreg_regno_offset

2015-10-27 Thread Bernd Schmidt
On 10/26/2015 11:46 PM, Anatoliy Sokolov wrote: This patch change code 'REGNO (subreg) + subreg_regno_offset (...)' with subreg_regno (subreg). The patch has whitespace damage that makes it difficult to apply. Please use text/plain attachments. Index: gcc/reg-stack.c

Re: [AArch64][PATCH 1/7] Add support for ARMv8.1 Adv.SIMD,instructions.

2015-10-27 Thread James Greenhalgh
On Fri, Oct 23, 2015 at 01:16:25PM +0100, Matthew Wahab wrote: > The ARMv8.1 architecture extension adds two Adv.SIMD instructions, > sqrdmlah and sqrdmlsh. This patch series adds the instructions to the > AArch64 backend together with the ACLE feature macro and NEON intrinsics > to make use of the

Re: [PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-27 Thread Renlin Li
On 26/10/15 13:24, Bernd Schmidt wrote: On 10/26/2015 02:17 PM, Teresa Johnson wrote: On Mon, Oct 26, 2015 at 2:00 AM, Renlin Li wrote: * lib/target-supports.exp (check_effective_target_freorder): Add -fprofile-use flag. Hmmm, the testcases themselves which use this predicate onl

Re: [PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-27 Thread Bernd Schmidt
On 10/27/2015 11:54 AM, Renlin Li wrote: Yes. In all of the related testcases, only -freorder-and-partition flag is provided explicitly. How about creating a new dg-add-options for freorder? proc add_options_for_freorder { flags } { return "$flags -freorder-blocks-and-partition -fprofile-us

Re: scheduling conditional branches after stores

2015-10-27 Thread Bernd Schmidt
On 10/09/2015 11:36 PM, Mike Stump wrote: So, I keep on seeing inaccurate schedule time on the conditional branches after a store, and tracked it down to this type of solution. On my machine, I can run these two in the same cycle, but with a REG_DEP_OUTPUT dependency it was moving the branch to t

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

2015-10-27 Thread Bernd Schmidt
On 10/26/2015 01:27 PM, Richard Biener wrote: On Mon, Oct 26, 2015 at 1:01 PM, Jakub Jelinek wrote: On Mon, Oct 26, 2015 at 12:57:53PM +0100, Bernd Schmidt wrote: On 10/26/2015 12:47 PM, Jakub Jelinek wrote: Because the amount of code that uses this (including GCC itself) is just too huge, s

Re: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.

2015-10-27 Thread James Greenhalgh
On Fri, Oct 23, 2015 at 01:19:20PM +0100, Matthew Wahab wrote: > The ARMv8.1 architecture extension adds two Adv.SIMD instructions, > sqrdmlah and sqrdmlsh. This patch adds the instructions to the > aarch64-simd patterns, making them conditional on the TARGET_SIMD_RDMA > feature macro introduced in

Re: [AArch64][PATCH 3/7] Add builtins for ARMv8.1 Adv.SIMD,instructions.

2015-10-27 Thread James Greenhalgh
On Fri, Oct 23, 2015 at 01:20:55PM +0100, Matthew Wahab wrote: > The ARMv8.1 architecture extension adds two Adv.SIMD instructions, > sqrdmlah and sqrdmlsh. This patch adds the GCC builtins to generate the new > instructions which are needed for the NEON intrinsics added later in > this series. >

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Bernd Schmidt
On 10/19/2015 09:55 PM, H.J. Lu wrote: * calls.c (prepare_call_address): Don't handle -fno-plt here. Is any other target using -fno-plt? If not, and if that's really just a revert I'll approve it on the condition that the x86 maintainers are happy with the rest of the changes. Your

Re: Fold comparisons between sqrt and zero

2015-10-27 Thread Richard Biener
On Tue, Oct 27, 2015 at 10:21 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, Oct 26, 2015 at 10:36 AM, Richard Sandiford >> wrote: >>> An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2). >>> This is unusual in that it could trigger in the gimplifier but would >>>

Re: [AArch64][PATCH 4/7] Add ACLE feature macro for ARMv8.1,Adv.SIMD instructions.

2015-10-27 Thread James Greenhalgh
On Fri, Oct 23, 2015 at 01:22:16PM +0100, Matthew Wahab wrote: > The ARMv8.1 architecture extension adds two Adv.SIMD instructions, > sqrdmlah and sqrdmlsh. This patch adds the feature macro > __ARM_FEATURE_QRDMX to indicate the presence of these instructions, > generating it when the feature is av

Re: [Patch] Avoid is_simple_use bug in vectorizable_live_operation

2015-10-27 Thread Richard Biener
On Mon, Oct 26, 2015 at 6:15 PM, Alan Hayward wrote: > > > On 26/10/2015 13:35, "Richard Biener" wrote: > >>On Mon, Oct 26, 2015 at 1:33 PM, Alan Hayward >>wrote: >>> There is a potential bug in vectorizable_live_operation. >>> >>> Consider the case where the first op for stmt is valid, but the

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread H.J. Lu
On Tue, Oct 27, 2015 at 4:20 AM, Bernd Schmidt wrote: > On 10/19/2015 09:55 PM, H.J. Lu wrote: >> >> * calls.c (prepare_call_address): Don't handle -fno-plt here. > > > Is any other target using -fno-plt? If not, and if that's really just a aarch64 is the only target which checks -fno-pl

Re: [PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-27 Thread Maxim Ostapenko
On 27/10/15 14:06, Bernd Schmidt wrote: On 10/27/2015 11:54 AM, Renlin Li wrote: Yes. In all of the related testcases, only -freorder-and-partition flag is provided explicitly. How about creating a new dg-add-options for freorder? proc add_options_for_freorder { flags } { return "$flags -f

Re: [PATCH]Add -fprofile-use option for check_effective_target_freorder.

2015-10-27 Thread Bernd Schmidt
On 10/27/2015 12:38 PM, Maxim Ostapenko wrote: Anyway, disabling any compile options provided by user explicitly sounds like a bad idea for me, so disabling -freorder-blocks-and-partition if it can't find .gcda file seems to be not acceptable. The current situation is that -fr-b-a-p is disable

[Ada] Pragma SPARK_Mode and expression functions

2015-10-27 Thread Arnaud Charlet
This patch ensures that an internally generated subprogram body that completes an expression function inherits the SPARK_Mode from the expression function spec. -- Source -- -- expr_funcs.ads package Expr_Funcs with SPARK_Mode is function F1 return Boolean is (True)

[Ada] Delete response file even when link failed

2015-10-27 Thread Arnaud Charlet
When a response file was created and the link failed, the response file was not deleted. It is deleted now. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-10-27 Vincent Celier * gnatlink.adb: Always delete the response file, even when the invocation of gcc to link fail

Re: [PATCH, GCC 5 branch] Fix compile time regression caused by fix to PR64111

2015-10-27 Thread Richard Biener
On Mon, Oct 26, 2015 at 6:14 PM, Caroline Tice wrote: > Here is my promised backport to the GCC 5 branch, for the patch below > that went into ToT last week. As with the previous patch, I've > verified that it fixes the problem, bootstraps and has no new > regression test failures. Is this ok to

Re: [PATCH, GCC 4.9 branch] Fix compile time regression caused by fix to PR64111

2015-10-27 Thread Richard Biener
On Tue, Oct 27, 2015 at 4:36 AM, Caroline Tice wrote: > Here is my promised backport to the GCC 4.9 branch, for the patch below > that went into ToT last week. As with the previous patch, I've > verified that it fixes the problem, bootstraps and has no new > regression test failures. Is this ok

[Ada] Legality checks on initialization of limited objects

2015-10-27 Thread Arnaud Charlet
This patch corrects an omission on the legality check for allocators with a qualified expression when the expression is of a limited type. The check must be performed after the expression is fully resolved, to handle properly complex overloading cases such as indexings of parameterless functions th

[Ada] Spurious error on legal use of abstract state constituent

2015-10-27 Thread Arnaud Charlet
This patch modifies the analysis of pragma Refined_Global to treat objects and states as constituents only when their encapsulating state appears in pragma Global. -- Source -- -- pack.ads package Pack with Abstract_State => (State1, State2), Initializes=>

Re: [PATCH] [AArch64] Distinct costs for sign and zero extension

2015-10-27 Thread James Greenhalgh
On Tue, Oct 20, 2015 at 07:52:45AM +0800, Andrew Pinski wrote: > On Tue, Oct 20, 2015 at 7:10 AM, Evandro Menezes > wrote: > > Some micro-architectures may favor one of sign or zero extension over the > > other in the base plus extended register offset addressing mode. > > Yes I was going to cre

Re: [PATCH] Adjust some patterns wrt :c

2015-10-27 Thread Richard Biener
On Mon, 26 Oct 2015, Marc Glisse wrote: > On Mon, 26 Oct 2015, Richard Biener wrote: > > > @@ -435,7 +435,7 @@ (define_operator_list RINT BUILT_IN_RINT > > > > /* Fold (A & ~B) - (A & B) into (A ^ B) - B. */ > > (simplify > > - (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1)) > > + (minus

Re: [PATCH][ARM] PR target/67929 Tighten vfp3_const_double_for_bits checks

2015-10-27 Thread Ramana Radhakrishnan
On Wed, Oct 14, 2015 at 1:23 PM, Kyrill Tkachov wrote: > Hi all, > > This patch fixes the referenced PR by rewriting the > vfp3_const_double_for_bits function in arm.c > The function is supposed to accept positive CONST_DOUBLE rtxes whose value > is an exact power of 2 > and whose log2 is between

Re: [PATCH, PR67742] Handle restrict struct fields recursively

2015-10-27 Thread Tom de Vries
On 27/10/15 08:25, Tom de Vries wrote: @@ -5968,7 +5990,16 @@ intra_create_variable_infos (struct function *fn) for (; p; p = vi_next (p)) { if (p->only_restrict_pointers) - make_constraint_from_global_restrict (p, "PARM_RESTRICT"); +

Re: [PR 67794] Also remap SSA_NAMEs defined in ASMs in IPA-SRA

2015-10-27 Thread Martin Jambor
On Tue, Oct 27, 2015 at 09:56:48AM +0100, Christophe Lyon wrote: > Hi Martin, > > After your backport in the gcc-5 branch, I see build failures: > /tmp/2849532_27.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-sra.c: > In function ‘tree_node* replace_removed_params_ssa_names(tree_node*, > gimp

Re: [PATCH] Pass manager: add support for termination of pass list

2015-10-27 Thread Martin Liška
On 10/26/2015 02:48 PM, Richard Biener wrote: > On Thu, Oct 22, 2015 at 1:02 PM, Martin Liška wrote: >> On 10/21/2015 04:06 PM, Richard Biener wrote: >>> On Wed, Oct 21, 2015 at 1:24 PM, Martin Liška wrote: On 10/21/2015 11:59 AM, Richard Biener wrote: > On Wed, Oct 21, 2015 at 11:19 AM,

Re: [PATCH] tree-scalar-evolution.c: Handle LSHIFT by constant

2015-10-27 Thread Alan Lawrence
--in-reply-to On 26/10/15 08:58, Richard Biener wrote: > > On Fri, Oct 23, 2015 at 5:15 PM, Alan Lawrence wrote: >> + chrec2 = fold_build2 (LSHIFT_EXPR, TREE_TYPE (rhs1), >> + build_int_cst (TREE_TYPE (rhs1), 1), > > 'type' instead of TREE_TYPE (rhs1) I presume y

[PATCH, 1/6] Simplify constraint handling

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: Thinking it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints

[PATCH, 2/6] Rename make_restrict_var_constraints to make_param_constraints

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: Thinking it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints

[PATCH] Fix PR68067

2015-10-27 Thread Richard Biener
The following patch adjusts negate_expr_p to account for the fact that we can't generally change a - (b - c) to (c - b) + a because -INF - 0 is ok while 0 - -INF not. Similarly for a - (b + c). While creating testcases I noticed that MULT_EXPR handling is bogus as well as with -INF/2 * 2 neither

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Uros Bizjak
On Tue, Oct 27, 2015 at 12:37 PM, H.J. Lu wrote: > On Tue, Oct 27, 2015 at 4:20 AM, Bernd Schmidt wrote: >> On 10/19/2015 09:55 PM, H.J. Lu wrote: >>> >>> * calls.c (prepare_call_address): Don't handle -fno-plt here. >> >> >> Is any other target using -fno-plt? If not, and if that's real

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Jiong Wang
On 27/10/15 11:37, H.J. Lu wrote: On Tue, Oct 27, 2015 at 4:20 AM, Bernd Schmidt wrote: On 10/19/2015 09:55 PM, H.J. Lu wrote: * calls.c (prepare_call_address): Don't handle -fno-plt here. Is any other target using -fno-plt? If not, and if that's really just a aarch64 is the onl

[PATCH, 3/6] Add recursion to make_param_constraints

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: Thinking it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints

[PATCH, 4/6] Add handle_param parameter to create_variable_info_for_1

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints 3A

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread H.J. Lu
On Tue, Oct 27, 2015 at 5:52 AM, Jiong Wang wrote: > > > On 27/10/15 11:37, H.J. Lu wrote: >> >> On Tue, Oct 27, 2015 at 4:20 AM, Bernd Schmidt >> wrote: >>> >>> On 10/19/2015 09:55 PM, H.J. Lu wrote: * calls.c (prepare_call_address): Don't handle -fno-plt here. >>> >>> >>> Is

[PATCH, 5/6] Handle recursive restrict pointer in create_variable_info_for_1

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: Thinking it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints

[PATCH, 6/6] Handle restrict struct fields recursively

2015-10-27 Thread Tom de Vries
On 27/10/15 13:24, Tom de Vries wrote: Thinking it over a bit more, I realized the constraint handling started to be messy. I've reworked the patch series to simplify that first. 1Simplify constraint handling 2Rename make_restrict_var_constraints to make_param_constraints

[PATCH] Add -fchecking

2015-10-27 Thread Richard Biener
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). Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2015-10-27 Richard Biener * common.

Re: [Patch] Avoid is_simple_use bug in vectorizable_live_operation

2015-10-27 Thread Alan Hayward
On 27/10/2015 11:36, "Richard Biener" wrote: >On Mon, Oct 26, 2015 at 6:15 PM, Alan Hayward >wrote: >> >> >> On 26/10/2015 13:35, "Richard Biener" >>wrote: >> >>>On Mon, Oct 26, 2015 at 1:33 PM, Alan Hayward >>>wrote: There is a potential bug in vectorizable_live_operation. Co

Re: [mask conversion, patch 1/2] Add pattern for mask conversions

2015-10-27 Thread Richard Biener
On Mon, Oct 19, 2015 at 2:22 PM, Ilya Enkovich wrote: > Hi, > > This patch adds a vectorization pattern which detects cases where mask > conversion is needed and adds it. It is done for all statements which may > consume mask. Some additional changes were made to support MASK_LOAD with > patt

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-27 Thread Richard Biener
On Tue, Oct 27, 2015 at 9:03 AM, Jakub Jelinek wrote: > On Mon, Oct 26, 2015 at 03:32:45PM -0700, Nathan Sidwell wrote: >> Richard, Jakub, >> this updates patch 1 to use the target-insns.def mechanism of detecting >> conditionally-implemented instructions. Otherwise it's the same as >> yesterday'

[PATCH] Fix PR68104

2015-10-27 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2015-10-27 Richard Biener PR tree-optimization/68104 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Move strided access check ... (vect_compute_data_refs_alignment): ... here.

Re: [Patch] Avoid is_simple_use bug in vectorizable_live_operation

2015-10-27 Thread Richard Biener
On Tue, Oct 27, 2015 at 2:35 PM, Alan Hayward wrote: > > > On 27/10/2015 11:36, "Richard Biener" wrote: > >>On Mon, Oct 26, 2015 at 6:15 PM, Alan Hayward >>wrote: >>> >>> >>> On 26/10/2015 13:35, "Richard Biener" >>>wrote: >>> On Mon, Oct 26, 2015 at 1:33 PM, Alan Hayward wrote: >

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Jiong Wang
On 27/10/15 13:06, H.J. Lu wrote: On Tue, Oct 27, 2015 at 5:52 AM, Jiong Wang wrote: On 27/10/15 11:37, H.J. Lu wrote: On Tue, Oct 27, 2015 at 4:20 AM, Bernd Schmidt wrote: On 10/19/2015 09:55 PM, H.J. Lu wrote: * calls.c (prepare_call_address): Don't handle -fno-plt here. I

[PATCH][ARM] Fix costing of vmul+vcvt combine pattern

2015-10-27 Thread Kyrill Tkachov
Hi all, This patch allows us to handle the *combine_vcvtf2i pattern in rtx costs by properly identifying it as a toint coversion. Before this I saw a pattern like: (set (reg/i:SI 0 r0) (fix:SI (fix:SF (mult:SF (reg:SF 16 s0 [ a ]) (const_double:SF 3.2e+1 [0x0.8p+6]) bein

Re: [PATCH v4] SH FDPIC backend support

2015-10-27 Thread Oleg Endo
On Mon, 2015-10-26 at 22:47 -0400, Rich Felker wrote: > On Sun, Oct 25, 2015 at 11:28:51PM +0900, Oleg Endo wrote: > > On Fri, 2015-10-23 at 02:32 -0400, Rich Felker wrote: > > > Here's my updated version of the FDPIC patch with all requested > > > changes made and Changelog added. I've included al

Re: [OpenACC 7/11] execution model

2015-10-27 Thread Nathan Sidwell
On 10/27/15 01:18, Jakub Jelinek wrote: LGTM, though could I ask you to try to try to move the struct oacc_collapse expand_oacc_collapse_init expand_oacc_collapse_vars expand_oacc_for additions somewhere else (e.g. in between expand_omp_taskreg and expand_omp_for_init_counts), ok, I wasn't su

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-27 Thread Nathan Sidwell
On 10/27/15 06:45, Richard Biener wrote: On Tue, Oct 27, 2015 at 9:03 AM, Jakub Jelinek wrote: Ok for me, but please wait for Richi's ack too. + /* An IFN_UNIQUE call must be duplicated as part of its group, +or not at all. */ + if (is_gimple_call (g) && gimple_call_inter

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-27 Thread Jakub Jelinek
On Tue, Oct 27, 2015 at 07:03:40AM -0700, Nathan Sidwell wrote: > On 10/27/15 06:45, Richard Biener wrote: > >On Tue, Oct 27, 2015 at 9:03 AM, Jakub Jelinek wrote: > > >>Ok for me, but please wait for Richi's ack too. > > > >+ /* An IFN_UNIQUE call must be duplicated as part of its group, >

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-10-27 Thread Kirill Yukhin
Hello Joseph, On 23 Oct 14:16, Joseph Myers wrote: > On Fri, 23 Oct 2015, Kirill Yukhin wrote: > > > > You need to update this patch to take account of Marek's fix for bug > > > 67964 > > > (it was because I was suspicious of the "continue;" in this patch > > > accepting invalid syntax that I f

Re: Partial fix for LTO bootstrap with Ada

2015-10-27 Thread Tom de Vries
[ cc gcc-patches ] On 23/10/15 18:40, Eric Botcazou wrote: --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5887,7 +5887,10 @@ intra_create_variable_infos (struct function *fn) if (POINTER_TYPE_P (TREE_TYPE (t)) && TYPE_RESTRICT (TREE_TYPE (t))) -

Re: [OpenACC 1/11] UNIQUE internal function

2015-10-27 Thread Nathan Sidwell
On 10/27/15 01:03, Jakub Jelinek wrote: On Mon, Oct 26, 2015 at 03:32:45PM -0700, Nathan Sidwell wrote: to break out the else part into a separate function. That's fine -- it'll copy the whole CFG of interest. The question is if some UNIQUE call could be ever considered as part of the chea

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-10-27 Thread Jakub Jelinek
On Tue, Oct 27, 2015 at 05:06:58PM +0300, Kirill Yukhin wrote: > Boostrapped. Regtesting is in progress. Is it ok for trunk if pass? > > gcc/ > * cp/parser.h (cp_parser): Add simd_attr_present. > * cp/parser.c (cp_parser_late_return_type_opt): Handle > simd_attr_present, > r

[PATCH] Fix PR66313

2015-10-27 Thread Richard Biener
When factoring a*b + a*c to (b + c)*a we have to guard against the case of a == 0 as after the factoring b + c might overflow in that case. Fixed by doing the addition in an unsigned type if required. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. Richard. 2015-10-27 Richard Biener

Re: [PATCH] Fix PR68067

2015-10-27 Thread Richard Biener
On Tue, 27 Oct 2015, Richard Biener wrote: > > The following patch adjusts negate_expr_p to account for the fact > that we can't generally change a - (b - c) to (c - b) + a because > -INF - 0 is ok while 0 - -INF not. Similarly for a - (b + c). > While creating testcases I noticed that MULT_EXPR

[PATCH] Fix PR65962 fallout

2015-10-27 Thread Richard Biener
This fixes another fallout of the PR65962 fix, gcc.dg/vect/vect-62.c failing for targets that use constant pool entries for the array initializer. On x86_64 we fail to vectorize the 2nd loop in the testcase because PRE makes the latch block non-empty (and adds a loop carried dependency). The pat

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Ramana Radhakrishnan
> > OK, then it's fairly x86-64 specific optimization, because we can't do "call > *mem" in > aarch64 and some other targets. It is a fairly x86_64 specific optimization and doesn't apply to AArch64. The question really is what impact does removing the generic code handling have on aarch64 -

[PATCH][RTL-ifcvt] PR rtl-optimization/67749: Do not emit separate SET insn in IF-ELSE case

2015-10-27 Thread Kyrill Tkachov
Hi all, This patch fixes the gcc.dg/ifcvt-2.c test for x86_64 where we were failing to if-convert. This was because in my patch at https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=228194 which tried to emit a SET to move the source of insn_a or insn_b (that came from the test block) into

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread H.J. Lu
On Tue, Oct 27, 2015 at 7:34 AM, Ramana Radhakrishnan wrote: > >> >> OK, then it's fairly x86-64 specific optimization, because we can't do "call >> *mem" in >> aarch64 and some other targets. > > It is a fairly x86_64 specific optimization and doesn't apply to AArch64. > > The question really is

Re: [PATCH] Pass manager: add support for termination of pass list

2015-10-27 Thread Richard Biener
On Tue, Oct 27, 2015 at 1:36 PM, Martin Liška wrote: > On 10/26/2015 02:48 PM, Richard Biener wrote: >> On Thu, Oct 22, 2015 at 1:02 PM, Martin Liška wrote: >>> On 10/21/2015 04:06 PM, Richard Biener wrote: On Wed, Oct 21, 2015 at 1:24 PM, Martin Liška wrote: > On 10/21/2015 11:59 AM, R

[PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++ (was: [gomp4] OpenACC cache directive maintenance)

2015-10-27 Thread Thomas Schwinge
Hi! On Wed, 05 Nov 2014 17:44:58 +0100, I wrote: > On Wed, 05 Nov 2014 17:36:46 +0100, I wrote: > > In r217146, I applied the following to gomp-4_0-branch: > > > > [OpenACC cache directive maintenance in C/C++] > I also tried to make this work for Fortran, but didn't manage to (in > a reasonable

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Jiong Wang
On 27/10/15 14:50, H.J. Lu wrote: On Tue, Oct 27, 2015 at 7:34 AM, Ramana Radhakrishnan wrote: OK, then it's fairly x86-64 specific optimization, because we can't do "call *mem" in aarch64 and some other targets. It is a fairly x86_64 specific optimization and doesn't apply to AArch64. The

Re: [PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++ (was: [gomp4] OpenACC cache directive maintenance)

2015-10-27 Thread Jakub Jelinek
On Tue, Oct 27, 2015 at 04:19:49PM +0100, Thomas Schwinge wrote: > On Wed, 05 Nov 2014 17:44:58 +0100, I wrote: > > On Wed, 05 Nov 2014 17:36:46 +0100, I wrote: > > > In r217146, I applied the following to gomp-4_0-branch: > > > > > > [OpenACC cache directive maintenance in C/C++] > > > I also tr

Re: [PATCH] Pass manager: add support for termination of pass list

2015-10-27 Thread Martin Liška
On 10/27/2015 03:49 PM, Richard Biener wrote: > On Tue, Oct 27, 2015 at 1:36 PM, Martin Liška wrote: >> On 10/26/2015 02:48 PM, Richard Biener wrote: >>> On Thu, Oct 22, 2015 at 1:02 PM, Martin Liška wrote: On 10/21/2015 04:06 PM, Richard Biener wrote: > On Wed, Oct 21, 2015 at 1:24 PM,

Re: [AArch64][dejagnu][PATCH 5/7] Dejagnu support for ARMv8.1 Adv.SIMD.

2015-10-27 Thread Matthew Wahab
On 24/10/15 08:16, Bernhard Reutner-Fischer wrote: On October 23, 2015 2:24:26 PM GMT+02:00, Matthew Wahab wrote: The ARMv8.1 architecture extension adds two Adv.SIMD instructions,. This patch adds support in Dejagnu for ARMv8.1 Adv.SIMD specifiers and checks. The new test options are - { dg-

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Kyrill Tkachov
Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it accepts some CONSTRUCTOR and STRING_CST). At some point I tried using sign_bit_p, but

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread H.J. Lu
On Tue, Oct 27, 2015 at 8:26 AM, Jiong Wang wrote: > > > On 27/10/15 14:50, H.J. Lu wrote: >> >> On Tue, Oct 27, 2015 at 7:34 AM, Ramana Radhakrishnan >> wrote: OK, then it's fairly x86-64 specific optimization, because we can't do "call *mem" in aarch64 and some other targets

Re: more accurate error messages omp in fortran

2015-10-27 Thread Cesar Philippidis
(was "Re: more accurate omp in fortran" Ping. Cesar On 10/22/2015 08:21 AM, Cesar Philippidis wrote: > Currently, for certain omp and oacc errors the fortran will inaccurately > report exactly where in the omp/acc construct the error has occurred. E.g. > >!$acc parallel copy (i) copy (i) co

Re: [PATCH] Add -fchecking

2015-10-27 Thread Mikhail Maltsev
On 10/27/2015 04:17 PM, 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). I remember that Jakub proposed to use __builtin_expect with f

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Ramana Radhakrishnan
On 27/10/15 14:50, H.J. Lu wrote: > On Tue, Oct 27, 2015 at 7:34 AM, Ramana Radhakrishnan > wrote: >> >>> >>> OK, then it's fairly x86-64 specific optimization, because we can't do >>> "call *mem" in >>> aarch64 and some other targets. >> >> It is a fairly x86_64 specific optimization and doesn

Re: Re: [Bulk] [OpenACC 0/7] host_data construct

2015-10-27 Thread Cesar Philippidis
On 10/26/2015 11:34 AM, Jakub Jelinek wrote: > On Fri, Oct 23, 2015 at 10:51:42AM -0500, James Norris wrote: >> @@ -12942,6 +12961,7 @@ c_finish_omp_clauses (tree clauses, bool is_omp, >> bool declare_simd) >> case OMP_CLAUSE_GANG: >> case OMP_CLAUSE_WORKER: >> case OMP_CLAUSE_VECTO

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Marc Glisse
On Tue, 27 Oct 2015, Kyrill Tkachov wrote: Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it accepts some CONSTRUCTOR and STRING_CST).

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Kyrill Tkachov
On 27/10/15 15:57, Marc Glisse wrote: On Tue, 27 Oct 2015, Kyrill Tkachov wrote: Hi Marc, On 30/08/15 08:57, Marc Glisse wrote: Hello, just trying to shrink fold-const.c a bit more. initializer_zerop is close to what I was looking for with zerop, but I wasn't sure if it would be safe (it a

Re: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.

2015-10-27 Thread Matthew Wahab
On 27/10/15 11:18, James Greenhalgh wrote: ;; --- @@ -932,6 +934,8 @@ UNSPEC_SQSHRN UNSPEC_UQSHRN UNSPEC_SQRSHRN UNSPEC_UQRSHRN]) +(define_int_iterator SQRDMLAH [U

Re: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.

2015-10-27 Thread James Greenhalgh
On Tue, Oct 27, 2015 at 04:11:07PM +, Matthew Wahab wrote: > On 27/10/15 11:18, James Greenhalgh wrote: > > >> ;; --- > >>@@ -932,6 +934,8 @@ > >> UNSPEC_SQSHRN UNSPEC_UQSHRN > >>

Re: Move some comparison simplifications to match.pd

2015-10-27 Thread Marc Glisse
On Tue, 27 Oct 2015, Kyrill Tkachov wrote: So here the types are shorts and unsigned shorts. On aarch64 these are HImode values and there's no direct arithmetic operations on them, so they have to be extended to SImode and truncated back. Ah ok, that makes sense. I expect it is in the case wh

[PATCH, committed] PR fortran/68108 -- Check for valid array ref.

2015-10-27 Thread Steve Kargl
I've committed the attached patch after testing on x86_64-*-freebsd. A regression was introduced by my fix for PR fortran/67805, which failed to check for a valid array ref. Note, Mikael approved the patch in the PR audit trail. 2015-10-27 Steven G. Kargl PR fortran/68108 *

Re: [PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++

2015-10-27 Thread Thomas Schwinge
Hi! On Tue, 27 Oct 2015 16:26:54 +0100, Jakub Jelinek wrote: > On Tue, Oct 27, 2015 at 04:19:49PM +0100, Thomas Schwinge wrote: > > On Wed, 05 Nov 2014 17:44:58 +0100, I wrote: > > > On Wed, 05 Nov 2014 17:36:46 +0100, I wrote: > > > > In r217146, I applied the following to gomp-4_0-branch: > > >

Re: [PING][PATCHv2, ARM, libgcc] New aeabi_idiv function for armv6-m

2015-10-27 Thread Andre Vieira
Ping. BR, Andre On 13/10/15 18:01, Andre Vieira wrote: This patch ports the aeabi_idiv routine from Linaro Cortex-Strings (https://git.linaro.org/toolchain/cortex-strings.git), which was contributed by ARM under Free BSD license. The new aeabi_idiv routine is used to replace the one in libgcc/

Re: [PATCH] Fix PR66313

2015-10-27 Thread Joseph Myers
On Tue, 27 Oct 2015, Richard Biener wrote: > When factoring a*b + a*c to (b + c)*a we have to guard against the > case of a == 0 as after the factoring b + c might overflow in that > case. Fixed by doing the addition in an unsigned type if required. The same applies to a == -1 (consider b and c

Re: [PATCH] PR/67682, break SLP groups up if only some elements match

2015-10-27 Thread Alan Lawrence
On 26/10/15 15:04, Richard Biener wrote: apart from the fact that you'll post a new version you need to adjust GROUP_GAP. You also seem to somewhat "confuse" "first I stmts" and "a group of size I", those are not the same when the group has haps. I'd say "a group of size i" makes the most sense

Re: PING: [PATCH] PR target/67215: -fno-plt needs improvements for x86

2015-10-27 Thread Jeff Law
On 10/27/2015 09:42 AM, Ramana Radhakrishnan wrote: On 27/10/15 14:50, H.J. Lu wrote: On Tue, Oct 27, 2015 at 7:34 AM, Ramana Radhakrishnan wrote: OK, then it's fairly x86-64 specific optimization, because we can't do "call *mem" in aarch64 and some other targets. It is a fairly x86_64

Re: [c++-delayed-folding] Introduce convert_to_pointer_nofold

2015-10-27 Thread Marek Polacek
On Sun, Oct 25, 2015 at 04:49:08AM -1000, Jason Merrill wrote: > On 10/19/2015 05:33 AM, Marek Polacek wrote: > >+if (fold_p) > >+ expr = fold_build1_loc (loc, NOP_EXPR, totype, expr); > >+else > >+ expr = build1_loc (loc, NOP_EXPR, totype, expr); > > Rather than

  1   2   >