From: hubicka Date: Mon, 26 Apr 2010 09:52:05 +0000 (+0000) Subject: * cgraphunit.c (cgraph_copy_node_for_versioning): Fix profile updating. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32936803fb83b18e5a9d0e702fde31920bafe063;p=thirdparty%2Fgcc.git * cgraphunit.c (cgraph_copy_node_for_versioning): Fix profile updating. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158724 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14b8b45cbfbc..9d7d66931cd1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-04-26 Jan Hubicka + + * cgraphunit.c (cgraph_copy_node_for_versioning): Fix profile updating. + 2010-04-26 Richard Guenther PR lto/43080 diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 7d65b0476efb..fcb96b2044c1 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2027,7 +2027,7 @@ cgraph_copy_node_for_versioning (struct cgraph_node *old_version, VEC(cgraph_edge_p,heap) *redirect_callers) { struct cgraph_node *new_version; - struct cgraph_edge *e, *new_e; + struct cgraph_edge *e; struct cgraph_edge *next_callee; unsigned i; @@ -2046,10 +2046,10 @@ cgraph_copy_node_for_versioning (struct cgraph_node *old_version, also cloned. */ for (e = old_version->callees;e; e=e->next_callee) { - new_e = cgraph_clone_edge (e, new_version, e->call_stmt, - e->lto_stmt_uid, 0, e->frequency, - e->loop_nest, true); - new_e->count = e->count; + cgraph_clone_edge (e, new_version, e->call_stmt, + e->lto_stmt_uid, REG_BR_PROB_BASE, + CGRAPH_FREQ_BASE, + e->loop_nest, true); } /* Fix recursive calls. If OLD_VERSION has a recursive call after the