aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@redhat.com>2025-03-10 16:26:59 -0400
committerVladimir N. Makarov <vmakarov@redhat.com>2025-03-10 16:27:51 -0400
commite355fe414aa3aaf215c7dd9dd789ce217a1b458c (patch)
tree38cafa529d783837179421778dcf3c497f4b8127 /gcc/config.gcc
parent40a4f3dead623db86bc8f7255cbe524701f4aeb0 (diff)
downloadgcc-e355fe414aa3aaf215c7dd9dd789ce217a1b458c.zip
gcc-e355fe414aa3aaf215c7dd9dd789ce217a1b458c.tar.gz
gcc-e355fe414aa3aaf215c7dd9dd789ce217a1b458c.tar.bz2
[PR114991][IRA]: Improve reg equiv invariant calculation
In PR test case IRA preferred to allocate hard reg to a pseudo instead of its equivalence. This resulted in allocating caller-saved hard reg and generating save/restore insns in the function prologue/epilogue. The equivalence is an invariant (stack pointer plus offset) and the pseudo is used mostly as memory address. This happened as there was no simplification of insn after the invariant substitution. The patch adds the necessary code. gcc/ChangeLog: PR target/114991 * ira-costs.cc (equiv_can_be_consumed_p): Add new argument invariant_p. Add code for dealing with the invariant. (calculate_equiv_gains): Don't consider init insns. Pass the new argument to equiv_can_be_consumed_p. Don't treat invariant as memory. gcc/testsuite/ChangeLog: PR target/114991 * gcc.target/aarch64/pr114991.c: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions