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 fortran/103662] TBAA problem in Fortran FE triggering in gfortran.dg/unlimited_polymorphic_3.f03 Date: Tue, 14 Dec 2021 15:51:05 +0000 [thread overview] Message-ID: <bug-103662-4-PBspOqHr9K@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103662-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103662 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>: https://gcc.gnu.org/g:3305135c29e1c3e988bd9bad40aefc01d138aaca commit r12-5960-g3305135c29e1c3e988bd9bad40aefc01d138aaca Author: Jan Hubicka <jh@suse.cz> Date: Tue Dec 14 16:50:27 2021 +0100 Determine global memory accesses in ipa-modref As discussed in PR103585, fatigue2 is now only benchmark from my usual testing set (SPEC2k6, SPEC2k17, CPP benchmarks, polyhedron, Firefox, clang) which sees important regression when inlining functions called once is limited. This prevents us from solving runtime issues in roms benchmarks and elsewhere. The problem is that there is perdida function that takes many arguments and some of them are array descriptors. We constant propagate most of their fields but still keep their initialization. Because perdida is quite fast, the call overhead dominates, since we need over 100 memory stores consuing about 35% of the overall benchmark runtime. The memory stores would be eliminated if perdida did not call fortran I/O which makes modref to thin that the array descriptors could be accessed. We are quite close discovering that they can't becuase they are non-escaping from function. This patch makes modref to distingush between global memory access (only things that escapes) and unkonwn accesss (that may access also nonescaping things reaching the function). This makes disambiguation for functions containing error handling better. Unfortunately the patch hits two semi-latent issues in Fortran frontned. First is wrong code in gfortran.dg/unlimited_polymorphic_3.f03. This can be turned into wrong code testcase on both mainline and gcc11 if the runtime call is removed, so I filled PR 103662 for it. There is TBAA mismatch for structure produced in FE. Second is issue with GOMP where Fortran marks certain parameters as non-escaping and then makes them escape via GOMP_parallel. For this I disabled the use of escape info in verify_arg which also disables the useful transform on perdida but still does useful work for e.g. GCC error handling. I will work on this incrementally. Bootstrapped/regtested x86_64-linux, lto-bootstrapped and also tested with clang build. I plan to commit this tomorrow if there are no complains (the patch is not completely short but conceptualy simple and handles a lot of common cases). gcc/ChangeLog: 2021-12-12 Jan Hubicka <hubicka@ucw.cz> PR ipa/103585 * ipa-modref-tree.c (modref_access_node::range_info_useful_p): Handle MODREF_GLOBAL_MEMORY_PARM. (modref_access_node::dump): Likewise. (modref_access_node::get_call_arg): Likewise. * ipa-modref-tree.h (enum modref_special_parms): Add MODREF_GLOBAL_MEMORY_PARM. (modref_access_node::useful_for_kill): Handle MODREF_GLOBAL_MEMORY_PARM. (modref:tree::merge): Add promote_unknown_to_global. * ipa-modref.c (verify_arg):New function. (may_access_nonescaping_parm_p): New function. (modref_access_analysis::record_global_memory_load): New member function. (modref_access_analysis::record_global_memory_store): Likewise. (modref_access_analysis::process_fnspec): Distingush global and local memory. (modref_access_analysis::analyze_call): Likewise. * tree-ssa-alias.c (ref_may_access_global_memory_p): New function. (modref_may_conflict): Use it. gcc/testsuite/ChangeLog: 2021-12-12 Jan Hubicka <hubicka@ucw.cz> * gcc.dg/analyzer/data-model-1.c: Disable ipa-modref. * gcc.dg/uninit-38.c: Likewise. * gcc.dg/uninit-pr98578.c: Liewise.
next prev parent reply other threads:[~2021-12-14 15:51 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-11 19:25 [Bug fortran/103662] New: " hubicka at gcc dot gnu.org 2021-12-12 8:32 ` [Bug fortran/103662] " hubicka at gcc dot gnu.org 2021-12-14 15:51 ` cvs-commit at gcc dot gnu.org [this message] 2021-12-14 18:27 ` anlauf at gcc dot gnu.org 2021-12-14 18:34 ` hubicka at kam dot mff.cuni.cz 2021-12-14 21:53 ` seurer at gcc dot gnu.org 2021-12-15 9:08 ` clyon at gcc dot gnu.org 2022-01-04 9:32 ` rguenth at gcc dot gnu.org 2022-01-04 9:33 ` [Bug fortran/103662] [12 Regression] " rguenth at gcc dot gnu.org 2022-01-17 12:48 ` rguenth at gcc dot gnu.org 2022-01-17 17:36 ` hubicka at kam dot mff.cuni.cz 2022-01-18 14:09 ` rguenth at gcc dot gnu.org 2022-03-22 11:50 ` jakub at gcc dot gnu.org 2022-03-24 14:48 ` jakub at gcc dot gnu.org 2022-04-18 18:21 ` mikael at gcc dot gnu.org 2022-04-18 18:23 ` mikael at gcc dot gnu.org 2022-04-19 13:46 ` jakub at gcc dot gnu.org 2022-04-19 14:07 ` jakub at gcc dot gnu.org 2022-04-19 15:27 ` rguenth at gcc dot gnu.org 2022-04-19 16:12 ` mikael at gcc dot gnu.org 2022-04-19 16:51 ` jakub at gcc dot gnu.org 2022-04-20 10:16 ` hubicka at kam dot mff.cuni.cz 2022-04-24 13:32 ` cvs-commit at gcc dot gnu.org 2022-04-25 7:50 ` rguenth at gcc dot gnu.org 2022-04-25 11:32 ` cvs-commit at gcc dot gnu.org 2022-04-26 7:18 ` cvs-commit at gcc dot gnu.org 2022-04-26 14:57 ` hubicka at kam dot mff.cuni.cz 2022-04-27 9:36 ` 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-103662-4-PBspOqHr9K@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).