LLVM: lib/Target/ARM/ARMMachineFunctionInfo.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H

14#define LLVM_LIB_TARGET_ARM_ARMMACHINEFUNCTIONINFO_H

15

22

23namespace llvm {

24

25namespace yaml {

27}

28

30

31

32

34 virtual void anchor();

35

36

37

38 bool isThumb = false;

39

40

41

42

43 bool hasThumb2 = false;

44

45

46

47

48

49 unsigned ArgRegsSaveSize = 0;

50

51

52 unsigned ReturnRegsCount = 0;

53

54

55

56 bool HasStackFrame = false;

57

58

59

60 bool RestoreSPFromFP = false;

61

62

63

64 bool LRSpilled = false;

65

66

67

68 unsigned FramePtrSpillOffset = 0;

69

70

71

72

73

74

75

76

77

78

79

80

81 unsigned GPRCS1Offset = 0;

82 unsigned GPRCS2Offset = 0;

83 unsigned DPRCS1Offset = 0;

84

85

86

87 unsigned FPCXTSaveSize = 0;

88 unsigned FRSaveSize = 0;

89 unsigned GPRCS1Size = 0;

90 unsigned GPRCS2Size = 0;

91 unsigned FPStatusSize = 0;

92 unsigned DPRCSAlignGapSize = 0;

93 unsigned DPRCS1Size = 0;

94 unsigned GPRCS3Size = 0;

95

96

97

98

99

100

101

102

103 unsigned NumAlignedDPRCS2Regs = 0;

104

105 unsigned PICLabelUId = 0;

106

107

108 int VarArgsFrameIndex = 0;

109

110

111 bool HasITBlocks = false;

112

113

114 bool IsCmseNSEntry;

115 bool IsCmseNSCall;

116

117

118

120

121

122

123 unsigned ArgumentStackSize = 0;

124

125

126

127 unsigned ArgumentStackToRestore = 0;

128

129

130

132

133

134

135 bool IsSplitCSR = false;

136

137

139

140

141 int PromotedGlobalsIncrease = 0;

142

143

144

145 bool PreservesR0 = false;

146

147

148 bool SignReturnAddress = false;

149

150

151

152 bool SignReturnAddressAll = false;

153

154

155

156 bool BranchTargetEnforcement = false;

157

158public:

160

162

166 const override;

167

171

174

177

180

183

186

189

192

195

199

203

212

221

224

227

229 PICLabelUId = UId;

230 }

231

233 return PICLabelUId;

234 }

235

237 return PICLabelUId++;

238 }

239

242

245

248

250 if (!CPEClones.insert(std::make_pair(CPCloneIdx, CPIdx)).second)

252 }

253

256 if (I != CPEClones.end())

257 return I->second;

258 else

259 return -1U;

260 }

261

264 return CoalescedWeights.try_emplace(MBB, 0).first;

265 }

266

267

268

269

271 PromotedGlobals.insert(GV);

272 }

274 return PromotedGlobals;

275 }

277 return PromotedGlobalsIncrease;

278 }

280 PromotedGlobalsIncrease = Sz;

281 }

282

285

288

292

294 if (!SignReturnAddress)

295 return false;

296 if (SignReturnAddressAll)

297 return true;

298 return SpillsLR;

299 }

300

302

304};

305

306namespace yaml {

316

322

323}

324

325}

326

327#endif

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...

Definition ARMMachineFunctionInfo.h:33

bool hasStackFrame() const

Definition ARMMachineFunctionInfo.h:181

bool isThumb2Function() const

Definition ARMMachineFunctionInfo.h:170

unsigned getDPRCalleeSavedArea1Offset() const

Definition ARMMachineFunctionInfo.h:198

void initPICLabelUId(unsigned UId)

Definition ARMMachineFunctionInfo.h:228

unsigned getFPCXTSaveAreaSize() const

Definition ARMMachineFunctionInfo.h:204

int getVarArgsFrameIndex() const

Definition ARMMachineFunctionInfo.h:240

unsigned getGPRCalleeSavedArea2Offset() const

Definition ARMMachineFunctionInfo.h:197

bool isSplitCSR() const

Definition ARMMachineFunctionInfo.h:246

unsigned getGPRCalleeSavedArea1Size() const

Definition ARMMachineFunctionInfo.h:206

void setHasITBlocks(bool h)

Definition ARMMachineFunctionInfo.h:244

int getPromotedConstpoolIncrease() const

Definition ARMMachineFunctionInfo.h:276

SmallPtrSet< const GlobalVariable *, 2 > & getGlobalsPromotedToConstantPool()

Definition ARMMachineFunctionInfo.h:273

void setArgumentStackToRestore(unsigned v)

Definition ARMMachineFunctionInfo.h:226

unsigned getDPRCalleeSavedGapSize() const

Definition ARMMachineFunctionInfo.h:209

bool branchTargetEnforcement() const

Definition ARMMachineFunctionInfo.h:301

unsigned getDPRCalleeSavedArea1Size() const

Definition ARMMachineFunctionInfo.h:210

unsigned createPICLabelUId()

Definition ARMMachineFunctionInfo.h:236

void setLRIsSpilled(bool s)

Definition ARMMachineFunctionInfo.h:188

void setDPRCalleeSavedArea1Offset(unsigned o)

Definition ARMMachineFunctionInfo.h:202

unsigned getGPRCalleeSavedArea1Offset() const

Definition ARMMachineFunctionInfo.h:196

void setPreservesR0()

Definition ARMMachineFunctionInfo.h:286

void setPromotedConstpoolIncrease(int Sz)

Definition ARMMachineFunctionInfo.h:279

void setGPRCalleeSavedArea2Size(unsigned s)

Definition ARMMachineFunctionInfo.h:216

bool isThumb1OnlyFunction() const

Definition ARMMachineFunctionInfo.h:169

bool shouldSignReturnAddress(bool SpillsLR) const

Definition ARMMachineFunctionInfo.h:293

void setHasStackFrame(bool s)

Definition ARMMachineFunctionInfo.h:182

DenseMap< unsigned, unsigned > EHPrologueRemappedRegs

Definition ARMMachineFunctionInfo.h:283

bool isThumbFunction() const

Definition ARMMachineFunctionInfo.h:168

void setFramePtrSpillOffset(unsigned o)

Definition ARMMachineFunctionInfo.h:191

void setArgRegsSaveSize(unsigned s)

Definition ARMMachineFunctionInfo.h:176

unsigned getGPRCalleeSavedArea2Size() const

Definition ARMMachineFunctionInfo.h:207

unsigned getNumAlignedDPRCS2Regs() const

Definition ARMMachineFunctionInfo.h:193

bool shouldSignReturnAddress() const

Definition ARMMachineFunctionInfo.h:289

bool hasITBlocks() const

Definition ARMMachineFunctionInfo.h:243

void setGPRCalleeSavedArea1Size(unsigned s)

Definition ARMMachineFunctionInfo.h:215

unsigned getArgumentStackToRestore() const

Definition ARMMachineFunctionInfo.h:225

void setFPCXTSaveAreaSize(unsigned s)

Definition ARMMachineFunctionInfo.h:213

ARMFunctionInfo()=default

bool isCmseNSEntryFunction() const

Definition ARMMachineFunctionInfo.h:172

bool isCmseNSCallFunction() const

Definition ARMMachineFunctionInfo.h:173

unsigned getGPRCalleeSavedArea3Size() const

Definition ARMMachineFunctionInfo.h:211

unsigned getFramePtrSpillOffset() const

Definition ARMMachineFunctionInfo.h:190

void setReturnRegsCount(unsigned s)

Definition ARMMachineFunctionInfo.h:179

void setVarArgsFrameIndex(int Index)

Definition ARMMachineFunctionInfo.h:241

bool shouldRestoreSPFromFP() const

Definition ARMMachineFunctionInfo.h:184

DenseMap< unsigned, unsigned > EHPrologueOffsetInRegs

Definition ARMMachineFunctionInfo.h:284

unsigned getOriginalCPIdx(unsigned CloneIdx) const

Definition ARMMachineFunctionInfo.h:254

bool isLRSpilled() const

Definition ARMMachineFunctionInfo.h:187

void setFrameRecordSavedAreaSize(unsigned s)

Definition ARMMachineFunctionInfo.h:214

unsigned getNumPICLabels() const

Definition ARMMachineFunctionInfo.h:232

unsigned getArgRegsSaveSize() const

Definition ARMMachineFunctionInfo.h:175

void recordCPEClone(unsigned CPIdx, unsigned CPCloneIdx)

Definition ARMMachineFunctionInfo.h:249

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.

Definition ARMMachineFunctionInfo.h:270

void setIsSplitCSR(bool s)

Definition ARMMachineFunctionInfo.h:247

void setGPRCalleeSavedArea2Offset(unsigned o)

Definition ARMMachineFunctionInfo.h:201

unsigned getFrameRecordSavedAreaSize() const

Definition ARMMachineFunctionInfo.h:205

DenseMap< constMachineBasicBlock *, unsigned >::iterator getCoalescedWeight(MachineBasicBlock *MBB)

Definition ARMMachineFunctionInfo.h:263

void setGPRCalleeSavedArea1Offset(unsigned o)

Definition ARMMachineFunctionInfo.h:200

void setDPRCalleeSavedArea1Size(unsigned s)

Definition ARMMachineFunctionInfo.h:219

void setDPRCalleeSavedGapSize(unsigned s)

Definition ARMMachineFunctionInfo.h:218

void setArgumentStackSize(unsigned size)

Definition ARMMachineFunctionInfo.h:223

void setFPStatusSavesSize(unsigned s)

Definition ARMMachineFunctionInfo.h:217

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)

Definition ARMMachineFunctionInfo.h:194

unsigned getArgumentStackSize() const

Definition ARMMachineFunctionInfo.h:222

void setShouldRestoreSPFromFP(bool s)

Definition ARMMachineFunctionInfo.h:185

unsigned getReturnRegsCount() const

Definition ARMMachineFunctionInfo.h:178

void setGPRCalleeSavedArea3Size(unsigned s)

Definition ARMMachineFunctionInfo.h:220

bool getPreservesR0() const

Definition ARMMachineFunctionInfo.h:287

unsigned getFPStatusSavesSize() const

Definition ARMMachineFunctionInfo.h:208

DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT > iterator

DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

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

bool LRSpilled

Definition ARMMachineFunctionInfo.h:308

ARMFunctionInfo()=default

Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.

static void mapping(IO &YamlIO, ARMFunctionInfo &MFI)

Definition ARMMachineFunctionInfo.h:318

This class should be specialized by any type that needs to be converted to/from a YAML mapping.