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 <hubi...@gcc.gnu.org>:

https://gcc.gnu.org/g:e93809f62363ba4b233858005aef652fb550e896

commit r12-5915-ge93809f62363ba4b233858005aef652fb550e896
Author: Jan Hubicka <j...@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  <hubi...@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 via email to