diff options
author | Jan Hubicka <jh@suse.cz> | 2020-10-26 14:10:45 +0100 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2020-10-26 14:11:35 +0100 |
commit | 783dc02d89712f5219093d33ad7f08e1509a2134 (patch) | |
tree | 1db4b583f7cff5d77efdc88773e79d57f23800a5 /gcc/symtab.c | |
parent | 2d5aad691f5bd605cfc27ce16a1f2d023cd21f75 (diff) | |
download | gcc-783dc02d89712f5219093d33ad7f08e1509a2134.zip gcc-783dc02d89712f5219093d33ad7f08e1509a2134.tar.gz gcc-783dc02d89712f5219093d33ad7f08e1509a2134.tar.bz2 |
Fix simdclones
gcc/ChangeLog:
PR ipa/97576
* cgraphclones.c (cgraph_node::materialize_clone): Clear stmt
references.
* cgraphunit.c (mark_functions_to_output): Do not clear them here.
* ipa-inline-transform.c (inline_transform): Clear stmt references.
* symtab.c (symtab_node::clear_stmts_in_references): Make recursive
for clones.
* tree-ssa-structalias.c (ipa_pta_execute): Do not clear references.
gcc/testsuite/ChangeLog:
PR ipa/97576
* gcc.c-torture/compile/pr97576.c: New test.
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index bc2865f..067ae2e 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -752,7 +752,8 @@ symtab_node::remove_stmt_references (gimple *stmt) i++; } -/* Remove all stmt references in non-speculative references. +/* Remove all stmt references in non-speculative references in THIS + and all clones. Those are not maintained during inlining & cloning. The exception are speculative references that are updated along with callgraph edges associated with them. */ @@ -770,6 +771,13 @@ symtab_node::clear_stmts_in_references (void) r->lto_stmt_uid = 0; r->speculative_id = 0; } + cgraph_node *cnode = dyn_cast <cgraph_node *> (this); + if (cnode) + { + if (cnode->clones) + for (cnode = cnode->clones; cnode; cnode = cnode->next_sibling_clone) + cnode->clear_stmts_in_references (); + } } /* Remove all references in ref list. */ |