Go to the documentation of this file.
15 #ifndef LLVM_IR_INTRINSICS_H
16 #define LLVM_IR_INTRINSICS_H
47 #define GET_INTRINSIC_ENUM_VALUES
48 #include "llvm/IR/IntrinsicEnums.inc"
49 #undef GET_INTRINSIC_ENUM_VALUES
77 ArrayRef<Type *> Tys = std::nullopt);
93 ArrayRef<Type *> Tys = std::nullopt);
198 unsigned Field = Hi << 16 | Lo;
StringRef getBaseName(ID id)
Return the LLVM name for an intrinsic, without encoded types for overloading, such as "llvm....
This class represents an incoming formal argument to a Function.
bool isOverloaded(ID id)
Returns true if the intrinsic can be overloaded.
This is an optimization pass for GlobalISel generic memory operations.
static IITDescriptor get(IITDescriptorKind K, unsigned short Hi, unsigned short Lo)
@ MatchIntrinsicTypes_NoMatchArg
enum llvm::Intrinsic::IITDescriptor::IITDescriptorKind Kind
StringRef getName(ID id)
Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
int lookupLLVMIntrinsicByName(ArrayRef< const char * > NameTable, StringRef Name)
Looks up Name in NameTable via binary search.
AttributeList getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
std::optional< Function * > remangleIntrinsicFunction(Function *F)
static constexpr ElementCount get(ScalarTy MinVal, bool Scalable)
bool getIntrinsicSignature(Function *F, SmallVectorImpl< Type * > &ArgTys)
Gets the type arguments of an intrinsic call by matching type contraints specified by the ....
@ MatchIntrinsicTypes_NoMatchRet
unsigned Struct_NumElements
ID getIntrinsicForClangBuiltin(const char *Prefix, StringRef BuiltinName)
Map a Clang builtin name to an intrinsic ID.
(vector float) vec_cmpeq(*A, *B) C
unsigned getArgumentNumber() const
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=std::nullopt)
Return the function type for an intrinsic.
unsigned Pointer_AddressSpace
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
@ MatchIntrinsicTypes_Match
static IITDescriptor get(IITDescriptorKind K, unsigned Field)
bool matchIntrinsicVarArg(bool isVarArg, ArrayRef< IITDescriptor > &Infos)
Verify if the intrinsic has variable arguments.
void getIntrinsicInfoTableEntries(ID id, SmallVectorImpl< IITDescriptor > &T)
Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors.
ID getIntrinsicForMSBuiltin(const char *Prefix, StringRef BuiltinName)
Map a MS builtin name to an intrinsic ID.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getOverloadArgNumber() const
static const int NoAliasScopeDeclScopeArg
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Machine Check Debug Module
Function * getDeclaration(Module *M, ID id, ArrayRef< Type * > Tys=std::nullopt)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
std::string getNameNoUnnamedTypes(ID Id, ArrayRef< Type * > Tys)
Return the LLVM name for an intrinsic.
ElementCount Vector_Width
unsigned getRefArgNumber() const
MatchIntrinsicTypesResult matchIntrinsicSignature(FunctionType *FTy, ArrayRef< IITDescriptor > &Infos, SmallVectorImpl< Type * > &ArgTys)
Match the specified function type with the type constraints specified by the .td file.
static IITDescriptor getVector(unsigned Width, bool IsScalable)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a type descriptor which explains the type requirements of an intrinsic.
MatchIntrinsicTypesResult
ArgKind getArgumentKind() const
Class to represent function types.