[PATCH] D98101: [RISCV] Enable the LocalStackSlotAllocation pass support

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 5 21:35:31 PST 2021


StephenFan created this revision.
StephenFan added reviewers: asb, rogfer01, jrtc27, luismarques, HsiangKai, craig.topper.
Herald added subscribers: vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
StephenFan requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

For RISC-V, load/store(exclude vector load/store) instructions only has a 12 bit immediate operand. If the offset is out-of-range, it must make use of a temp register to make up this offset. If between these offsets, they have a small
(IsInt<12>) relative offset, LocalStackSlotAllocation pass can find a value as frame base register's value, and replace the origin offset with this register's value plus the relative offset.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98101

Files:
  llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
  llvm/lib/Target/RISCV/RISCVRegisterInfo.h
  llvm/test/CodeGen/RISCV/local-stack-allocation.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98101.328731.patch
Type: text/x-patch
Size: 7275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210306/ec7109f0/attachment.bin>


More information about the llvm-commits mailing list