]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PR115458][LRA]: Run split sub-pass more times
authorVladimir N. Makarov <vmakarov@redhat.com>
Tue, 25 Feb 2025 20:01:15 +0000 (15:01 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Tue, 25 Feb 2025 20:04:50 +0000 (15:04 -0500)
commit2341f675edadd6370147d2bc55ca7761a7ecfaa1
tree4b96fc958ea2f747355e8a314a69cd103d80a397
parent0bb431d0a77cf8dc790b9c61539b3eb6ab1710f0
[PR115458][LRA]: Run split sub-pass more times

  In this PR case LRA needs to provide too many hard regs for insn
reloads, where some reload pseudos require 8 aligned regs for
themselves.  As the last attempt, LRA tries to split live ranges of
hard regs for insn reload pseudos.  It is a very rare case.  An
inheritance pseudo involving a reload pseudo of the insn can be
spilled in the assignment sub-pass run right after splitting and we need
to run split sub-pass for the inheritance pseudo now.

gcc/ChangeLog:

PR target/115458
* lra-int.h (LRA_MAX_FAILED_SPLITS): Define and check its value.
(lra_split_hard_reg_for): Change prototype.
* lra.cc (lra): Try to split hard reg range several times after a
failure.
* lra-assigns.cc (lra_split_hard_reg_for): Add an arg, a flag of
giving up.  Report asm error and nullify the asm insn depending on
the arg value.

gcc/testsuite/ChangeLog:

PR target/115458
* g++.target/riscv/pr115458.C: New.
gcc/lra-assigns.cc
gcc/lra-int.h
gcc/lra.cc
gcc/testsuite/g++.target/riscv/pr115458.C [new file with mode: 0644]