aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDILFrameLowering.h
blob: 934ee46821d220148060a314eb60f7e7db461a6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//===--------------------- AMDILFrameLowering.h -----------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//==-----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Interface to describe a layout of a stack frame on a AMDIL target machine
//
//===----------------------------------------------------------------------===//
#ifndef _AMDILFRAME_LOWERING_H_
#define _AMDILFRAME_LOWERING_H_

#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Target/TargetFrameLowering.h"

/// 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.

namespace llvm {
  class AMDGPUFrameLowering : public TargetFrameLowering {
    public:
      AMDGPUFrameLowering(StackDirection D, unsigned StackAl, int LAO, unsigned
          TransAl = 1);
      virtual ~AMDGPUFrameLowering();
      virtual int getFrameIndexOffset(const MachineFunction &MF,
                                         int FI) const;
      virtual const SpillSlot *
        getCalleeSavedSpillSlots(unsigned &NumEntries) const;
      virtual void emitPrologue(MachineFunction &MF) const;
      virtual void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
      virtual bool hasFP(const MachineFunction &MF) const;
  }; // class AMDGPUFrameLowering
} // namespace llvm
#endif // _AMDILFRAME_LOWERING_H_