if (clone.param_adjustments)
clone.param_adjustments->dump (symtab->dump_file);
}
+ clear_stmts_in_references ();
/* Copy the OLD_VERSION_NODE function tree to the new version. */
tree_function_versioning (clone_of->decl, decl,
clone.tree_map, clone.param_adjustments,
FOR_EACH_FUNCTION (node)
{
tree decl = node->decl;
- node->clear_stmts_in_references ();
gcc_assert (!node->process || node->same_comdat_group);
if (node->process)
if (n->decl != node->decl)
n->materialize_clone ();
}
+ node->clear_stmts_in_references ();
/* We might need the body of this function so that we can expand
it inline somewhere else. */
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. */
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. */
--- /dev/null
+void
+pc (void);
+
+void __attribute__ ((simd))
+ty (void);
+
+void __attribute__ ((simd))
+gf ()
+{
+ ty ();
+}
+
+void __attribute__ ((simd))
+ty (void)
+{
+ gf (pc);
+ gf (gf);
+}
from = constraints.length ();
}
- /* FIXME: Clone materialization is not preserving stmt references. */
- FOR_EACH_DEFINED_FUNCTION (node)
- node->clear_stmts_in_references ();
-
/* Build the constraints. */
FOR_EACH_DEFINED_FUNCTION (node)
{