Message ID | 20181215210545.el4ccpj3gxlbhxq3@kam.mff.cuni.cz |
---|---|
State | New |
Headers | show |
Series | Do not read function bodies to merge zero profiles | expand |
Index: ipa-utils.c =================================================================== --- ipa-utils.c (revision 267122) +++ ipa-utils.c (working copy) @@ -402,6 +402,10 @@ ipa_merge_profiles (struct cgraph_node * 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 ()