Commit 36576655 by Jan Hubicka Committed by Jan Hubicka

cgraph.c (cgraph_create_virtual_clone): Only check versionable_function_p when…

cgraph.c (cgraph_create_virtual_clone): Only check versionable_function_p when not in wpa and checking is enabled.


	* cgraph.c (cgraph_create_virtual_clone): Only check
	versionable_function_p when not in wpa and checking is enabled.
	* cgrpahunit.c (cgraph_materialize_all_clones): Stabilize after
	there are no more functions to materialize.
	
	* lto/lto.c (lto_1_to_1_map): Partition non-inline clones.
	(lto_promote_cross_file_statics): Deal with non-inline clones.

From-SVN: r159518
parent 922f15c2
2010-05-17 Jan Hubicka <jh@suse.cz> 2010-05-17 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_create_virtual_clone): Only check
versionable_function_p when not in wpa and checking is enabled.
* cgraphunit.c (cgraph_materialize_all_clones): Stabilize after
there are no more functions to materialize.
2010-05-17 Jan Hubicka <jh@suse.cz>
* cgraph.h (struct ipa_replace_map): Add parm_num parameter. * cgraph.h (struct ipa_replace_map): Add parm_num parameter.
* lto-cgraph.c (output_cgraph_opt_summary, input_cgraph_opt_summary): * lto-cgraph.c (output_cgraph_opt_summary, input_cgraph_opt_summary):
New functions. New functions.
......
...@@ -2184,7 +2184,10 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node, ...@@ -2184,7 +2184,10 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
size_t i; size_t i;
struct ipa_replace_map *map; struct ipa_replace_map *map;
gcc_assert (tree_versionable_function_p (old_decl)); #ifdef ENABLE_CHECKING
if (!flag_wpa)
gcc_assert (tree_versionable_function_p (old_decl));
#endif
/* Make a new FUNCTION_DECL tree node */ /* Make a new FUNCTION_DECL tree node */
if (!args_to_skip) if (!args_to_skip)
......
...@@ -2425,9 +2425,8 @@ cgraph_materialize_all_clones (void) ...@@ -2425,9 +2425,8 @@ cgraph_materialize_all_clones (void)
} }
} }
cgraph_materialize_clone (node); cgraph_materialize_clone (node);
stabilized = false;
} }
else
stabilized = false;
} }
} }
} }
......
2010-05-18 Jan Hubicka <jh@suse.cz> 2010-05-18 Jan Hubicka <jh@suse.cz>
* lto/lto.c (lto_1_to_1_map): Partition non-inline clones.
(lto_promote_cross_file_statics): Deal with non-inline clones.
2010-05-18 Jan Hubicka <jh@suse.cz>
* lto.c (lto_materialize_function): Announce function when * lto.c (lto_materialize_function): Announce function when
reading body; allocate_struct_function only when reading body; reading body; allocate_struct_function only when reading body;
do not finalize local statics; ggc_collect after reading; do not finalize local statics; ggc_collect after reading;
......
...@@ -537,9 +537,8 @@ lto_1_to_1_map (void) ...@@ -537,9 +537,8 @@ lto_1_to_1_map (void)
for (node = cgraph_nodes; node; node = node->next) for (node = cgraph_nodes; node; node = node->next)
{ {
/* We will get proper partition based on function they are inlined to or /* We will get proper partition based on function they are inlined to. */
cloned from. */ if (node->global.inlined_to)
if (node->global.inlined_to || node->clone_of)
continue; continue;
/* Nodes without a body do not need partitioning. */ /* Nodes without a body do not need partitioning. */
if (!node->analyzed) if (!node->analyzed)
...@@ -721,7 +720,7 @@ lto_promote_cross_file_statics (void) ...@@ -721,7 +720,7 @@ lto_promote_cross_file_statics (void)
struct cgraph_node *node = csi_node (csi); struct cgraph_node *node = csi_node (csi);
if (node->local.externally_visible) if (node->local.externally_visible)
continue; continue;
if (node->clone_of || node->global.inlined_to) if (node->global.inlined_to)
continue; continue;
if (!DECL_EXTERNAL (node->decl) if (!DECL_EXTERNAL (node->decl)
&& (referenced_from_other_partition_p (&node->ref_list, set, vset) && (referenced_from_other_partition_p (&node->ref_list, set, vset)
......
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