diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-05-06 07:46:48 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-05-06 07:46:48 +0000 |
commit | 8ffa3150d30b90a11aba7d7bba3c6462b6461101 (patch) | |
tree | 7d48a218f64b22e0df6870cad3e5169bfba7fe89 /gcc/tree-vrp.c | |
parent | 2a3f79973f7ff22ab936b3919c31df5c704e1715 (diff) | |
download | gcc-8ffa3150d30b90a11aba7d7bba3c6462b6461101.zip gcc-8ffa3150d30b90a11aba7d7bba3c6462b6461101.tar.gz gcc-8ffa3150d30b90a11aba7d7bba3c6462b6461101.tar.bz2 |
Record equivalences for spill registers
If we decide to allocate a call-clobbered register R to a value that
is live across a call, LRA will create a new spill register TMPR,
insert:
TMPR <- R
before the call and
R <- TMPR
after it. But if we then failed to allocate a register to TMPR, we would
always spill it to the stack, even if R was known to be equivalent to
a constant or to some existing memory location. And on AArch64, we'd
always fail to allocate such a register for 128-bit Advanced SIMD modes,
since no registers of those modes are call-preserved.
This patch avoids the problem by copying the equivalence information
from the original pseudo to the spill register. It means that the
code for the testcase is as good with -O2 as it is with -O,
whereas previously the -O code was better.
[Based on the code ARM contributed in branches/ARM/sve-branch@247248]
2017-05-06 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* lra-constraints.c (lra_copy_reg_equiv): New function.
(split_reg): Use it to copy equivalence information from the
original register to the spill register.
gcc/testsuite/
* gcc.target/aarch64/spill_1.c: New test.
From-SVN: r247720
Diffstat (limited to 'gcc/tree-vrp.c')
0 files changed, 0 insertions, 0 deletions