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 tree-optimization/103665] insert_trap in gimple-isolate-paths interferes badly with modref, pure-const and other optimizations
Date: Sun, 12 Dec 2021 10:38:54 +0000	[thread overview]
Message-ID: <bug-103665-4-kkywVIMxbr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103665-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103665

--- Comment #1 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:e93809f62363ba4b233858005aef652fb550e896

commit r12-5915-ge93809f62363ba4b233858005aef652fb550e896
Author: Jan Hubicka <jh@suse.cz>
Date:   Sun Dec 12 11:38:13 2021 +0100

    Terminate BB analysis on NULL memory access in ipa-pure-const and
ipa-modref

    As discussed in the PR, we miss some optimization becuase
    gimple-ssa-isolate-paths turns NULL memory accesses to volatile and adds
    __builtin_trap after them.  This is seen as a side-effect by IPA analysis
    and additionally the (fully unreachable) builtin_trap is believed to load
    all global memory.

    I think we should think of less intrusive gimple representation of this,
but
    it is also easy enough to special case that in IPA analysers as done in
    this patch.  This is a win even if we improve the representation since
    gimple-ssa-isolate-paths is run late and this way we improve optimization
    early.

    This affects 1623 functions during cc1plus link.

    Bootstrapped/regtested x86_64-linux, comitted.

    gcc/ChangeLog:

    2021-12-12  Jan Hubicka  <hubicka@ucw.cz>

            PR ipa/103665
            * ipa-modref.c (modref_access_analysis::analyze): Terminate BB
            analysis on NULL memory access.
            * ipa-pure-const.c (analyze_function): Likewise.

  reply	other threads:[~2021-12-12 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 22:03 [Bug tree-optimization/103665] New: " hubicka at gcc dot gnu.org
2021-12-12 10:38 ` cvs-commit at gcc dot gnu.org [this message]
2022-01-04  9:36 ` [Bug tree-optimization/103665] " rguenth 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-103665-4-kkywVIMxbr@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: link
Be 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).