13#ifndef LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H
27 virtual void anchor();
33 bool ForceFramePointer =
false;
39 signed char RestoreBasePointerOffset = 0;
47 unsigned CalleeSavedFrameSize = 0;
52 unsigned BytesToPopOnReturn = 0;
55 int ReturnAddrIndex = 0;
58 int FrameAddrIndex = 0;
62 int TailCallReturnAddrDelta = 0;
75 int VarArgsFrameIndex = 0;
77 int RegSaveFrameIndex = 0;
79 unsigned VarArgsGPOffset = 0;
81 unsigned VarArgsFPOffset = 0;
84 unsigned ArgumentStackSize = 0;
86 unsigned NumLocalDynamics = 0;
89 bool HasPushSequences =
false;
93 bool HasSEHFramePtrSave =
false;
97 int SEHFramePtrSaveIndex = 0;
101 bool IsSplitCSR =
false;
104 bool UsesRedZone =
false;
107 bool HasDynAlloca =
false;
110 bool HasPreallocatedCall =
false;
115 bool HasSwiftAsyncContext =
false;
119 bool HasVirtualTileReg =
false;
122 bool PadForPush2Pop2 =
false;
125 std::set<Register> CandidatesForPush2Pop2;
130 bool HasCFIAdjustCfa =
false;
134 std::optional<int> SwiftAsyncContextFrameIdx;
167 RestoreBasePointerOffset = -CalleeSavedFrameSize;
173 return WinEHXMMSlotInfo; }
223 return ForwardedMustTailRegParms;
248 return CandidatesForPush2Pop2.find(
Reg) != CandidatesForPush2Pop2.end();
251 CandidatesForPush2Pop2.insert(
Reg);
254 return CandidatesForPush2Pop2.size();
264 return SwiftAsyncContextFrameIdx;
269 auto Insert = PreallocatedIds.
insert({CS, PreallocatedIds.
size()});
274 return Insert.first->second;
278 PreallocatedStackSizes[Id] = StackSize;
282 assert(PreallocatedStackSizes[Id] != 0 &&
"stack size not set");
283 return PreallocatedStackSizes[Id];
291 assert(!PreallocatedArgOffsets[Id].empty() &&
"arg offsets not set");
292 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)
void setPadForPush2Pop2(bool V)
const DenseMap< int, unsigned > & getWinEHXMMSlotInfo() const
void setSwiftAsyncContextFrameIdx(int v)
void setHasVirtualTileReg(bool v)
unsigned getVarArgsGPOffset() const
bool isCandidateForPush2Pop2(Register Reg) 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
size_t getNumCandidatesForPush2Pop2() 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)
void addCandidateForPush2Pop2(Register Reg)
unsigned getCalleeSavedFrameSize() const
bool getHasPushSequences() const
bool padForPush2Pop2() 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...