[PATCH] fix PR46029: reimplement if conversion of loads and stores [3nd submitted version of patch]

2015-07-09 Thread Abe
Below, please find the 3nd submitted version of this patch, now with some more issues resolved. Regards, Abe From 87af575347e216672e322bbc1b4ae0a5ab93507f Mon Sep 17 00:00:00 2001 From: Abe Date: Mon, 18 May 2015 14:26:29 -0500 Subject: [PATCH] fix PR46029: reimplement if conversion of lo

Re: Merge DEF_GOACC_BUILTIN into DEF_GOMP_BUILTIN? (was: OpenACC middle end changes)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 05:52:20PM +0200, Thomas Schwinge wrote: > --- gcc/builtins.def > +++ gcc/builtins.def > @@ -182,7 +182,9 @@ along with GCC; see the file COPYING3. If not see > #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ >DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL,

[C++ Patch] PR 61491 (aka DR 1206)

2015-07-09 Thread Paolo Carlini
Hi, the DR got resolved in time for C++11 and Jonathan noticed that we should remove the pedwarn, not a big deal. Tested x86_64-linux. Thanks, Paolo. // /cp 2015-07-09 Paolo Carlini PR c++/61491 * pt.c (maybe_process_partial_specialization): Allow enum temp

Re: [PATCH 1/3] tree-ssa-tail-merge: add IPA ICF infrastructure.

2015-07-09 Thread Jeff Law
On 07/09/2015 07:56 AM, mliska wrote: gcc/ChangeLog: 2015-07-09 Martin Liska * dbgcnt.def: Add new debug counter. * ipa-icf-gimple.c (func_checker::compare_ssa_name): Add flag for strict mode. (func_checker::compare_memory_operand): Likewise. (func_che

Re: [patch 0/9] Flattening and initial module rebuilding

2015-07-09 Thread Jeff Law
On 07/08/2015 08:42 PM, Andrew MacLeod wrote: blah, not so trivial. One of the primary things predict.h does is create enum br_predictor by including predict,def.. so moving that enum doesnt really make sense. Fixing gimple,h isn't too bad, I could split the prediction stuff out into gimple-pre

[PATCH] Remove duplicate graphite statistics printers

2015-07-09 Thread Bernhard Reutner-Fischer
graphite-scop-detection.c contained a copy of graphite.c print_graphite_statistics() and print_graphite_scop_statistics(). The latter gained a parameter to distinguish \nBefore limit_scops SCoP statistics ( from \nSCoP statistics ( Note that previously the version in gimple.c was never called (AF

Re: [C++ Patch] PR 61491 (aka DR 1206)

2015-07-09 Thread Jason Merrill
On 07/09/2015 12:09 PM, Paolo Carlini wrote: the DR got resolved in time for C++11 and Jonathan noticed that we should remove the pedwarn, not a big deal. Tested x86_64-linux. How about adding the testcase from the DR as well? OK with that change. Jason

Re: [PATCH 3/3] Fix ubsan tests by disabling of an optimization.

2015-07-09 Thread Jeff Law
On 07/09/2015 09:41 AM, Jakub Jelinek wrote: On Thu, Jul 09, 2015 at 09:34:25AM -0600, Jeff Law wrote: On 07/09/2015 08:13 AM, Jakub Jelinek wrote: On Thu, Jul 09, 2015 at 03:56:35PM +0200, mliska wrote: --- gcc/testsuite/g++.dg/ubsan/vptr-1.C | 2 +- gcc/testsuite/g++.dg/ubsan/vptr-2.C | 2

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

2015-07-09 Thread Jeff Law
On 07/09/2015 03:19 AM, Tom de Vries wrote: On 09/07/15 05:33, Jeff Law wrote: On 07/07/2015 09:58 AM, Tom de Vries wrote: [Big snip] 0001-Add-rewrite_virtuals_into_loop_closed_ssa.patch Add rewrite_virtuals_into_loop_closed_ssa 2015-07-07 Tom de Vries * tree-cfg.c (get_virtual_phi):

Re: [PATCH] Remove duplicate graphite statistics printers

2015-07-09 Thread Jeff Law
On 07/09/2015 10:30 AM, Bernhard Reutner-Fischer wrote: Thanks, gcc/ChangeLog 2015-07-09 Bernhard Reutner-Fischer * graphite.h: New file. (print_graphite_statistics): Extern declaration. * graphite-scop-detection.c (print_graphite_scop_statistics, print_grap

Re: [PATCH 1/6] hash_set: add iterator and remove method.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * hash-set.h (remove): New function. (iterator): New iteration class for hash_set. OK. jeff

Re: [patch 0/9] Flattening and initial module rebuilding

2015-07-09 Thread Andrew MacLeod
On 07/08/2015 10:42 PM, Andrew MacLeod wrote: On 07/08/2015 06:43 PM, Jeff Law wrote: predict.h is actually required by gimple.h for a few reasons, enum be_predictor is used in parameter lists and a few inlines use the TAKEN, NOT_TAKEN macros Its also needed by cfghooks.h, and betwen those 2 f

[Patch, MIPS] Fix SYSROOT_SUFFIX_SPEC for mips-mti-linux-gnu

2015-07-09 Thread Steve Ellcey
This patch enables builds with mips[32|64]r3 and mips[32|64]r5 in the mips-mti-linux-gnu toolchain. t-mti-linux uses MULTILIB_MATCHES to map these to r2 but SYSROOT_SUFFIX_SPEC was not being set properly to find the sysroot (the r2 one) for these architectures. This patch fixes that problem by up

Re: [PATCH 2/6] Introduce new edge_summary class and replace ipa_edge_args_sum.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * cgraph.c (symbol_table::create_edge): Introduce summary_uid for cgraph_edge. * cgraph.h (struct GTY): Likewise. * ipa-inline-analysis.c (estimate_function_body_sizes): Use n

Re: [PATCH 3/6] IPA inline: port inline_edge_summary to a new infrastructure.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-inline-analysis.c (inline_edge_summaries): New data structure. (redirect_to_unreachable): Use renamed function get_inline_edge_summary. (edge_set_predicate): Likewise.

[PATCH] ipa-icf.c: Fix typo in dump file

2015-07-09 Thread Bernhard Reutner-Fischer
gcc/ChangeLog 2015-07-09 Bernhard Reutner-Fischer * ipa-icf.c (sem_item_optimizer::do_congruence_step): Fix typo in dump message. Ok for trunk if testing passes? Hmz, that's obvious, will commit tomorrow after the regstrap during night. --- gcc/ipa-icf.c | 2 +- 1 file change

Re: [PATCH 5/6] Port IPA reference to function_summary infrastructure.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-reference.c (ipa_ref_opt_summary_t): New class. (get_reference_optimization_summary): Use it. (set_reference_optimization_summary): Likewise. (ipa_init): Remove hook holders usa

Re: [PATCH] ipa-icf.c: Fix typo in dump file

2015-07-09 Thread Jeff Law
On 07/09/2015 11:32 AM, Bernhard Reutner-Fischer wrote: gcc/ChangeLog 2015-07-09 Bernhard Reutner-Fischer * ipa-icf.c (sem_item_optimizer::do_congruence_step): Fix typo in dump message. Ok for trunk if testing passes? Hmz, that's obvious, will commit tomorrow after the regst

Re: [PATCH 4/6] Port ipa-cp to use cgraph_edge summary.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-cp.c (struct edge_clone_summary): New structure. (class edge_clone_summary_t): Likewise. (edge_clone_summary_t::initialize): New method. (edge_clone_summary_t::duplicate): Likew

Re: [PATCH 6/6] Migrate ipa-pure-const to function_summary.

2015-07-09 Thread Jeff Law
On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-pure-const.c (struct funct_state_d): New. (funct_state_d::default_p): Likewise. (has_function_state): Remove. (get_function_state): Likewise. (set_function_state): Likew

C++ PATCHes to template parameter parsing

2015-07-09 Thread Jason Merrill
The first patch is a cleanup hoisted from the c++-concepts branch: on the branch we want to be able to parse type/template in multiple places, so Andrew factored that out, but it's a good code cleanup on the trunk as well. While looking at this and related code on the branch, I noticed that t

Re: [PATCH] Remove duplicate graphite statistics printers

2015-07-09 Thread Bernhard Reutner-Fischer
On July 9, 2015 6:48:39 PM GMT+02:00, Jeff Law wrote: >On 07/09/2015 10:30 AM, Bernhard Reutner-Fischer wrote: >> >> Thanks, >> >> gcc/ChangeLog >> >> 2015-07-09 Bernhard Reutner-Fischer >> >> * graphite.h: New file. >> (print_graphite_statistics): Extern declaration. >> * graphi

Re: [patch 0/9] Flattening and initial module rebuilding

2015-07-09 Thread Jeff Law
On 07/09/2015 11:06 AM, Andrew MacLeod wrote: On 07/08/2015 10:42 PM, Andrew MacLeod wrote: On 07/08/2015 06:43 PM, Jeff Law wrote: predict.h is actually required by gimple.h for a few reasons, enum be_predictor is used in parameter lists and a few inlines use the TAKEN, NOT_TAKEN macros Its al

Re: [PATCH] Remove duplicate graphite statistics printers

2015-07-09 Thread Jeff Law
On 07/09/2015 11:48 AM, Bernhard Reutner-Fischer wrote: On July 9, 2015 6:48:39 PM GMT+02:00, Jeff Law wrote: On 07/09/2015 10:30 AM, Bernhard Reutner-Fischer wrote: Thanks, gcc/ChangeLog 2015-07-09 Bernhard Reutner-Fischer * graphite.h: New file. (print_graphite_statist

Small C++ PATCH to instantiation_dependent_r for TRAIT_EXPR

2015-07-09 Thread Jason Merrill
There's no reason we should have the logic for whether a TRAIT_EXPR is value-dependent in two places. Tested x86_64-pc-linux-gnu, applying to trunk. commit fcd3802b2b88251b6c0dea63b38e6f269be7713d Author: Jason Merrill Date: Tue Jul 7 23:49:21 2015 -0400 * pt.c (instantiation_dependent_

Re: [RFC, Fortran, (pr66775)] Allocatable function result

2015-07-09 Thread Steve Kargl
On Thu, Jul 09, 2015 at 12:25:18PM +0200, Andre Vehreschild wrote: > > I need your help on how to interpret the standard(s) or how to > implement handling an allocatable function's result, when that > result is not allocated by the function. Imagine the simple > (albeit artificial) case: > > int

Re: [patch 0/9] Flattening and initial module rebuilding

2015-07-09 Thread Andrew MacLeod
On 07/09/2015 01:49 PM, Jeff Law wrote: On 07/09/2015 11:06 AM, Andrew MacLeod wrote: The total result affect 227 files. Now, predict.h is *still* more pervasive than it needs to be, but thats a different patch :-). There are a set of routines in there like optimize_{fucntion,loop,edge,bb}_f

[PATCH] Adjust variable shift costs for IA MCU

2015-07-09 Thread H.J. Lu
We reduce code size for IA MCU by adjusting variable shift costs for IA MCU. OK for trunk? Thanks. H.J. --- PR target/66821 * config/i386/i386.c (iamcu_cost): Adjust variable shift costs. --- gcc/config/i386/i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-09 Thread Jakub Jelinek
Hi! On Thu, Jul 09, 2015 at 11:24:44AM -0700, Aldy Hernandez wrote: Thanks for working on it. > + wide_int offset = wi::neg (addend, &overflow); > + addend = wide_int_to_tree (TREE_TYPE (addend), offset); > + if (overflow) > + warning_at (c_parser_peek_t

Re: [RFC, Fortran, (pr66775)] Allocatable function result

2015-07-09 Thread Andre Vehreschild
Hi Steve, Thanks for your knowledge. Can you support your statement that an allocatable function has to return an allocated object by a part of the standard? I totally agree with you that this code is ill-designed, but IMO is it not the task of the compiler to address ill design. The compiler h

[PATCH] PR target/66824: -miamcu doesn't load FP constant into register directly

2015-07-09 Thread H.J. Lu
ix86_split_long_move can optimize floating point constant move, which can be used to optimize SFmode move for IA MCU. OK for trunk if there is no regression? H.J. --- gcc/ PR target/66824 * config/i386/i386.c (ix86_split_to_parts): Allow SFmode move for IA MCU. (

[gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-09 Thread Aldy Hernandez
The following patch goes along with Jakub's parsing of ordered(n) loops. With it, we can now parse his testcase, along with a variety of other tests with appropriate diagnostics. The lowering to gimple is still not done, as we should agree on what needs to be emitted first. I'll follow up w

Re: [C++ Patch] PR 61491 (aka DR 1206)

2015-07-09 Thread Paolo Carlini
Hi, On 07/09/2015 06:33 PM, Jason Merrill wrote: On 07/09/2015 12:09 PM, Paolo Carlini wrote: the DR got resolved in time for C++11 and Jonathan noticed that we should remove the pedwarn, not a big deal. Tested x86_64-linux. How about adding the testcase from the DR as well? OK with that cha

RE: [Patch, MIPS] Fix SYSROOT_SUFFIX_SPEC for mips-mti-linux-gnu

2015-07-09 Thread Matthew Fortune
> 2015-07-09 Steve Ellcey > > * config/mips/mti-linux.h (MIPS_SYSVERSION_SPEC): Update > to handle mips[32|64]r3 and mips[32|64]r5. OK, thanks. Matthew

Re: [PATCH, i386]: Fix PR 66814, ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 05:22:33PM +0200, Uros Bizjak wrote: > Hello! > > This ICE was caused by a peephole2 pattern that allowed non-general > regs arguments. > > 2015-07-08 Uros Bizjak > > PR target/66814 > * config/i386/predicates.md (nonimmediate_gr_operand): New predicate. >

Re: [RFC, Fortran, (pr66775)] Allocatable function result

2015-07-09 Thread Steve Kargl
On Thu, Jul 09, 2015 at 08:59:08PM +0200, Andre Vehreschild wrote: > Hi Steve, > > Thanks for your knowledge. Can you support your statement that an allocatable > function has to return an allocated object by a part of the standard? I > totally agree with you that this code is ill-designed, but

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

2015-07-09 Thread Jeff Law
On 06/01/2015 06:26 AM, Ilya Enkovich wrote: 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 patch is not to bl

Re: [PATCH, i386]: Fix PR 66814, ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-09 Thread Uros Bizjak
On Thu, Jul 9, 2015 at 9:38 PM, Jakub Jelinek wrote: > On Thu, Jul 09, 2015 at 05:22:33PM +0200, Uros Bizjak wrote: >> Hello! >> >> This ICE was caused by a peephole2 pattern that allowed non-general >> regs arguments. >> >> 2015-07-08 Uros Bizjak >> >> PR target/66814 >> * config/i386/

Re: Tests for libgomp based on OpenMP Examples 4.0.2.

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 05:23:36PM +0300, Maxim Blumental wrote: > Now the patch is corrected (according to the previous letter) and > ready to be reviewed. I'm looking forward to your feedback. Ok, I guess while the filenames are still different, it is quite easily possible to find corresponding

Re: [PATCH, i386]: Fix PR 66814, ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 10:13:49PM +0200, Uros Bizjak wrote: > I was under impression that peephole2 pass doesn't see subregs of hard > regs (all x86 predicates are written in this way). Even documentation > somehow agrees with this: > > '(subreg:M1 REG:M2 BYTENUM)' > > 'subreg' expressions a

Proposal to postpone release of 5.2 for a week [Was: Re: patch to fix PR66782]

2015-07-09 Thread Uros Bizjak
Hello! > The patch was bootstrapped and tested on x86/x86-64. > > Committed as rev. 225618. > > 2015-07-09 Vladimir Makarov > > PR rtl-optimization/66782 > * lra-int.h (struct lra_insn_recog_data): Add comment about > clobbered hard regs for arg_hard_regs. > * lr

Re: [PATCH, i386]: Fix PR 66814, ICE: gcc.target/i386/avx512f-klogic-2.c

2015-07-09 Thread Uros Bizjak
On Thu, Jul 9, 2015 at 10:17 PM, Jakub Jelinek wrote: > On Thu, Jul 09, 2015 at 10:13:49PM +0200, Uros Bizjak wrote: >> I was under impression that peephole2 pass doesn't see subregs of hard >> regs (all x86 predicates are written in this way). Even documentation >> somehow agrees with this: >> >>

Re: [PATCH] Adjust variable shift costs for IA MCU

2015-07-09 Thread Uros Bizjak
On Thu, Jul 9, 2015 at 8:05 PM, H.J. Lu wrote: > We reduce code size for IA MCU by adjusting variable shift costs for IA > MCU. OK for trunk? IMO, tuning patches should fall into "obvious" category. I don't have any data to to do any meaningful review of a cost metric for a new target. So, inst

Re: [PATCH] Adjust variable shift costs for IA MCU

2015-07-09 Thread H.J. Lu
On Thu, Jul 9, 2015 at 1:30 PM, Uros Bizjak wrote: > On Thu, Jul 9, 2015 at 8:05 PM, H.J. Lu wrote: >> We reduce code size for IA MCU by adjusting variable shift costs for IA >> MCU. OK for trunk? > > IMO, tuning patches should fall into "obvious" category. I don't have > any data to to do any m

Re: [PATCH 2/6] Introduce new edge_summary class and replace ipa_edge_args_sum.

2015-07-09 Thread Martin Liška
On 07/09/2015 07:15 PM, Jeff Law wrote: On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * cgraph.c (symbol_table::create_edge): Introduce summary_uid for cgraph_edge. * cgraph.h (struct GTY): Likewise. * ipa-inline-analysis.c (estimate_function_b

Re: [PATCH 5/6] Port IPA reference to function_summary infrastructure.

2015-07-09 Thread Martin Liška
On 07/09/2015 07:35 PM, Jeff Law wrote: On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-reference.c (ipa_ref_opt_summary_t): New class. (get_reference_optimization_summary): Use it. (set_reference_optimization_summary): Likewise. (ipa_init)

Re: [PATCH 6/6] Migrate ipa-pure-const to function_summary.

2015-07-09 Thread Martin Liška
On 07/09/2015 07:44 PM, Jeff Law wrote: On 07/09/2015 03:13 AM, mliska wrote: gcc/ChangeLog: 2015-07-03 Martin Liska * ipa-pure-const.c (struct funct_state_d): New. (funct_state_d::default_p): Likewise. (has_function_state): Remove. (get_function_state): Likewise. (set_f

Re: [C++ Patch] PR 61491 (aka DR 1206)

2015-07-09 Thread Jason Merrill
On 07/09/2015 03:36 PM, Paolo Carlini wrote: Finally, we do *not* reject, as we should, the line: template<> enum A::E : char { echar }; Then, overall, is it Ok to simply suppress the pedwarn in C++11, and xfail for now the error? Should I open a new, separate bug report about the latter? (note

Re: [PATCH] Fix PR c++/30044

2015-07-09 Thread Jason Merrill
OK, thanks. Jason

Re: [PATCH] PR target/66824: -miamcu doesn't load FP constant into register directly

2015-07-09 Thread H.J. Lu
On Thu, Jul 09, 2015 at 12:13:38PM -0700, H.J. Lu wrote: > ix86_split_long_move can optimize floating point constant move, which > can be used to optimize SFmode move for IA MCU. > > OK for trunk if there is no regression? > > > H.J. > --- > gcc/ > > PR target/66824 > * config/i386/

Re: [patch] testsuite enable PIE tests on DragonFly

2015-07-09 Thread Andreas Tobler
On 09.07.15 17:30, Jeff Law wrote: On 07/09/2015 07:53 AM, John Marino wrote: DragonFly supports PIE but the tests for it are disabled. The attached patch for the trunk will enable these checks on DragonFly. Thanks for considering this! John p.s. suggested gcc/testsuite/changelog entry: 2015-

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:21:01AM +0200, Jakub Jelinek wrote: > > Hmm, this looks like it could be split out to a function. > > Ok, will try that. Here is what I've committed after another bootstrap/regtest on x86_64-linux and i686-linux. You're right, the separate function cleaned stuff up. 2

[PATCH] Fix OpenMP ICE due to fold_stmt (PR middle-end/66820)

2015-07-09 Thread Jakub Jelinek
Hi! As discussed on IRC, we have a problem because fold_stmt can call force_gimple_operand_1, which in turn does push_gimplify_context/pop_gimplify_context (NULL), even when inside of some gimplify_ctxp and thus pushes the decls into function context rather than the current gimplify_ctxp. So far

Re: [patch] Fix PR middle-end/66633

2015-07-09 Thread Jakub Jelinek
On Mon, Jun 29, 2015 at 11:23:24AM +0200, Eric Botcazou wrote: > > Don't you need to handle convert_nonlocal_omp_clauses similarly (need_chain > > in that case)? > > At least looking at your r211308 commit, for !optimize you force not just > > the frame, but also chain. > > You're very likely righ

Re: [C++ Patch] PR 61491 (aka DR 1206)

2015-07-09 Thread Paolo Carlini
Hi, On 07/09/2015 10:53 PM, Jason Merrill wrote: On 07/09/2015 03:36 PM, Paolo Carlini wrote: Finally, we do *not* reject, as we should, the line: template<> enum A::E : char { echar }; Then, overall, is it Ok to simply suppress the pedwarn in C++11, and xfail for now the error? Should I open

Re: [RFC, PATCH] Split pool_allocator and create a new object_allocator

2015-07-09 Thread Martin Liška
On 07/03/2015 06:18 PM, Richard Sandiford wrote: Hi Martin, Martin Liška writes: On 07/03/2015 03:07 PM, Richard Sandiford wrote: Martin Jambor writes: On Fri, Jul 03, 2015 at 09:55:58AM +0100, Richard Sandiford wrote: Trevor Saunders writes: On Thu, Jul 02, 2015 at 09:09:31PM +0100, Ric

Re: [PR66726] Factor conversion out of COND_EXPR

2015-07-09 Thread Kugan
On 08/07/15 00:41, Jeff Law wrote: > On 07/07/2015 06:50 AM, Kugan wrote: >> >> Thanks for the review. I have addressed your comments above in the >> attached patch. >> >> I have one question with respect to unary operation. For generic unary >> operation with INTEGER_CST, do we skip this or do w

Re: [gomp] Move openacc vector& worker single handling to RTL

2015-07-09 Thread Nathan Sidwell
This is the patch I committed. Bernd pointed out that I didn't need to be so coy about the branches in the middle of blocks at that point of the compilation anyway. So we remove a couple of unneeded insn patterns. nathan 2015-07-09 Nathan Sidwell Infrastructure: * gimple.

Re: [PATCH 3/7] Fix trinary op

2015-07-09 Thread Mikhail Maltsev
On 08.07.2015 13:55, Ian Lance Taylor wrote: > I don't know of anybody who actually uses the DMGL_TYPES support. I > don't know why anybody would. > > Ian Thanks for pointing that out. I updated the testcases, so that now they don't depend on DMGL_TYPES being used. > But better still is to consi

Re: [PATCH] Simple optimization for MASK_STORE.

2015-07-09 Thread Jeff Law
On 06/18/2015 08:32 AM, Yuri Rumyantsev wrote: Richard, Here is updated patch which does not include your proposal related to the target hook deletion. You wrote: I still don't understand why you need the new target hook. If we have a masked load/store then the mask is computed by an assignmen

Re: [PATCH] fold builtin_tolower, builtin_toupper

2015-07-09 Thread Ondřej Bílka
On Thu, Jul 09, 2015 at 03:46:08PM +0200, Richard Biener wrote: > On Thu, 9 Jul 2015, Bernhard Reutner-Fischer wrote: > > > gcc/ChangeLog > > > > 2015-07-09 Bernhard Reutner-Fischer > > > > * builtins.c (fold_builtin_tolower, fold_builtin_toupper): New > > static functions. > > (f

Re: [PATCH] S390: Support -mtune=native and -march=native.

2015-07-09 Thread DJ Delorie
> Sorry about that. Does the attached Patch fix the problem? Yup. Thanks!

Re: [PATCH] Fix PR66794

2015-07-09 Thread Richard Biener
On Wed, 8 Jul 2015, H.J. Lu wrote: > On Wed, Jul 8, 2015 at 4:46 AM, Richard Biener wrote: > > > > Passes do not expect post-dominators being around and thus forget > > to invalidate them properly. Thus passes computing them have to > > free them. The patch fixes path-isolation and adds an asse

Re: [PATCH] Limit alignment on error_mark_node variable

2015-07-09 Thread Richard Biener
On Wed, Jul 8, 2015 at 5:32 PM, H.J. Lu wrote: > There is no need to try different alignment on variable of > error_mark_node. > > OK for trunk if there is no regression? Can't we avoid calling align_variable on error_mark_node type decls completely? That is, punt earlier when we try to emit it.

Re: darwin fix for gcc-5 (RM please)

2015-07-09 Thread Richard Biener
On Wed, Jul 8, 2015 at 6:37 PM, Mike Stump wrote: > I’d like to merge in the fix from https://gcc.gnu.org/PR66523 into the > gcc-5-branch. > > RM Ok? Ok. Richard. > https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773: > diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c > index 40804b8..0

Re: [gomp4] Handle Fortran deviceptr clause.

2015-07-09 Thread Thomas Schwinge
Hi Jim! On Wed, 8 Jul 2015 13:00:16 -0500, James Norris wrote: > This patch adds handling of the deviceptr clause when > used within a Fortran program. Please motivate such non-obvious code changes by a test case. At least to me, it's not at all obvious what's going on here... Is that the occ

[gomp4.1] Support C++ "this" in OpenMP directives

2015-07-09 Thread Jakub Jelinek
On Wed, Jun 10, 2015 at 11:38:25AM +, Joseph Myers wrote: > This patch, for gomp-4_0-branch, adds support for C++ "this" in > OpenACC directives. (This patch does not do anything to handle OpenMP > differently from OpenACC; that - bug 66053 - will need to be resolved > for mainline, either dec

Re: [gomp4] Handle deviceptr from an outer directive

2015-07-09 Thread Thomas Schwinge
Hi Jim! On Tue, 7 Jul 2015 10:19:39 -0500, James Norris wrote: > This patch fixes an issue where the deviceptr clause in an outer > directive was being ignored during implicit variable definition > on a nested directive. > Committed to gomp-4_0-branch. > --- a/gcc/gimplify.c > +++ b/gcc/gimpli

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Richard Biener
On Wed, 8 Jul 2015, Marek Polacek wrote: > On Fri, Jul 03, 2015 at 03:41:29PM +0200, Richard Biener wrote: > > On Fri, 3 Jul 2015, Marek Polacek wrote: > > > > > This patch implements a new pass, called laddress, which deals with > > > lowering ADDR_EXPR assignments. Such lowering ought to help

Re: [PR25530] Convert (unsigned t / 2) * 2 into (unsigned t & ~1)

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 8:35 AM, Paolo Bonzini wrote: > > > On 07/07/2015 11:08, Richard Biener wrote: >> Also I am not sure ceil_div and floor_div can be handled this way. >> (5 /[ceil] 2) * 2 == 6 but you compute it as 4. So I am only convinced >> trunc_div works this way. > > Of course also flo

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Marek Polacek
On Thu, Jul 09, 2015 at 10:53:30AM +0200, Richard Biener wrote: > > I renamed the file to gimple-laddress.c then and adjusted the timevar. > > Another change is that for x86_64 we don't need -mavx at all, so I dropped > > that. The test is now restricted to x86_64/i?86; on aarch64/ppc64 we aren't

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:04:38AM +0200, Marek Polacek wrote: > On Thu, Jul 09, 2015 at 10:53:30AM +0200, Richard Biener wrote: > > > I renamed the file to gimple-laddress.c then and adjusted the timevar. > > > Another change is that for x86_64 we don't need -mavx at all, so I dropped > > > that.

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Richard Biener
On Sat, 4 Jul 2015, Jakub Jelinek wrote: > On Fri, Jul 03, 2015 at 04:06:26PM +0200, Jakub Jelinek wrote: > > In the pr59984.c testcase, with Marek's patch and this patch, one loop in > > test is already vectorized (the ICE was on the other one), I'll work on > > recognizing multiples of GOMP_SIMD

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

2015-07-09 Thread Tom de Vries
On 09/07/15 05:33, Jeff Law wrote: On 07/07/2015 09:58 AM, Tom de Vries wrote: [Big snip] 0001-Add-rewrite_virtuals_into_loop_closed_ssa.patch Add rewrite_virtuals_into_loop_closed_ssa 2015-07-07 Tom de Vries * tree-cfg.c (get_virtual_phi): New function. * tree-cfg.h (get_virtual_

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:14:01AM +0200, Richard Biener wrote: > > @@ -2764,6 +2769,93 @@ vectorizable_simd_clone_call (gimple stm > > || thisarginfo.dt == vect_external_def) > >&& POINTER_TYPE_P (TREE_TYPE (op))) > > thisarginfo.align = get_pointer_alignment (op) / BIT

[C++ Patch, obvious?] Rename warn_args_num

2015-07-09 Thread Paolo Carlini
Hi, given that the current warn_args_num only outputs errors, never warnings, I think we really want to rename it. Unless it's the wrong time for such changes...?!? Thanks, Paolo. /// 2015-07-09 Paolo Carlini * typeck.c (warn_args_num): Rename to error_args_nu

Re: move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-09 Thread Marek Polacek
On Tue, Jul 07, 2015 at 07:47:50AM +0200, Marc Glisse wrote: > On Tue, 7 Jul 2015, Prathamesh Kulkarni wrote: > > >+/* a * (1 << b) -> a << b */ > >+(simplify > >+ (mult:c @a (lshift integer_onep @b)) > >+ (if (!FLOAT_TYPE_P (type)) > >+(lshift @a @b))) Just a nit: the last line is wrongly

Re: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real

2015-07-09 Thread Alan Lawrence
Jeff Law wrote: On 07/08/2015 03:43 AM, Richard Biener wrote: On Wed, Jul 8, 2015 at 12:07 AM, Jeff Law wrote: On 07/07/2015 06:37 AM, Alan Lawrence wrote: As per https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01346.html. Fixes FAIL of advsimd-intrinsics vcreate.c on aarch64_be-none-elf from p

[PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing

2015-07-09 Thread Bin Cheng
Hi, When I going through the code, I spot this minor issue. When start_cand/orig_cand/third_cand have overall cost in order like "start_cand < third_cand < orig_cand", GCC chooses the third_cand instead of start_cand because we haven't set best_cost for start_cand. This is an obvious fix to it.

[PATCH GCC]Improve auto-increment addressing mode support in IVO by refactoring add candiate logic.

2015-07-09 Thread Bin Cheng
Hi, This patch refactors codes adding iv candidates in IVO. It renames functions using straightforward names, it also factors function call to add_autoinc_candidates from add_candidate to add_iv_candidate_for_use. Before this patch, we tried to add autoinc candidates for every call to add_candidat

Re: [PATCH AArch64]Handle wrong cost for addition of minus immediate in aarch64_rtx_costs.

2015-07-09 Thread Bin.Cheng
Ping. On Fri, Jun 26, 2015 at 4:47 PM, Bin Cheng wrote: > Hi, > The canonical form of subtract of immediate is (add op0 minus_imm), which is > supported with addsi3_aarch64 pattern on aarch64. Unfortunately wrong cost > (8 rather than 4) is computed by aarch64_rtx_cost because it doesn't honor >

Re: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 11:34 AM, Alan Lawrence wrote: > Jeff Law wrote: >> >> On 07/08/2015 03:43 AM, Richard Biener wrote: >>> >>> On Wed, Jul 8, 2015 at 12:07 AM, Jeff Law wrote: On 07/07/2015 06:37 AM, Alan Lawrence wrote: > > As per https://gcc.gnu.org/ml/gcc-patches/2015-04

Re: [PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 11:37 AM, Bin Cheng wrote: > Hi, > When I going through the code, I spot this minor issue. When > start_cand/orig_cand/third_cand have overall cost in order like "start_cand > < third_cand < orig_cand", GCC chooses the third_cand instead of start_cand > because we haven't s

Re: [PATCH] Limit alignment on error_mark_node variable

2015-07-09 Thread H.J. Lu
On Thu, Jul 09, 2015 at 10:16:38AM +0200, Richard Biener wrote: > On Wed, Jul 8, 2015 at 5:32 PM, H.J. Lu wrote: > > There is no need to try different alignment on variable of > > error_mark_node. > > > > OK for trunk if there is no regression? > > Can't we avoid calling align_variable on error_m

Re: [PATCH GCC]Improve auto-increment addressing mode support in IVO by refactoring add candiate logic.

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 11:40 AM, Bin Cheng wrote: > Hi, > This patch refactors codes adding iv candidates in IVO. It renames > functions using straightforward names, it also factors function call to > add_autoinc_candidates from add_candidate to add_iv_candidate_for_use. > Before this patch, we t

Re: [PATCH] Limit alignment on error_mark_node variable

2015-07-09 Thread Richard Biener
On Thu, Jul 9, 2015 at 11:52 AM, H.J. Lu wrote: > On Thu, Jul 09, 2015 at 10:16:38AM +0200, Richard Biener wrote: >> On Wed, Jul 8, 2015 at 5:32 PM, H.J. Lu wrote: >> > There is no need to try different alignment on variable of >> > error_mark_node. >> > >> > OK for trunk if there is no regressio

Re: [PATCH 15/16][fold-const.c] Fix bigendian HFmode in native_interpret_real

2015-07-09 Thread Alan Lawrence
Richard Biener wrote: I wonder why wi::from_buffer doesn't have the same issue though for HImode ints. It's structured differently, without magic '4's as well. I don't claim to understand the rest of wi::from_buffer and why it is different. However, wrt. HImode, I think the key line is: o

Re: [PATCH 2/4] Add liboffloadmic

2015-07-09 Thread Thomas Schwinge
Hi Ilya! On Tue, 21 Oct 2014 21:20:34 +0400, Ilya Verbin wrote: > This patch contains liboffloadmic library. > > It is used by ICC for offloading. The sources are imported from upstream > ( https://www.openmprtl.org/sites/default/files/liboffload_oss.tgz ) > Configure and makefiles are new. >

Re: [PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing

2015-07-09 Thread Bin.Cheng
On Thu, Jul 9, 2015 at 5:49 PM, Richard Biener wrote: > On Thu, Jul 9, 2015 at 11:37 AM, Bin Cheng wrote: >> Hi, >> When I going through the code, I spot this minor issue. When >> start_cand/orig_cand/third_cand have overall cost in order like "start_cand >> < third_cand < orig_cand", GCC choose

Re: move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-09 Thread Richard Biener
On Thu, 9 Jul 2015, Marek Polacek wrote: > On Tue, Jul 07, 2015 at 07:47:50AM +0200, Marc Glisse wrote: > > On Tue, 7 Jul 2015, Prathamesh Kulkarni wrote: > > > > >+/* a * (1 << b) -> a << b */ > > >+(simplify > > >+ (mult:c @a (lshift integer_onep @b)) > > >+ (if (!FLOAT_TYPE_P (type)) > > >+

[RFC, Fortran, (pr66775)] Allocatable function result

2015-07-09 Thread Andre Vehreschild
Hi all, I need your help on how to interpret the standard(s) or how to implement handling an allocatable function's result, when that result is not allocated by the function. Imagine the simple (albeit artificial) case: integer function read_input() ! Do whatever is needed to read an int. rea

Re: move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-09 Thread Marek Polacek
On Thu, Jul 09, 2015 at 12:02:19PM +0200, Richard Biener wrote: > I've added support for non-digit names to allow more descriptive > patterns. Like when we have > > /* Fold (X << C1) & C2 into (X << C1) & (C2 | ((1 << C1) - 1)) > (X >> C1) & C2 into (X >> C1) & (C2 | ~((type) -1 >> C1)) >

Re: [RFC] two-phase marking in gt_cleare_cache

2015-07-09 Thread Tom de Vries
On 07/07/15 16:00, Michael Matz wrote: Hi, On Mon, 6 Jul 2015, Richard Biener wrote: By doing so, we make the behaviour of gt_cleare_cache independent of the order in which the entries are visited, turning: - hard-to-trigger bugs which trigger for one visiting order but not for another, int

[PATCH] PR target/66819: Allow indirect sibcall with register arguments

2015-07-09 Thread H.J. Lu
Indirect sibcall with register arguments is OK when there is register available for argument passing. OK for trunk if there is no regression? H.J. --- gcc/ PR target/66819 * config/i386/i386.c (ix86_function_ok_for_sibcall): Allow indirect sibcall with register arguments

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-07-09 Thread Richard Biener
On Wed, 8 Jul 2015, Richard Biener wrote: > > This introduces a :s flag to match expressions which enforces > the expression to have a single-use if(!) the simplified > expression is larger than one statement. > > Thus with that we for example allow > > tem = a + 1; > x = tem - 3; > foo (

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

2015-07-09 Thread Tom de Vries
On 07/07/15 17:58, Tom de Vries wrote: If you can handle one exit edge I also can't see the difficulty in handling all exit edges. Agreed, that doesn't look to complicated. I could call rewrite_virtuals_into_loop_closed_ssa for all loops in rewrite_virtuals_into_loop_closed_ssa, to get non-sin

Re: [PATCH] PR target/66819: Allow indirect sibcall with register arguments

2015-07-09 Thread Uros Bizjak
On Thu, Jul 9, 2015 at 12:54 PM, H.J. Lu wrote: > Indirect sibcall with register arguments is OK when there is register > available for argument passing. > > OK for trunk if there is no regression? > > > H.J. > --- > gcc/ > > PR target/66819 > * config/i386/i386.c (ix86_function_ok

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

2015-07-09 Thread Richard Biener
On Thu, 9 Jul 2015, Tom de Vries wrote: > On 07/07/15 17:58, Tom de Vries wrote: > > > If you can > > > handle one exit edge I also can't see the difficulty in handling > > > all exit edges. > > > > > > > Agreed, that doesn't look to complicated. I could call > > rewrite_virtuals_into_loop_close

[PATCH 0/6] {function,edge}_summary for IPA passes

2015-07-09 Thread mliska
Following series of patches continues where I stopped at the end of previous stage 1. It ports places in IPA passes to function_summary container and I introduce a new edge_summary, which is essentially very similar to the aforementioned container. Patches were tested together on x86_64-linux-gnu

[PATCH 1/6] hash_set: add iterator and remove method.

2015-07-09 Thread mliska
gcc/ChangeLog: 2015-07-03 Martin Liska * hash-set.h (remove): New function. (iterator): New iteration class for hash_set. --- gcc/hash-set.h | 39 +++ 1 file changed, 39 insertions(+) diff --git a/gcc/hash-set.h b/gcc/hash-set.h index 2fb6c

  1   2   >