diff options
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 2c7b4c6eff10..8274213aa839 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -160,6 +160,7 @@ typedef enum { LLVMVectorTypeKind, /**< Fixed width SIMD vector type */ LLVMMetadataTypeKind, /**< Metadata */ LLVMX86_MMXTypeKind, /**< X86 MMX */ + LLVMX86_AMXTypeKind, /**< X86 AMX */ LLVMTokenTypeKind, /**< Tokens */ LLVMScalableVectorTypeKind, /**< Scalable SIMD vector type */ LLVMBFloatTypeKind /**< 16 bit brain floating point type */ @@ -269,6 +270,7 @@ typedef enum { LLVMConstantVectorValueKind, LLVMUndefValueValueKind, + LLVMPoisonValueValueKind, LLVMConstantAggregateZeroValueKind, LLVMConstantDataArrayValueKind, LLVMConstantDataVectorValueKind, @@ -626,6 +628,11 @@ LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A); LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A); /** + * Obtain a Type from a context by its registered name. + */ +LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name); + +/** * @} */ @@ -866,9 +873,7 @@ LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty, */ LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M); -/** - * Obtain a Type from a module by its registered name. - */ +/** Deprecated: Use LLVMGetTypeByName2 instead. */ LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); /** @@ -1444,9 +1449,21 @@ unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy); LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); /** - * Obtain the number of elements in a vector type. + * Create a vector type that contains a defined type and has a scalable + * number of elements. * - * This only works on types that represent vectors. + * The created type will exist in the context thats its element type + * exists in. + * + * @see llvm::ScalableVectorType::get() + */ +LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType, + unsigned ElementCount); + +/** + * Obtain the (possibly scalable) number of elements in a vector type. + * + * This only works on types that represent vectors (fixed or scalable). * * @see llvm::VectorType::getNumElements() */ @@ -1478,6 +1495,11 @@ LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C); LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C); /** + * Create a X86 AMX type in a context. + */ +LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C); + +/** * Create a token type in a context. */ LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C); @@ -1494,6 +1516,7 @@ LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C); LLVMTypeRef LLVMVoidType(void); LLVMTypeRef LLVMLabelType(void); LLVMTypeRef LLVMX86MMXType(void); +LLVMTypeRef LLVMX86AMXType(void); /** * @} @@ -1550,6 +1573,7 @@ LLVMTypeRef LLVMX86MMXType(void); macro(Function) \ macro(GlobalVariable) \ macro(UndefValue) \ + macro(PoisonValue) \ macro(Instruction) \ macro(UnaryOperator) \ macro(BinaryOperator) \ @@ -1684,6 +1708,11 @@ LLVMBool LLVMIsConstant(LLVMValueRef Val); LLVMBool LLVMIsUndef(LLVMValueRef Val); /** + * Determine whether a value instance is poisonous. + */ +LLVMBool LLVMIsPoison(LLVMValueRef Val); + +/** * Convert value instances between types. * * Internally, an LLVMValueRef is "pinned" to a specific type. This @@ -1842,6 +1871,13 @@ LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty); LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty); /** + * Obtain a constant value referring to a poison value of a type. + * + * @see llvm::PoisonValue::get() + */ +LLVMValueRef LLVMGetPoison(LLVMTypeRef Ty); + +/** * Determine whether a value instance is null. * * @see llvm::Constant::isNullValue() @@ -3636,7 +3672,7 @@ void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); /* Get the number of clauses on the landingpad instruction */ unsigned LLVMGetNumClauses(LLVMValueRef LandingPad); -/* Get the value of the clause at idnex Idx on the landingpad instruction */ +/* Get the value of the clause at index Idx on the landingpad instruction */ LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx); /* Add a catch or filter clause to the landingpad instruction */ @@ -3937,6 +3973,26 @@ LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread); +/** + * Get the number of elements in the mask of a ShuffleVector instruction. + */ +unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst); + +/** + * \returns a constant that specifies that the result of a \c ShuffleVectorInst + * is undefined. + */ +int LLVMGetUndefMaskElem(void); + +/** + * Get the mask value at position Elt in the mask of a ShuffleVector + * instruction. + * + * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is undef + * at that position. + */ +int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt); + LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst); void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread); |