LLVM API Documentation
Classes | |
struct | IITDescriptor |
Enumerations | |
enum | ID { not_intrinsic = 0 } |
Functions | |
std::string | getName (ID id, ArrayRef< Type * > Tys=None) |
FunctionType * | getType (LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None) |
bool | isOverloaded (ID id) |
AttributeSet | getAttributes (LLVMContext &C, ID id) |
Function * | getDeclaration (Module *M, ID id, ArrayRef< Type * > Tys=None) |
ID | getIntrinsicForGCCBuiltin (const char *Prefix, const char *BuiltinName) |
Map a GCC builtin name to an intrinsic ID. | |
ID | getIntrinsicForMSBuiltin (const char *Prefix, const char *BuiltinName) |
Map a MS builtin name to an intrinsic ID. | |
void | getIntrinsicInfoTableEntries (ID id, SmallVectorImpl< IITDescriptor > &T) |
Intrinsic Namespace - This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM. These enum values are returned by Function::getIntrinsicID().
enum llvm::Intrinsic::ID |
Definition at line 36 of file Intrinsics.h.
AttributeSet llvm::Intrinsic::getAttributes | ( | LLVMContext & | C, |
ID | id | ||
) |
Intrinsic::getAttributes(ID) - Return the attributes for an intrinsic.
Referenced by llvm::MipsAsmPrinter::EmitFunctionBodyStart(), llvm::AttributeSet::getAsString(), llvm::AttributeSet::getAttribute(), llvm::AttributeSet::getDereferenceableBytes(), llvm::AttributeSet::getFnAttributes(), llvm::AttributeSet::getParamAlignment(), llvm::AttributeSet::getParamAttributes(), llvm::AttributeSet::getRetAttributes(), llvm::AttributeSet::getStackAlignment(), llvm::AttributeSet::hasAttribute(), llvm::AttributeSet::hasAttributes(), llvm::Argument::hasNonNullAttr(), haveSameSpecialState(), llvm::returnTypeIsEligibleForTailCall(), and llvm::UpgradeIntrinsicFunction().
Function * llvm::Intrinsic::getDeclaration | ( | Module * | M, |
ID | id, | ||
ArrayRef< Type * > | Tys = None |
||
) |
Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function declaration for an intrinsic, and return it.
The Tys parameter is for intrinsics with overloaded types (e.g., those using iAny, fAny, vAny, or iPTRAny). For a declaration of an overloaded intrinsic, Tys must provide exactly one type for each overloaded type in the intrinsic.
Definition at line 751 of file Function.cpp.
References llvm::Module::getContext(), getName(), llvm::Module::getOrInsertFunction(), and getType().
Referenced by changeToUnreachable(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), CreatePrologue(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), generateUnsignedDivisionCode(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), llvm::IntrinsicLowering::LowerToByteSwap(), makeDMB(), ProcessUAddIdiom(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), UpgradeX86IntrinsicsWith8BitMask(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFPTrunc().
ID llvm::Intrinsic::getIntrinsicForGCCBuiltin | ( | const char * | Prefix, |
const char * | BuiltinName | ||
) |
Map a GCC builtin name to an intrinsic ID.
Referenced by llvm::AMDGPUIntrinsicInfo::lookupName().
ID llvm::Intrinsic::getIntrinsicForMSBuiltin | ( | const char * | Prefix, |
const char * | BuiltinName | ||
) |
Map a MS builtin name to an intrinsic ID.
void llvm::Intrinsic::getIntrinsicInfoTableEntries | ( | ID | id, |
SmallVectorImpl< IITDescriptor > & | T | ||
) |
getIntrinsicInfoTableEntries - Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors.
Definition at line 634 of file Function.cpp.
References DecodeIITType(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::ArrayRef< T >::size().
Referenced by getType().
std::string llvm::Intrinsic::getName | ( | ID | id, |
ArrayRef< Type * > | Tys = None |
||
) |
Intrinsic::getName(ID) - Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
Definition at line 449 of file Function.cpp.
References llvm::ArrayRef< T >::empty(), llvm::EVT::getEVT(), llvm::EVT::getEVTString(), llvm::ArrayRef< T >::size(), and llvm::utostr().
Referenced by llvm::DISubprogram::describes(), getDeclaration(), llvm::object::Archive::Child::getMemoryBufferRef(), llvm::RegionBase< Tr >::getNameStr(), llvm::SDNode::getOperationName(), llvm::Type::getStructName(), INITIALIZE_PASS(), llvm::MachineTraceMetrics::Ensemble::invalidate(), LLVMGetSectionName(), LLVMGetSymbolName(), llvm::operator<<(), llvm::MachineTraceMetrics::Ensemble::print(), llvm::DIVariable::printExtendedName(), llvm::DIType::printInternal(), llvm::RawInstrProfReader< IntPtrT >::readNextRecord(), UpgradeIntrinsicFunction1(), and llvm::SelectionDAG::viewGraph().
FunctionType * llvm::Intrinsic::getType | ( | LLVMContext & | Context, |
ID | id, | ||
ArrayRef< Type * > | Tys = None |
||
) |
Intrinsic::getType(ID) - Return the function type for an intrinsic.
Definition at line 725 of file Function.cpp.
References DecodeFixedType(), llvm::ArrayRef< T >::empty(), llvm::FunctionType::get(), getIntrinsicInfoTableEntries(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by llvm::PHINode::addIncoming(), CastGEPIndices(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), getDeclaration(), llvm::CastInst::getDestTy(), llvm::DataLayout::getIndexedOffset(), llvm::ScalarEvolution::getMulExpr(), llvm::DIVariable::getSizeInBits(), llvm::ScalarEvolution::getSMaxExpr(), llvm::ScalarEvolution::getUMaxExpr(), llvm::ConstantExpr::getWithOperands(), LLVMGetRelocationType(), LLVMTypeOf(), PerformHeapAllocSRoA(), llvm::DebugInfoFinder::processDeclare(), llvm::DebugInfoFinder::processValue(), llvm::QualifyName(), llvm::object::Elf_Sym_Impl< ELFT >::setBinding(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, MaxAlign, true >, isRela >::setSymbol(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, MaxAlign, false >, isRela >::setSymbol(), SimplifyGEPInst(), and llvm::InstCombiner::visitLandingPadInst().
bool llvm::Intrinsic::isOverloaded | ( | ID | id | ) |
Intrinsic::isOverloaded(ID) - Returns true if the intrinsic can be overloaded.
Definition at line 740 of file Function.cpp.