13#ifndef LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
30 virtual void anchor();
39 bool hasThumb2 =
false;
45 unsigned ArgRegsSaveSize = 0;
48 unsigned ReturnRegsCount = 0;
52 bool HasStackFrame =
false;
56 bool RestoreSPFromFP =
false;
60 bool LRSpilled =
false;
64 unsigned FramePtrSpillOffset = 0;
77 unsigned GPRCS1Offset = 0;
78 unsigned GPRCS2Offset = 0;
79 unsigned DPRCSOffset = 0;
83 unsigned FPCXTSaveSize = 0;
84 unsigned FRSaveSize = 0;
85 unsigned GPRCS1Size = 0;
86 unsigned GPRCS2Size = 0;
87 unsigned DPRCSAlignGapSize = 0;
88 unsigned DPRCSSize = 0;
97 unsigned NumAlignedDPRCS2Regs = 0;
99 unsigned PICLabelUId = 0;
102 int VarArgsFrameIndex = 0;
105 bool HasITBlocks =
false;
117 unsigned ArgumentStackSize = 0;
121 unsigned ArgumentStackToRestore = 0;
129 bool IsSplitCSR =
false;
135 int PromotedGlobalsIncrease = 0;
139 bool PreservesR0 =
false;
142 bool SignReturnAddress =
false;
146 bool SignReturnAddressAll =
false;
150 bool BranchTargetEnforcement =
false;
227 return PICLabelUId++;
240 if (!CPEClones.
insert(std::make_pair(CPCloneIdx, CPIdx)).second)
246 if (
I != CPEClones.
end())
254 auto It = CoalescedWeights.
find(
MBB);
255 if (It == CoalescedWeights.
end()) {
256 It = CoalescedWeights.
insert(std::make_pair(
MBB, 0)).first;
265 PromotedGlobals.
insert(GV);
268 return PromotedGlobals;
271 return PromotedGlobalsIncrease;
274 PromotedGlobalsIncrease = Sz;
288 if (!SignReturnAddress)
290 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 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...