public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106075] Wrong DSE with -fnon-call-exceptions Date: Mon, 08 May 2023 13:49:50 +0000 [thread overview] Message-ID: <bug-106075-4-vGzr60LY7h@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106075-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106075 --- Comment #12 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 8 May 2023, ebotcazou at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106075 > > --- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > > Eric, maybe you can help with RTL DSE here? > > The problem is that add_non_frame_wild_read is exclusive, i.e. the read is > turned into a read from *only* non-frame memory, but can_throw_external > is conservative and may return true for a read from frame memory: > > (insn 15 13 16 4 (set (reg:QI 87 [ _20 ]) > (mem:QI (plus:DI (reg/f:DI 100) > (reg:DI 92 [ ivtmp.23 ])) [8 MEM <character> > [(interfaces__unsigned_32 *)&value.4 + ivtmp.23_39 * 1]+0 S1 A8])) > "opt47.adb":22:13 91 {*movqi_internal} > > value.4 is a local variable but can_throw_external return true on the read. Ah - interesting. I wonder how the CALL handling is correct in using add_non_frame_wild_read then for the case we pass the address of a frame variable to it. So I suppose add_wild_read () would do the trick. > So you would need to implement an inclusive version of add_non_frame_wild_read > but the change is going to pessimize Ada and Go if the condition to invoke it > is not made more precise. So better would be to include the original effects of the insn _plus_ the non-frame wild read effect. I'm defering this for now, the problem went unnoticed for long, so ...
next prev parent reply other threads:[~2023-05-08 13:49 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-24 9:34 [Bug middle-end/106075] New: " hubicka at gcc dot gnu.org 2022-06-24 9:36 ` [Bug middle-end/106075] " pinskia at gcc dot gnu.org 2022-06-24 9:39 ` pinskia at gcc dot gnu.org 2022-06-24 10:39 ` rguenth at gcc dot gnu.org 2022-06-24 11:14 ` hubicka at gcc dot gnu.org 2022-06-24 11:15 ` hubicka at gcc dot gnu.org 2023-01-16 20:58 ` hubicka at gcc dot gnu.org 2023-01-17 9:16 ` rguenth at gcc dot gnu.org 2023-05-03 12:56 ` rguenth at gcc dot gnu.org 2023-05-03 12:57 ` rguenth at gcc dot gnu.org 2023-05-08 9:35 ` ebotcazou at gcc dot gnu.org 2023-05-08 13:25 ` ebotcazou at gcc dot gnu.org 2023-05-08 13:49 ` rguenther at suse dot de [this message] 2023-05-08 13:54 ` rguenth at gcc dot gnu.org 2023-05-08 13:55 ` ebotcazou at gcc dot gnu.org 2023-05-08 13:57 ` ebotcazou 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-106075-4-vGzr60LY7h@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).