From: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Fix count comparison in ipa-cp
Date: Mon, 21 Nov 2022 21:26:49 +0000 [thread overview]
Message-ID: <CY5PR21MB35427E6C2EE445568BFA6BA4910A9@CY5PR21MB3542.namprd21.prod.outlook.com> (raw)
The existing comparison was incorrect for non-PRECISE counts
(e.g., AFDO): we could end up with a 0 base_count, which could
lead to asserts, e.g., in good_cloning_opportunity_p.
gcc/ChangeLog:
* ipa-cp.cc (ipcp_propagate_stage): Fix profile count comparison.
---
gcc/ipa-cp.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index d2bcd5e5e69..9df8b456759 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -4225,7 +4225,7 @@ ipcp_propagate_stage (class ipa_topo_info *topo)
for (cgraph_edge *cs = node->callees; cs; cs = cs->next_callee)
{
profile_count count = cs->count.ipa ();
- if (!(count > profile_count::zero ()))
+ if (!count.nonzero_p ())
continue;
enum availability avail;
--
2.25.1
next reply other threads:[~2022-11-21 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 21:26 Eugene Rozenfeld [this message]
2022-11-22 20:02 ` Jeff Law
2022-12-07 1:25 ` [EXTERNAL] " Eugene Rozenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY5PR21MB35427E6C2EE445568BFA6BA4910A9@CY5PR21MB3542.namprd21.prod.outlook.com \
--to=eugene.rozenfeld@microsoft.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).