]>
git.proxmox.com Git - rustc.git/blob - src/llvm/lib/Target/XCore/XCoreFrameLowering.h
1 //===-- XCoreFrameLowering.h - Frame info for XCore Target ------*- 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 // This file contains XCore frame information that doesn't fit anywhere else
13 //===----------------------------------------------------------------------===//
15 #ifndef XCOREFRAMEINFO_H
16 #define XCOREFRAMEINFO_H
18 #include "llvm/Target/TargetFrameLowering.h"
19 #include "llvm/Target/TargetMachine.h"
24 class XCoreFrameLowering
: public TargetFrameLowering
{
26 XCoreFrameLowering(const XCoreSubtarget
&STI
);
28 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
30 void emitPrologue(MachineFunction
&MF
) const;
31 void emitEpilogue(MachineFunction
&MF
, MachineBasicBlock
&MBB
) const;
33 bool spillCalleeSavedRegisters(MachineBasicBlock
&MBB
,
34 MachineBasicBlock::iterator MI
,
35 const std::vector
<CalleeSavedInfo
> &CSI
,
36 const TargetRegisterInfo
*TRI
) const;
37 bool restoreCalleeSavedRegisters(MachineBasicBlock
&MBB
,
38 MachineBasicBlock::iterator MI
,
39 const std::vector
<CalleeSavedInfo
> &CSI
,
40 const TargetRegisterInfo
*TRI
) const;
42 void eliminateCallFramePseudoInstr(MachineFunction
&MF
,
43 MachineBasicBlock
&MBB
,
44 MachineBasicBlock::iterator I
) const;
46 bool hasFP(const MachineFunction
&MF
) const;
48 void processFunctionBeforeCalleeSavedScan(MachineFunction
&MF
,
49 RegScavenger
*RS
= NULL
) const;
51 //! Stack slot size (4 bytes)
52 static int stackSlotSize() {
58 #endif // XCOREFRAMEINFO_H