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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_IR_INTRINSICS_H

16#define LLVM_IR_INTRINSICS_H

17

21#include

22#include

23

24namespace llvm {

25

31class AttributeList;

35

36

37

38

40

42

43

44

45 typedef unsigned ID;

46

49

50

51#define GET_INTRINSIC_ENUM_VALUES

52#include "llvm/IR/IntrinsicEnums.inc"

53#undef GET_INTRINSIC_ENUM_VALUES

54 };

55

56

57

58

60

61

62

64

65

66

67

68

69

70

72 FunctionType *FT = nullptr);

73

74

75

76

78

79

82

83

85

86

88

89

90

92

94

95

97

98

100

101

102

103

104

105

106

107

108

111

112

113

114

115

116

117

118

119

120

121

122

123

126

127

128

129

131

132

136

137

140

141

144

145

146

148

149

150

152

153

154

185

186 union {

193 };

194

195

197#define GET_INTRINSIC_ARGKIND

198#include "llvm/IR/IntrinsicEnums.inc"

199#undef GET_INTRINSIC_ARGKIND

200 };

201

216

217

218

223

224

233

238

240 unsigned short Lo) {

243 return Result;

244 }

245

251 };

252

253

254

257

263

264

265

266

267

268

269

273

274

275

276

277

280

281

282

283

284

285

286

289

290

293

294

295

296

297

299

300

302

303

304

306

307

310

311 }

312

313 }

314

315#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

Machine Check Debug Module

OptimizedStructLayoutField Field

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

This class holds the attributes for a particular argument, parameter, function, or return value.

This is an important base class in LLVM.

static constexpr ElementCount get(ScalarTy MinVal, bool Scalable)

Class to represent function types.

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

A Module instance is used to store all the information related to an LLVM module.

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

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

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

This class implements an extremely fast bulk output stream that can only output to a stream.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

@ C

The default llvm calling convention, compatible with C.

This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.

LLVM_ABI Function * getOrInsertDeclaration(Module *M, ID id, ArrayRef< Type * > Tys={})

Look up the Function declaration of the intrinsic id in the Module M.

LLVM_ABI Intrinsic::ID getDeinterleaveIntrinsicID(unsigned Factor)

Returns the corresponding llvm.vector.deinterleaveN intrinsic for factor N.

LLVM_ABI MatchIntrinsicTypesResult matchIntrinsicSignature(FunctionType *FTy, ArrayRef< IITDescriptor > &Infos, SmallVectorImpl< Type * > &ArgTys)

Match the specified function type with the type constraints specified by the .td file.

LLVM_ABI void getIntrinsicInfoTableEntries(ID id, SmallVectorImpl< IITDescriptor > &T)

Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors.

MatchIntrinsicTypesResult

Definition Intrinsics.h:258

@ MatchIntrinsicTypes_Match

Definition Intrinsics.h:259

@ MatchIntrinsicTypes_NoMatchRet

Definition Intrinsics.h:260

@ MatchIntrinsicTypes_NoMatchArg

Definition Intrinsics.h:261

LLVM_ABI Function * getDeclarationIfExists(const Module *M, ID id)

Look up the Function declaration of the intrinsic id in the Module M and return it if it exists.

IndependentIntrinsics

Definition Intrinsics.h:47

@ not_intrinsic

Definition Intrinsics.h:48

LLVM_ABI std::string getNameNoUnnamedTypes(ID Id, ArrayRef< Type * > Tys)

Return the LLVM name for an intrinsic.

LLVM_ABI std::optional< Function * > remangleIntrinsicFunction(Function *F)

LLVM_ABI bool hasConstrainedFPRoundingModeOperand(ID QID)

Returns true if the intrinsic ID is for one of the "ConstrainedFloating-Point Intrinsics" that take r...

LLVM_ABI void printImmArg(ID IID, unsigned ArgIdx, raw_ostream &OS, const Constant *ImmArgVal)

Print the argument info for the arguments with ArgInfo.

LLVM_ABI ID getIntrinsicForMSBuiltin(StringRef TargetPrefix, StringRef BuiltinName)

Map a MS builtin name to an intrinsic ID.

LLVM_ABI StringRef getName(ID id)

Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".

LLVM_ABI bool isConstrainedFPIntrinsic(ID QID)

Returns true if the intrinsic ID is for one of the "ConstrainedFloating-Point Intrinsics".

LLVM_ABI ID lookupIntrinsicID(StringRef Name)

This does the actual lookup of an intrinsic ID which matches the given function name.

LLVM_ABI bool hasPrettyPrintedArgs(ID id)

Returns true if the intrinsic has pretty printed immediate arguments.

LLVM_ABI AttributeSet getFnAttributes(LLVMContext &C, ID id)

Return the function attributes for an intrinsic.

static const int NoAliasScopeDeclScopeArg

Definition Intrinsics.h:41

LLVM_ABI StringRef getBaseName(ID id)

Return the LLVM name for an intrinsic, without encoded types for overloading, such as "llvm....

LLVM_ABI Intrinsic::ID getInterleaveIntrinsicID(unsigned Factor)

Returns the corresponding llvm.vector.interleaveN intrinsic for factor N.

LLVM_ABI AttributeList getAttributes(LLVMContext &C, ID id, FunctionType *FT)

Return the attributes for an intrinsic.

LLVM_ABI bool isOverloaded(ID id)

Returns true if the intrinsic can be overloaded.

LLVM_ABI ID getIntrinsicForClangBuiltin(StringRef TargetPrefix, StringRef BuiltinName)

Map a Clang builtin name to an intrinsic ID.

LLVM_ABI FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys={})

Return the function type for an intrinsic.

LLVM_ABI bool getIntrinsicSignature(Intrinsic::ID, FunctionType *FT, SmallVectorImpl< Type * > &ArgTys)

Gets the type arguments of an intrinsic call by matching type contraints specified by the ....

LLVM_ABI bool isTargetIntrinsic(ID IID)

isTargetIntrinsic - Returns true if IID is an intrinsic specific to a certain target.

LLVM_ABI bool matchIntrinsicVarArg(bool isVarArg, ArrayRef< IITDescriptor > &Infos)

Verify if the intrinsic has variable arguments.

This is an optimization pass for GlobalISel generic memory operations.

ArrayRef(const T &OneElt) -> ArrayRef< T >

This is a type descriptor which explains the type requirements of an intrinsic.

Definition Intrinsics.h:155

enum llvm::Intrinsic::IITDescriptor::IITDescriptorKind Kind

static IITDescriptor get(IITDescriptorKind K, unsigned Field)

Definition Intrinsics.h:234

unsigned getArgumentNumber() const

Definition Intrinsics.h:202

ElementCount Vector_Width

Definition Intrinsics.h:192

unsigned getVectorDivisor() const

Definition Intrinsics.h:225

static IITDescriptor getVector(unsigned Width, bool IsScalable)

Definition Intrinsics.h:246

unsigned Struct_NumElements

Definition Intrinsics.h:190

IITDescriptorKind

Definition Intrinsics.h:156

@ Vector

Definition Intrinsics.h:168

@ SameVecWidthArgument

Definition Intrinsics.h:175

@ VecOfAnyPtrsToElt

Definition Intrinsics.h:176

@ Double

Definition Intrinsics.h:165

@ VarArg

Definition Intrinsics.h:158

@ Argument

Definition Intrinsics.h:171

@ Metadata

Definition Intrinsics.h:161

@ PPCQuad

Definition Intrinsics.h:182

@ OneNthEltsVecArgument

Definition Intrinsics.h:174

@ Float

Definition Intrinsics.h:164

@ Token

Definition Intrinsics.h:160

@ Pointer

Definition Intrinsics.h:169

@ Void

Definition Intrinsics.h:157

@ VecOfBitcastsToInt

Definition Intrinsics.h:180

@ TruncArgument

Definition Intrinsics.h:173

@ Subdivide2Argument

Definition Intrinsics.h:178

@ ExtendArgument

Definition Intrinsics.h:172

@ VecElementArgument

Definition Intrinsics.h:177

@ Struct

Definition Intrinsics.h:170

@ Half

Definition Intrinsics.h:162

@ Subdivide4Argument

Definition Intrinsics.h:179

@ MMX

Definition Intrinsics.h:159

@ Quad

Definition Intrinsics.h:166

@ Integer

Definition Intrinsics.h:167

@ AArch64Svcount

Definition Intrinsics.h:183

@ AMX

Definition Intrinsics.h:181

@ BFloat

Definition Intrinsics.h:163

unsigned Integer_Width

Definition Intrinsics.h:187

static IITDescriptor get(IITDescriptorKind K, unsigned short Hi, unsigned short Lo)

Definition Intrinsics.h:239

unsigned Argument_Info

Definition Intrinsics.h:191

unsigned Pointer_AddressSpace

Definition Intrinsics.h:189

ArgKind

Definition Intrinsics.h:196

ArgKind getArgumentKind() const

Definition Intrinsics.h:209

unsigned getRefArgNumber() const

Definition Intrinsics.h:229

unsigned Float_Width

Definition Intrinsics.h:188

unsigned getOverloadArgNumber() const

Definition Intrinsics.h:219