aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2025-03-18 08:25:49 -0700
committerGitHub <noreply@github.com>2025-03-18 08:25:49 -0700
commit2175c6cb38e7bb7701219a5081f22e7877ab0380 (patch)
treee16ba6aea6f4453752198c8e6bda2c6cc5ee1703 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parent6ada38b248ef80a224fd2f48841b22ae3bbf5a7b (diff)
downloadllvm-2175c6cb38e7bb7701219a5081f22e7877ab0380.zip
llvm-2175c6cb38e7bb7701219a5081f22e7877ab0380.tar.gz
llvm-2175c6cb38e7bb7701219a5081f22e7877ab0380.tar.bz2
[RISCV] Set AllocationPriority in line with LMUL (#131176)
This mechanism causes the greedy register allocator to prefer allocating register classes with higher priority first. This helps to ensure that high LMUL registers obtain a register without having to go through the eviction mechanism. In practice, it seems to cause a bunch of code churn, and some minor improvement around widening and narrowing operations. In a few of the widening tests, we have what look like code size regressions because we end up with two smaller register class copies instead of one larger one after the instruction. However, in any larger code sequence, these are likely to be folded into the producing instructions. (But so were the wider copies after the operation.) Two observations: 1) We're not setting the greedy-regclass-priority-trumps-globalness flag on the register class, so this doesn't help long mask ranges. I thought about doing that, but the benefit is non-obvious, so I decided it was worth a separate change at minimum. 2) We could arguably set the priority higher for the register classes that exclude v0. I tried that, and it caused a whole bunch of further churn. I may return to it in a separate patch.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions