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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexander Monakov <amona...@gcc.gnu.org>:

https://gcc.gnu.org/g:733a1b777f16cd397b43a242d9c31761f66d3da8

commit r13-5154-g733a1b777f16cd397b43a242d9c31761f66d3da8
Author: Alexander Monakov <amona...@ispras.ru>
Date:   Fri Jan 13 21:04:02 2023 +0300

    sched-deps: do not schedule pseudos across calls [PR108117]

    Scheduling across calls in the pre-RA scheduler is problematic: we do
    not take liveness info into account, and are thus prone to extending
    lifetime of a pseudo over the loop, requiring a callee-saved hardreg
    or causing a spill.

    If current function called a setjmp, lifting an assignment over a call
    may be incorrect if a longjmp would happen before the assignment.

    Thanks to Jose Marchesi for testing on AArch64.

    gcc/ChangeLog:

            PR rtl-optimization/108117
            PR rtl-optimization/108132
            * sched-deps.cc (deps_analyze_insn): Do not schedule across
            calls before reload.

    gcc/testsuite/ChangeLog:

            PR rtl-optimization/108117
            PR rtl-optimization/108132
            * gcc.dg/pr108117.c: New test.

Reply via email to