aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-reference.c
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2021-02-13 12:13:08 -0800
committerJim Wilson <jimw@sifive.com>2021-02-13 12:13:08 -0800
commita4953810bac524e19126a2745c75fed58db962c2 (patch)
tree3e20f457a714b6bf09c330ee55f46fe24260dac3 /gcc/ipa-reference.c
parent05402ca65a6696a8f20a3dbcb18f47ba3bdfa268 (diff)
downloadgcc-a4953810bac524e19126a2745c75fed58db962c2.zip
gcc-a4953810bac524e19126a2745c75fed58db962c2.tar.gz
gcc-a4953810bac524e19126a2745c75fed58db962c2.tar.bz2
RISC-V: Shorten memrefs improvement, partial fix 97417.
We already have a check for riscv_shorten_memrefs in riscv_address_cost. This adds the same check to riscv_rtx_costs. Making this work also requires a change to riscv_compressed_lw_address_p to work before reload by checking the offset and assuming any pseudo reg is OK. Testing shows that this consistently gives small code size reductions. gcc/ PR target/97417 * config/riscv/riscv.c (riscv_compressed_lw_address_p): Drop early exit when !reload_completed. Only perform check for compressed reg if reload_completed. (riscv_rtx_costs): In MEM case, when optimizing for size and shorten memrefs, if not compressible, then increase cost.
Diffstat (limited to 'gcc/ipa-reference.c')
0 files changed, 0 insertions, 0 deletions