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/104303] [12 regression] gnatmake is miscompiled by IPA/modref Date: Thu, 07 Apr 2022 13:03:52 +0000 [thread overview] Message-ID: <bug-104303-4-SqQriWtYJV@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104303-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104303 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:8c0ebaf9f586100920a3c0849fb10e9985d7ae58 commit r12-8048-g8c0ebaf9f586100920a3c0849fb10e9985d7ae58 Author: Richard Biener <rguenther@suse.de> Date: Thu Apr 7 14:07:54 2022 +0200 ipa/104303 - miscompilation of gnatmake Modref attempts to track memory accesses relative to the base pointers which are parameters of functions. If it fails, it still makes difference between unknown memory access and global memory access. The second makes it possible to disambiguate with memory that is not accessible from outside world (i.e. everything that does not escape from the caller function). This is useful so we do not punt when unknown function is called. The added ref_may_access_global_memory_p ends up using ptr_deref_may_alias_global_p which does not consider escaped automatic variables as global. For modref those are still global since they can be accessed from functions called. The following adds a flag to the *_global_p APIs indicating whether escaped local memory should be considered as global or not and removes ref_may_access_global_memory_p in favor of using ref_may_alias_global_p with the flag set to true. 2022-04-07 Richard Biener <rguenther@suse.de> Jan Hubicka <hubicka@ucw.cz> PR ipa/104303 * tree-ssa-alias.h (ptr_deref_may_alias_global_p, ref_may_alias_global_p, ref_may_alias_global_p, stmt_may_clobber_global_p, pt_solution_includes_global): Add bool parameters indicating whether escaped locals should be considered global. * tree-ssa-structalias.cc (pt_solution_includes_global): When the new escaped_nonlocal_p flag is true also consider pt->vars_contains_escaped. * tree-ssa-alias.cc (ptr_deref_may_alias_global_p): Pass down new escaped_nonlocal_p flag. (ref_may_alias_global_p): Likewise. (stmt_may_clobber_global_p): Likewise. (ref_may_alias_global_p_1): Likewise. For decls also query the escaped solution if true. (ref_may_access_global_memory_p): Remove. (modref_may_conflict): Use ref_may_alias_global_p with escaped locals considered global. (ref_maybe_used_by_stmt_p): Adjust. * ipa-fnsummary.cc (points_to_local_or_readonly_memory_p): Likewise. * tree-ssa-dse.cc (dse_classify_store): Likewise. * trans-mem.cc (thread_private_new_memory): Likewise, but consider escaped locals global. * tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Likewise. * gnat.dg/concat5.adb: New. * gnat.dg/concat5_pkg1.adb: Likewise. * gnat.dg/concat5_pkg1.ads: Likewise. * gnat.dg/concat5_pkg2.adb: Likewise. * gnat.dg/concat5_pkg2.ads: Likewise.
next prev parent reply other threads:[~2022-04-07 13:03 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-31 10:09 [Bug ipa/104303] New: [12 regression] gnatmake is miscompiled by IPA/modef ebotcazou at gcc dot gnu.org 2022-01-31 10:12 ` [Bug ipa/104303] [12 regression] gnatmake is miscompiled by IPA/modref pinskia at gcc dot gnu.org 2022-01-31 10:21 ` hubicka at gcc dot gnu.org 2022-02-01 8:18 ` rguenth at gcc dot gnu.org 2022-03-22 14:52 ` jakub at gcc dot gnu.org 2022-03-31 12:51 ` rguenth at gcc dot gnu.org 2022-03-31 13:12 ` hubicka at gcc dot gnu.org 2022-04-03 23:49 ` hubicka at gcc dot gnu.org 2022-04-05 21:46 ` hubicka at gcc dot gnu.org 2022-04-07 11:47 ` rguenth at gcc dot gnu.org 2022-04-07 11:57 ` rguenth at gcc dot gnu.org 2022-04-07 12:12 ` rguenth at gcc dot gnu.org 2022-04-07 13:01 ` hubicka at kam dot mff.cuni.cz 2022-04-07 13:03 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-07 13:04 ` rguenth at gcc dot gnu.org 2022-04-07 14:16 ` ebotcazou at gcc dot gnu.org 2022-04-12 15:05 ` 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-104303-4-SqQriWtYJV@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).