aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixed-value.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2024-02-23 14:12:55 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2024-02-23 14:12:55 +0000
commit9f105cfdc1bca6c9224384b3044c4ca5894e1e4c (patch)
tree91355f6fe32e8cc43c07040cda7f7fc98dccecfa /gcc/fixed-value.h
parent8a16e06da97f51574cfad17e2cece2e58571305d (diff)
downloadgcc-9f105cfdc1bca6c9224384b3044c4ca5894e1e4c.zip
gcc-9f105cfdc1bca6c9224384b3044c4ca5894e1e4c.tar.gz
gcc-9f105cfdc1bca6c9224384b3044c4ca5894e1e4c.tar.bz2
aarch64: Tighten early-ra chain test for wide registers [PR113295]
Most code in early-ra used is_chain_candidate to check whether we should chain two allocnos. This included both tests that matter for correctness and tests for certain heuristics. Once that test passes for one pair of allocnos, we test whether it's safe to chain the containing groups (which might contain multiple allocnos for x2, x3 and x4 modes). This test used an inline test for correctness only, deliberately skipping the heuristics. However, this instance of the test was missing some handling of equivalent allocnos. This patch fixes things by making is_chain_candidate take a strictness parameter: correctness only, or correctness + heuristics. It then makes the group-chaining test use the correctness version rather than trying to replicate it inline. gcc/ PR target/113295 * config/aarch64/aarch64-early-ra.cc (early_ra::test_strictness): New enum. (early_ra::is_chain_candidate): Add a strictness parameter to control whether only correctness matters, or whether both correctness and heuristics should be used. Handle multiple levels of equivalence. (early_ra::find_related_start): Update call accordingly. (early_ra::strided_polarity_pref): Likewise. (early_ra::form_chains): Likewise. (early_ra::try_to_chain_allocnos): Use is_chain_candidate in correctness mode rather than trying to inline the test. gcc/testsuite/ PR target/113295 * gcc.target/aarch64/pr113295-2.c: New test.
Diffstat (limited to 'gcc/fixed-value.h')
0 files changed, 0 insertions, 0 deletions