Commit 0b9c3a04 by Jan Hubicka Committed by Jan Hubicka

dwarf2out.c (reference_to_unused, [...]): Avoid creating of new varool nodes.

	* dwarf2out.c (reference_to_unused,
	premark_types_used_by_global_vars_helper): Avoid creating of new
	varool nodes.

From-SVN: r160052
parent d56026c2
2010-05-30 Jan Hubicka <jh@suse.cz> 2010-05-30 Jan Hubicka <jh@suse.cz>
* dwarf2out.c (reference_to_unused,
premark_types_used_by_global_vars_helper): Avoid creating of new
varool nodes.
2010-05-30 Jan Hubicka <jh@suse.cz>
* cgraph.h (cgraph_node_cannot_return, * cgraph.h (cgraph_node_cannot_return,
cgraph_edge_cannot_lead_to_return): New functions. cgraph_edge_cannot_lead_to_return): New functions.
* cgraph.c (cgraph_node_cannot_return, * cgraph.c (cgraph_node_cannot_return,
......
...@@ -15938,8 +15938,8 @@ reference_to_unused (tree * tp, int * walk_subtrees, ...@@ -15938,8 +15938,8 @@ reference_to_unused (tree * tp, int * walk_subtrees,
return *tp; return *tp;
else if (TREE_CODE (*tp) == VAR_DECL) else if (TREE_CODE (*tp) == VAR_DECL)
{ {
struct varpool_node *node = varpool_node (*tp); struct varpool_node *node = varpool_get_node (*tp);
if (!node->needed) if (!node || !node->needed)
return *tp; return *tp;
} }
else if (TREE_CODE (*tp) == FUNCTION_DECL else if (TREE_CODE (*tp) == FUNCTION_DECL
...@@ -18213,8 +18213,8 @@ premark_types_used_by_global_vars_helper (void **slot, ...@@ -18213,8 +18213,8 @@ premark_types_used_by_global_vars_helper (void **slot,
{ {
/* Ask cgraph if the global variable really is to be emitted. /* Ask cgraph if the global variable really is to be emitted.
If yes, then we'll keep the DIE of ENTRY->TYPE. */ If yes, then we'll keep the DIE of ENTRY->TYPE. */
struct varpool_node *node = varpool_node (entry->var_decl); struct varpool_node *node = varpool_get_node (entry->var_decl);
if (node->needed) if (node && node->needed)
{ {
die->die_perennial_p = 1; die->die_perennial_p = 1;
/* Keep the parent DIEs as well. */ /* Keep the parent DIEs as well. */
......
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