diff options
author | Jan Hubicka <jh@suse.cz> | 2020-11-04 00:19:59 +0100 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2020-11-04 00:19:59 +0100 |
commit | ab4664eb73f9401a5ca65d21cdf87d69fe0026dc (patch) | |
tree | 60524595ea5de0b47cc7ad19ad96119358147ba2 /gcc/symtab-clones.cc | |
parent | e7144372e06bf446d1bfb529806a803467ba697a (diff) | |
download | gcc-ab4664eb73f9401a5ca65d21cdf87d69fe0026dc.zip gcc-ab4664eb73f9401a5ca65d21cdf87d69fe0026dc.tar.gz gcc-ab4664eb73f9401a5ca65d21cdf87d69fe0026dc.tar.bz2 |
Fix copying of clone_info while reshaping clone tree.
2020-11-04 Jan Hubicka <hubicka@ucw.cz>
PR ipa/97695
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Fix ICE with
in dumping code.
(cgraph_node::remove): Save clone info before releasing it and pass it
to unregister.
* cgraph.h (symtab_node::unregister): Add clone_info parameter.
(cgraph_clone::unregister): Likewise.
* cgraphclones.c (cgraph_node::find_replacement): Copy clone info
* symtab-clones.cc (clone_infos_t::duplicate): Remove.
(clone_info::get_create): Simplify.
* symtab.c (symtab_node::unregister): Pass around clone info.
* varpool.c (varpool_node::remove): Update.
Diffstat (limited to 'gcc/symtab-clones.cc')
-rw-r--r-- | gcc/symtab-clones.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/symtab-clones.cc b/gcc/symtab-clones.cc index 76b86c64..ad154f6 100644 --- a/gcc/symtab-clones.cc +++ b/gcc/symtab-clones.cc @@ -42,22 +42,8 @@ class GTY((user)) clone_infos_t: public function_summary <clone_info *> public: clone_infos_t (symbol_table *table, bool ggc): function_summary<clone_info *> (table, ggc) { } - - /* Hook that is called by summary when a node is duplicated. */ - virtual void duplicate (cgraph_node *node, - cgraph_node *node2, - clone_info *data, - clone_info *data2); }; -/* Duplication hook. */ -void -clone_infos_t::duplicate (cgraph_node *, cgraph_node *, - clone_info *src, clone_info *dst) -{ - *dst = *src; -} - } /* anon namespace */ /* Return thunk_info possibly creating new one. */ @@ -67,8 +53,8 @@ clone_info::get_create (cgraph_node *node) if (!symtab->m_clones) { symtab->m_clones - = new (ggc_alloc_no_dtor <clone_infos_t> ()) - clone_infos_t (symtab, true); + = new (ggc_alloc_no_dtor <function_summary <clone_info *>> ()) + function_summary <clone_info *> (symtab, true); symtab->m_clones->disable_insertion_hook (); symtab->m_clones->disable_duplication_hook (); } |