Go to the documentation of this file.
514 void *DiagnosticContext);
631 const char *K,
unsigned KLength,
632 const char *V,
unsigned VLength);
805 unsigned Index,
size_t *Len);
822 const char *
Key,
size_t KeyLen);
831 const char *
Key,
size_t KeyLen,
848 char **ErrorMessage);
885 size_t AsmStringSize,
char *Constraints,
886 size_t ConstraintsSize,
LLVMBool HasSideEffects,
937 const char *
Name,
size_t NameLen);
1308 unsigned ElementCount,
LLVMBool Packed);
1338 unsigned ElementCount,
LLVMBool Packed);
1498 unsigned ElementCount);
1587 #define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \
1593 macro(BlockAddress) \
1594 macro(ConstantAggregateZero) \
1595 macro(ConstantArray) \
1596 macro(ConstantDataSequential) \
1597 macro(ConstantDataArray) \
1598 macro(ConstantDataVector) \
1599 macro(ConstantExpr) \
1601 macro(ConstantInt) \
1602 macro(ConstantPointerNull) \
1603 macro(ConstantStruct) \
1604 macro(ConstantTokenNone) \
1605 macro(ConstantVector) \
1606 macro(GlobalValue) \
1607 macro(GlobalAlias) \
1608 macro(GlobalObject) \
1610 macro(GlobalVariable) \
1611 macro(GlobalIFunc) \
1613 macro(PoisonValue) \
1614 macro(Instruction) \
1615 macro(UnaryOperator) \
1616 macro(BinaryOperator) \
1618 macro(IntrinsicInst) \
1619 macro(DbgInfoIntrinsic) \
1620 macro(DbgVariableIntrinsic) \
1621 macro(DbgDeclareInst) \
1622 macro(DbgLabelInst) \
1623 macro(MemIntrinsic) \
1625 macro(MemMoveInst) \
1630 macro(ExtractElementInst) \
1631 macro(GetElementPtrInst) \
1632 macro(InsertElementInst) \
1633 macro(InsertValueInst) \
1634 macro(LandingPadInst) \
1637 macro(ShuffleVectorInst) \
1640 macro(IndirectBrInst) \
1644 macro(UnreachableInst) \
1646 macro(CleanupReturnInst) \
1647 macro(CatchReturnInst) \
1648 macro(CatchSwitchInst) \
1650 macro(FuncletPadInst) \
1651 macro(CatchPadInst) \
1652 macro(CleanupPadInst) \
1653 macro(UnaryInstruction) \
1656 macro(AddrSpaceCastInst) \
1657 macro(BitCastInst) \
1661 macro(FPTruncInst) \
1662 macro(IntToPtrInst) \
1663 macro(PtrToIntInst) \
1669 macro(ExtractValueInst) \
1673 macro(AtomicCmpXchgInst) \
1674 macro(AtomicRMWInst) \
1763 #define LLVM_DECLARE_VALUE_CAST(name) \
1764 LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
1988 unsigned SLen, uint8_t Radix);
2049 unsigned Length,
LLVMBool DontNullTerminate);
2182 unsigned NumIndices),
2183 "Use LLVMConstGEP2 instead to support opaque pointers");
2189 unsigned NumIndices),
2190 "Use LLVMConstInBoundsGEP2 instead to support opaque pointers");
2193 unsigned NumIndices);
2233 unsigned *IdxList,
unsigned NumIdx);
2238 const char *AsmString,
const char *Constraints,
2342 size_t *NumEntries);
2414 "Use LLVMAddAlias2 instead to support opaque pointers");
2433 const char *
Name,
size_t NameLen);
2637 const char *K,
unsigned KLen);
2641 const char *K,
unsigned KLen);
2760 const char *
Name,
size_t NameLen,
2772 const char *
Name,
size_t NameLen);
3196 size_t *NumEntries);
3345 const char *K,
unsigned KLen);
3349 const char *K,
unsigned KLen);
3720 "Use LLVMBuildInvoke2 instead to support opaque pointers");
3744 unsigned NumHandlers,
const char *
Name);
3917 "Use LLVMBuildLoad2 instead to support opaque pointers");
3925 "Use LLVMBuildGEP2 instead to support opaque pointers");
3929 unsigned NumIndices,
const char *
Name),
3930 "Use LLVMBuildInBoundsGEP2 instead to support opaque pointers");
3933 unsigned Idx,
const char *
Name),
3934 "Use LLVMBuildStructGEP2 instead to support opaque pointers");
3937 unsigned NumIndices,
const char *
Name);
3940 unsigned NumIndices,
const char *
Name);
4021 "Use LLVMBuildCall2 instead to support opaque pointers");
4053 "Use LLVMBuildPtrDiff2 instead to support opaque pointers");
4137 size_t InputDataLength,
4138 const char *BufferName,
4141 size_t InputDataLength,
4142 const char *BufferName);
LLVMValueRef LLVMConstString(const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential with string content in the global context.
@ LLVMBlockAddressValueKind
@ LLVMConstantExprValueKind
LLVMTypeRef LLVMBFloatType(void)
LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI)
Return an enum LLVMDiagnosticSeverity.
LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val)
LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar)
LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
@ LLVMARMAAPCSVFPCallConv
we get the following basic block
@ LLVMAtomicRMWBinOpFAdd
Add a floating point value and return the old one.
LLVMValueRef LLVMBuildInBoundsGEP(LLVMBuilderRef B, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
@ LLVMHiddenVisibility
The GV is hidden.
void LLVMGlobalClearMetadata(LLVMValueRef Global)
Removes all metadata attachments from this value.
LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
@ LLVMConstantVectorValueKind
LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst)
@ LLVMRealPredicateFalse
Always false (always folded)
LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy)
Determine whether a structure is packed.
LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg)
Obtain the next parameter to a function.
void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall)
Set whether a call instruction is a tail call.
@ LLVMGhostLinkage
Obsolete.
LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB)
Obtain the terminator instruction for a basic block.
LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name)
Obtain a Type from a context by its registered name.
LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential and initialize it with a string.
LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst)
LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest)
@ LLVMRealULE
True if unordered, less than, or equal.
@ LLVMInternalLinkage
Rename collisions when linking (static functions)
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
LLVMValueRef LLVMGetNamedGlobalIFunc(LLVMModuleRef M, const char *Name, size_t NameLen)
Obtain a GlobalIFunc value from a Module by its name.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt)
Get the mask value at position Elt in the mask of a ShuffleVector instruction.
LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char *Text, unsigned SLen)
Obtain a constant for a floating point value parsed from a string.
unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy)
Obtain the (possibly scalable) number of elements in a vector type.
LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA)
Advance a GlobalAlias iterator to the next GlobalAlias.
void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn)
Set the personality function attached to the function.
LLVMValueRef LLVMConstLShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C)
Obtain a 128-bit floating point type (112-bit mantissa) from a context.
LLVMContextRef LLVMGetGlobalContext(void)
Obtain the global context instance.
void LLVMDisposePassManager(LLVMPassManagerRef PM)
Frees the memory of a pass pipeline.
@ LLVMBasicBlockValueKind
@ LLVMDLLImportLinkage
Obsolete.
LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index)
Obtain the use of an operand at a specific index in a llvm::User value.
LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)
LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn)
Obtain the personality function attached to the function.
@ LLVMExternalLinkage
Externally visible function.
LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name)
void LLVMEraseGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module and delete it.
@ LLVMIntSGT
signed greater than
LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
struct LLVMOpaquePassRegistry * LLVMPassRegistryRef
@ LLVMAtomicRMWBinOpXchg
Set the new value and return the one old.
LLVMValueRef LLVMBuildCall2(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
const char * LLVMGetDebugLocDirectory(LLVMValueRef Val, unsigned *Length)
Return the directory of the debug location for this value, which must be an llvm::Instruction,...
@ LLVMConstantAggregateZeroValueKind
LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C)
@ LLVMAtomicOrderingAcquireRelease
provides both an Acquire and a Release barrier (for fences and operations which both read and write m...
LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad)
Get the parent catchswitch instruction of a catchpad instruction.
LLVMValueRef LLVMConstAShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMBuildLoad(LLVMBuilderRef B, LLVMValueRef PointerVal, const char *Name)
void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params)
Obtain the parameters in a function.
LLVMValueRef LLVMConstICmp(LLVMIntPredicate Predicate, LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)
void(* LLVMYieldCallback)(LLVMContextRef, void *)
LLVMValueRef LLVMGetFirstGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the first GlobalIFunc in a Module.
LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
Update the specified successor to point at the provided block.
LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca)
Obtain the type that is being allocated by the alloca instruction.
@ LLVMGeneralDynamicTLSModel
void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
@ LLVMAtomicRMWBinOpOr
OR a value and return the old one.
LLVMValueRef LLVMConstSExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
LLVMValueRef LLVMBuildFreeze(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for an integer constant value.
LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM)
Finalizes all of the function passes scheduled in the function pass manager.
LLVMTypeRef LLVMFloatType(void)
@ LLVMIntegerTypeKind
Arbitrary bit width integers.
LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM)
Initializes all of the function passes scheduled in the function pass manager.
LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, LLVMBool IsSigned, const char *Name)
LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMValueRef.
char * LLVMCreateMessage(const char *Message)
unsigned LLVMAttributeIndex
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf)
LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMValueRef LLVMConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, LLVMBool isSigned)
int LLVMGetNumOperands(LLVMValueRef Val)
Obtain the number of operands in a llvm::User value.
void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr)
Set the data layout for a module.
LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, const char *Name)
LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA)
Decrement a GlobalAlias iterator to the previous GlobalAlias.
LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
LLVMValueRef LLVMConstZExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)
@ LLVMArrayTypeKind
Arrays.
unsigned LLVMGetDebugLocColumn(LLVMValueRef Val)
Return the column number of the debug location for this value, which must be an llvm::Instruction.
LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMModuleRef LLVMCloneModule(LLVMModuleRef M)
Return an exact copy of the specified module.
@ LLVMModuleFlagBehaviorWarning
Emits a warning if two values disagree.
LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty)
Obtain a constant value referring to the instance of a type consisting of all ones.
LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst)
LLVMModuleProviderRef LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M)
Changes the type of M so it can be passed to FunctionPassManagers and the JIT.
LLVMValueRef LLVMBuildPtrDiff2(LLVMBuilderRef, LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB)
void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)
@ LLVMRealOGE
True if ordered and greater than or equal.
LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C)
Get the diagnostic handler of this context.
unsigned LLVMCountBasicBlocks(LLVMValueRef Fn)
Obtain the number of basic blocks in a function.
LLVMValueKind LLVMGetValueKind(LLVMValueRef Val)
Obtain the enumerated type of a Value instance.
@ LLVMConstantFPValueKind
@ LLVMRealORD
True if ordered (no nans)
LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn)
Obtain the basic block that corresponds to the entry point of a function.
LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global)
LLVMOpcode
External users depend on the following values being stable.
LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Create a new structure type in the global context.
LLVMValueRef LLVMConstFRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
void LLVMDisposeBuilder(LLVMBuilderRef Builder)
@ LLVMInlineAsmDialectATT
LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn)
Obtain the first parameter to a function.
LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C)
Create a void type in a context.
LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar)
LLVMPassRegistryRef LLVMGetGlobalPassRegistry(void)
Return the global pass registry, for use with initialization functions.
LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C, const char *Name)
Create a new basic block without inserting it into a function.
LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)
void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr)
Deprecated: Use LLVMSetUnnamedAddress instead.
LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata(LLVMModuleRef M, const char *Name, size_t NameLen)
Retrieve a NamedMDNode with the given name, creating a new node if no such node exists.
@ LLVMRealUNO
True if unordered: isnan(X) | isnan(Y)
void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar)
LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
const char * LLVMGetSection(LLVMValueRef Global)
@ LLVMIntUGT
unsigned greater than
LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val)
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType, unsigned ElementCount)
Create a vector type that contains a defined type and has a scalable number of elements.
unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy)
Obtain the length of an array type.
LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread)
LLVMValueRef LLVMConstFPToSI(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB)
Obtain the last instruction in a basic block.
LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Create a ConstantStruct in the global Context.
@ LLVMScalableVectorTypeKind
Scalable SIMD vector type.
LLVMValueRef LLVMConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
Deprecated: Use LLVMGetInlineAsm instead.
void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, const char *Key, size_t KeyLen, LLVMMetadataRef Val)
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn)
Decrement a Function iterator to the previous Function.
LLVMValueRef LLVMConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
@ LLVMAtomicOrderingUnordered
Lowest level of atomicity, guarantees somewhat sane results, lock free.
LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits)
void LLVMContextSetDiscardValueNames(LLVMContextRef C, LLVMBool Discard)
Set whether the given context discards all value names.
void LLVMDisposeMessage(char *Message)
unsigned LLVMGetDebugLocLine(LLVMValueRef Val)
Return the line number of the debug location for this value, which must be an llvm::Instruction,...
LLVMValueRef LLVMBuildPtrDiff(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo)
Obtain the double value for an floating point constant value.
@ LLVMFP128TypeKind
128 bit floating point type (112-bit mantissa)
LLVMTypeRef LLVMX86FP80Type(void)
LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M)
Obtain an iterator to the first Function in a Module.
LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val)
Obtain the first use of a value.
LLVMValueRef LLVMConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
const char * LLVMModuleFlagEntriesGetKey(LLVMModuleFlagEntry *Entries, unsigned Index, size_t *Len)
Returns the key for a module flag entry at a specific index.
LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)
Add a function to a module under a specified name.
void LLVMDisposeModuleFlagsMetadata(LLVMModuleFlagEntry *Entries)
Destroys module flags metadata entries.
LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef PointerVal, const char *Name)
@ LLVMHalfTypeKind
16 bit floating point type
void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L)
Deprecated: Passing the NULL location will crash.
LLVMBuilderRef LLVMCreateBuilder(void)
LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder)
Get the dafult floating-point math metadata for a given builder.
void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class)
@ LLVMConstantStructValueKind
LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn)
Obtain the last parameter to a function.
LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlockRef BB)
Append the given basic block to the basic block list of the given function.
LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)
LLVMMetadataRef LLVMValueMetadataEntriesGetMetadata(LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the underlying metadata node of a value metadata entry at a specific index.
LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr)
Obtain the calling convention for a call instruction.
@ LLVMGlobalUnnamedAddr
Address of the GV is globally insignificant.
@ LLVMAMDGPUKERNELCallConv
LLVMValueRef LLVMConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
void LLVMSetValueName(LLVMValueRef Val, const char *Name)
Deprecated: Use LLVMSetValueName2 instead.
LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C)
Create a label type in a context.
const char * LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len)
Get inline assembly for a module.
void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds)
Set the given GEP instruction to be inbounds or not.
void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)
LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, const char *Name)
Insert a basic block in a function using the global context.
void LLVMRemoveGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module.
LLVMBool LLVMIsTailCall(LLVMValueRef CallInst)
Obtain whether a call instruction is a tail call.
LLVMValueRef LLVMConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Add an attribute to a function.
struct LLVMOpaqueUse * LLVMUseRef
Used to get the users and usees of a Value.
#define LLVM_DECLARE_VALUE_CAST(name)
Convert value instances between types.
void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB)
Remove a basic block from a function and delete it.
LLVMBool LLVMIsConstantString(LLVMValueRef c)
Returns true if the specified constant is an array of i8.
LLVMValueRef LLVMConstFNeg(LLVMValueRef ConstantVal)
const char * LLVMGetStringAttributeKind(LLVMAttributeRef A, unsigned *Length)
Get the string attribute's kind.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
@ LLVMModuleFlagBehaviorError
Emits an error if two values disagree, otherwise the resulting value is that of the operands.
constexpr std::underlying_type_t< E > Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst)
@ LLVMRealOLT
True if ordered and less than.
LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc)
Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
char * LLVMPrintValueToString(LLVMValueRef Val)
Return a string representation of the value.
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)
Obtain a constant value for an integer type.
LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)
@ LLVMAtomicRMWBinOpAdd
Add a value and return the old one.
void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp)
LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst)
LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])
Obtain a constant value for an integer of arbitrary precision.
void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC)
Set the calling convention of a function.
const char * LLVMGetTarget(LLVMModuleRef M)
Obtain the target triple for a module.
@ LLVMConstantIntValueKind
void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage)
LLVMBool LLVMPointerTypeIsOpaque(LLVMTypeRef Ty)
Determine whether a pointer is opaque.
LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst)
Obtain the predicate of an instruction.
LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C)
LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M)