2013-02-07 01:32:29 +08:00
|
|
|
//===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===//
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
2015-11-07 02:17:45 +08:00
|
|
|
/// \brief Interface to describe a layout of a stack frame on an AMDGPU target.
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2016-12-10 06:06:55 +08:00
|
|
|
|
2015-11-07 02:17:45 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|
2012-12-12 05:25:42 +08:00
|
|
|
|
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
/// \brief Information about the stack frame layout on the AMDGPU targets.
|
|
|
|
///
|
|
|
|
/// It holds the direction of the stack growth, the known stack alignment on
|
|
|
|
/// entry to each function, and the offset to the locals area.
|
|
|
|
/// See TargetFrameInfo for more comments.
|
|
|
|
class AMDGPUFrameLowering : public TargetFrameLowering {
|
|
|
|
public:
|
|
|
|
AMDGPUFrameLowering(StackDirection D, unsigned StackAl, int LAO,
|
|
|
|
unsigned TransAl = 1);
|
2016-12-10 06:06:55 +08:00
|
|
|
~AMDGPUFrameLowering() override;
|
2013-02-07 01:32:29 +08:00
|
|
|
|
|
|
|
/// \returns The number of 32-bit sub-registers that are used when storing
|
|
|
|
/// values to the stack.
|
2014-04-30 13:53:27 +08:00
|
|
|
unsigned getStackWidth(const MachineFunction &MF) const;
|
2016-06-24 14:30:11 +08:00
|
|
|
|
2015-08-15 10:32:35 +08:00
|
|
|
int getFrameIndexReference(const MachineFunction &MF, int FI,
|
|
|
|
unsigned &FrameReg) const override;
|
2016-06-24 14:30:11 +08:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const override {
|
|
|
|
return false;
|
|
|
|
}
|
2012-12-12 05:25:42 +08:00
|
|
|
};
|
2016-12-10 06:06:55 +08:00
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif // LLVM_LIB_TARGET_AMDGPU_AMDGPUFRAMELOWERING_H
|