From: hubicka Date: Sat, 15 Dec 2018 21:04:29 +0000 (+0000) Subject: * ipa-utils.c (ipa_merge_profiles): Do no merging when source function X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e94feafd3e63eecb6d7dc9df0b5b3da2a8927a49;p=thirdparty%2Fgcc.git * ipa-utils.c (ipa_merge_profiles): Do no merging when source function has zero count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267174 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f829e93cd499..fd92845039ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-12-15 Jan Hubicka + + * ipa-utils.c (ipa_merge_profiles): Do no merging when source function + has zero count. + 2018-12-15 Jakub Jelinek PR tree-optimization/88464 diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c index 9985721f7da7..3345f9dee9fb 100644 --- a/gcc/ipa-utils.c +++ b/gcc/ipa-utils.c @@ -402,6 +402,10 @@ ipa_merge_profiles (struct cgraph_node *dst, if (src->profile_id && !dst->profile_id) dst->profile_id = src->profile_id; + /* Merging zero profile to dst is no-op. */ + if (src->count.ipa () == profile_count::zero ()) + return; + /* FIXME when we merge in unknown profile, we ought to set counts as unsafe. */ if (!src->count.initialized_p ()