Tom Stellard | f3b2a1e | 2013-02-06 17:32:29 +0000 | [diff] [blame] | 1 | //===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===// |
Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | /// \file |
Matt Arsenault | 0c90e95 | 2015-11-06 18:17:45 +0000 | [diff] [blame] | 11 | /// \brief Interface to describe a layout of a stack frame on an AMDGPU target. |
Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
Eugene Zelenko | 2bc2f33 | 2016-12-09 22:06:55 +0000 | [diff] [blame] | 14 | |
Matt Arsenault | 0c90e95 | 2015-11-06 18:17:45 +0000 | [diff] [blame] | 15 | #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H |
| 16 | #define LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H |
Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 17 | |
David Blaikie | 1be62f0 | 2017-11-03 22:32:11 +0000 | [diff] [blame] | 18 | #include "llvm/CodeGen/TargetFrameLowering.h" |
Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 19 | |
| 20 | namespace llvm { |
| 21 | |
| 22 | /// \brief Information about the stack frame layout on the AMDGPU targets. |
| 23 | /// |
| 24 | /// It holds the direction of the stack growth, the known stack alignment on |
| 25 | /// entry to each function, and the offset to the locals area. |
| 26 | /// See TargetFrameInfo for more comments. |
| 27 | class AMDGPUFrameLowering : public TargetFrameLowering { |
| 28 | public: |
| 29 | AMDGPUFrameLowering(StackDirection D, unsigned StackAl, int LAO, |
| 30 | unsigned TransAl = 1); |
Eugene Zelenko | 2bc2f33 | 2016-12-09 22:06:55 +0000 | [diff] [blame] | 31 | ~AMDGPUFrameLowering() override; |
Tom Stellard | f3b2a1e | 2013-02-06 17:32:29 +0000 | [diff] [blame] | 32 | |
| 33 | /// \returns The number of 32-bit sub-registers that are used when storing |
| 34 | /// values to the stack. |
Craig Topper | ee7b0f3 | 2014-04-30 05:53:27 +0000 | [diff] [blame] | 35 | unsigned getStackWidth(const MachineFunction &MF) const; |
Tom Stellard | 75aadc2 | 2012-12-11 21:25:42 +0000 | [diff] [blame] | 36 | }; |
Eugene Zelenko | 2bc2f33 | 2016-12-09 22:06:55 +0000 | [diff] [blame] | 37 | |
| 38 | } // end namespace llvm |
| 39 | |
| 40 | #endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H |