|
LLVM
3.7.0
|
This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM. More...
Classes | |
| struct | IITDescriptor |
| This is a type descriptor which explains the type requirements of an intrinsic. More... | |
Enumerations | |
| enum | ID : unsigned { not_intrinsic = 0, num_intrinsics } |
Functions | |
| std::string | getName (ID id, ArrayRef< Type * > Tys=None) |
| Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx". More... | |
| FunctionType * | getType (LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None) |
| Return the function type for an intrinsic. More... | |
| bool | isOverloaded (ID id) |
| Returns true if the intrinsic can be overloaded. More... | |
| bool | isLeaf (ID id) |
| Returns true if the intrinsic is a leaf, i.e. More... | |
| AttributeSet | getAttributes (LLVMContext &C, ID id) |
| Return the attributes for an intrinsic. More... | |
| Function * | getDeclaration (Module *M, ID id, ArrayRef< Type * > Tys=None) |
| Create or insert an LLVM Function declaration for an intrinsic, and return it. More... | |
| ID | getIntrinsicForGCCBuiltin (const char *Prefix, const char *BuiltinName) |
| Map a GCC builtin name to an intrinsic ID. More... | |
| ID | getIntrinsicForMSBuiltin (const char *Prefix, const char *BuiltinName) |
| Map a MS builtin name to an intrinsic ID. More... | |
| void | getIntrinsicInfoTableEntries (ID id, SmallVectorImpl< IITDescriptor > &T) |
| Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors. More... | |
This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
The enum values are returned by Function::getIntrinsicID().
| enum llvm::Intrinsic::ID : unsigned |
| Enumerator | |
|---|---|
| not_intrinsic | |
| num_intrinsics | |
Definition at line 35 of file Intrinsics.h.
| AttributeSet llvm::Intrinsic::getAttributes | ( | LLVMContext & | C, |
| ID | id | ||
| ) |
Return the attributes for an intrinsic.
Referenced by llvm::AttributeSet::getAsString(), llvm::AttributeSet::getAttribute(), llvm::AttributeSet::getDereferenceableBytes(), llvm::AttributeSet::getDereferenceableOrNullBytes(), 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().
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 866 of file Function.cpp.
References llvm::Module::getContext(), getName(), llvm::Module::getOrInsertFunction(), and getType().
Referenced by callIntrinsic(), changeToUnreachable(), CombineUAddWithOverflow(), llvm::IRBuilderBase::CreateAssumption(), llvm::IRBuilderBase::CreateGCRelocate(), CreateGCRelocates(), llvm::IRBuilderBase::CreateGCResult(), llvm::IRBuilderBase::CreateGCStatepointCall(), llvm::IRBuilderBase::CreateGCStatepointInvoke(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), CreatePrologue(), createStubLandingPad(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), generateUnsignedDivisionCode(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::ARMTargetLowering::makeDMB(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), UpgradeX86IntrinsicsWith8BitMask(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFPTrunc().
Map a GCC builtin name to an intrinsic ID.
Referenced by llvm::AMDGPUIntrinsicInfo::lookupName().
Map a MS builtin name to an intrinsic ID.
| void llvm::Intrinsic::getIntrinsicInfoTableEntries | ( | ID | id, |
| SmallVectorImpl< IITDescriptor > & | T | ||
| ) |
Return the IIT table descriptor for the specified intrinsic into an array of IITDescriptors.
Definition at line 710 of file Function.cpp.
References DecodeIITType(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::ArrayRef< T >::size().
Referenced by getType().
Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
Definition at line 500 of file Function.cpp.
References llvm::ArrayRef< T >::empty(), getMangledTypeStr(), num_intrinsics, and llvm::ArrayRef< T >::size().
Referenced by llvm::SDNode::getOperationName(), and UpgradeIntrinsicFunction1().
| FunctionType * llvm::Intrinsic::getType | ( | LLVMContext & | Context, |
| ID | id, | ||
| ArrayRef< Type * > | Tys = None |
||
| ) |
Return the function type for an intrinsic.
Definition at line 822 of file Function.cpp.
References llvm::SmallVectorTemplateCommon< T >::back(), DecodeFixedType(), llvm::SmallVectorBase::empty(), llvm::ArrayRef< T >::empty(), llvm::FunctionType::get(), getIntrinsicInfoTableEntries(), llvm::Type::isVoidTy(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by llvm::PHINode::addIncoming(), llvm::LoopAccessInfo::addRuntimeCheck(), CastGEPIndices(), llvm::ConstantExprKeyType::create(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getAddRecExpr(), getDeclaration(), llvm::CastInst::getDestTy(), llvm::DataLayout::getIndexedOffset(), llvm::ScalarEvolution::getMulExpr(), llvm::ScalarEvolution::getSMaxExpr(), llvm::ScalarEvolution::getUMaxExpr(), llvm::ConstantExpr::getWithOperands(), llvm::object::Elf_Sym_Impl< ELFT >::isCommon(), LLVMTypeOf(), PerformHeapAllocSRoA(), llvm::QualifyName(), llvm::object::Elf_Sym_Impl< ELFT >::setBinding(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, false >, false >::setSymbol(), llvm::object::Elf_Rel_Impl< ELFType< TargetEndianness, true >, false >::setSymbol(), llvm::SimplifyGEPInst(), SimplifyGEPInst(), and llvm::InstCombiner::visitLandingPadInst().
| bool llvm::Intrinsic::isLeaf | ( | ID | id | ) |
Returns true if the intrinsic is a leaf, i.e.
it does not make any calls itself. Most intrinsics are leafs, the exceptions being the patchpoint and statepoint intrinsics. These call (or invoke) their "target" argument.
Definition at line 849 of file Function.cpp.
Referenced by llvm::CallGraphNode::addCalledFunction(), and isGCLeafFunction().
| bool llvm::Intrinsic::isOverloaded | ( | ID | id | ) |
Returns true if the intrinsic can be overloaded.
Definition at line 843 of file Function.cpp.
1.8.6