13#ifndef LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H
30 virtual void anchor();
39 bool hasThumb2 =
false;
46 unsigned StByValParamsPadding = 0;
52 unsigned ArgRegsSaveSize = 0;
55 unsigned ReturnRegsCount = 0;
59 bool HasStackFrame =
false;
63 bool RestoreSPFromFP =
false;
67 bool LRSpilled =
false;
71 unsigned FramePtrSpillOffset = 0;
84 unsigned GPRCS1Offset = 0;
85 unsigned GPRCS2Offset = 0;
86 unsigned DPRCSOffset = 0;
90 unsigned FPCXTSaveSize = 0;
91 unsigned FRSaveSize = 0;
92 unsigned GPRCS1Size = 0;
93 unsigned GPRCS2Size = 0;
94 unsigned DPRCSAlignGapSize = 0;
95 unsigned DPRCSSize = 0;
104 unsigned NumAlignedDPRCS2Regs = 0;
106 unsigned PICLabelUId = 0;
109 int VarArgsFrameIndex = 0;
112 bool HasITBlocks =
false;
124 unsigned ArgumentStackSize = 0;
128 unsigned ArgumentStackToRestore = 0;
136 bool IsSplitCSR =
false;
142 int PromotedGlobalsIncrease = 0;
146 bool PreservesR0 =
false;
149 bool SignReturnAddress =
false;
153 bool SignReturnAddressAll =
false;
157 bool BranchTargetEnforcement =
false;
237 return PICLabelUId++;
250 if (!CPEClones.
insert(std::make_pair(CPCloneIdx, CPIdx)).second)
256 if (
I != CPEClones.
end())
264 auto It = CoalescedWeights.
find(
MBB);
265 if (It == CoalescedWeights.
end()) {
266 It = CoalescedWeights.
insert(std::make_pair(
MBB, 0)).first;
275 PromotedGlobals.
insert(GV);
278 return PromotedGlobals;
281 return PromotedGlobalsIncrease;
284 PromotedGlobalsIncrease = Sz;
298 if (!SignReturnAddress)
300 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 getStoredByValParamsPadding() const
unsigned getNumPICLabels() const
unsigned getArgRegsSaveSize() const
void setStoredByValParamsPadding(unsigned p)
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...