* Do not read function bodies to merge zero profiles
@ 2018-12-15 21:05 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2018-12-15 21:05 UTC (permalink / raw)
To: gcc-patches
Hi,
this patch saves some stream-in time of WPA becuase if source profile is
zero, there is no need to merge it into destination since it is no-op
anyway.
Bootstrapped/regtested x86_64-linux, comitted.
Honza
* ipa-utils.c (ipa_merge_profiles): Do no merging when source function
has zero count.
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 ()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-15 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-15 21:05 Do not read function bodies to merge zero profiles Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).