[all-commits] [llvm/llvm-project] d57bba: [SVE] Return StackOffset for TargetFrameLowering::...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Thu Nov 5 03:03:20 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d57bba7cf831aa603d1f060a7a2d4ac55bdacdc9
      https://github.com/llvm/llvm-project/commit/d57bba7cf831aa603d1f060a7a2d4ac55bdacdc9
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

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

  Log Message:
  -----------
  [SVE] Return StackOffset for TargetFrameLowering::getFrameIndexReference.

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.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D90018




More information about the All-commits mailing list