Commit d63f0fe5 by Jan Hubicka Committed by Jan Hubicka

re PR middle-end/24093 (cgraph exhausts virtual memory building 197.parser with -profile-use -O3)


	PR middle-end/24093
	* cgraph.c (cgraph_clone_edge, cgraph_clone_node): Watch negative

From-SVN: r106291
parent d8ff1871
2005-10-31 Jan Hubicka <jh@suse.cz>
PR middle-end/24093
* cgraph.c (cgraph_clone_edge, cgraph_clone_node): Watch negative
PR target/20928
* i386.c (legitimize_pic_address): Deal with large immediates.
......
......@@ -895,7 +895,11 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n,
new->inline_failed = e->inline_failed;
if (update_original)
{
e->count -= new->count;
if (e->count < 0)
e->count = 0;
}
return new;
}
......@@ -931,7 +935,11 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int loop_nest,
else
count_scale = 0;
if (update_original)
{
n->count -= count;
if (n->count < 0)
n->count = 0;
}
for (e = n->callees;e; e=e->next_callee)
cgraph_clone_edge (e, new, e->call_stmt, count_scale, loop_nest,
......
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