LLVM 22.0.0git
Classes | Namespaces | Macros | Enumerations | Functions | Variables
Intrinsics.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/TypeSize.h"
#include <optional>
#include <string>
#include "llvm/IR/IntrinsicEnums.inc"

Go to the source code of this file.

Classes

struct  llvm::Intrinsic::IITDescriptor
 This is a type descriptor which explains the type requirements of an intrinsic. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::Intrinsic
 This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
 

Macros

#define GET_INTRINSIC_ENUM_VALUES
 
#define GET_INTRINSIC_ARGKIND
 

Enumerations

enum  llvm::Intrinsic::IndependentIntrinsics : unsigned { llvm::Intrinsic::not_intrinsic = 0 }
 
enum  llvm::Intrinsic::MatchIntrinsicTypesResult { llvm::Intrinsic::MatchIntrinsicTypes_Match = 0 , llvm::Intrinsic::MatchIntrinsicTypes_NoMatchRet = 1 , llvm::Intrinsic::MatchIntrinsicTypes_NoMatchArg = 2 }
 

Functions

LLVM_ABI StringRef llvm::Intrinsic::getName (ID id)
 Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
 
LLVM_ABI StringRef llvm::Intrinsic::getBaseName (ID id)
 Return the LLVM name for an intrinsic, without encoded types for overloading, such as "llvm.ssa.copy".
 
LLVM_ABI std::string llvm::Intrinsic::getName (ID Id, ArrayRef< Type * > Tys, Module *M, FunctionType *FT=nullptr)
 Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx" or "llvm.ssa.copy.p0s_s.1".
 
LLVM_ABI std::string llvm::Intrinsic::getNameNoUnnamedTypes (ID Id, ArrayRef< Type * > Tys)
 Return the LLVM name for an intrinsic.
 
LLVM_ABI FunctionTypellvm::Intrinsic::getType (LLVMContext &Context, ID id, ArrayRef< Type * > Tys={})
 Return the function type for an intrinsic.
 
LLVM_ABI bool llvm::Intrinsic::isOverloaded (ID id)
 Returns true if the intrinsic can be overloaded.
 
LLVM_ABI bool llvm::Intrinsic::isTargetIntrinsic (ID IID)
 isTargetIntrinsic - Returns true if IID is an intrinsic specific to a certain target.
 
LLVM_ABI ID llvm::Intrinsic::lookupIntrinsicID (StringRef Name)
 This does the actual lookup of an intrinsic ID which matches the given function name.
 
LLVM_ABI AttributeList llvm::Intrinsic::getAttributes (LLVMContext &C, ID id, FunctionType *FT)
 Return the attributes for an intrinsic.
 
LLVM_ABI AttributeSet llvm::Intrinsic::getFnAttributes (LLVMContext &C, ID id)
 Return the function attributes for an intrinsic.
 
LLVM_ABI Functionllvm::Intrinsic::getOrInsertDeclaration (Module *M, ID id, ArrayRef< Type * > Tys={})
 Look up the Function declaration of the intrinsic id in the Module M.
 
LLVM_ABI Functionllvm::Intrinsic::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.
 
LLVM_ABI Functionllvm::Intrinsic::getDeclarationIfExists (Module *M, ID id, ArrayRef< Type * > Tys, FunctionType *FT=nullptr)
 This version supports overloaded intrinsics.
 
LLVM_ABI ID llvm::Intrinsic::getIntrinsicForClangBuiltin (StringRef TargetPrefix, StringRef BuiltinName)
 Map a Clang builtin name to an intrinsic ID.
 
LLVM_ABI ID llvm::Intrinsic::getIntrinsicForMSBuiltin (StringRef TargetPrefix, StringRef BuiltinName)
 Map a MS builtin name to an intrinsic ID.
 
LLVM_ABI bool llvm::Intrinsic::isConstrainedFPIntrinsic (ID QID)
 Returns true if the intrinsic ID is for one of the "Constrained Floating-Point Intrinsics".
 
LLVM_ABI bool llvm::Intrinsic::hasConstrainedFPRoundingModeOperand (ID QID)
 Returns true if the intrinsic ID is for one of the "Constrained Floating-Point Intrinsics" that take rounding mode metadata.
 
LLVM_ABI void llvm::Intrinsic::getIntrinsicInfoTableEntries (ID id, SmallVectorImpl< IITDescriptor > &T)
 Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors.
 
LLVM_ABI MatchIntrinsicTypesResult llvm::Intrinsic::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 bool llvm::Intrinsic::matchIntrinsicVarArg (bool isVarArg, ArrayRef< IITDescriptor > &Infos)
 Verify if the intrinsic has variable arguments.
 
LLVM_ABI bool llvm::Intrinsic::getIntrinsicSignature (Intrinsic::ID, FunctionType *FT, SmallVectorImpl< Type * > &ArgTys)
 Gets the type arguments of an intrinsic call by matching type contraints specified by the .td file.
 
LLVM_ABI bool llvm::Intrinsic::getIntrinsicSignature (Function *F, SmallVectorImpl< Type * > &ArgTys)
 Same as previous, but accepts a Function instead of ID and FunctionType.
 
LLVM_ABI std::optional< Function * > llvm::Intrinsic::remangleIntrinsicFunction (Function *F)
 
LLVM_ABI Intrinsic::ID llvm::Intrinsic::getInterleaveIntrinsicID (unsigned Factor)
 Returns the corresponding llvm.vector.interleaveN intrinsic for factor N.
 
LLVM_ABI Intrinsic::ID llvm::Intrinsic::getDeinterleaveIntrinsicID (unsigned Factor)
 Returns the corresponding llvm.vector.deinterleaveN intrinsic for factor N.
 

Variables

static const int llvm::Intrinsic::NoAliasScopeDeclScopeArg = 0
 

Macro Definition Documentation

◆ GET_INTRINSIC_ARGKIND

#define GET_INTRINSIC_ARGKIND

Definition at line 177 of file Intrinsics.h.

◆ GET_INTRINSIC_ENUM_VALUES

#define GET_INTRINSIC_ENUM_VALUES

Definition at line 49 of file Intrinsics.h.