Commit b75d1e21 by Martin Jambor Committed by Martin Jambor

re PR lto/49796 (483.xalancbmk/447.dealII in SPEC CPU 2006 failed to build)

2011-07-22  Martin Jambor  <mjambor@suse.cz>

	PR lto/49796
	* cgraphunit.c (verify_edge_corresponds_to_fndecl): Return false
	if decl node is in another partition, call cgraph_get_node only
	once.

From-SVN: r176630
parent e3c666fd
2011-07-22 Martin Jambor <mjambor@suse.cz>
PR lto/49796
* cgraphunit.c (verify_edge_corresponds_to_fndecl): Return false
if decl node is in another partition, call cgraph_get_node only
once.
2011-07-22 Uros Bizjak <ubizjak@gmail.com> 2011-07-22 Uros Bizjak <ubizjak@gmail.com>
* config.gcc (x86_64-*-linux*): Set * config.gcc (x86_64-*-linux*): Set
......
...@@ -456,17 +456,23 @@ cgraph_debug_gimple_stmt (struct function *this_cfun, gimple stmt) ...@@ -456,17 +456,23 @@ cgraph_debug_gimple_stmt (struct function *this_cfun, gimple stmt)
static bool static bool
verify_edge_corresponds_to_fndecl (struct cgraph_edge *e, tree decl) verify_edge_corresponds_to_fndecl (struct cgraph_edge *e, tree decl)
{ {
if (!e->callee->global.inlined_to struct cgraph_node *node;
&& decl
&& cgraph_get_node (decl) if (!decl || e->callee->global.inlined_to)
&& (e->callee->former_clone_of return false;
!= cgraph_function_or_thunk_node (cgraph_get_node (decl), NULL)->decl) node = cgraph_get_node (decl);
/* We do not know if a node from a different partition is an alias or what it
aliases and therefore cannot do the former_clone_of check reliably. */
if (!node || node->in_other_partition)
return false;
node = cgraph_function_or_thunk_node (node, NULL);
if ((e->callee->former_clone_of != node->decl)
/* IPA-CP sometimes redirect edge to clone and then back to the former /* IPA-CP sometimes redirect edge to clone and then back to the former
function. This ping-pong has to go, eventaully. */ function. This ping-pong has to go, eventaully. */
&& (cgraph_function_or_thunk_node (cgraph_get_node (decl), NULL) && (node != cgraph_function_or_thunk_node (e->callee, NULL))
!= cgraph_function_or_thunk_node (e->callee, NULL)) && !clone_of_p (node, e->callee))
&& !clone_of_p (cgraph_get_node (decl),
e->callee))
return true; return true;
else else
return false; return false;
......
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