[PATCH] D90018: [SVE] Return StackOffset for TargetFrameLowering::getFrameIndexReference.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 02:57:28 PDT 2020


sdesmalen created this revision.
sdesmalen added reviewers: efriedma, RKSimon, craig.topper, ctetreau, david-arm.
Herald added subscribers: kerbowa, luismarques, apazos, sameer.abuasal, pzheng, pengfei, s.egerton, lenary, Jim, psnobl, jocewei, PkmX, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, fedor.sergeev, hiraditya, tschuett, nhaehnle, jvesely, sdardis, jyknight, arsenm, jholewinski.
Herald added a project: LLVM.
sdesmalen requested review of this revision.
Herald added a subscriber: MaskRay.

To accommodate frame layouts that have both fixed and scalable objects
on the stack, describing a stack location or offset using a pointer + uint64_t
is not sufficient. For this reason, we've introduced the StackOffset class,
which models both the fixed- and scalable sized offsets.

The TargetFrameLowering::getFrameIndexReference is made to return a StackOffset,
so that this can be used in other interfaces, such as to eliminate frame indices
in PEI or to emit Debug locations for variables on the stack.

This patch is purely mechanical and doesn't change the behaviour of how
the result of this function is used for fixed-sized offsets. The patch adds
various checks to assert that the offset has no scalable component, as frame
offsets with a scalable component are not yet supported in various places.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90018

Files:
  llvm/include/llvm/CodeGen/TargetFrameLowering.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/WinException.cpp
  llvm/lib/CodeGen/GCRootLowering.cpp
  llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
  llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp
  llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
  llvm/lib/Target/AArch64/AArch64FrameLowering.h
  llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
  llvm/lib/Target/AMDGPU/R600FrameLowering.cpp
  llvm/lib/Target/AMDGPU/R600FrameLowering.h
  llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
  llvm/lib/Target/AMDGPU/R600InstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
  llvm/lib/Target/AMDGPU/SIFrameLowering.h
  llvm/lib/Target/ARM/ARMFrameLowering.cpp
  llvm/lib/Target/ARM/ARMFrameLowering.h
  llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
  llvm/lib/Target/Hexagon/HexagonFrameLowering.h
  llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp
  llvm/lib/Target/Mips/MipsSEFrameLowering.cpp
  llvm/lib/Target/Mips/MipsSEFrameLowering.h
  llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp
  llvm/lib/Target/NVPTX/NVPTXFrameLowering.h
  llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp
  llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
  llvm/lib/Target/RISCV/RISCVFrameLowering.h
  llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
  llvm/lib/Target/Sparc/SparcFrameLowering.cpp
  llvm/lib/Target/Sparc/SparcFrameLowering.h
  llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
  llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
  llvm/lib/Target/SystemZ/SystemZFrameLowering.h
  llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
  llvm/lib/Target/VE/VEFrameLowering.cpp
  llvm/lib/Target/VE/VEFrameLowering.h
  llvm/lib/Target/VE/VERegisterInfo.cpp
  llvm/lib/Target/X86/X86FrameLowering.cpp
  llvm/lib/Target/X86/X86FrameLowering.h
  llvm/lib/Target/X86/X86RegisterInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90018.300201.patch
Type: text/x-patch
Size: 54343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201023/c744cd20/attachment-0001.bin>


More information about the llvm-commits mailing list