[PATCH 3/4] ipa-sra: Improve debug info for removed parameters (PR 93385)

2020-05-28 Thread Martin Jambor
Whereas the previous patch fixed issues with code left behind after IPA-SRA removed a parameter but only reset all affected debug bind statements, this one updates them with expressions which can allow the debugger to print the removed value - see the added test-case. Even though I originally did

[PATCH 0/4] Make IPA-SRA not depend on tree-dce and related fixes

2020-05-28 Thread Martin Jambor
comments, questions and suggestions, Martin Martin Jambor (4): ipa-sra: Do not remove statements necessary because of non-call EH (PR 95113) ipa-sra: Introduce a mini-DCE to tree-inline.c (PR 93385) ipa-sra: Improve debug info for removed parameters (PR 93385) ipa-sra: Fix debug info

Re: [WIKI] Replace delta with C-Vise (and C-Reduce)

2020-05-28 Thread Martin Jambor
Hi, On Thu, May 28 2020, Martin Liška wrote: > Hello. > > I've spent quite some time working of a super-parallel reduction tool > and I would like to promote it ;) Moreover, delta website is down and > it should be replaced: [1]. > > There's updated wording of the following WIKI page: >

BRIG FE testsuite: Fix dump scan patterns in packed.hsail test

2020-05-25 Thread Martin Jambor
| 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dfb92ec5748..58521437e2d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-25 Martin Jambor + + * brig.dg/test/gim

Re: [PATCH] Fix missed IPA-CP on by-ref argument directly passed through (PR ipa/93429)

2020-05-04 Thread Martin Jambor
Hi, On Mon, Jan 27 2020, Feng Xue OS wrote: > Current IPA does not propagate aggregate constant for by-ref argument > if it is simple pass-through of caller parameter. Here is an example, > >f1 (int *p) >{ > ... = *p; > ... >} > >f2 (int *p) >{ > *p = 2; >

[PATCH] ipa: Cgraph verification fix (PR 94856)

2020-04-30 Thread Martin Jambor
and segfaults. Therefore the patch also adds a test whether the a former hunk even has any call. Passed bootstrap and testsuite on x86-64-linux, LTO bootstrap underway. OK for trunk (in time for GCC 10) if it passes it too? Thanks, Martin 2020-04-30 Martin Jambor PR ipa/94856

[PATCH] tree-inline: Simplify IPA-CP type conversion (PR 93385)

2020-04-22 Thread Martin Jambor
-bootstrapped and tested on x86_64-linux. I assume this should wait until GCC 11 stage 1 but note that if we want to backport a fix for PR 93385 later, this will probably be a prerequisite. So, OK for trunk in stage 1? Thanks, Martin 2020-04-21 Martin Jambor PR ipa/93385 * tree

Re: [PATCH] gcc-[89]: Fix sra_modify_expr handling of partial writes (PR 94482)

2020-04-21 Thread Martin Jambor
On Wed, Apr 08 2020, Martin Jambor wrote: > [...] > > 2020-04-08 Martin Jambor > Richard Biener > > PR tree-optimization/94482 > * tree-sra.c (create_access_replacement): Dump new replacement with > TDF_UID. > (sra_modify_expr):

Re: [PATCH] Fix spacing in symtab_node::dump_references.

2020-04-20 Thread Martin Jambor
Hi, On Mon, Apr 20 2020, Martin Liška wrote: > Hi. > > The patch is about a space printed in between multiple > entries in Referring and References in symtab_node dump. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? Given that "called by"

Re: [PATCH] ipa: Make call redirection detect already adjusted calls (PR 93621)

2020-04-16 Thread Martin Jambor
Hi, On Thu, Apr 16 2020, Jan Hubicka wrote: >> >> 2020-04-09 Martin Jambor >> >> PR ipa/93621 >> * ipa-inline.h (ipa_saved_clone_sources): Declare. >> * ipa-inline-transform.c (ipa_saved_clone_sources): New variable. >> (sav

Re: [PATCH] sra: Fix access verification (PR 94598)

2020-04-16 Thread Martin Jambor
Hi, On Wed, Apr 15 2020, Richard Biener wrote: > On Wed, 15 Apr 2020, Martin Jambor wrote: > >> Hi, >> >> get_ref_base_and_extent recognizes ARRAY_REFs with variable index but >> into arrays of length one as constant offset accesses. However, >> max_si

[PATCH] sra: Fix access verification (PR 94598)

2020-04-15 Thread Martin Jambor
the access structure describes a genuine variable array access. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2020-04-15 Martin Jambor PR tree-optimization/94598 * tree-sra.c (verify_sra_access_forest): Fix verification of total scalarization

[PATCH] wwwdocs: Deprecate offloading to HSAIL

2020-04-14 Thread Martin Jambor
Hi, for reasons described in my earlier email, I'd like to commit the following to gcc-10/changes.html to mark offloading to HSAIL as deprecated. OK? Thanks, Martin --- htdocs/gcc-10/changes.html | 5 + 1 file changed, 5 insertions(+) diff --git a/htdocs/gcc-10/changes.html

[PATCH] wwwdocs: Slightly improve IPA-SRA description in gcc-10/changes.html

2020-04-14 Thread Martin Jambor
Hi, I think that the fact that IPA-SRA can now remove unused return values deserves a special mention - and I also fixed the proposition in the name of the pass. OK for wwwdocs? Thanks, Martin --- htdocs/gcc-10/changes.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH] Add myself as callgraph (IPA) reviewer

2020-04-14 Thread Martin Jambor
Hi, On Mon, Apr 13 2020, David Edelsohn wrote: > I am pleased to announce that the GCC Steering Committee has > appointed Martin Jambor as GCC IPA Reviewer. > > Please join me in congratulating Martin on his new role. > Martin, please update your listing in the M

[PATCH] ipa: Make call redirection detect already adjusted calls (PR 93621)

2020-04-09 Thread Martin Jambor
-utils so that we don't have to include ipa-inline in two new files? Should the deallocation be someplace else? Any other comments, preferences, constructive criticism? :-) Thanks, Martin 2020-04-09 Martin Jambor PR ipa/93621 * ipa-inline.h (ipa_saved_clone_sources): Declare

[PATCH] ipa-sra: Fix treatment of internal functions (PR 94434)

2020-04-09 Thread Martin Jambor
as well as a small testcase that would follow all relevant conventions in gcc.target/aarch64/sve. OK for trunk? 2020-04-09 Martin Jambor PR ipa/94434 * ipa-sra.c: Include internal-fn.h. (enum isra_scan_context): Update comment. (scan_function): Treat calls to in

Re: [Patch] HSA: omp-grid.c – access proper clause code (was: Re: [Patch] omp-grid.c – add cast to silence different enumeration types warning)

2020-04-09 Thread Martin Jambor
Hi, On Mon, Apr 06 2020, Jakub Jelinek wrote: > On Fri, Apr 03, 2020 at 12:43:42PM +0200, Tobias Burnus wrote: >> HSA: omp-grid.c – access proper clause code >> >> * omp-grid.c (grid_eliminate_combined_simd_part): Use >> OMP_CLAUSE_CODE to access the omp clause code. >> >> diff --git

Re: [PATCH] sra: Fix sra_modify_expr handling of partial writes (PR 94482)

2020-04-08 Thread Martin Jambor
Hi, On Wed, Apr 08 2020, Richard Biener wrote: > On Tue, 7 Apr 2020, Richard Biener wrote: > >> On April 7, 2020 6:25:26 PM GMT+02:00, Martin Jambor wrote: >> >Hi, >> > >> >On Tue, Apr 07 2020, Richard Biener wrote: >> >> On Tu

Re: Disable aggregate walking in ipa code for optimize_debug

2020-04-08 Thread Martin Jambor
Hi, On Sat, Apr 04 2020, Jan Hubicka wrote: > Martin, > with optimize_debug or when FRE is disabled propagating aggregates is > useless since we are not going to use them. I think we should also > avoid working hard on the jump functions. > This patch disables it in ipa_load_from_param_agg, but

Re: [PATCH] sra: Fix sra_modify_expr handling of partial writes (PR 94482)

2020-04-07 Thread Martin Jambor
Hi Jeff, On Tue, Apr 07 2020, Jeff Law wrote: > On Tue, 2020-04-07 at 18:25 +0200, Martin Jambor wrote: >> Hi, >> >> On Tue, Apr 07 2020, Richard Biener wrote: >> > On Tue, 7 Apr 2020, Martin Jambor wrote: >> > >> > > Hi, >> >

Re: [PATCH] sra: Fix sra_modify_expr handling of partial writes (PR 94482)

2020-04-07 Thread Martin Jambor
Hi, On Tue, Apr 07 2020, Richard Biener wrote: > On Tue, 7 Apr 2020, Martin Jambor wrote: > >> Hi, >> >> when sra_modify_expr is invoked on an expression that modifies only >> part of the underlying replacement, such as a BIT_FIELD_REF on a LHS >> of an assig

Re: [AArch64][SVE][IPA] ICE caused by incompatibility of SRA and svst builtin-function

2020-04-06 Thread Martin Jambor
Hi, On Thu, Apr 02 2020, Richard Biener wrote: > On Thu, Apr 2, 2020 at 5:36 AM bule wrote: >> >> Hello, >> >> An Internal Compiler Error(ICE) is found in ipa-sra optimization pass when >> it handle the argument of internal call svst3 for SVE. >> >> The problem comes from >>

[PATCH] sra: Fix sra_modify_expr handling of partial writes (PR 94482)

2020-04-06 Thread Martin Jambor
is the only level where the the test fails for me). Bootstrapped and tested on x86_64-linux, bootstrap and testing on i686-linux and aarch64-linux underway. OK for trunk (and subsequently for release branches) if it passes? Thanks, Martin 2020-04-06 Martin Jambor PR tree

[PATCH] gcc-9 sra: Cap number of sub-access propagations with a param (PR 93435)

2020-04-02 Thread Martin Jambor
as-is to gcc-8 as well and I will backport it there as the next step after testing (without seeking another approval). Thanks, Martin 2020-04-01 Martin Jambor PR tree-optimization/93435 * params.def (PARAM_SRA_MAX_PROPAGATIONS): New parameter. * tree-sra.c

[PATCH] sra/doc: Document param sra-max-propagations

2020-04-02 Thread Martin Jambor
Hi, I forgot to document the new param in invoke.texi, does the text below look OK? Tested with make info and make pdf. Thanks, Martin 2020-04-02 Martin Jambor * doc/invoke.texi (Optimize Options): Document sra-max-propagations. --- gcc/ChangeLog | 4 gcc/doc

Re: [PATCH] Prevent IPA-SRA from creating calls to local comdats (PR 92676)

2020-04-02 Thread Martin Jambor
this bug and now cannot really say if we can have a thunk there in the call chain.) So like this? Passed bootstrap and testing on x86_64-linux, running LTO bootstrap now. Thanks, Martin 2020-04-01 Martin Jambor PR ipa/92676 * ipa-sra.c (struct caller_is

[PATCH] sra: Cap number of sub-access propagations with a param (PR 93435)

2020-03-20 Thread Martin Jambor
? I'll prepare backport patches as a follow-up. Thanks, Martin 2020-03-19 Martin Jambor PR tree-optimization/93435 * params.opt (sra-max-propagations): New parameter. * tree-sra.c (propagation_budget): New variable. (budget_for_propagation_access): New function

Re: [PATCH] Prevent IPA-SRA from creating calls to local comdats (PR 92676)

2020-03-11 Thread Martin Jambor
Hello, ping. Thanks, Martin On Mon, Dec 16 2019, Martin Jambor wrote: > Hi, > > since r278669 (fix for PR ipa/91956), IPA-SRA makes sure that the clone > it creates is put into the same same_comdat as the original cgraph_node, > so that it can call private comdats (such as the

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-24 Thread Martin Jambor
t week). The result is below, it has passed bootstrap and testing and LTO+PGO bootstrap on x86_64-linux. Honza, is it OK for trunk? Thanks, Martin ipa-cp: Avoid an ICE processing self-recursive cloned edges (PR 93707) 2020-02-24 Martin Jambor Feng Xue PR ipa/93707 * ip

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-21 Thread Martin Jambor
eation - and that doing so avoids this problem. So that is what the patch below does. I have still kept the cgraph_edge_brings_value_p hunks too, so that edges are collected reliably. Bootstrapped and tested on an x86_64-linux, LTO bootstrap underway. What do you think

Re: [PATCH] Do not propagate self-dependent value (PR ipa/93763)

2020-02-21 Thread Martin Jambor
Hi, On Tue, Feb 18 2020, Feng Xue OS wrote: > Currently, for self-recursive call, we never use value originated from > non-passthrough > jump function as source to avoid propagation explosion, but self-dependent > value is > missed. This patch is made to fix the bug. > > Bootstrapped/regtested

[PATCH] sra: Only verify sizes of scalar accesses (PR 93845)

2020-02-21 Thread Martin Jambor
for aggregates, this patch simply disables it for non-register types. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2020-02-20 Martin Jambor PR tree-optimization/93845 * tree-sra.c (verify_sra_access_forest): Only test access size of scalar types

Re: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-19 Thread Martin Jambor
passed bootstrap and testing on x86_64-linux, LTO bootstrap is underway. Honza, is it OK for trunk? Tamar, can you please double check it fixes your problem with perlbench? Thanks, Martin ipa-cp: Avoid wrongly gathering self-recursive edges (PR 93707) 2020-02-18 Martin Jambor

[PATCH] sra: Do not create zero sized accesses (PR93776)

2020-02-18 Thread Martin Jambor
and tested on an x86_64-linux. OK for trunk? Thanks, Martin 2020-02-18 Martin Jambor PR tree-optimization/93776 * tree-sra.c (create_access): Do not create zero size accesses. (get_access_for_expr): Do not search for zero sized accesses. testsuite/ * gcc.dg

[PATCH] sra: Avoid totally scalarizing overallping field_decls (PR93667)

2020-02-18 Thread Martin Jambor
a TODO item to enable total scalarization of cases like this where the problematic fields are basically empty - despite having a non-zero size - i.e. when they are just RECORD_TYPEs without any data fields. Bootstrapped and tested on x86_64, OK for trunk? Thanks, Martin 2020-02-14 Martin Jambor

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Jambor
Hi, On Mon, Feb 17 2020, Richard Biener wrote: > On Mon, Feb 17, 2020 at 1:16 PM Martin Liška wrote: >> >> Hello. >> >> As mentioned in the PR, we end up with a void function >> call that has set MALLOC attribute. That causes problems in RTL >> expansion. >> >> I believe a proper fix is to drop

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Jambor
Hi, On Mon, Feb 17 2020, Martin Liška wrote: > Hello. > > As mentioned in the PR, we end up with a void function > call that has set MALLOC attribute. That causes problems in RTL > expansion. > > I believe a proper fix is to drop the attribute when a callgraph > clone with void type is created. >

[PATCH] sra: Avoid verification failure (PR 93516)

2020-02-14 Thread Martin Jambor
the artificial reference causing the verifier is guaranteed not to be created. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2020-02-10 Martin Jambor PR tree-optimization/93516 * tree-sra.c (propagate_subaccesses_from_rhs): Do not create access

Re: [PATCH V2] Generalized value pass-through for self-recursive function (ipa/pr93203)

2020-02-05 Thread Martin Jambor
Hi, On Sat, Jan 25 2020, Feng Xue OS wrote: > Made some changes. > > Feng > > > From: Feng Xue OS > Sent: Saturday, January 25, 2020 5:54 PM > To: mjam...@suse.cz; Jan Hubicka; gcc-patches@gcc.gnu.org > Subject: [PATCH] Generalized value pass-through for

Re: [PATCH] Prevent IPA-SRA from creating calls to local comdats (PR 92676)

2020-02-03 Thread Martin Jambor
Hello Honza, ping. Thanks, Martin On Mon, Dec 16 2019, Martin Jambor wrote: > Hi, > > since r278669 (fix for PR ipa/91956), IPA-SRA makes sure that the clone > it creates is put into the same same_comdat as the original cgraph_node, > so that it can call private comdats (such a

[PATCH 4/4] SRA: Do not ignore padding when totally scalarizing [PR92486]

2020-01-27 Thread Martin Jambor
d by extra artificial accesses. As you can see, it adds a little complexity to various places of the pass which are already not trivial, but hopefully it is manageable. Bootstrapped and tested on x86_64-linux, I'll curious about the feedback. Thanks, Martin 2020-01-27 Martin Jambor

[PATCH 2/4] SRA: Total scalarization after access propagation [PR92706]

2020-01-27 Thread Martin Jambor
-up also depends on this patch. Thanks, Martin 2019-12-20 Martin Jambor PR tree-optimization/92706 * tree-sra.c (struct access): Adjust comment of grp_total_scalarization. (find_access_in_subtree): Look for single children spanning an entire access

[PATCH 3/4] SRA: Also propagate accesses from LHS to RHS [PR92706]

2020-01-27 Thread Martin Jambor
.html and https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00698.html. Bootstrapped and tested on x86_64-linux. Thanks, Martin 2019-12-11 Martin Jambor PR tree-optimization/92706 * tree-sra.c (struct access): Fields first_link, last_link, next_queued and grp_queued renamed

[PATCH 1/4] SRA: Add verification of accesses

2020-01-27 Thread Martin Jambor
for total scalarization but since the following patch removes the offending function, this patch does not fix it. Bootstrapped and tested on x86_64, I consider this a pre-requisite for the followup patches (and the parent link fix really is). Thanks, Martin 2019-12-10 Martin Jambor

Re: [PATCH] doc: Replace references to SVN with those to Git

2020-01-16 Thread Martin Jambor
Hi, On Thu, Jan 16 2020, Gerald Pfeifer wrote: > On Wed, 15 Jan 2020, Martin Jambor wrote: >> when going over stuff linked from the SummerOfCode wiki page, >> I found out that doc/install.texi still refers to Subversion. > > We've got a fair number of references left in vari

[PATCH] doc: Replace references to SVN with those to Git

2020-01-15 Thread Martin Jambor
? Thanks, Martin 2020-01-15 Martin Jambor * doc/install.texi (Prerequisites): Replace references to SVN with references to Git. (Downloading the source): Likewise. (Configuration): Likewise. (Building): Likewise. --- gcc/ChangeLog| 8

IPA: Avoid segfault in devirtualization_time_bonus (PR 93223)

2020-01-13 Thread Martin Jambor
and I will commit it momentarily. Thanks, Martin 2020-01-13 Martin Jambor PR ipa/93223 * ipa-cp.c (devirtualization_time_bonus): Check whether isummary is NULL. testsuite/ * g++.dg/ipa/pr93223.C: New test. --- gcc/ipa-cp.c | 2

Re: [PATCH 4/4] Make total scalarization also copy padding (PR 92486)

2020-01-13 Thread Martin Jambor
One more thing... On Mon, Jan 13 2020, Martin Jambor wrote: > Hi, > > On Tue, Jan 07 2020, Richard Biener wrote: >> On Tue, 17 Dec 2019, Martin Jambor wrote: >> >>> Hi, >>> >>> PR 92486 shows that DSE, when seeing a "normal" gimple

Re: [PATCH 4/4] Make total scalarization also copy padding (PR 92486)

2020-01-13 Thread Martin Jambor
Hi, On Tue, Jan 07 2020, Richard Biener wrote: > On Tue, 17 Dec 2019, Martin Jambor wrote: > >> Hi, >> >> PR 92486 shows that DSE, when seeing a "normal" gimple aggregate >> assignment coming from a C struct assignment and one a representing a >&g

Re: [PATCH 3/4] Also propagate SRA accesses from LHS to RHS (PR 92706)

2020-01-13 Thread Martin Jambor
Hi, sorry for taking so long to reply... On Wed, Dec 18 2019, Richard Biener wrote: > On December 17, 2019 1:43:15 PM GMT+01:00, Martin Jambor > wrote: >>Hi, >> >>the previous patch unfortunately does not fix the first testcase in PR >>92706 and since I am afraid

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-13 Thread Martin Jambor
Hi, On Mon, Jan 13 2020, Martin Liška wrote: > On 1/11/20 1:20 PM, Tamar Christina wrote: >> It seems the parameters no longer do anything. i.e. -flto --param >> ipa-cp-eval-threshold=1 --param ipa-cp-unit-growth=80 doesn't have any >> effect anymore. > > Hi. > > You are right, the param

Re: [PATCH] Fix a bug that propagation in recursive function uses wrong aggregate lattice (PR ipa/93084)

2020-01-10 Thread Martin Jambor
Hi, On Thu, Jan 09 2020, Christophe Lyon wrote: > On Tue, 7 Jan 2020 at 14:18, Martin Jambor wrote: >> >> Hi, >> >> On Fri, Jan 03 2020, Feng Xue OS wrote: >> > When checking a self-recursively generated value for aggregate jump >> > function, wrong

Re: [PATCH] [RFC] ipa: duplicate ipa_size_summary for cloned nodes

2020-01-09 Thread Martin Jambor
Hello again, On Fri, Jan 03 2020, Martin Jambor wrote: > Hi, > > On Thu, Dec 19 2019, Jan Hubicka wrote: >>> On 2019/12/18 23:48, Jan Hubicka wrote: >>> >> The size_info of ipa_size_summary are created by r277424. It should be >>> >>

Re: [PATCH] Prevent IPA-SRA from creating calls to local comdats (PR 92676)

2020-01-09 Thread Martin Jambor
Ping. Thanks, Martin On Mon, Dec 16 2019, Martin Jambor wrote: > Hi, > > since r278669 (fix for PR ipa/91956), IPA-SRA makes sure that the clone > it creates is put into the same same_comdat as the original cgraph_node, > so that it can call private comdats (such as the

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
right >> > parameter values. >> > >> > @Martin, Honza: >> > There are last few remaining parameters which should use >> > opt_for_fn: >> > >> > param_ipa_sra_max_replacements >> >> IPA-CP: Always access param_ipa_sra_max_replacements thro

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
Hi, On Wed, Jan 08 2020, Martin Jambor wrote: > Hi, > > On Fri, Jan 03 2020, Martin Liška wrote: >> Hi. >> >> This is similar transformation for IPA passes. This time, >> one needs to use opt_for_fn in order to get the right >> parameter values. >

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
Hi, On Wed, Jan 08 2020, Jan Hubicka wrote: >> Hi, >> >> On Fri, Jan 03 2020, Martin Liška wrote: >> > Hi. >> > >> > This is similar transformation for IPA passes. This time, >> > one needs to use opt_for_fn in order to get the right >> > parameter values. >> > >> > @Martin, Honza: >> > There

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
Hi, On Fri, Jan 03 2020, Martin Liška wrote: > Hi. > > This is similar transformation for IPA passes. This time, > one needs to use opt_for_fn in order to get the right > parameter values. > > @Martin, Honza: > There are last few remaining parameters which should use > opt_for_fn: > >

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
should use > opt_for_fn: > > param_ipa_sra_max_replacements IPA-CP: Always access param_ipa_sra_max_replacements through opt_for_fn 2020-01-07 Martin Jambor * params.opt (param_ipa_sra_max_replacements): Mark as Optimization. * ipa-sra.c (scanned_node): New variable.

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
should use > opt_for_fn: > > param_ipa_cp_unit_growth So as we discussed, picking this one from one particular node is not what one would expect to happen, but inlining does it too and so anyway: IPA-CP: Always access param_ipcp_unit_growth through opt_for_fn 2020-01-07 Martin Jambor * p

Re: [PATCH] Add Optimization for various IPA parameters.

2020-01-08 Thread Martin Jambor
should use > opt_for_fn: > > param_ipa_max_agg_items IPA-CP: Always access param_ipa_max_agg_items through opt_for_fn 2020-01-07 Martin Jambor * params.opt (param_ipa_max_agg_items): Mark as Optimization * ipa-cp.c (merge_agg_lats_step): New parameter max_agg_items, use i

Re: [PATCH] Fix a bug that propagation in recursive function uses wrong aggregate lattice (PR ipa/93084)

2020-01-07 Thread Martin Jambor
Hi, On Fri, Jan 03 2020, Feng Xue OS wrote: > When checking a self-recursively generated value for aggregate jump > function, wrong aggregate lattice was used, which will cause infinite > constant propagation. This patch is composed to fix this issue. > > 2020-01-03 Feng Xue > > PR

Re: [PATCH] Use dump_asm_name for Callers/Calls in dump.

2020-01-07 Thread Martin Jambor
Hi, On Tue, Jan 07 2020, Martin Liška wrote: > Hi. > > I would like to make cgraph_node names consistent in cgraph_node::dump. > I try to use just the symtab_order numbers whenever I can to avoid confusion but - at least if we care about the non-asm name at all - shouldn't the dump have both the

Re: [PATCH] Make cgraph_edge::resolve_speculation static

2020-01-07 Thread Martin Jambor
also passed bootstrap, LTO bootstrap and testing on an x86_64-linux. (On a related note, varpool_node::remove should be static too, but that is something for another patch.) Thanks, Martin 2020-01-06 Martin Jambor * cgraph.h (cgraph_edge): Make remove, set_call_stmt, make_dire

[PATCH] Make cgraph_edge::resolve_speculation static

2020-01-04 Thread Martin Jambor
that is a logical follow-up. The patch has passed bootstrap and LTO bootstrap and testing on an x86_64-linux. What do you think? Thanks, Martin 2020-01-04 Martin Jambor * cgraph.h (cgraph_edge): Make set_call_stmt, make_direct, resolve_speculation and redirect_call_stmt_to_callee static

Re: [PATCH] [RFC] ipa: duplicate ipa_size_summary for cloned nodes

2020-01-03 Thread Martin Jambor
Hi, On Thu, Dec 19 2019, Jan Hubicka wrote: >> On 2019/12/18 23:48, Jan Hubicka wrote: >> >> The size_info of ipa_size_summary are created by r277424. It should be >> >> duplicated for cloned nodes, otherwise self_size and >> >> estimated_self_stack_size >> >> would be 0, causing param

[PATCH] Avoid segfault when dumping IPA-CP lattices for unoptimized functions (PR 92917)

2020-01-03 Thread Martin Jambor
going to commit now. Thanks, Martin 2020-01-02 Martin Jambor PR ipa/92917 * ipa-cp.c (print_all_lattices): Skip functions without info. --- gcc/ipa-cp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 43c0d5a6706

[PATCH] Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)

2019-12-20 Thread Martin Jambor
() the patch fixes it by what IPA-CP-BITS does, which is simply checking that info of a node is not NULL. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2019-12-20 Martin Jambor PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists

Re: [PATCH] Handle aggregate pass-through for self-recursive call (PR ipa/92794)

2019-12-18 Thread Martin Jambor
Hi, On Tue, Dec 17 2019, Feng Xue OS wrote: > If argument for a self-recursive call is a simple pass-through, the call > edge is also considered as source of any value originated from > non-recursive call to the function. Scalar pass-through and full aggregate > pass-through due to pointer

Re: [PATCH] IPA-CP: Remove bogus static keyword (PR 92971)

2019-12-18 Thread Martin Jambor
Hi, On Tue, Dec 17 2019, Jakub Jelinek wrote: > On Tue, Dec 17, 2019 at 01:50:32PM +0100, Martin Jambor wrote: >> Hi, >> >> as reported in PR 92971, IPA-CP's >> cgraph_edge_brings_all_agg_vals_for_node defines one local variable with >> the static keyword wh

[PATCH] IPA-CP: Remove bogus static keyword (PR 92971)

2019-12-17 Thread Martin Jambor
. Early next year, I'll also commit it to all opened release branches. Thanks, Martin 2019-12-17 Martin Jambor * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Remove static from local variable definition. --- gcc/ipa-cp.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4/4] Make total scalarization also copy padding (PR 92486)

2019-12-17 Thread Martin Jambor
or copying will need change, but even then I'd rather not commit it. Thanks, Martin 2019-12-13 Martin Jambor PR tree-optimization/92486 * tree-sra.c: Include langhooks.h. (total_scalarization_fill_padding): New function. (total_skip_all_accesses_until_pos):

[PATCH 3/4] Also propagate SRA accesses from LHS to RHS (PR 92706)

2019-12-17 Thread Martin Jambor
it on aarch64 and i686 (except that on i686 the testcase will need to be skipped because __int128_t is not available there). I expect that review will lead to requests to change things but as far as I am concerned, this is ready for trunk too. Thanks, Martin 2019-12-11 Martin Jambor

[PATCH 2/4] SRA: Total scalarization after access propagation (PR 92706)

2019-12-17 Thread Martin Jambor
and tested it on aarch64 and i686. I expect that review will lead to requests to change things but as far as I am concerned, this is ready for trunk. Thanks, Martin 2019-12-12 Martin Jambor PR tree-optimization/92706 * tree-sra.c (struct access): Adjust comment

[PATCH 1/4] Add verification of SRA accesses

2019-12-17 Thread Martin Jambor
(and the parent link fix really is). Thanks, Martin 2019-12-10 Martin Jambor * tree-sra.c (verify_sra_access_forest): New function. (verify_all_sra_access_forests): Likewise. (create_artificial_child_access): Set parent. (analyze_all_variable_accesses): Call

Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support

2019-12-17 Thread Martin Jambor
Hi, On Tue, Dec 17 2019, Thomas Schwinge wrote: > On 2019-11-14T16:35:31+0100, Frederik Harwath > wrote: >> this patch implements OpenACC 2.6 "acc_get_property" and related functions. > > [...] > >> --- a/libgomp/plugin/plugin-hsa.c >> +++ b/libgomp/plugin/plugin-hsa.c >> @@ -699,6 +699,32 @@

[PATCH] Prevent IPA-SRA from creating calls to local comdats (PR 92676)

2019-12-16 Thread Martin Jambor
and at the same time does not disable the transformation unnecessarily. The patch also fixes up the calls_comdat_local of callers of the modified node, despite that not triggering any known issues. It has passed LTO-bootstrap and testing. What do you think? Thanks, Martin 2019-12-16 Martin Jambor

Re: Move -Wmaybe-uninitialized to -Wextra

2019-12-16 Thread Martin Jambor
Hi Jeff, On Sat, Dec 07 2019, Jeff Law wrote: > [...] > The whole point behind the uninitialized warning is to capture cases > where objects may not be properly initialized. For modern code the > simple cases typically "just work". What is by far the most > interesting cases are those with

Re: Move -Wmaybe-uninitialized to -Wextra

2019-12-16 Thread Martin Jambor
Hi, On Tue, Nov 26 2019, Michael Witten wrote: > [...] > From what I've read, `-Wmaybe-uninitialized' is essentially > customized for `-O2', I don't think that is true. It can be perfectly useful -O1 and there are many nasty false positives at -O2 too. > [...] > * If

Re: [RFC] ipa-cp: Fix PGO regression caused by r278808

2019-12-10 Thread Martin Jambor
Hi, On Tue, Dec 10 2019, Jan Hubicka wrote: > Hi, > I think the updating should treat self recursive edges as loops: that is > calculate SUM of counts incomming edges which are not self recursive, > calculate probability of self recursing and then set count as > SUM *

Re: Fix jump function update in inliner

2019-12-02 Thread Martin Jambor
Hi, On Sun, Dec 01 2019, Jan Hubicka wrote: > Hi, > this patch fixes the problem with clearing bits and m_vr in inliner > update we discussed earlier. I am not sure if > dete_type_change_from_memory_writes needs the clear? No, they don't. Since your rewrite of devirtualization, the jfunc

Re: [PATCH] ipa-cp: Avoid ICEs when looking at expanded thunks and unoptimized functions (PR 92476)

2019-11-29 Thread Martin Jambor
{ -fgnu89-inline } } */ > 20111207-1_1.c:/* { dg-options "-fno-lto" } */ > Ah, servers me right for only grepping for dg-lto-options. I have committed the fix and will commit the following testcase addition as a follow-up. Thanks, Martin 2019-11-29 Martin Jambor PR

[PATCH] ipa-cp: Avoid ICEs when looking at expanded thunks and unoptimized functions (PR 92476)

2019-11-29 Thread Martin Jambor
gone. OK for trunk? Thanks, Martin 2019-11-28 Martin Jambor Jan Hubicka PR ipa/92476 * ipa-cp.c (set_single_call_flag): Set node_calling_single_call in the summary only if the summary exists. (find_more_scalar_values_for_callers_subset): Check

[PATCH] cgraph: ifunc resolvers cannot be made local (PR 92697)

2019-11-28 Thread Martin Jambor
ch also adds dumping of the symtab_node flag. Bootstrapped and tested on x86_64-linux, OK for trunk? Thanks, Martin 2019-11-27 Martin Jambor PR ipa/92697 * cgraph.c (cgraph_node_cannot_be_local_p_1): Return true for ifunc_resolvers. * symtab.c (symtab_node::dump_base):

[PATCH] ipa: Prevent materialization of clones with removed bodies (PR 92109)

2019-11-22 Thread Martin Jambor
with a small testcase, the bug is triggered by fragile partitioning decisions. I have bootstrapped, LTO-bootstrapped and tested the patch on an x86_64-linux, OK for trunk? Thanks, Martin 2019-11-21 Martin Jambor PR ipa/92109 * cgraph.h (cgraph_node::remove_from_clone_tree

[PATCH] Make IPA-SRA follow comdat-local rules (PR 91956)

2019-11-22 Thread Martin Jambor
outside of the comdat group to a private comdat symbol, which it does not like. Fixed by doing what IPA-split does in the patch below. Bootstrapped and tested on x86_64-linux. OK for trunk? Thanks, Martin 2019-11-21 Martin Jambor PR ipa/91956 * ipa-sra.c

Re: [PATCH] Support multi-versioning on self-recursive function (ipa/92133)

2019-11-22 Thread Martin Jambor
Hi, On Fri, Nov 15 2019, Feng Xue OS wrote: > Honza, > > I made some changes: do not penalize self-recursive function, and > add --param ipa-cp-min-recursive-probability, similar to recursive > inline. Please review this new one. The patch and its effect on exchange is intriguing, I only have a

[committed] Add testcase for already fixed PR ipa/92528

2019-11-18 Thread Martin Jambor
Hi, I have committed the patch below to add the testcase for the already fixed PR ipa/92528 to the testsuite. Thanks, Martin 2019-11-18 Martin Jambor PR ipa/92528 * g++.dg/ipa/pr92528.C: New test. Index: gcc/testsuite/g++.dg/ipa/pr92528.C

[PATCH] Only warn for maybe-uninitialized SRAed bits in -Wextra (PR 80635)

2019-11-15 Thread Martin Jambor
Hi, On Fri, Nov 08 2019, Martin Jambor wrote: > Hi, > > this patch is an attempt to implement my idea from a previous thread > about moving -Wmaybe-uninitialized to -Wextra: > > https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00220.html > > Specifically, it attempts to spl

Re: Avoid trashing of polymorphic call cache during inlining

2019-11-15 Thread Martin Jambor
ve_useless_jump_functions (); >> > + >> >> This is probably an unintended change? Can I remove it? > > Indeed, it is unrelated change. > Thanks for noticing it! > Honza OK, I have committed the following (after adding to a round of bootstrap and testing). Thanks,

Re: [PATCH 1/2] Update iterator of next

2019-11-15 Thread Martin Jambor
Hi, On Fri, Nov 15 2019, luoxhu wrote: > > Sorry to break the bootstrap. This was my lack of consideration when > splitting this small piece of code from the previous patch, the line > should be in the first line of the second loop. Could you please add > some comments that edge may be freed

Re: Avoid trashing of polymorphic call cache during inlining

2019-11-14 Thread Martin Jambor
Hi, On Mon, Nov 04 2019, Jan Hubicka wrote: > Hi, > I am not really pround of this implementation (and will think of better > interface), but this patch saves about 10% of WPA time by avoiding > unnecesary invalidations of the polymorphic call target hash during > inlining. > > ipa-devirt

Re: Optimize handling of inline summaries

2019-11-14 Thread Martin Jambor
Hi, On Mon, Nov 04 2019, Jan Hubicka wrote: >> On 11/4/19 3:12 PM, Jan Hubicka wrote: >> > Martin, do you know why this flag was introduced? >> >> Hi. >> >> The flag is used in IPA CP: >> >> call_summary >> >> class edge_clone_summary >> { >> ... >> cgraph_edge *prev_clone; >>

Re: Fix ICE when inlining into function containing polymorphic call

2019-11-14 Thread Martin Jambor
On Thu, Nov 14 2019, Jan Hubicka wrote: >> On Wed, Nov 13 2019, Jan Hubicka wrote: >> > Hi, >> > the testcase causes inline context cache to go out of sync because I >> > forgot to update used flags of parameters in one path of >> > update_indirect_edges_after_inlining. >> > >> > While debugging

Re: Fix ICE when inlining into function containing polymorphic call

2019-11-14 Thread Martin Jambor
Hi, On Wed, Nov 13 2019, Jan Hubicka wrote: > Hi, > the testcase causes inline context cache to go out of sync because I > forgot to update used flags of parameters in one path of > update_indirect_edges_after_inlining. > > While debugging it I also added better consistency check to >

Re: Ping: [PATCH V6] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-11-13 Thread Martin Jambor
9 8:34 PM > To: Feng Xue OS > Cc: Martin Jambor; gcc-patches@gcc.gnu.org > Subject: Re: Ping: [PATCH V6] Extend IPA-CP to support > arithmetically-computed value-passing on by-ref argument (PR ipa/91682) > >> >> OK, thanks - this looks like very nice ipa-prop improvem

[committed] Add a few missing checks that IPA_NODE_REF is not NULL (PR 92454)

2019-11-13 Thread Martin Jambor
-linux and and committed because three fourths of the patch are from Honza's Bugzilla comment anyway. Thanks, Martin 2019-11-13 Jan Hubicka Martin Jambor PR ipa/92454 * ipa-cp.c (spread_undeadness): Check that IPA_NODE_REF exists. (identify_dead_nodes

Re: Free ipa-prop edge summaries for inline calls

2019-11-12 Thread Martin Jambor
On Sun, Oct 27 2019, Jan Hubicka wrote: > Hi, > this patch makes ipa-prop to free edge summaries (jump functions) for > calls which has been inlined because they are no longer useful. > The main change is to change IPA_EDGE_REF from get_create to get > and thus we need to watch for missing

Re: Teach ipa-cp to propagate value ranges over binary operaitons too

2019-11-12 Thread Martin Jambor
Hi, On Tue, Nov 12 2019, Richard Biener wrote: > On Tue, 12 Nov 2019, Jan Hubicka wrote: > >> Hi, >> this patch adds propagation of value ranges through binary operations. >> This is disabled for value ranges within SCC to avoid infinite loop during >> propagation. I am bit worried about types

<    1   2   3   4   5   6   7   8   9   10   >