aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-utils.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-12-15 22:04:29 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-12-15 21:04:29 +0000
commit6263c29d28abb099cb835ca373aa234ef36df6a2 (patch)
tree046cf9feac7ea499b296b9a9f59fd67d9978675a /gcc/ipa-utils.c
parent305f1fb78347a0bdf5d6ddd6ac5dead1c6167ea5 (diff)
downloadgcc-6263c29d28abb099cb835ca373aa234ef36df6a2.zip
gcc-6263c29d28abb099cb835ca373aa234ef36df6a2.tar.gz
gcc-6263c29d28abb099cb835ca373aa234ef36df6a2.tar.bz2
ipa-utils.c (ipa_merge_profiles): Do no merging when source function has zero count.
* ipa-utils.c (ipa_merge_profiles): Do no merging when source function has zero count. From-SVN: r267174
Diffstat (limited to 'gcc/ipa-utils.c')
-rw-r--r--gcc/ipa-utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c
index 9985721..3345f9d 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 ()