LLVM: lib/Target/XCore/XCoreMachineFunctionInfo.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H
15
19#include
20#include
21#include
22
23namespace llvm {
24
25
26
28 bool LRSpillSlotSet = false;
29 int LRSpillSlot;
30 bool FPSpillSlotSet = false;
31 int FPSpillSlot;
32 bool EHSpillSlotSet = false;
33 int EHSpillSlot[2];
34 unsigned ReturnStackOffset;
35 bool ReturnStackOffsetSet = false;
36 int VarArgsFrameIndex = 0;
37 mutable int CachedEStackSize = -1;
38 std::vector<std::pair<MachineBasicBlock::iterator, CalleeSavedInfo>>
39 SpillLabels;
40
41 virtual void anchor();
42
43public:
45
48
52 const override;
53
55
58
62 assert(LRSpillSlotSet && "LR Spill slot not set");
63 return LRSpillSlot;
64 }
65
69 assert(FPSpillSlotSet && "FP Spill slot not set");
70 return FPSpillSlot;
71 }
72
76 assert(EHSpillSlotSet && "EH Spill slot not set");
77 return EHSpillSlot;
78 }
79
81 assert(!ReturnStackOffsetSet && "Return stack offset set twice");
82 ReturnStackOffset = value;
83 ReturnStackOffsetSet = true;
84 }
85
87 assert(ReturnStackOffsetSet && "Return stack offset not set");
88 return ReturnStackOffset;
89 }
90
92
93 std::vector<std::pair<MachineBasicBlock::iterator, CalleeSavedInfo>> &
95 return SpillLabels;
96 }
97};
98
99}
100
101#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
TargetSubtargetInfo - Generic base class for all target subtargets.
int getLRSpillSlot() const
Definition XCoreMachineFunctionInfo.h:61
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
bool hasEHSpillSlot()
Definition XCoreMachineFunctionInfo.h:74
void setVarArgsFrameIndex(int off)
Definition XCoreMachineFunctionInfo.h:56
~XCoreFunctionInfo() override=default
const int * getEHSpillSlot() const
Definition XCoreMachineFunctionInfo.h:75
const int * createEHSpillSlot(MachineFunction &MF)
void setReturnStackOffset(unsigned value)
Definition XCoreMachineFunctionInfo.h:80
bool isLargeFrame(const MachineFunction &MF) const
int getVarArgsFrameIndex() const
Definition XCoreMachineFunctionInfo.h:57
int createLRSpillSlot(MachineFunction &MF)
int getFPSpillSlot() const
Definition XCoreMachineFunctionInfo.h:68
int createFPSpillSlot(MachineFunction &MF)
unsigned getReturnStackOffset() const
Definition XCoreMachineFunctionInfo.h:86
bool hasLRSpillSlot()
Definition XCoreMachineFunctionInfo.h:60
std::vector< std::pair< MachineBasicBlock::iterator, CalleeSavedInfo > > & getSpillLabels()
Definition XCoreMachineFunctionInfo.h:94
XCoreFunctionInfo()=default
XCoreFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
Definition XCoreMachineFunctionInfo.h:46
bool hasFPSpillSlot()
Definition XCoreMachineFunctionInfo.h:67
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...