|
LLVM
3.7.0
|
#include "llvm/IR/Function.h"#include "LLVMContextImpl.h"#include "SymbolTableListTraitsImpl.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringExtras.h"#include "llvm/CodeGen/ValueTypes.h"#include "llvm/IR/CallSite.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/IntrinsicInst.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/MDBuilder.h"#include "llvm/IR/Metadata.h"#include "llvm/IR/Module.h"#include "llvm/Support/ManagedStatic.h"#include "llvm/Support/RWMutex.h"#include "llvm/Support/StringPool.h"#include "llvm/Support/Threading.h"#include "llvm/IR/Intrinsics.gen"Go to the source code of this file.
Macros | |
| #define | GET_FUNCTION_RECOGNIZER |
| #define | GET_INTRINSIC_NAME_TABLE |
| #define | GET_INTRINSIC_GENERATOR_GLOBAL |
| #define | GET_INTRINSIC_OVERLOAD_TABLE |
| #define | GET_INTRINSIC_ATTRIBUTES |
| This defines the "Intrinsic::getAttributes(ID id)" method. More... | |
| #define | GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN |
| #define | GET_LLVM_INTRINSIC_FOR_MS_BUILTIN |
Enumerations | |
| enum | IIT_Info { IIT_Done = 0, IIT_I1 = 1, IIT_I8 = 2, IIT_I16 = 3, IIT_I32 = 4, IIT_I64 = 5, IIT_F16 = 6, IIT_F32 = 7, IIT_F64 = 8, IIT_V2 = 9, IIT_V4 = 10, IIT_V8 = 11, IIT_V16 = 12, IIT_V32 = 13, IIT_PTR = 14, IIT_ARG = 15, IIT_V64 = 16, IIT_MMX = 17, IIT_METADATA = 18, IIT_EMPTYSTRUCT = 19, IIT_STRUCT2 = 20, IIT_STRUCT3 = 21, IIT_STRUCT4 = 22, IIT_STRUCT5 = 23, IIT_EXTEND_ARG = 24, IIT_TRUNC_ARG = 25, IIT_ANYPTR = 26, IIT_V1 = 27, IIT_VARARG = 28, IIT_HALF_VEC_ARG = 29, IIT_SAME_VEC_WIDTH_ARG = 30, IIT_PTR_TO_ARG = 31, IIT_VEC_OF_PTRS_TO_ELT = 32, IIT_I128 = 33 } |
| IIT_Info - These are enumerators that describe the entries returned by the getIntrinsicInfoTableEntries function. More... | |
Functions | |
| static Intrinsic::ID | lookupIntrinsicID (const ValueName *ValName) |
| This does the actual lookup of an intrinsic ID which matches the given function name. More... | |
| static std::string | getMangledTypeStr (Type *Ty) |
| Returns a stable mangling for the type specified for use in the name mangling scheme used by 'any' types in intrinsic signatures. More... | |
| static void | DecodeIITType (unsigned &NextElt, ArrayRef< unsigned char > Infos, SmallVectorImpl< Intrinsic::IITDescriptor > &OutputTable) |
| static Type * | DecodeFixedType (ArrayRef< Intrinsic::IITDescriptor > &Infos, ArrayRef< Type * > Tys, LLVMContext &Context) |
Variables | |
| static DenseMap< const Function *, PooledStringPtr > * | GCNames |
| static StringPool * | GCNamePool |
| static ManagedStatic < sys::SmartRWMutex< true > > | GCLock |
| #define GET_FUNCTION_RECOGNIZER |
| #define GET_INTRINSIC_ATTRIBUTES |
This defines the "Intrinsic::getAttributes(ID id)" method.
Definition at line 862 of file Function.cpp.
| #define GET_INTRINSIC_GENERATOR_GLOBAL |
Definition at line 706 of file Function.cpp.
| #define GET_INTRINSIC_NAME_TABLE |
| #define GET_INTRINSIC_OVERLOAD_TABLE |
| #define GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN |
Definition at line 875 of file Function.cpp.
| #define GET_LLVM_INTRINSIC_FOR_MS_BUILTIN |
Definition at line 880 of file Function.cpp.
| enum IIT_Info |
IIT_Info - These are enumerators that describe the entries returned by the getIntrinsicInfoTableEntries function.
NOTE: This must be kept in synch with the copy in TblGen/IntrinsicEmitter!
Definition at line 522 of file Function.cpp.
|
static |
Definition at line 744 of file Function.cpp.
References llvm::Intrinsic::IITDescriptor::Argument, llvm::Intrinsic::IITDescriptor::Double, llvm::dyn_cast(), llvm::Intrinsic::IITDescriptor::ExtendArgument, llvm::Intrinsic::IITDescriptor::Float, llvm::ArrayRef< T >::front(), llvm::IntegerType::get(), llvm::StructType::get(), llvm::VectorType::get(), llvm::PointerType::get(), llvm::IntegerType::getBitWidth(), getBitWidth(), llvm::Type::getDoubleTy(), llvm::VectorType::getExtendedElementVectorType(), llvm::Type::getFloatTy(), llvm::VectorType::getHalfElementsVectorType(), llvm::Type::getHalfTy(), llvm::Type::getMetadataTy(), llvm::VectorType::getNumElements(), llvm::VectorType::getTruncatedElementVectorType(), llvm::PointerType::getUnqual(), llvm::Type::getVectorElementType(), llvm::Type::getVoidTy(), llvm::Type::getX86_MMXTy(), llvm::Intrinsic::IITDescriptor::Half, llvm::Intrinsic::IITDescriptor::HalfVecArgument, llvm::Intrinsic::IITDescriptor::Integer, llvm_unreachable, llvm::makeArrayRef(), llvm::Intrinsic::IITDescriptor::Metadata, llvm::Intrinsic::IITDescriptor::MMX, llvm::Intrinsic::IITDescriptor::Pointer, llvm::Intrinsic::IITDescriptor::PtrToArgument, llvm::Intrinsic::IITDescriptor::SameVecWidthArgument, llvm::ArrayRef< T >::slice(), llvm::Intrinsic::IITDescriptor::Struct, llvm::Intrinsic::IITDescriptor::TruncArgument, llvm::Intrinsic::IITDescriptor::VarArg, llvm::Intrinsic::IITDescriptor::VecOfPtrsToElt, llvm::Intrinsic::IITDescriptor::Vector, and llvm::Intrinsic::IITDescriptor::Void.
Referenced by llvm::Intrinsic::getType().
|
static |
Definition at line 563 of file Function.cpp.
References llvm::Intrinsic::IITDescriptor::Argument, llvm::Intrinsic::IITDescriptor::Double, llvm::Intrinsic::IITDescriptor::ExtendArgument, llvm::Intrinsic::IITDescriptor::Float, llvm::Intrinsic::IITDescriptor::get(), llvm::Intrinsic::IITDescriptor::Half, llvm::Intrinsic::IITDescriptor::HalfVecArgument, IIT_ANYPTR, IIT_ARG, IIT_Done, IIT_EMPTYSTRUCT, IIT_EXTEND_ARG, IIT_F16, IIT_F32, IIT_F64, IIT_HALF_VEC_ARG, IIT_I1, IIT_I128, IIT_I16, IIT_I32, IIT_I64, IIT_I8, IIT_METADATA, IIT_MMX, IIT_PTR, IIT_PTR_TO_ARG, IIT_SAME_VEC_WIDTH_ARG, IIT_STRUCT2, IIT_STRUCT3, IIT_STRUCT4, IIT_STRUCT5, IIT_TRUNC_ARG, IIT_V1, IIT_V16, IIT_V2, IIT_V32, IIT_V4, IIT_V64, IIT_V8, IIT_VARARG, IIT_VEC_OF_PTRS_TO_ELT, llvm::Intrinsic::IITDescriptor::Integer, llvm_unreachable, llvm::Intrinsic::IITDescriptor::Metadata, llvm::Intrinsic::IITDescriptor::MMX, llvm::Intrinsic::IITDescriptor::Pointer, llvm::Intrinsic::IITDescriptor::PtrToArgument, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::Intrinsic::IITDescriptor::SameVecWidthArgument, llvm::ArrayRef< T >::size(), llvm::Intrinsic::IITDescriptor::Struct, llvm::Intrinsic::IITDescriptor::TruncArgument, llvm::Intrinsic::IITDescriptor::VarArg, llvm::Intrinsic::IITDescriptor::VecOfPtrsToElt, llvm::Intrinsic::IITDescriptor::Vector, and llvm::Intrinsic::IITDescriptor::Void.
Referenced by llvm::Intrinsic::getIntrinsicInfoTableEntries().
|
static |
Returns a stable mangling for the type specified for use in the name mangling scheme used by 'any' types in intrinsic signatures.
The mangling of named types is simply their name. Manglings for unnamed types consist of a prefix ('p' for pointers, 'a' for arrays, 'f_' for functions) combined with the mangling of their component types. A vararg function type will have a suffix of 'vararg'. Since function types can contain other function types, we close a function type mangling with suffix 'f' which can't be confused with it's prefix. This ensures we don't have collisions between two unrelated function types. Otherwise, you might parse ffXX as f(fXX) or f(fX)X. (X is a placeholder for any other type.) Manglings of integers, floats, and vectors ('i', 'f', and 'v' prefix in most cases) fall back to the MVT codepath, where they could be mangled to 'x86mmx', for example; matching on derived types is not sufficient to mangle everything.
Definition at line 476 of file Function.cpp.
References llvm::EVT::getEVT(), llvm::EVT::getEVTString(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::FunctionType::isVarArg(), and llvm::utostr().
Referenced by llvm::Intrinsic::getName().
|
static |
This does the actual lookup of an intrinsic ID which matches the given function name.
Definition at line 442 of file Function.cpp.
References llvm::StringMapEntry< ValueTy >::getKeyData(), llvm::StringMapEntryBase::getKeyLength(), and llvm::Intrinsic::not_intrinsic.
Referenced by llvm::Function::recalculateIntrinsicID().
|
static |
Definition at line 377 of file Function.cpp.
Referenced by llvm::Function::clearGC(), llvm::Function::getGC(), llvm::Function::hasGC(), and llvm::Function::setGC().
|
static |
Definition at line 376 of file Function.cpp.
Referenced by llvm::Function::clearGC(), and llvm::Function::setGC().
|
static |
Definition at line 375 of file Function.cpp.
Referenced by llvm::Function::clearGC(), llvm::Function::hasGC(), and llvm::Function::setGC().
1.8.6