1 //===--------------------- AMDILFrameLowering.h -----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //==-----------------------------------------------------------------------===//
10 // The LLVM Compiler Infrastructure
12 // This file is distributed under the University of Illinois Open Source
13 // License. See LICENSE.TXT for details.
15 //===----------------------------------------------------------------------===//
17 // Interface to describe a layout of a stack frame on a AMDIL target machine
19 //===----------------------------------------------------------------------===//
20 #ifndef _AMDILFRAME_LOWERING_H_
21 #define _AMDILFRAME_LOWERING_H_
23 #include "llvm/CodeGen/MachineFunction.h"
24 #include "llvm/Target/TargetFrameLowering.h"
26 /// Information about the stack frame layout on the AMDGPU targets. It holds
27 /// the direction of the stack growth, the known stack alignment on entry to
28 /// each function, and the offset to the locals area.
29 /// See TargetFrameInfo for more comments.
32 class AMDGPUFrameLowering
: public TargetFrameLowering
{
34 AMDGPUFrameLowering(StackDirection D
, unsigned StackAl
, int LAO
, unsigned
36 virtual ~AMDGPUFrameLowering();
37 virtual int getFrameIndexOffset(const MachineFunction
&MF
,
39 virtual const SpillSlot
*
40 getCalleeSavedSpillSlots(unsigned &NumEntries
) const;
41 virtual void emitPrologue(MachineFunction
&MF
) const;
42 virtual void emitEpilogue(MachineFunction
&MF
, MachineBasicBlock
&MBB
) const;
43 virtual bool hasFP(const MachineFunction
&MF
) const;
44 }; // class AMDGPUFrameLowering
46 #endif // _AMDILFRAME_LOWERING_H_