Commit 0818c24c by Jan Hubicka Committed by Jan Hubicka

ipa-cp.c (ipcp_versionable_function_p): Thunks are not versionable.


	* ipa-cp.c (ipcp_versionable_function_p): Thunks are not versionable.
	(ipcp_initialize_node_lattices): Do not deal with aliases; Do not try to
	propagate through thunks.
	(ipcp_change_tops_to_bottom): Do not deal with aliases.

From-SVN: r174916
parent c8246dbe
2011-06-10 Jan Hubicka <jh@suse.cz> 2011-06-10 Jan Hubicka <jh@suse.cz>
* ipa-cp.c (ipcp_versionable_function_p): Thunks are not versionable.
(ipcp_initialize_node_lattices): Do not deal with aliases; Do not try to
propagate through thunks.
(ipcp_change_tops_to_bottom): Do not deal with aliases.
2011-06-10 Jan Hubicka <jh@suse.cz>
* ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect * ipa-prop.c (ipa_write_node_info): Stream jump functions for indirect
calls. calls.
(ipa_read_node_info): Likewise. (ipa_read_node_info): Likewise.
......
...@@ -354,6 +354,10 @@ ipcp_versionable_function_p (struct cgraph_node *node) ...@@ -354,6 +354,10 @@ ipcp_versionable_function_p (struct cgraph_node *node)
if (node->alias) if (node->alias)
return false; return false;
/* We don't know how to clone thunks. */
if (node->thunk.thunk_p)
return false;
/* There are a number of generic reasons functions cannot be versioned. We /* There are a number of generic reasons functions cannot be versioned. We
also cannot remove parameters if there are type attributes such as fnspec also cannot remove parameters if there are type attributes such as fnspec
present. */ present. */
...@@ -507,9 +511,11 @@ ipcp_initialize_node_lattices (struct cgraph_node *node) ...@@ -507,9 +511,11 @@ ipcp_initialize_node_lattices (struct cgraph_node *node)
struct ipa_node_params *info = IPA_NODE_REF (node); struct ipa_node_params *info = IPA_NODE_REF (node);
enum ipa_lattice_type type; enum ipa_lattice_type type;
if (ipa_is_called_with_var_arguments (info) || node->alias) if (ipa_is_called_with_var_arguments (info))
type = IPA_BOTTOM; type = IPA_BOTTOM;
else if (node->local.local) /* We don't know how to clone thunks even when they are local. */
else if (node->local.local
&& !node->thunk.thunk_p)
type = IPA_TOP; type = IPA_TOP;
/* When cloning is allowed, we can assume that externally visible functions /* When cloning is allowed, we can assume that externally visible functions
are not called. We will compensate this by cloning later. */ are not called. We will compensate this by cloning later. */
...@@ -592,6 +598,7 @@ ipcp_change_tops_to_bottom (void) ...@@ -592,6 +598,7 @@ ipcp_change_tops_to_bottom (void)
prop_again = false; prop_again = false;
for (node = cgraph_nodes; node; node = node->next) for (node = cgraph_nodes; node; node = node->next)
if (!node->alias)
{ {
struct ipa_node_params *info = IPA_NODE_REF (node); struct ipa_node_params *info = IPA_NODE_REF (node);
count = ipa_get_param_count (info); count = ipa_get_param_count (info);
...@@ -813,6 +820,7 @@ ipcp_iterate_stage (void) ...@@ -813,6 +820,7 @@ ipcp_iterate_stage (void)
ipa_update_after_lto_read (); ipa_update_after_lto_read ();
for (node = cgraph_nodes; node; node = node->next) for (node = cgraph_nodes; node; node = node->next)
if (!node->alias)
{ {
ipcp_initialize_node_lattices (node); ipcp_initialize_node_lattices (node);
ipcp_compute_node_scale (node); ipcp_compute_node_scale (node);
......
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