* [PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names
@ 2022-12-16 12:05 Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2022-12-16 12:05 UTC (permalink / raw)
To: gcc-patches; +Cc: Jan Hubicka
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.
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)
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names
@ 2023-01-18 13:56 Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-01-18 13:56 UTC (permalink / raw)
To: gcc-patches; +Cc: Jan Hubicka
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-18 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 12:05 [PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names Richard Biener
2023-01-18 13:56 Richard Biener
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).