aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-12-05 09:20:55 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-12-05 09:20:55 +0000
commit6e2e0ce6795c863e295eb33559f8dc0500297da3 (patch)
tree264a8e7c8451adb224f294c267dcd3457fae5f2d /gcc/tree-pass.h
parent1a84af19cd18730477dbceaebc45466c3fd77b60 (diff)
downloadgcc-6e2e0ce6795c863e295eb33559f8dc0500297da3.zip
gcc-6e2e0ce6795c863e295eb33559f8dc0500297da3.tar.gz
gcc-6e2e0ce6795c863e295eb33559f8dc0500297da3.tar.bz2
lra: Updates of biggest mode for hard regs [PR112278]
LRA keeps track of the biggest mode for both hard registers and pseudos. The updates assume that the modes are ordered, i.e. that we can tell whether one is no bigger than the other at compile time. That is (or at least seemed to be) a reasonable restriction for pseudos. But it isn't necessarily so for hard registers, since the uses of hard registers can be logically distinct. The testcase is an example of this. The biggest mode of hard registers is also special for other reasons. As the existing comment says: /* A reg can have a biggest_mode of VOIDmode if it was only ever seen as part of a multi-word register. In that case, just use the reg_rtx mode. Do the same also if the biggest mode was larger than a register or we can not compare the modes. Otherwise, limit the size to that of the biggest access in the function or to the natural mode at least. */ This patch applies the same approach to the updates. gcc/ PR rtl-optimization/112278 * lra-int.h (lra_update_biggest_mode): New function. * lra-coalesce.cc (merge_pseudos): Use it. * lra-lives.cc (process_bb_lives): Likewise. * lra.cc (new_insn_reg): Likewise. gcc/testsuite/ PR rtl-optimization/112278 * gcc.target/aarch64/sve/pr112278.c: New test.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions