aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2022-12-02 11:45:53 -0800
committerPhilip Reames <listmail@philipreames.com>2022-12-02 11:54:06 -0800
commitb77533306876fc807e58e355d95d848a0077131f (patch)
treefa04522efb3a92774d1e97e39c6a96eabbe56da5 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parent86fe4dfdb626d472f88bf8331da7cc98e9631cfe (diff)
downloadllvm-b77533306876fc807e58e355d95d848a0077131f.zip
llvm-b77533306876fc807e58e355d95d848a0077131f.tar.gz
llvm-b77533306876fc807e58e355d95d848a0077131f.tar.bz2
[RISCV] Fold low 12 bits into instruction during frame index elimination
Fold the low 12 bits of an immediate offset into the offset field of the using instruction. That using instruction will be a load, store, or addi which performs an add of a signed 12-bit immediate as part of it's operation. Splitting out the low bits allows the high bits to be generated via a single LUI instead of needing an LUI/ADDI pair. The codegen effect of this is mostly converting cases where "split addi" kicks in to using LUI + a folded offset. There are a couple of straight dynamic instruction count wins, and using a canonical LUI is probably better than a chain of SP adds if the dynamic instruction count is equal. Differential Revision: https://reviews.llvm.org/D139037
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions