public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/100145] missed optimization for dead code elimination at -O3 (vs. -O2)
Date: Fri, 09 Jun 2023 17:20:09 +0000 [thread overview]
Message-ID: <bug-100145-4-ynmDpzbiSf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100145-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100145
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> So we get optimize_edge_for_size_p () returning OPTIMIZE_SIZE_BALANCED and
> thus optimize_edge_for_speed_p which is
>
> 340 bool
> 341 optimize_edge_for_speed_p (edge e)
> 342 {
> 343 return !optimize_edge_for_size_p (e);
> 344 }
>
> return false. And that's likely because this is 'main'.
Yes it is.
If we do s/main/c123/
And then add:
```
int main()
{
return c123();
}
```
The -O3 issue goes away.
prev parent reply other threads:[~2023-06-09 17:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 9:24 [Bug tree-optimization/100145] New: " zhendong.su at inf dot ethz.ch
2021-04-20 8:26 ` [Bug ipa/100145] " rguenth at gcc dot gnu.org
2021-04-20 8:50 ` [Bug gcov-profile/100145] " rguenth at gcc dot gnu.org
2021-05-20 13:57 ` rguenth at gcc dot gnu.org
2023-06-09 17:20 ` pinskia at gcc dot gnu.org [this message]
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=bug-100145-4-ynmDpzbiSf@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).