public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Feng Xue OS <fxue@os.amperecomputing.com>,
	Jan Hubicka <hubicka@ucw.cz>,
	"gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Do not propagate self-dependent value (PR ipa/93763)
Date: Fri, 21 Feb 2020 17:59:00 -0000	[thread overview]
Message-ID: <ri6o8tru8h3.fsf@suse.cz> (raw)
In-Reply-To: <BYAPR01MB486917B0996670658AF0902FF7110@BYAPR01MB4869.prod.exchangelabs.com>

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 on x86_64-linux and aarch64-linux.
>
> Feng
> ---
> 2020-02-18  Feng Xue  <fxue@os.amperecomputing.com>
>
>         PR ipa/93763
>         * ipa-cp.c (self_recursively_generated_p): Mark self-dependent value as
>         self-recursively generated.

Honza, this is OK.

Thanks,

Martin



> From 1ff803f33de0fe86d526deb23af2d08c15028ff9 Mon Sep 17 00:00:00 2001
> From: Feng Xue <fxue@os.amperecomputing.com>
> Date: Mon, 17 Feb 2020 17:07:04 +0800
> Subject: [PATCH] Do not propagate self-dependent value (PR ipa/93763)
>
> ---
>  gcc/ipa-cp.c                       | 10 ++++---
>  gcc/testsuite/g++.dg/ipa/pr93763.C | 15 ++++++++++
>  gcc/testsuite/gcc.dg/ipa/pr93763.c | 46 ++++++++++++++++++++++++++++++
>  3 files changed, 67 insertions(+), 4 deletions(-)
>  create mode 100644 gcc/testsuite/g++.dg/ipa/pr93763.C
>  create mode 100644 gcc/testsuite/gcc.dg/ipa/pr93763.c
>
> diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
> index 4f5b72e6994..1d0c1ac0f35 100644
> --- a/gcc/ipa-cp.c
> +++ b/gcc/ipa-cp.c
> @@ -1897,8 +1897,8 @@ ipcp_lattice<valtype>::add_value (valtype newval, cgraph_edge *cs,
>  }
>  
>  /* Return true, if a ipcp_value VAL is orginated from parameter value of
> -   self-feeding recursive function by applying non-passthrough arithmetic
> -   transformation.  */
> +   self-feeding recursive function via some kind of pass-through jump
> +   function.  */
>  
>  static bool
>  self_recursively_generated_p (ipcp_value<tree> *val)
> @@ -1909,10 +1909,12 @@ self_recursively_generated_p (ipcp_value<tree> *val)
>      {
>        cgraph_edge *cs = src->cs;
>  
> -      if (!src->val || cs->caller != cs->callee->function_symbol ()
> -	  || src->val == val)
> +      if (!src->val || cs->caller != cs->callee->function_symbol ())
>  	return false;
>  
> +      if (src->val == val)
> +	continue;
> +
>        if (!info)
>  	info = IPA_NODE_REF (cs->caller);
>  

  reply	other threads:[~2020-02-21 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 15:12 Feng Xue OS
2020-02-21 17:59 ` Martin Jambor [this message]
2020-02-21 20:23   ` Jeff Law
2020-02-24 10:10     ` Christophe Lyon
2020-02-24 11:50       ` [PATCH] testsuite: Fix recently added ipa testcases [PR93763] Jakub Jelinek
2020-02-24 12:33         ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ri6o8tru8h3.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=fxue@os.amperecomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).