2013-02-06 17:32:29 +00:00
|
|
|
//===--------------------- AMDGPUFrameLowering.h ----------------*- C++ -*-===//
|
2012-12-11 21:25:42 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
|
|
|
/// \brief Interface to describe a layout of a stack frame on a AMDIL target
|
|
|
|
/// machine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_R600_AMDGPUFRAMELOWERING_H
|
|
|
|
#define LLVM_LIB_TARGET_R600_AMDGPUFRAMELOWERING_H
|
2012-12-11 21:25:42 +00:00
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineFunction.h"
|
|
|
|
#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);
|
|
|
|
virtual ~AMDGPUFrameLowering();
|
2013-02-06 17:32:29 +00:00
|
|
|
|
|
|
|
/// \returns The number of 32-bit sub-registers that are used when storing
|
|
|
|
/// values to the stack.
|
2014-04-30 05:53:27 +00:00
|
|
|
unsigned getStackWidth(const MachineFunction &MF) const;
|
2014-04-29 07:57:24 +00:00
|
|
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const override;
|
|
|
|
const SpillSlot *
|
|
|
|
getCalleeSavedSpillSlots(unsigned &NumEntries) const override;
|
|
|
|
void emitPrologue(MachineFunction &MF) const override;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
|
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
2012-12-11 21:25:42 +00:00
|
|
|
};
|
|
|
|
} // namespace llvm
|
2014-08-13 16:26:38 +00:00
|
|
|
#endif
|