public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Cc: Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names
Date: Wed, 18 Jan 2023 13:56:45 +0000 (UTC)	[thread overview]
Message-ID: <nycvar.YFH.7.77.849.2301181356250.12651@jbgna.fhfr.qr> (raw)

On Fri, 16 Dec 2022, Richard Biener wrote:

> r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but
> that wasn't in the version of the patch posted.  That has some
> non-trivial cost through mostly_copy_tree_r and copy_tree_r but
> more importantly it doesn't seem to be necessary.  I've successfully
> bootstrapped and tested with an assert we only get
> tree_node_can_be_shared trees here.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu with all
> languages.
> 
> Pushed to trunk.

Reverted due to PR108445, will revisit during stage1.

Richard.

> 	PR middle-end/108086
> 	* tree-inline.cc (remap_ssa_name): Do not unshare the
> 	result from the decl_map.
> ---
>  gcc/tree-inline.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc
> index c802792fa07..b471774ce51 100644
> --- a/gcc/tree-inline.cc
> +++ b/gcc/tree-inline.cc
> @@ -183,7 +183,7 @@ remap_ssa_name (tree name, copy_body_data *id)
>  	  return name;
>  	}
>  
> -      return unshare_expr (*n);
> +      return *n;
>      }
>  
>    if (processing_debug_stmt)
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
HRB 36809 (AG Nuernberg)

             reply	other threads:[~2023-01-18 13:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18 13:56 Richard Biener [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-16 12:05 Richard Biener

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=nycvar.YFH.7.77.849.2301181356250.12651@jbgna.fhfr.qr \
    --to=rguenther@suse.de \
    --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).