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 ipa/113907] [11/12/13/14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41 Date: Fri, 15 Mar 2024 23:29:38 +0000 [thread overview] Message-ID: <bug-113907-4-JiVkw1qvTd@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113907-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907 --- Comment #62 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:9f255e4baac68fc3568820cdca9412f67ff07940 commit r13-8451-g9f255e4baac68fc3568820cdca9412f67ff07940 Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Mar 14 17:48:30 2024 +0100 icf: Reset SSA_NAME_{PTR,RANGE}_INFO in successfully merged functions [PR113907] AFAIK we have no code in LTO streaming to stream out or in SSA_NAME_{RANGE,PTR}_INFO, so LTO effectively throws it all away and let vrp1 and alias analysis after IPA recompute that. There is just one spot, for IPA VRP and IPA bit CCP we save/restore ranges and set SSA_NAME_{PTR,RANGE}_INFO e.g. on parameters depending on what we saved and propagated, but that is after streaming in bodies for the post IPA optimizations. Now, without LTO SSA_NAME_{RANGE,PTR}_INFO is already computed from earlier in many cases (er.g. evrp and early alias analysis but other spots too), but IPA ICF is ignoring the ranges and points-to details when comparing the bodies. I think ignoring that is just fine, that is effectively what we do for LTO where we throw that information away before the analysis, and not ignoring it could lead to fewer ICF merging possibilities. So, the following patch instead verifies that for LTO SSA_NAME_{PTR,RANGE}_INFO just isn't there on SSA_NAMEs in functions into which other functions have been ICFed, and for non-LTO throws that information away (which matches the LTO behavior). Another possibility would be to remember the SSA_NAME <-> SSA_NAME mapping vector (just one of the 2) on successful sem_function::equals on the sem_function which is not the chosen leader (e.g. how SSA_NAMEs in the leader map to SSA_NAMEs in the other function) and use that vector to union the ranges in sem_function::merge. I can implement that for comparison, but wanted to post this first if there is an agreement on doing that or if Honza thinks we should take SSA_NAME_{RANGE,PTR}_INFO into account. I think we can compare SSA_NAME_RANGE_INFO, but have no idea how to try to compare points to info. And I think it will result in less effective ICF for non-LTO vs. LTO unnecessarily. 2024-03-12 Jakub Jelinek <jakub@redhat.com> PR middle-end/113907 * ipa-icf.cc (sem_item_optimizer::merge_classes): Reset SSA_NAME_RANGE_INFO and SSA_NAME_PTR_INFO on successfully ICF merged functions. * gcc.dg/pr113907-1.c: New test. (cherry picked from commit 7580e39452b65ab5fb5a06f3f1ad7d59720269b5)
next prev parent reply other threads:[~2024-03-15 23:29 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-13 12:49 [Bug middle-end/113907] New: [14 " sjames at gcc dot gnu.org 2024-02-13 12:55 ` [Bug middle-end/113907] " sjames at gcc dot gnu.org 2024-02-13 13:00 ` sjames at gcc dot gnu.org 2024-02-13 13:00 ` rguenth at gcc dot gnu.org 2024-02-13 13:14 ` jakub at gcc dot gnu.org 2024-02-13 14:17 ` sjames at gcc dot gnu.org 2024-02-13 14:18 ` sjames at gcc dot gnu.org 2024-02-13 14:19 ` sjames at gcc dot gnu.org 2024-02-13 14:22 ` sjames at gcc dot gnu.org 2024-02-13 14:23 ` sjames at gcc dot gnu.org 2024-02-13 14:24 ` sjames at gcc dot gnu.org 2024-02-13 14:49 ` jakub at gcc dot gnu.org 2024-02-13 14:55 ` pinskia at gcc dot gnu.org 2024-02-13 14:56 ` sjames at gcc dot gnu.org 2024-02-13 14:58 ` sjames at gcc dot gnu.org 2024-02-13 15:11 ` jakub at gcc dot gnu.org 2024-02-13 15:17 ` pinskia at gcc dot gnu.org 2024-02-13 15:19 ` sjames at gcc dot gnu.org 2024-02-13 15:36 ` jakub at gcc dot gnu.org 2024-02-13 15:40 ` pinskia at gcc dot gnu.org 2024-02-13 15:46 ` jakub at gcc dot gnu.org 2024-02-13 15:58 ` jakub at gcc dot gnu.org 2024-02-13 16:00 ` pinskia at gcc dot gnu.org 2024-02-13 16:01 ` pinskia at gcc dot gnu.org 2024-02-13 16:07 ` jakub at gcc dot gnu.org 2024-02-13 16:30 ` jakub at gcc dot gnu.org 2024-02-14 9:16 ` jakub at gcc dot gnu.org 2024-02-14 9:24 ` rguenth at gcc dot gnu.org 2024-02-14 9:25 ` rguenth at gcc dot gnu.org 2024-02-14 9:52 ` jakub at gcc dot gnu.org 2024-02-14 10:35 ` rguenther at suse dot de 2024-02-14 15:52 ` hubicka at gcc dot gnu.org 2024-02-14 15:56 ` jakub at gcc dot gnu.org 2024-02-15 10:25 ` sjames at gcc dot gnu.org 2024-02-15 14:25 ` hubicka at gcc dot gnu.org 2024-02-15 14:36 ` jakub at gcc dot gnu.org 2024-02-15 14:36 ` jakub at gcc dot gnu.org 2024-02-15 14:43 ` rguenther at suse dot de 2024-02-15 14:45 ` rguenther at suse dot de 2024-02-15 14:55 ` hubicka at ucw dot cz 2024-02-15 14:57 ` hubicka at ucw dot cz 2024-02-15 15:02 ` jakub at gcc dot gnu.org 2024-02-16 14:40 ` hubicka at gcc dot gnu.org 2024-02-16 15:10 ` jakub at gcc dot gnu.org 2024-02-16 15:52 ` [Bug middle-end/113907] [12/13/14 " hubicka at gcc dot gnu.org 2024-02-16 15:55 ` jakub at gcc dot gnu.org 2024-02-16 16:08 ` hubicka at ucw dot cz 2024-02-16 16:27 ` jakub at gcc dot gnu.org 2024-02-16 16:45 ` hubicka at ucw dot cz 2024-02-16 17:01 ` amacleod at redhat dot com 2024-02-16 20:42 ` amacleod at redhat dot com 2024-02-22 9:22 ` sjames at gcc dot gnu.org 2024-03-08 15:34 ` jakub at gcc dot gnu.org 2024-03-09 17:10 ` law at gcc dot gnu.org 2024-03-09 21:04 ` [Bug ipa/113907] " pinskia at gcc dot gnu.org 2024-03-09 21:06 ` [Bug ipa/113907] [11/12/13/14 " pinskia at gcc dot gnu.org 2024-03-09 21:11 ` pinskia at gcc dot gnu.org 2024-03-11 11:21 ` jakub at gcc dot gnu.org 2024-03-13 14:07 ` hubicka at gcc dot gnu.org 2024-03-13 14:14 ` jakub at gcc dot gnu.org 2024-03-13 15:21 ` hubicka at ucw dot cz 2024-03-14 16:20 ` hubicka at gcc dot gnu.org 2024-03-14 16:39 ` hubicka at gcc dot gnu.org 2024-03-14 16:49 ` cvs-commit at gcc dot gnu.org 2024-03-14 16:53 ` jakub at gcc dot gnu.org 2024-03-15 23:29 ` cvs-commit at gcc dot gnu.org [this message] 2024-03-19 17:09 ` jakub at gcc dot gnu.org 2024-03-19 18:41 ` hubicka at ucw dot cz 2024-03-20 9:05 ` jamborm at gcc dot gnu.org 2024-03-20 18:13 ` jamborm at gcc dot gnu.org 2024-03-20 18:33 ` jakub at gcc dot gnu.org 2024-03-21 15:29 ` jakub at gcc dot gnu.org 2024-03-28 12:25 ` [Bug ipa/113907] [11/12/13/14 regression] ICU miscompiled " cvs-commit at gcc dot gnu.org 2024-04-02 8:44 ` hubicka at ucw dot cz 2024-04-04 21:17 ` jamborm at gcc dot gnu.org 2024-04-08 9:33 ` sjames at gcc dot gnu.org 2024-04-08 9:38 ` rguenth at gcc dot gnu.org 2024-04-08 16:56 ` cvs-commit at gcc dot gnu.org 2024-04-08 17:04 ` jamborm at gcc dot gnu.org 2024-04-09 9:47 ` Jan Hubicka 2024-04-09 9:47 ` hubicka at ucw dot cz 2024-05-07 7:45 ` [Bug ipa/113907] [11/12/13/14/15 " rguenth at gcc dot gnu.org 2024-05-14 15:06 ` cvs-commit at gcc dot gnu.org 2024-05-28 13:45 ` cvs-commit 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-113907-4-JiVkw1qvTd@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).