First step of huge frame-related refactoring: move emit{Prologue,Epilogue} out of...
[oota-llvm.git] / lib / Target / XCore / XCoreFrameInfo.h
1 //===-- XCoreFrameInfo.h - Frame info for XCore Target -----------*- C++ -*-==//
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 // This file contains XCore frame information that doesn't fit anywhere else
11 // cleanly...
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef XCOREFRAMEINFO_H
16 #define XCOREFRAMEINFO_H
17
18 #include "llvm/Target/TargetFrameInfo.h"
19 #include "llvm/Target/TargetMachine.h"
20
21 namespace llvm {
22   class XCoreSubtarget;
23
24   class XCoreFrameInfo: public TargetFrameInfo {
25     const XCoreSubtarget &STI;
26   public:
27     XCoreFrameInfo(const XCoreSubtarget &STI);
28
29     /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
30     /// the function.
31     void emitPrologue(MachineFunction &MF) const;
32     void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
33
34     //! Stack slot size (4 bytes)
35     static int stackSlotSize() {
36       return 4;
37     }
38   };
39 }
40
41 #endif // XCOREFRAMEINFO_H