2020-05-12 Richard Biener <rguenther@suse.de>
Backport from mainline
+ 2020-05-07 Richard Biener <rguenther@suse.de>
+
+ PR ipa/94947
+ * tree-ssa-structalias.c (refered_from_nonlocal_fn): Use
+ DECL_EXTERNAL || TREE_PUBLIC instead of externally_visible.
+ (refered_from_nonlocal_var): Likewise.
+ (ipa_pta_execute): Likewise.
+
2020-05-05 Richard Biener <rguenther@suse.de>
PR ipa/94947
{
bool *nonlocal_p = (bool *)data;
*nonlocal_p |= (node->used_from_other_partition
- || node->externally_visible
+ || DECL_EXTERNAL (node->decl)
+ || TREE_PUBLIC (node->decl)
|| node->force_output
|| lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl)));
return false;
{
bool *nonlocal_p = (bool *)data;
*nonlocal_p |= (node->used_from_other_partition
- || node->externally_visible_p ()
+ || DECL_EXTERNAL (node->decl)
+ || TREE_PUBLIC (node->decl)
|| node->force_output);
return false;
}
For local functions we see all callers and thus do not need initial
constraints for parameters. */
bool nonlocal_p = (node->used_from_other_partition
- || node->externally_visible
+ || DECL_EXTERNAL (node->decl)
+ || TREE_PUBLIC (node->decl)
|| node->force_output
|| lookup_attribute ("noipa",
DECL_ATTRIBUTES (node->decl)));
/* For the purpose of IPA PTA unit-local globals are not
escape points. */
- bool nonlocal_p = (var->externally_visible_p ()
+ bool nonlocal_p = (DECL_EXTERNAL (var->decl)
+ || TREE_PUBLIC (var->decl)
|| var->used_from_other_partition
|| var->force_output);
var->call_for_symbol_and_aliases (refered_from_nonlocal_var,