public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/107050] duplicate load of return value when facing multiple branches Date: Tue, 27 Sep 2022 19:53:44 +0000 [thread overview] Message-ID: <bug-107050-4-dSfUGBYGud@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107050-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107050 --- Comment #2 from Segher Boessenkool <segher at gcc dot gnu.org> --- Splitting blocks in shrink-wrap will cause degraded performance compared to the status quo, on average. If I understand what will be split how, that is? It certainly can be good to move more code, much much more than prepare_shrink_wrap does, but that is a good trade-off most of the time only because it makes the fast path faster, makes less code executed when there is an early return: just randomly moving code to be executed later makes code *slower*. Where shrink-wrapping duplicates code here only one copy is executed, ever. The question seems to really be why at -O1 global variable accesses are not optimised very well? The answer to that is this is -O1, if you want good optimisation you should use -O2!
prev parent reply other threads:[~2022-09-27 19:53 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-27 8:53 [Bug rtl-optimization/107050] New: " absoler at smail dot nju.edu.cn 2022-09-27 9:20 ` [Bug rtl-optimization/107050] " rguenth at gcc dot gnu.org 2022-09-27 19:53 ` segher 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-107050-4-dSfUGBYGud@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: linkBe 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).