aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-mca/llvm-mca.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2024-05-22 13:38:39 -0700
committerGitHub <noreply@github.com>2024-05-22 13:38:39 -0700
commit25b65be43df56c1b7bea3fe2596fb36c2788d7af (patch)
treecb5768db707d3bee380410786976e29c8edf6dc6 /llvm/tools/llvm-mca/llvm-mca.cpp
parent6de14c61e40aa12b85d97bdd91e037a2def824d2 (diff)
downloadllvm-25b65be43df56c1b7bea3fe2596fb36c2788d7af.zip
llvm-25b65be43df56c1b7bea3fe2596fb36c2788d7af.tar.gz
llvm-25b65be43df56c1b7bea3fe2596fb36c2788d7af.tar.bz2
[RISCV][LSR] Account for temporary register for base addition (#92296)
An LSR formula may require the addition of multiple base or scale registers, this sum reduction requires a temporary register to perform. Since the formulas are independent, we only need one temporary, regardless of the number of unique formula. Each formula can reuse the same temporary. A later CSE pass may come along and combine sub-expressions - but then the register pressure would be that passes problem to consider. This change fixes up the costing in the RISCV specific way, but this is really a generic LSR problem. I just didn't feel like fighting with LSR and dealing with all the various targets swinging slightly in hard to reason about ways. This problem is more pronounced on RISCV than any other target due to our lack of addressing modes. This change is not hugely important on it's own, but I have an upcoming change to add support fo shNadd in LSR which biases us fairly strongly towards adding more "base adds". Without this change, we see net regression due to the increase in register pressure which is not accounted for.
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
0 files changed, 0 insertions, 0 deletions