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 DPRCS1Offset = 0;
88 unsigned FPCXTSaveSize = 0;
89 unsigned FRSaveSize = 0;
90 unsigned GPRCS1Size = 0;
91 unsigned GPRCS2Size = 0;
92 unsigned DPRCSAlignGapSize = 0;
93 unsigned DPRCS1Size = 0;
94 unsigned GPRCS3Size = 0;
103 unsigned NumAlignedDPRCS2Regs = 0;
105 unsigned PICLabelUId = 0;
108 int VarArgsFrameIndex = 0;
111 bool HasITBlocks =
false;
123 unsigned ArgumentStackSize = 0;
127 unsigned ArgumentStackToRestore = 0;
135 bool IsSplitCSR =
false;
141 int PromotedGlobalsIncrease = 0;
145 bool PreservesR0 =
false;
148 bool SignReturnAddress =
false;
152 bool SignReturnAddressAll =
false;
156 bool BranchTargetEnforcement =
false;
235 return PICLabelUId++;
248 if (!CPEClones.
insert(std::make_pair(CPCloneIdx, CPIdx)).second)
254 if (
I != CPEClones.
end())
269 PromotedGlobals.
insert(GV);
272 return PromotedGlobals;
275 return PromotedGlobalsIncrease;
278 PromotedGlobalsIncrease = Sz;
292 if (!SignReturnAddress)
294 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...
bool hasStackFrame() const
bool isThumb2Function() const
unsigned getDPRCalleeSavedArea1Offset() 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 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)
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 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)
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
Allocate memory in an ever growing pool, as if by bump-pointer.
iterator find(const_arg_type_t< KeyT > Val)
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&...Args)
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)