13#ifndef LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H
26 virtual void anchor();
32 bool ForceFramePointer =
false;
38 signed char RestoreBasePointerOffset = 0;
46 unsigned CalleeSavedFrameSize = 0;
51 unsigned BytesToPopOnReturn = 0;
54 int ReturnAddrIndex = 0;
57 int FrameAddrIndex = 0;
61 int TailCallReturnAddrDelta = 0;
74 int VarArgsFrameIndex = 0;
76 int RegSaveFrameIndex = 0;
78 unsigned VarArgsGPOffset = 0;
80 unsigned VarArgsFPOffset = 0;
83 unsigned ArgumentStackSize = 0;
85 unsigned NumLocalDynamics = 0;
88 bool HasPushSequences =
false;
92 bool HasSEHFramePtrSave =
false;
96 int SEHFramePtrSaveIndex = 0;
100 bool IsSplitCSR =
false;
103 bool UsesRedZone =
false;
106 bool HasDynAlloca =
false;
109 bool HasPreallocatedCall =
false;
114 bool HasSwiftAsyncContext =
false;
118 bool HasVirtualTileReg =
false;
123 bool HasCFIAdjustCfa =
false;
127 std::optional<int> SwiftAsyncContextFrameIdx;
160 RestoreBasePointerOffset = -CalleeSavedFrameSize;
166 return WinEHXMMSlotInfo; }
214 return ForwardedMustTailRegParms;
242 return SwiftAsyncContextFrameIdx;
247 auto Insert = PreallocatedIds.
insert({CS, PreallocatedIds.
size()});
252 return Insert.first->second;
256 PreallocatedStackSizes[Id] = StackSize;
260 assert(PreallocatedStackSizes[Id] != 0 &&
"stack size not set");
261 return PreallocatedStackSizes[Id];
269 assert(!PreallocatedArgOffsets[Id].empty() &&
"arg offsets not set");
270 return PreallocatedArgOffsets[Id];
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Allocate memory in an ever growing pool, as if by bump-pointer.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Representation of each machine instruction.
Wrapper class representing virtual and physical registers.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void assign(size_type NumElts, ValueParamT Elt)
reference emplace_back(ArgTypes &&... Args)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
TargetSubtargetInfo - Generic base class for all target subtargets.
LLVM Value Representation.
X86MachineFunctionInfo - This class is derived from MachineFunction and contains private X86 target-s...
void setBytesToPopOnReturn(unsigned bytes)
bool getForceFramePointer() const
void setFAIndex(int Index)
bool hasDynAlloca() const
void setHasCFIAdjustCfa(bool v)
const DenseMap< int, unsigned > & getWinEHXMMSlotInfo() const
void setSwiftAsyncContextFrameIdx(int v)
void setHasVirtualTileReg(bool v)
unsigned getVarArgsGPOffset() const
unsigned getArgumentStackSize() const
X86MachineFunctionInfo(const X86MachineFunctionInfo &)=default
int getRegSaveFrameIndex() const
ArrayRef< size_t > getPreallocatedArgOffsets(const size_t Id)
void setHasSwiftAsyncContext(bool v)
Register getSRetReturnReg() const
void setIsSplitCSR(bool s)
void setVarArgsGPOffset(unsigned Offset)
void setRegSaveFrameIndex(int Idx)
void setForceFramePointer(bool forceFP)
Register getGlobalBaseReg() const
void setSRetReturnReg(Register Reg)
unsigned getVarArgsFPOffset() const
bool hasVirtualTileReg() const
void setHasDynAlloca(bool v)
int getRestoreBasePointerOffset() const
void setArgumentStackSize(unsigned size)
X86MachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
X86MachineFunctionInfo()=default
void setPreallocatedArgOffsets(size_t Id, ArrayRef< size_t > AO)
void setRestoreBasePointer(unsigned CalleeSavedFrameSize)
int getSEHFramePtrSaveIndex() const
SmallVectorImpl< ForwardedRegister > & getForwardedMustTailRegParms()
void setTCReturnAddrDelta(int delta)
bool hasCFIAdjustCfa() const
int getVarArgsFrameIndex() const
int getTCReturnAddrDelta() const
void setRestoreBasePointer(const MachineFunction *MF)
std::optional< int > getSwiftAsyncContextFrameIdx() const
bool getHasSEHFramePtrSave() const
void setHasPreallocatedCall(bool v)
void incNumLocalDynamicTLSAccesses()
size_t getPreallocatedStackSize(const size_t Id)
void setGlobalBaseReg(Register Reg)
unsigned getNumLocalDynamicTLSAccesses() const
void setPreallocatedStackSize(size_t Id, size_t StackSize)
void setVarArgsFrameIndex(int Idx)
DenseMap< int, unsigned > & getWinEHXMMSlotInfo()
void setUsesRedZone(bool V)
bool hasPreallocatedCall() const
bool hasSwiftAsyncContext() const
void setHasSEHFramePtrSave(bool V)
bool getRestoreBasePointer() const
MachineInstr * getStackPtrSaveMI() const
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
unsigned getBytesToPopOnReturn() const
void setVarArgsFPOffset(unsigned Offset)
unsigned getCalleeSavedFrameSize() const
bool getHasPushSequences() const
void setStackPtrSaveMI(MachineInstr *MI)
bool getUsesRedZone() const
void setCalleeSavedFrameSize(unsigned bytes)
void setRAIndex(int Index)
void setSEHFramePtrSaveIndex(int Index)
size_t getPreallocatedIdForCallSite(const Value *CS)
void setHasPushSequences(bool HasPush)
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...