Commit 52b3b3c7 by Jan Hubicka Committed by Jan Hubicka

lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone.


	* lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when
	processing clone.
	* lto.c (lto_materialize_function): Do not tamper with STATIC and
	EXTERNAL flags.

From-SVN: r164354
parent ff01e2cb
2010-09-16 Jan Hubicka <jh@suse.cz>
* lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when
processing clone.
2010-09-16 H.J. Lu <hongjiu.lu@intel.com> 2010-09-16 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386-protos.h (ix86_split_idivmod): New prototype. * config/i386/i386-protos.h (ix86_split_idivmod): New prototype.
......
...@@ -956,7 +956,16 @@ input_overwrite_node (struct lto_file_decl_data *file_data, ...@@ -956,7 +956,16 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->lowered = bp_unpack_value (bp, 1); node->lowered = bp_unpack_value (bp, 1);
node->analyzed = tag == LTO_cgraph_analyzed_node; node->analyzed = tag == LTO_cgraph_analyzed_node;
node->in_other_partition = bp_unpack_value (bp, 1); node->in_other_partition = bp_unpack_value (bp, 1);
if (node->in_other_partition) if (node->in_other_partition
/* Avoid updating decl when we are seeing just inline clone.
When inlining function that has functions already inlined into it,
we produce clones of inline clones.
WPA partitioning might put each clone into different unit and
we might end up streaming inline clone from other partition
to support clone we are interested in. */
&& (!node->clone_of
|| node->clone_of->decl != node->decl))
{ {
DECL_EXTERNAL (node->decl) = 1; DECL_EXTERNAL (node->decl) = 1;
TREE_STATIC (node->decl) = 0; TREE_STATIC (node->decl) = 0;
......
2010-09-16 Jan Hubicka <jh@suse.cz>
* lto.c (lto_materialize_function): Do not tamper with STATIC and
EXTERNAL flags.
2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com> 2010-09-15 Laurynas Biveinis <laurynas.biveinis@gmail.com>
* lto-tree.h (struct lang_type): Add variable_size GTY option. * lto-tree.h (struct lang_type): Add variable_size GTY option.
......
...@@ -160,9 +160,6 @@ lto_materialize_function (struct cgraph_node *node) ...@@ -160,9 +160,6 @@ lto_materialize_function (struct cgraph_node *node)
and also functions that are needed to produce virtual clones. */ and also functions that are needed to produce virtual clones. */
if (node->analyzed || has_analyzed_clone_p (node)) if (node->analyzed || has_analyzed_clone_p (node))
{ {
/* This function has a definition. */
TREE_STATIC (decl) = 1;
/* Clones don't need to be read. */ /* Clones don't need to be read. */
if (node->clone_of) if (node->clone_of)
return; return;
...@@ -198,8 +195,6 @@ lto_materialize_function (struct cgraph_node *node) ...@@ -198,8 +195,6 @@ lto_materialize_function (struct cgraph_node *node)
if (!flag_wpa) if (!flag_wpa)
ggc_collect (); ggc_collect ();
} }
else
DECL_EXTERNAL (decl) = 1;
/* Let the middle end know about the function. */ /* Let the middle end know about the function. */
rest_of_decl_compilation (decl, 1, 0); rest_of_decl_compilation (decl, 1, 0);
......
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