LLVM: include/llvm/IR/MDBuilder.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_IR_MDBUILDER_H

15#define LLVM_IR_MDBUILDER_H

16

23#include

24

25namespace llvm {

26

28template class ArrayRef;

36

39

40public:

42

43

45

46

48

49

50

51

52

53

54

55

57

58

59

60

61

62

63

64

65

68 bool IsExpected = false);

69

70

71

73

74

75

77

78

79

80

82 bool IsExpected = false);

83

84

86

87

88

89

90

94

95

97

98

101

102

105

106

107

108

109

110

112

113

115

116

117

118

119

120

121

123

124

125

126

127

128

131 bool VarArgsArePassed);

132

133

136

137

138

141

142

143

144

145

146

147 using PCSection = std::pair<StringRef, SmallVector<Constant *>>;

148

149

151

152

153

154

155

156protected:

157

158

159

161 MDNode *Extra = nullptr);

162

163public:

164

165

166

170

171

172

173

177

178

179

180

185

186

187

188

190

191

192

193

195

196

197

198

200

201

202

205

213

214

215

217

218

219

222 ArrayRef<std::pair<MDNode *, uint64_t>> Fields);

223

224

225

228

229

230

233 bool IsConstant = false);

234

235

236

240

241

242

243

244

247 bool IsImmutable = false);

248

249

250

252

253

255};

256

257}

258

259#endif

static bool isConstant(const MachineInstr &MI)

AMDGPU Lower Kernel Arguments

This file defines the DenseSet and SmallDenseSet classes.

BaseType

A given derived pointer can have multiple base pointers through phi/selects.

This file defines the SmallVector class.

Class for arbitrary precision integers.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

This is an important base class in LLVM.

Implements a dense probed hash-table based set.

This is an important class for using LLVM in a threaded context.

LLVM_ABI MDNode * createTBAAAccessTag(MDNode *BaseType, MDNode *AccessType, uint64_t Offset, uint64_t Size, bool IsImmutable=false)

Return metadata for a TBAA access tag with the given base type, final access type,...

LLVM_ABI MDNode * createCallbackEncoding(unsigned CalleeArgNo, ArrayRef< int > Arguments, bool VarArgsArePassed)

Return metadata describing a callback (see llvm::AbstractCallSite).

LLVM_ABI MDNode * createAnonymousAARoot(StringRef Name=StringRef(), MDNode *Extra=nullptr)

Return metadata appropriate for a AA root node (scope or TBAA).

LLVM_ABI MDNode * createFunctionEntryCount(uint64_t Count, bool Synthetic, const DenseSet< GlobalValue::GUID > *Imports)

Return metadata containing the entry Count for a function, a boolean \Synthetic indicating whether th...

MDNode * createAnonymousAliasScope(MDNode *Domain, StringRef Name=StringRef())

Return metadata appropriate for an alias scope root node.

Definition MDBuilder.h:181

LLVM_ABI MDNode * createPseudoProbeDesc(uint64_t GUID, uint64_t Hash, StringRef FName)

Return metadata containing the pseudo probe descriptor for a function.

LLVM_ABI ConstantAsMetadata * createConstant(Constant *C)

Return the given constant as metadata.

LLVM_ABI MDNode * createFPMath(float Accuracy)

Return metadata with the given settings.

LLVM_ABI MDNode * createPCSections(ArrayRef< PCSection > Sections)

Return metadata for PC sections.

LLVM_ABI MDNode * createTBAANode(StringRef Name, MDNode *Parent, bool isConstant=false)

Return metadata for a non-root TBAA node with the given name, parent in the TBAA tree,...

LLVM_ABI MDNode * createTBAARoot(StringRef Name)

Return metadata appropriate for a TBAA root node with the given name.

LLVM_ABI MDNode * createBranchWeights(uint32_t TrueWeight, uint32_t FalseWeight, bool IsExpected=false)

Return metadata containing two branch weights.

LLVM_ABI MDString * createString(StringRef Str)

Return the given string as metadata.

MDNode * createAnonymousTBAARoot()

Return metadata appropriate for a TBAA root node.

Definition MDBuilder.h:167

LLVM_ABI MDNode * createTBAAScalarTypeNode(StringRef Name, MDNode *Parent, uint64_t Offset=0)

Return metadata for a TBAA scalar type node with the given name, an offset and a parent in the TBAA t...

LLVM_ABI MDNode * createIrrLoopHeaderWeight(uint64_t Weight)

Return metadata containing an irreducible loop header weight.

LLVM_ABI MDNode * createUnpredictable()

Return metadata specifying that a branch or switch is unpredictable.

LLVM_ABI MDNode * createTBAAStructTypeNode(StringRef Name, ArrayRef< std::pair< MDNode *, uint64_t > > Fields)

Return metadata for a TBAA struct node in the type DAG with the given name, a list of pairs (offset,...

LLVM_ABI MDNode * createCallees(ArrayRef< Function * > Callees)

Return metadata indicating the possible callees of indirect calls.

LLVM_ABI MDNode * createAliasScopeDomain(StringRef Name)

Return metadata appropriate for an alias scope domain node with the given name.

LLVM_ABI MDNode * createRange(const APInt &Lo, const APInt &Hi)

Return metadata describing the range [Lo, Hi).

LLVM_ABI MDNode * createLikelyBranchWeights()

Return metadata containing two branch weights, with significant bias towards true destination.

LLVM_ABI MDNode * createTBAAStructNode(ArrayRef< TBAAStructField > Fields)

Return metadata for a tbaa.struct node with the given struct field descriptions.

MDBuilder(LLVMContext &context)

Definition MDBuilder.h:41

LLVM_ABI MDNode * mergeCallbackEncodings(MDNode *ExistingCallbacks, MDNode *NewCB)

Merge the new callback encoding NewCB into ExistingCallbacks.

LLVM_ABI MDNode * createMutableTBAAAccessTag(MDNode *Tag)

Return mutable version of the given mutable or immutable TBAA access tag.

std::pair< StringRef, SmallVector< Constant * > > PCSection

A pair of PC section name with auxilliary constant data.

Definition MDBuilder.h:147

LLVM_ABI MDNode * createGlobalObjectSectionPrefix(StringRef Prefix)

Return metadata containing the section prefix for a global object.

LLVM_ABI MDNode * createLLVMStats(ArrayRef< std::pair< StringRef, uint64_t > > LLVMStatsVec)

Return metadata containing llvm statistics.

LLVM_ABI MDNode * createRTTIPointerPrologue(Constant *PrologueSig, Constant *RTTI)

Return metadata feeding to the CodeGen about how to generate a function prologue for the "function" s...

MDNode * createAnonymousAliasScopeDomain(StringRef Name=StringRef())

Return metadata appropriate for an alias scope domain node.

Definition MDBuilder.h:174

LLVM_ABI MDNode * createUnlikelyBranchWeights()

Return metadata containing two branch weights, with significant bias towards false destination.

LLVM_ABI MDNode * createAliasScope(StringRef Name, MDNode *Domain)

Return metadata appropriate for an alias scope node with the given name.

LLVM_ABI MDNode * createTBAAStructTagNode(MDNode *BaseType, MDNode *AccessType, uint64_t Offset, bool IsConstant=false)

Return metadata for a TBAA tag node with the given base type, access type and offset relative to the ...

LLVM_ABI MDNode * createTBAATypeNode(MDNode *Parent, uint64_t Size, Metadata *Id, ArrayRef< TBAAStructField > Fields=ArrayRef< TBAAStructField >())

Return metadata for a TBAA type node in the TBAA type DAG with the given parent type,...

StringRef - Represent a constant reference to a string, i.e.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

FunctionAddr VTableAddr Count

MDNode * Type

Definition MDBuilder.h:209

uint64_t Offset

Definition MDBuilder.h:207

uint64_t Size

Definition MDBuilder.h:208

TBAAStructField(uint64_t Offset, uint64_t Size, MDNode *Type)

Definition MDBuilder.h:210