10b57cec5SDimitry Andric //===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric /// \file 100b57cec5SDimitry Andric /// Interface to describe a layout of a stack frame on an AMDGPU target. 110b57cec5SDimitry Andric // 120b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H 150b57cec5SDimitry Andric #define LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric #include "llvm/CodeGen/TargetFrameLowering.h" 180b57cec5SDimitry Andric 190b57cec5SDimitry Andric namespace llvm { 200b57cec5SDimitry Andric 210b57cec5SDimitry Andric /// Information about the stack frame layout on the AMDGPU targets. 220b57cec5SDimitry Andric /// 230b57cec5SDimitry Andric /// It holds the direction of the stack growth, the known stack alignment on 240b57cec5SDimitry Andric /// entry to each function, and the offset to the locals area. 250b57cec5SDimitry Andric /// See TargetFrameInfo for more comments. 260b57cec5SDimitry Andric class AMDGPUFrameLowering : public TargetFrameLowering { 270b57cec5SDimitry Andric public: 288bcb0991SDimitry Andric AMDGPUFrameLowering(StackDirection D, Align StackAl, int LAO, 29*5ffd83dbSDimitry Andric Align TransAl = Align(1)); 300b57cec5SDimitry Andric ~AMDGPUFrameLowering() override; 310b57cec5SDimitry Andric 320b57cec5SDimitry Andric /// \returns The number of 32-bit sub-registers that are used when storing 330b57cec5SDimitry Andric /// values to the stack. 340b57cec5SDimitry Andric unsigned getStackWidth(const MachineFunction &MF) const; 350b57cec5SDimitry Andric }; 360b57cec5SDimitry Andric 370b57cec5SDimitry Andric } // end namespace llvm 380b57cec5SDimitry Andric 390b57cec5SDimitry Andric #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H 40