13#ifndef LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
27struct ARMFunctionInfo;
35 virtual void anchor();
44 bool hasThumb2 =
false;
50 unsigned ArgRegsSaveSize = 0;
53 unsigned ReturnRegsCount = 0;
57 bool HasStackFrame =
false;
61 bool RestoreSPFromFP =
false;
65 bool LRSpilled =
false;
69 unsigned FramePtrSpillOffset = 0;
82 unsigned GPRCS1Offset = 0;
83 unsigned GPRCS2Offset = 0;
84 unsigned DPRCSOffset = 0;
88 unsigned FPCXTSaveSize = 0;
89 unsigned FRSaveSize = 0;
90 unsigned GPRCS1Size = 0;
91 unsigned GPRCS2Size = 0;
92 unsigned DPRCSAlignGapSize = 0;
93 unsigned DPRCSSize = 0;
102 unsigned NumAlignedDPRCS2Regs = 0;
104 unsigned PICLabelUId = 0;
107 int VarArgsFrameIndex = 0;
110 bool HasITBlocks =
false;
122 unsigned ArgumentStackSize = 0;
126 unsigned ArgumentStackToRestore = 0;
134 bool IsSplitCSR =
false;
140 int PromotedGlobalsIncrease = 0;
144 bool PreservesR0 =
false;
147 bool SignReturnAddress =
false;
151 bool SignReturnAddressAll =
false;
155 bool BranchTargetEnforcement =
false;
232 return PICLabelUId++;
245 if (!CPEClones.
insert(std::make_pair(CPCloneIdx, CPIdx)).second)
251 if (
I != CPEClones.
end())
259 auto It = CoalescedWeights.
find(
MBB);
260 if (It == CoalescedWeights.
end()) {
261 It = CoalescedWeights.
insert(std::make_pair(
MBB, 0)).first;
270 PromotedGlobals.
insert(GV);
273 return PromotedGlobals;
276 return PromotedGlobalsIncrease;
279 PromotedGlobalsIncrease = Sz;
293 if (!SignReturnAddress)
295 if (SignReturnAddressAll)
This file defines the DenseMap class.
This file defines the SmallPtrSet class.
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
void setDPRCalleeSavedAreaSize(unsigned s)
bool hasStackFrame() const
bool isThumb2Function() const
void initPICLabelUId(unsigned UId)
unsigned getFPCXTSaveAreaSize() const
int getVarArgsFrameIndex() const
unsigned getGPRCalleeSavedArea2Offset() const
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 createPICLabelUId()
void setLRIsSpilled(bool s)
unsigned getGPRCalleeSavedArea1Offset() const
void setPromotedConstpoolIncrease(int Sz)
void setGPRCalleeSavedArea2Size(unsigned s)
bool isThumb1OnlyFunction() const
unsigned getDPRCalleeSavedAreaOffset() const
bool shouldSignReturnAddress(bool SpillsLR) const
void setHasStackFrame(bool s)
void setDPRCalleeSavedAreaOffset(unsigned o)
DenseMap< unsigned, unsigned > EHPrologueRemappedRegs
bool isThumbFunction() const
void setFramePtrSpillOffset(unsigned o)
void setArgRegsSaveSize(unsigned s)
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 getDPRCalleeSavedAreaSize() 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 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 setDPRCalleeSavedGapSize(unsigned s)
void setArgumentStackSize(unsigned size)
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
bool getPreservesR0() const
Allocate memory in an ever growing pool, as if by bump-pointer.
iterator find(const_arg_type_t< KeyT > Val)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
#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.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
void mappingImpl(yaml::IO &YamlIO) override
ARMFunctionInfo()=default
~ARMFunctionInfo()=default
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
static void mapping(IO &YamlIO, ARMFunctionInfo &MFI)