public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/104869] [12 Regression] Miscompilation of qt5-qtdeclarative since r12-6342-ge7a7dbb5ca5dd696 Date: Mon, 04 Jul 2022 19:02:51 +0000 [thread overview] Message-ID: <bug-104869-4-z8Q1NpF2G2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104869-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104869 --- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>: https://gcc.gnu.org/g:d6a8ac7e92dfe0a51d71525e212147d0b84f1224 commit r11-10110-gd6a8ac7e92dfe0a51d71525e212147d0b84f1224 Author: Richard Sandiford <richard.sandiford@arm.com> Date: Mon Jul 4 20:02:26 2022 +0100 rtl-ssa: Fix prev/next_def confusion [PR104869] rtl-ssa chains definitions into an RPO list. It also groups sequences of clobbers together into a single node, so that it's possible to skip over the clobbers in constant time in order to get the next or previous set. When adding a clobber to an insn, the main DF barriers for that clobber are the last use of the previous set (if any) and the next set (if any); adding a new clobber to a sea of clobbers is fine. def_lookup provided the basis for these barriers as prev_def () and next_def (). But of course, in hindsight, those were bad names, since they implied that the returned values were literally the previous definition (of any kind) or the next definition (of any kind). And function_info::make_use_available was using the same routines assuming that they had that meaning. :-( This made a difference for the case where the start of a BB occurs in the middle of an (RPO) clobber group: we then want the previous and next clobbers in the group, rather than the set before the clobber group and the set after the clobber group. This patch renames the existing routines to something that's hopefully clearer (though also more long-winded). It then adds routines that really do provide the previous and next definitions. This complication is supposed to be internal to rtl-ssa and, as mentioned above, is part of trying to reduce time complexity. gcc/ PR middle-end/104869 * rtl-ssa/accesses.h (clobber_group::prev_clobber): Declare. (clobber_group::next_clobber): Likewise. (def_lookup::prev_def): Rename to... (def_lookup::last_def_of_prev_group): ...this. (def_lookup::next_def): Rename to... (def_lookup::first_def_of_next_group): ...this. (def_lookup::matching_or_prev_def): Rename to... (def_lookup::matching_set_or_last_def_of_prev_group): ...this. (def_lookup::matching_or_next_def): Rename to... (def_lookup::matching_set_or_first_def_of_next_group): ...this. (def_lookup::prev_def): New function, taking the lookup insn as argument. (def_lookup::next_def): Likewise. * rtl-ssa/member-fns.inl (def_lookup::prev_def): Rename to... (def_lookup::last_def_of_prev_group): ...this. (def_lookup::next_def): Rename to... (def_lookup::first_def_of_next_group): ...this. (def_lookup::matching_or_prev_def): Rename to... (def_lookup::matching_set_or_last_def_of_prev_group): ...this. (def_lookup::matching_or_next_def): Rename to... (def_lookup::matching_set_or_first_def_of_next_group): ...this. * rtl-ssa/movement.h (restrict_movement_for_dead_range): Update after above renaming. * rtl-ssa/accesses.cc (clobber_group::prev_clobber): New function. (clobber_group::next_clobber): Likewise. (def_lookup::prev_def): Likewise. (def_lookup::next_def): Likewise. (function_info::make_use_available): Pass the lookup insn to def_lookup::prev_def and def_lookup::next_def. gcc/testsuite/ PR middle-end/104869 * g++.dg/pr104869.C: New test. (cherry picked from commit 4a3073f04e8b7987ad7bfe1bc23bfeb1d627ee6a)
prev parent reply other threads:[~2022-07-04 19:02 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-10 18:43 [Bug rtl-optimization/104869] New: [12 Regression] Miscompilation of qt5-qtdeclarative jakub at gcc dot gnu.org 2022-03-10 19:32 ` [Bug rtl-optimization/104869] [12 Regression] Miscompilation of qt5-qtdeclarative since r12-6342-ge7a7dbb5ca5dd696 jakub at gcc dot gnu.org 2022-03-10 19:32 ` jakub at gcc dot gnu.org 2022-03-11 11:00 ` jakub at gcc dot gnu.org 2022-03-11 12:04 ` jakub at gcc dot gnu.org 2022-03-20 14:02 ` rsandifo at gcc dot gnu.org 2022-03-21 10:52 ` cvs-commit at gcc dot gnu.org 2022-03-21 10:52 ` rsandifo at gcc dot gnu.org 2022-07-04 19:02 ` cvs-commit 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-104869-4-z8Q1NpF2G2@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).