Commit 2b78f221 by Richard Biener Committed by Richard Biener

re PR ipa/70785 (LTO bootstrap with IPA PTA is broken)

2016-04-27  Richard Biener  <rguenther@suse.de>

	PR ipa/70785
	* tree-ssa-structalias.c (refered_from_nonlocal_fn): New
	function cummulating used_from_other_partition, externally_visible
	and force_output from aliases.
	(refered_from_nonlocal_var): Likewise.
	(ipa_pta_execute): Use call_for_symbol_and_aliases to cummulate
	node flags properly.

From-SVN: r235477
parent c1e1f433
2016-04-27 Richard Biener <rguenther@suse.de>
PR ipa/70785
* tree-ssa-structalias.c (refered_from_nonlocal_fn): New
function cummulating used_from_other_partition, externally_visible
and force_output from aliases.
(refered_from_nonlocal_var): Likewise.
(ipa_pta_execute): Use call_for_symbol_and_aliases to cummulate
node flags properly.
2016-04-27 Bernd Schmidt <bschmidt@redhat.com> 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
* doc/invoke.texi (Warning Options): Add -Wmemset-elt-size. * doc/invoke.texi (Warning Options): Add -Wmemset-elt-size.
......
...@@ -7508,7 +7508,7 @@ struct pt_solution ipa_escaped_pt ...@@ -7508,7 +7508,7 @@ struct pt_solution ipa_escaped_pt
= { true, false, false, false, false, false, false, false, NULL }; = { true, false, false, false, false, false, false, false, NULL };
/* Associate node with varinfo DATA. Worker for /* Associate node with varinfo DATA. Worker for
cgraph_for_node_and_aliases. */ cgraph_for_symbol_thunks_and_aliases. */
static bool static bool
associate_varinfo_to_alias (struct cgraph_node *node, void *data) associate_varinfo_to_alias (struct cgraph_node *node, void *data)
{ {
...@@ -7624,6 +7624,29 @@ debug_varmap (void) ...@@ -7624,6 +7624,29 @@ debug_varmap (void)
dump_varmap (stderr); dump_varmap (stderr);
} }
/* Compute whether node is refered to non-locally. Worker for
cgraph_for_symbol_thunks_and_aliases. */
static bool
refered_from_nonlocal_fn (struct cgraph_node *node, void *data)
{
bool *nonlocal_p = (bool *)data;
*nonlocal_p |= (node->used_from_other_partition
|| node->externally_visible
|| node->force_output);
return false;
}
/* Same for varpool nodes. */
static bool
refered_from_nonlocal_var (struct varpool_node *node, void *data)
{
bool *nonlocal_p = (bool *)data;
*nonlocal_p |= (node->used_from_other_partition
|| node->externally_visible
|| node->force_output);
return false;
}
/* Execute the driver for IPA PTA. */ /* Execute the driver for IPA PTA. */
static unsigned int static unsigned int
ipa_pta_execute (void) ipa_pta_execute (void)
...@@ -7687,6 +7710,8 @@ ipa_pta_execute (void) ...@@ -7687,6 +7710,8 @@ ipa_pta_execute (void)
|| node->externally_visible || node->externally_visible
|| node->force_output || node->force_output
|| node_address_taken); || node_address_taken);
node->call_for_symbol_thunks_and_aliases (refered_from_nonlocal_fn,
&nonlocal_p, true);
vi = create_function_info_for (node->decl, vi = create_function_info_for (node->decl,
alias_get_name (node->decl), false, alias_get_name (node->decl), false,
...@@ -7724,6 +7749,8 @@ ipa_pta_execute (void) ...@@ -7724,6 +7749,8 @@ ipa_pta_execute (void)
bool nonlocal_p = (var->used_from_other_partition bool nonlocal_p = (var->used_from_other_partition
|| var->externally_visible || var->externally_visible
|| var->force_output); || var->force_output);
var->call_for_symbol_and_aliases (refered_from_nonlocal_var,
&nonlocal_p, true);
if (nonlocal_p) if (nonlocal_p)
vi->is_ipa_escape_point = true; vi->is_ipa_escape_point = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment