public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/95558] Invalid IPA optimizations based on weak definition Date: Sat, 06 Jun 2020 14:40:45 +0000 [thread overview] Message-ID: <bug-95558-4-4Qc6boTNKS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95558-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95558 --- Comment #3 from Rich Felker <bugdal at aerifal dot cx> --- In addition to a fix, this is going to need a workaround as well. Do you have ideas for a clean one? A dummy asm in the dummy function to kill pureness is certainly a big hammer that would work, but it precludes LTO optimization if the weak definition doesn't actually get replaced, so I don't like that. One idea I think would work, but not sure: make an external __weak_dummy_tail function that all the weak dummies tail call to. This should only take a few bytes more than just returning, and precludes pureness analysis in the TU it's in, while still allowing DCE at LTO time when the definition of __weak_dummy_tail becomes available. Is my reasoning correct here?
next prev parent reply other threads:[~2020-06-06 14:40 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-06 3:45 [Bug middle-end/95558] New: " bugdal at aerifal dot cx 2020-06-06 8:01 ` [Bug ipa/95558] " amonakov at gcc dot gnu.org 2020-06-06 14:36 ` bugdal at aerifal dot cx 2020-06-06 14:40 ` bugdal at aerifal dot cx [this message] 2020-06-09 6:47 ` rguenth at gcc dot gnu.org 2021-09-22 5:59 ` [Bug ipa/95558] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2022-01-17 15:08 ` rguenth at gcc dot gnu.org 2022-01-17 16:33 ` bugdal at aerifal dot cx 2022-01-17 17:32 ` hubicka at kam dot mff.cuni.cz 2022-01-17 17:44 ` bugdal at aerifal dot cx 2022-01-17 19:15 ` amonakov at gcc dot gnu.org 2022-01-17 22:05 ` bugdal at aerifal dot cx 2022-01-17 22:20 ` pinskia at gcc dot gnu.org 2022-01-17 23:54 ` hubicka at kam dot mff.cuni.cz 2022-01-21 13:31 ` rguenth at gcc dot gnu.org 2022-05-27 9:42 ` [Bug ipa/95558] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:41 ` jakub at gcc dot gnu.org 2023-01-19 13:12 ` rguenth at gcc dot gnu.org 2023-07-07 10:37 ` [Bug ipa/95558] [11/12/13/14 " rguenth at gcc dot gnu.org
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-95558-4-4Qc6boTNKS@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).