1 //===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Interface to describe a layout of a stack frame on an AMDGPU target.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
17 #include "llvm/CodeGen/TargetFrameLowering.h"
21 /// Information about the stack frame layout on the AMDGPU targets.
23 /// It holds the direction of the stack growth, the known stack alignment on
24 /// entry to each function, and the offset to the locals area.
25 /// See TargetFrameInfo for more comments.
26 class AMDGPUFrameLowering
: public TargetFrameLowering
{
28 AMDGPUFrameLowering(StackDirection D
, Align StackAl
, int LAO
,
29 Align TransAl
= Align::None());
30 ~AMDGPUFrameLowering() override
;
32 /// \returns The number of 32-bit sub-registers that are used when storing
33 /// values to the stack.
34 unsigned getStackWidth(const MachineFunction
&MF
) const;
37 } // end namespace llvm
39 #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H