LLVM: lib/Target/PowerPC/PPCMachineFunctionInfo.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_POWERPC_PPCMACHINEFUNCTIONINFO_H

14#define LLVM_LIB_TARGET_POWERPC_PPCMACHINEFUNCTIONINFO_H

15

19

20namespace llvm {

21

22

23

25public:

35

36private:

37 virtual void anchor();

38

39

40

41

42 int FramePointerSaveIndex = 0;

43

44

45

46 int ReturnAddrSaveIndex = 0;

47

48

49 int BasePointerSaveIndex = 0;

50

51

52 int PICBasePointerSaveIndex = 0;

53

54

55 int ROPProtectionHashSaveIndex = 0;

56

57

58

59

61

62

63

64

65

66 bool MustSaveTOC = false;

67

68

69

70

71 bool ShrinkWrapDisabled = false;

72

73

74 bool HasSpills = false;

75

76

77

78 bool HasNonRISpills = false;

79

80

81 bool SpillsCR = false;

82

83

84

85 bool DisableNonVolatileCR = false;

86

87

88

89

90

91 bool LRStoreRequired = false;

92

93

94 bool UsesTOCBasePtr = false;

95

96

97

98 unsigned MinReservedArea = 0;

99

100

101

102

103 int TailCallSPDelta = 0;

104

105

106

107 bool HasFastCall = false;

108

109

110 int VarArgsFrameIndex = 0;

111

112

113

114

115 int VarArgsStackOffset = 0;

116

117

118

119 unsigned VarArgsNumGPR = 0;

120

121

122

123 unsigned VarArgsNumFPR = 0;

124

125

126 unsigned FixedParmsNum = 0;

127

128

129 unsigned FloatingParmsNum = 0;

130

131

132 unsigned VectorParmsNum = 0;

133

134

135

137

138

139 int CRSpillFrameIndex = 0;

140

141

142

143

145

146

147 bool UsesPICBase = false;

148

149

150

151 std::vector<std::pair<Register, ISD::ArgFlagsTy>> LiveInAttrs;

152

153

154

155 bool AIXFuncUseTLSIEForLD = false;

156 bool AIXFuncTLSModelOptInitDone = false;

157

158public:

160

164 const override;

165

168

171

174

177

179 return ROPProtectionHashSaveIndex;

180 }

182 ROPProtectionHashSaveIndex = Idx;

183 }

184

187

190

191

192

193

194

195

198

201

202

203

204

207

210

213

216

219

222

225

228

231 return AIXFuncTLSModelOptInitDone;

232 }

235

238

241

244

249

251

253

255

258

259

261 LiveInAttrs.push_back(std::make_pair(VReg, Flags));

262 }

263

264

265

267

268

269

271

274

278

281

283

287};

288

289}

290

291#endif

static bool MustSaveLR(const MachineFunction &MF, MCRegister LR)

MustSaveLR - Return true if this function requires that we save the LR register onto the stack in the...

This file defines the SmallVector class.

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

bool isCRSpilled() const

Definition PPCMachineFunctionInfo.h:215

int getTailCallSPDelta() const

Definition PPCMachineFunctionInfo.h:188

void setVarArgsNumFPR(unsigned Num)

Definition PPCMachineFunctionInfo.h:257

uint32_t getParmsType() const

MCSymbol * getPICOffsetSymbol(MachineFunction &MF) const

const SmallVectorImpl< Register > & getMustSaveCRs() const

Definition PPCMachineFunctionInfo.h:276

void setReturnAddrSaveIndex(int idx)

Definition PPCMachineFunctionInfo.h:170

void setMustSaveTOC(bool U)

Definition PPCMachineFunctionInfo.h:199

unsigned getFloatingPointParmsNum() const

Definition PPCMachineFunctionInfo.h:246

bool isAIXFuncUseTLSIEForLD() const

Definition PPCMachineFunctionInfo.h:234

bool isLiveInSExt(Register VReg) const

This function returns true if the specified vreg is a live-in register and sign-extended.

MCSymbol * getGlobalEPSymbol(MachineFunction &MF) const

int getPICBasePointerSaveIndex() const

Definition PPCMachineFunctionInfo.h:175

MCSymbol * getLocalEPSymbol(MachineFunction &MF) const

bool shrinkWrapDisabled() const

Definition PPCMachineFunctionInfo.h:206

int getReturnAddrSaveIndex() const

Definition PPCMachineFunctionInfo.h:169

bool hasSpills() const

Definition PPCMachineFunctionInfo.h:209

unsigned getVarArgsNumFPR() const

Definition PPCMachineFunctionInfo.h:256

void setAIXFuncUseTLSIEForLD()

Definition PPCMachineFunctionInfo.h:233

int getFramePointerSaveIndex() const

Definition PPCMachineFunctionInfo.h:166

bool isLiveInZExt(Register VReg) const

This function returns true if the specified vreg is a live-in register and zero-extended.

void setShrinkWrapDisabled(bool U)

We certainly don't want to shrink wrap functions if we've emitted a MovePCtoLR8 as that has to go int...

Definition PPCMachineFunctionInfo.h:205

unsigned getVectorParmsNum() const

Definition PPCMachineFunctionInfo.h:247

void setVarArgsNumGPR(unsigned Num)

Definition PPCMachineFunctionInfo.h:243

PPCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)

void setUsesPICBase(bool uses)

Definition PPCMachineFunctionInfo.h:279

bool usesPICBase() const

Definition PPCMachineFunctionInfo.h:280

void appendParameterType(ParamType Type)

bool isNonVolatileCRDisabled() const

Definition PPCMachineFunctionInfo.h:218

int getVarArgsFrameIndex() const

Definition PPCMachineFunctionInfo.h:236

void addMustSaveCR(Register Reg)

Definition PPCMachineFunctionInfo.h:277

bool mustSaveTOC() const

Definition PPCMachineFunctionInfo.h:200

void setLRStoreRequired()

Definition PPCMachineFunctionInfo.h:220

bool usesTOCBasePtr() const

Definition PPCMachineFunctionInfo.h:224

void setBasePointerSaveIndex(int Idx)

Definition PPCMachineFunctionInfo.h:173

bool hasFastCall() const

Definition PPCMachineFunctionInfo.h:227

bool isAIXFuncTLSModelOptInitDone() const

Definition PPCMachineFunctionInfo.h:230

bool hasVectorParms() const

Definition PPCMachineFunctionInfo.h:248

void setTailCallSPDelta(int size)

Definition PPCMachineFunctionInfo.h:189

uint32_t getVecExtParmsType() const

void setAIXFuncTLSModelOptInitDone()

Definition PPCMachineFunctionInfo.h:229

int getCRSpillFrameIndex() const

Definition PPCMachineFunctionInfo.h:272

bool hasNonRISpills() const

Definition PPCMachineFunctionInfo.h:212

bool isLRStoreRequired() const

Definition PPCMachineFunctionInfo.h:221

void setMinReservedArea(unsigned size)

Definition PPCMachineFunctionInfo.h:186

void setHasFastCall()

Definition PPCMachineFunctionInfo.h:226

void setPICBasePointerSaveIndex(int Idx)

Definition PPCMachineFunctionInfo.h:176

MCSymbol * getTOCOffsetSymbol(MachineFunction &MF) const

int getROPProtectionHashSaveIndex() const

Definition PPCMachineFunctionInfo.h:178

ParamType

Definition PPCMachineFunctionInfo.h:26

@ LongFloatingPoint

Definition PPCMachineFunctionInfo.h:29

@ VectorShort

Definition PPCMachineFunctionInfo.h:31

@ VectorChar

Definition PPCMachineFunctionInfo.h:30

@ ShortFloatingPoint

Definition PPCMachineFunctionInfo.h:28

@ VectorFloat

Definition PPCMachineFunctionInfo.h:33

@ FixedType

Definition PPCMachineFunctionInfo.h:27

@ VectorInt

Definition PPCMachineFunctionInfo.h:32

unsigned getVarArgsNumGPR() const

Definition PPCMachineFunctionInfo.h:242

void setUsesTOCBasePtr()

Definition PPCMachineFunctionInfo.h:223

unsigned getMinReservedArea() const

Definition PPCMachineFunctionInfo.h:185

void setMustSaveLR(bool U)

MustSaveLR - This is set when the prolog/epilog inserter does its initial scan of the function.

Definition PPCMachineFunctionInfo.h:196

void setDisableNonVolatileCR()

Definition PPCMachineFunctionInfo.h:217

void setVarArgsStackOffset(int Offset)

Definition PPCMachineFunctionInfo.h:240

void setCRSpillFrameIndex(int idx)

Definition PPCMachineFunctionInfo.h:273

unsigned getFixedParmsNum() const

Definition PPCMachineFunctionInfo.h:245

void setSpillsCR()

Definition PPCMachineFunctionInfo.h:214

bool mustSaveLR() const

Definition PPCMachineFunctionInfo.h:197

void setVarArgsFrameIndex(int Index)

Definition PPCMachineFunctionInfo.h:237

int getBasePointerSaveIndex() const

Definition PPCMachineFunctionInfo.h:172

void addLiveInAttr(Register VReg, ISD::ArgFlagsTy Flags)

This function associates attributes for each live-in virtual register.

Definition PPCMachineFunctionInfo.h:260

void setROPProtectionHashSaveIndex(int Idx)

Definition PPCMachineFunctionInfo.h:181

MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override

Make a functionally equivalent copy of this MachineFunctionInfo in MF.

int getVarArgsStackOffset() const

Definition PPCMachineFunctionInfo.h:239

void setHasNonRISpills()

Definition PPCMachineFunctionInfo.h:211

void setHasSpills()

Definition PPCMachineFunctionInfo.h:208

void setFramePointerSaveIndex(int Idx)

Definition PPCMachineFunctionInfo.h:167

Wrapper class representing virtual and physical registers.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

TargetSubtargetInfo - Generic base class for all target subtargets.

The instances of the Type class are immutable: once they are created, they are never changed.

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