]> gcc.gnu.org Git - gcc.git/commit
sched-deps: do not schedule pseudos across calls [PR108117]
authorAlexander Monakov <amonakov@ispras.ru>
Fri, 13 Jan 2023 18:04:02 +0000 (21:04 +0300)
committerAlexander Monakov <amonakov@ispras.ru>
Fri, 13 Jan 2023 18:33:14 +0000 (21:33 +0300)
commit733a1b777f16cd397b43a242d9c31761f66d3da8
treeaecfd13965c06cc086077992307d31d06a75714f
parentb4b1c6aa6d28d3afe989a6dc3210606a3d55a367
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.
gcc/sched-deps.cc
gcc/testsuite/gcc.dg/pr108117.c [new file with mode: 0644]
This page took 0.071875 seconds and 6 git commands to generate.