13#ifndef LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
36 virtual void anchor();
45 bool hasThumb2 =
false;
51 unsigned ArgRegsSaveSize = 0;
54 unsigned ReturnRegsCount = 0;
58 bool HasStackFrame =
false;
62 bool RestoreSPFromFP =
false;
66 bool LRSpilled =
false;
70 unsigned FramePtrSpillOffset = 0;
83 unsigned GPRCS1Offset = 0;
84 unsigned GPRCS2Offset = 0;
85 unsigned DPRCS1Offset = 0;
89 unsigned FPCXTSaveSize = 0;
90 unsigned FRSaveSize = 0;
91 unsigned GPRCS1Size = 0;
92 unsigned GPRCS2Size = 0;
93 unsigned FPStatusSize = 0;
94 unsigned DPRCSAlignGapSize = 0;
95 unsigned DPRCS1Size = 0;
96 unsigned GPRCS3Size = 0;
105 unsigned NumAlignedDPRCS2Regs = 0;
107 unsigned PICLabelUId = 0;
110 int VarArgsFrameIndex = 0;
117 bool HasITBlocks =
false;
129 unsigned ArgumentStackSize = 0;
133 unsigned ArgumentStackToRestore = 0;
141 bool IsSplitCSR =
false;
147 int PromotedGlobalsIncrease = 0;
151 bool PreservesR0 =
false;
154 bool SignReturnAddress =
false;
158 bool SignReturnAddressAll =
false;
162 bool BranchTargetEnforcement =
false;
166 std::optional<unsigned> EstimatedFunctionSizeInBytes;
239 return EstimatedFunctionSizeInBytes;
242 EstimatedFunctionSizeInBytes = v;
254 return PICLabelUId++;
261 return ForwardedMustTailRegParms;
271 if (!CPEClones.insert(std::make_pair(CPCloneIdx, CPIdx)).second)
276 auto I = CPEClones.find(CloneIdx);
277 if (
I != CPEClones.end())
285 return CoalescedWeights.try_emplace(
MBB, 0).first;
292 PromotedGlobals.insert(GV);
295 return PromotedGlobals;
298 return PromotedGlobalsIncrease;
301 PromotedGlobalsIncrease = Sz;
315 if (!SignReturnAddress)
317 if (SignReturnAddressAll)
This file defines the DenseMap class.
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
bool hasStackFrame() const
bool isThumb2Function() const
unsigned getDPRCalleeSavedArea1Offset() const
void initPICLabelUId(unsigned UId)
unsigned getFPCXTSaveAreaSize() const
int getVarArgsFrameIndex() const
unsigned getGPRCalleeSavedArea2Offset() const
SmallVectorImpl< ForwardedRegister > & getForwardedMustTailRegParms()
unsigned getGPRCalleeSavedArea1Size() const
void setHasITBlocks(bool h)
int getPromotedConstpoolIncrease() const
SmallPtrSet< const GlobalVariable *, 2 > & getGlobalsPromotedToConstantPool()
void setArgumentStackToRestore(unsigned v)
unsigned getDPRCalleeSavedGapSize() const
bool branchTargetEnforcement() const
unsigned getDPRCalleeSavedArea1Size() const
unsigned createPICLabelUId()
void setLRIsSpilled(bool s)
void setDPRCalleeSavedArea1Offset(unsigned o)
unsigned getGPRCalleeSavedArea1Offset() const
void setPromotedConstpoolIncrease(int Sz)
void setGPRCalleeSavedArea2Size(unsigned s)
bool isThumb1OnlyFunction() const
bool shouldSignReturnAddress(bool SpillsLR) const
void setHasStackFrame(bool s)
DenseMap< unsigned, unsigned > EHPrologueRemappedRegs
bool isThumbFunction() const
void setFramePtrSpillOffset(unsigned o)
void setArgRegsSaveSize(unsigned s)
std::optional< unsigned > getEstimatedFunctionSizeInBytes() const
unsigned getGPRCalleeSavedArea2Size() const
unsigned getNumAlignedDPRCS2Regs() const
bool shouldSignReturnAddress() const
void setGPRCalleeSavedArea1Size(unsigned s)
unsigned getArgumentStackToRestore() const
void setFPCXTSaveAreaSize(unsigned s)
ARMFunctionInfo()=default
bool isCmseNSEntryFunction() const
bool isCmseNSCallFunction() const
unsigned getGPRCalleeSavedArea3Size() const
unsigned getFramePtrSpillOffset() const
void setReturnRegsCount(unsigned s)
void setVarArgsFrameIndex(int Index)
bool shouldRestoreSPFromFP() const
DenseMap< unsigned, unsigned > EHPrologueOffsetInRegs
unsigned getOriginalCPIdx(unsigned CloneIdx) const
void setFrameRecordSavedAreaSize(unsigned s)
unsigned getNumPICLabels() const
unsigned getArgRegsSaveSize() const
void setEstimatedFunctionSizeInBytes(unsigned v)
void recordCPEClone(unsigned CPIdx, unsigned CPCloneIdx)
void initializeBaseYamlFields(const yaml::ARMFunctionInfo &YamlMFI)
void markGlobalAsPromotedToConstantPool(const GlobalVariable *GV)
Indicate to the backend that GV has had its storage changed to inside a constant pool.
void setIsSplitCSR(bool s)
void setGPRCalleeSavedArea2Offset(unsigned o)
unsigned getFrameRecordSavedAreaSize() const
DenseMap< constMachineBasicBlock *, unsigned >::iterator getCoalescedWeight(MachineBasicBlock *MBB)
void setGPRCalleeSavedArea1Offset(unsigned o)
void setDPRCalleeSavedArea1Size(unsigned s)
void setDPRCalleeSavedGapSize(unsigned s)
void setArgumentStackSize(unsigned size)
void setFPStatusSavesSize(unsigned s)
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
void setNumAlignedDPRCS2Regs(unsigned n)
unsigned getArgumentStackSize() const
void setShouldRestoreSPFromFP(bool s)
unsigned getReturnRegsCount() const
void setGPRCalleeSavedArea3Size(unsigned s)
bool getPreservesR0() const
unsigned getFPStatusSavesSize() const
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
void mapOptional(StringRef Key, T &Val)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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.
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...
void mappingImpl(yaml::IO &YamlIO) override
~ARMFunctionInfo() override=default
ARMFunctionInfo()=default
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
static void mapping(IO &YamlIO, ARMFunctionInfo &MFI)
This class should be specialized by any type that needs to be converted to/from a YAML mapping.