LLVM 22.0.0git
Public Member Functions | List of all members
llvm::IRBuilder< FolderTy, InserterTy > Class Template Reference

This provides a uniform API for creating instructions and inserting them into a basic block: either at the end of a BasicBlock, or at a specific iterator location in a block. More...

#include "llvm/IR/IRBuilder.h"

Inheritance diagram for llvm::IRBuilder< FolderTy, InserterTy >:
[legend]

Public Member Functions

 IRBuilder (LLVMContext &C, FolderTy Folder, InserterTy Inserter, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (LLVMContext &C, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (LLVMContext &C, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (BasicBlock *TheBB, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (BasicBlock *TheBB, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (Instruction *IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles={})
 
 IRBuilder (const IRBuilder &)=delete
 Avoid copying the full IRBuilder.
 
InserterTy & getInserter ()
 
const InserterTy & getInserter () const
 
- Public Member Functions inherited from llvm::IRBuilderBase
 IRBuilderBase (LLVMContext &context, const IRBuilderFolder &Folder, const IRBuilderDefaultInserter &Inserter, MDNode *FPMathTag, ArrayRef< OperandBundleDef > OpBundles)
 
template<typename InstTy >
InstTy * Insert (InstTy *I, const Twine &Name="") const
 Insert and return the specified instruction.
 
ConstantInsert (Constant *C, const Twine &="") const
 No-op overload to handle constants.
 
ValueInsert (Value *V, const Twine &Name="") const
 
void ClearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block.
 
BasicBlockGetInsertBlock () const
 
BasicBlock::iterator GetInsertPoint () const
 
LLVMContextgetContext () const
 
void SetInsertPoint (BasicBlock *TheBB)
 This specifies that created instructions should be appended to the end of the specified block.
 
void SetInsertPoint (Instruction *I)
 This specifies that created instructions should be inserted before the specified instruction.
 
void SetInsertPoint (BasicBlock *TheBB, BasicBlock::iterator IP)
 This specifies that created instructions should be inserted at the specified point.
 
void SetInsertPoint (BasicBlock::iterator IP)
 This specifies that created instructions should be inserted at the specified point, but also requires that IP is dereferencable.
 
void SetInsertPointPastAllocas (Function *F)
 This specifies that created instructions should inserted at the beginning end of the specified function, but after already existing static alloca instructions that are at the start.
 
void SetCurrentDebugLocation (DebugLoc L)
 Set location information used by debugging information.
 
void SetNoSanitizeMetadata ()
 Set nosanitize metadata.
 
void CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds)
 Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions.
 
LLVM_ABI DebugLoc getCurrentDebugLocation () const
 Get location information used by debugging information.
 
LLVM_ABI void SetInstDebugLocation (Instruction *I) const
 If this builder has a current debug location, set it on the specified instruction.
 
void AddMetadataToInst (Instruction *I) const
 Add all entries in MetadataToCopy to I.
 
LLVM_ABI TypegetCurrentFunctionReturnType () const
 Get the return type of the current function that we're emitting into.
 
InsertPoint saveIP () const
 Returns the current insert point.
 
InsertPoint saveAndClearIP ()
 Returns the current insert point, clearing it in the process.
 
void restoreIP (InsertPoint IP)
 Sets the current insert point to a previously-saved location.
 
MDNodegetDefaultFPMathTag () const
 Get the floating point math metadata being used.
 
FastMathFlags getFastMathFlags () const
 Get the flags to be applied to created floating point ops.
 
FastMathFlagsgetFastMathFlags ()
 
void clearFastMathFlags ()
 Clear the fast-math flags.
 
void setDefaultFPMathTag (MDNode *FPMathTag)
 Set the floating point math metadata to be used.
 
void setFastMathFlags (FastMathFlags NewFMF)
 Set the fast-math flags to be used with generated fp-math operators.
 
void setIsFPConstrained (bool IsCon)
 Enable/Disable use of constrained floating point math.
 
bool getIsFPConstrained ()
 Query for the use of constrained floating point math.
 
void setDefaultConstrainedExcept (fp::ExceptionBehavior NewExcept)
 Set the exception handling to be used with constrained floating point.
 
void setDefaultConstrainedRounding (RoundingMode NewRounding)
 Set the rounding mode handling to be used with constrained floating point.
 
fp::ExceptionBehavior getDefaultConstrainedExcept ()
 Get the exception handling used with constrained floating point.
 
RoundingMode getDefaultConstrainedRounding ()
 Get the rounding mode handling used with constrained floating point.
 
void setConstrainedFPFunctionAttr ()
 
void setConstrainedFPCallAttr (CallBase *I)
 
void setDefaultOperandBundles (ArrayRef< OperandBundleDef > OpBundles)
 
LLVM_ABI GlobalVariableCreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr, bool AddNull=true)
 Make a new global variable with initializer type i8*.
 
ConstantIntgetInt1 (bool V)
 Get a constant value representing either true or false.
 
ConstantIntgetTrue ()
 Get the constant value for i1 true.
 
ConstantIntgetFalse ()
 Get the constant value for i1 false.
 
ConstantIntgetInt8 (uint8_t C)
 Get a constant 8-bit value.
 
ConstantIntgetInt16 (uint16_t C)
 Get a constant 16-bit value.
 
ConstantIntgetInt32 (uint32_t C)
 Get a constant 32-bit value.
 
ConstantIntgetInt64 (uint64_t C)
 Get a constant 64-bit value.
 
ConstantIntgetIntN (unsigned N, uint64_t C)
 Get a constant N-bit value, zero extended or truncated from a 64-bit value.
 
ConstantIntgetInt (const APInt &AI)
 Get a constant integer value.
 
IntegerTypegetInt1Ty ()
 Fetch the type representing a single bit.
 
IntegerTypegetInt8Ty ()
 Fetch the type representing an 8-bit integer.
 
IntegerTypegetInt16Ty ()
 Fetch the type representing a 16-bit integer.
 
IntegerTypegetInt32Ty ()
 Fetch the type representing a 32-bit integer.
 
IntegerTypegetInt64Ty ()
 Fetch the type representing a 64-bit integer.
 
IntegerTypegetInt128Ty ()
 Fetch the type representing a 128-bit integer.
 
IntegerTypegetIntNTy (unsigned N)
 Fetch the type representing an N-bit integer.
 
TypegetHalfTy ()
 Fetch the type representing a 16-bit floating point value.
 
TypegetBFloatTy ()
 Fetch the type representing a 16-bit brain floating point value.
 
TypegetFloatTy ()
 Fetch the type representing a 32-bit floating point value.
 
TypegetDoubleTy ()
 Fetch the type representing a 64-bit floating point value.
 
TypegetVoidTy ()
 Fetch the type representing void.
 
PointerTypegetPtrTy (unsigned AddrSpace=0)
 Fetch the type representing a pointer.
 
IntegerTypegetIntPtrTy (const DataLayout &DL, unsigned AddrSpace=0)
 Fetch the type of an integer with size at least as big as that of a pointer in the given address space.
 
IntegerTypegetIndexTy (const DataLayout &DL, unsigned AddrSpace)
 Fetch the type of an integer that should be used to index GEP operations within AddressSpace.
 
CallInstCreateMemSet (Value *Ptr, Value *Val, uint64_t Size, MaybeAlign Align, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 Create and insert a memset to the specified pointer and the specified value.
 
LLVM_ABI CallInstCreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
LLVM_ABI CallInstCreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val, Value *Size, bool IsVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, uint64_t Size, Align Alignment, uint32_t ElementSize, const AAMDNodes &AAInfo=AAMDNodes())
 Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value.
 
LLVM_ABI CallInstCreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF=nullptr, const Twine &Name="")
 
LLVM_ABI CallInstCreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, Function *MallocF=nullptr, const Twine &Name="")
 CreateMalloc - Generate the IR for a call to malloc:
 
LLVM_ABI CallInstCreateFree (Value *Source, ArrayRef< OperandBundleDef > Bundles={})
 Generate the IR for a call to the builtin free function.
 
LLVM_ABI CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size, Align Alignment, uint32_t ElementSize, const AAMDNodes &AAInfo=AAMDNodes())
 
CallInstCreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 Create and insert a memcpy between the specified pointers.
 
LLVM_ABI CallInstCreateMemTransferInst (Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
CallInstCreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
CallInstCreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
LLVM_ABI CallInstCreateElementUnorderedAtomicMemCpy (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, const AAMDNodes &AAInfo=AAMDNodes())
 Create and insert an element unordered-atomic memcpy between the specified pointers.
 
CallInstCreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
CallInstCreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
 
LLVM_ABI CallInstCreateElementUnorderedAtomicMemMove (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, const AAMDNodes &AAInfo=AAMDNodes())
 Create and insert an element unordered-atomic memmove between the specified pointers.
 
LLVM_ABI CallInstCreateFAddReduce (Value *Acc, Value *Src)
 Create a sequential vector fadd reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateFMulReduce (Value *Acc, Value *Src)
 Create a sequential vector fmul reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateAddReduce (Value *Src)
 Create a vector int add reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateMulReduce (Value *Src)
 Create a vector int mul reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateAndReduce (Value *Src)
 Create a vector int AND reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateOrReduce (Value *Src)
 Create a vector int OR reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateXorReduce (Value *Src)
 Create a vector int XOR reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateIntMaxReduce (Value *Src, bool IsSigned=false)
 Create a vector integer max reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateIntMinReduce (Value *Src, bool IsSigned=false)
 Create a vector integer min reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateFPMaxReduce (Value *Src)
 Create a vector float max reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateFPMinReduce (Value *Src)
 Create a vector float min reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateFPMaximumReduce (Value *Src)
 Create a vector float maximum reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateFPMinimumReduce (Value *Src)
 Create a vector float minimum reduction intrinsic of the source vector.
 
LLVM_ABI CallInstCreateLifetimeStart (Value *Ptr)
 Create a lifetime.start intrinsic.
 
LLVM_ABI CallInstCreateLifetimeEnd (Value *Ptr)
 Create a lifetime.end intrinsic.
 
LLVM_ABI CallInstCreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a call to invariant.start intrinsic.
 
LLVM_ABI CallInstCreateThreadLocalAddress (Value *Ptr)
 Create a call to llvm.threadlocal.address intrinsic.
 
LLVM_ABI CallInstCreateMaskedLoad (Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Load intrinsic.
 
LLVM_ABI CallInstCreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask)
 Create a call to Masked Store intrinsic.
 
LLVM_ABI CallInstCreateMaskedGather (Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Gather intrinsic.
 
LLVM_ABI CallInstCreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr)
 Create a call to Masked Scatter intrinsic.
 
LLVM_ABI CallInstCreateMaskedExpandLoad (Type *Ty, Value *Ptr, MaybeAlign Align, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Expand Load intrinsic.
 
LLVM_ABI CallInstCreateMaskedCompressStore (Value *Val, Value *Ptr, MaybeAlign Align, Value *Mask=nullptr)
 Create a call to Masked Compress Store intrinsic.
 
ValuegetAllOnesMask (ElementCount NumElts)
 Return an all true boolean vector (mask) with NumElts lanes.
 
LLVM_ABI CallInstCreateAssumption (Value *Cond, ArrayRef< OperandBundleDef > OpBundles={})
 Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.
 
LLVM_ABI InstructionCreateNoAliasScopeDeclaration (Value *Scope)
 Create a llvm.experimental.noalias.scope.decl intrinsic call.
 
InstructionCreateNoAliasScopeDeclaration (MDNode *ScopeTag)
 
LLVM_ABI CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, ArrayRef< Value * > CallArgs, std::optional< ArrayRef< Value * > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
 
LLVM_ABI CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, uint32_t Flags, ArrayRef< Value * > CallArgs, std::optional< ArrayRef< Use > > TransitionArgs, std::optional< ArrayRef< Use > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
 
LLVM_ABI CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, ArrayRef< Use > CallArgs, std::optional< ArrayRef< Value * > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Conveninence function for the common case when CallArgs are filled in using ArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer.
 
LLVM_ABI InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > InvokeArgs, std::optional< ArrayRef< Value * > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
 
LLVM_ABI InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef< Value * > InvokeArgs, std::optional< ArrayRef< Use > > TransitionArgs, std::optional< ArrayRef< Use > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
 
LLVM_ABI InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Use > InvokeArgs, std::optional< ArrayRef< Value * > > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 
LLVM_ABI CallInstCreateGCResult (Instruction *Statepoint, Type *ResultType, const Twine &Name="")
 Create a call to the experimental.gc.result intrinsic to extract the result from a call wrapped in a statepoint.
 
LLVM_ABI CallInstCreateGCRelocate (Instruction *Statepoint, int BaseOffset, int DerivedOffset, Type *ResultType, const Twine &Name="")
 Create a call to the experimental.gc.relocate intrinsics to project the relocated value of one pointer from the statepoint.
 
LLVM_ABI CallInstCreateGCGetPointerBase (Value *DerivedPtr, const Twine &Name="")
 Create a call to the experimental.gc.pointer.base intrinsic to get the base pointer for the specified derived pointer.
 
LLVM_ABI CallInstCreateGCGetPointerOffset (Value *DerivedPtr, const Twine &Name="")
 Create a call to the experimental.gc.get.pointer.offset intrinsic to get the offset of the specified derived pointer from its base.
 
ValueCreateVScale (Type *Ty, const Twine &Name="")
 Create a call to llvm.vscale.<Ty>().
 
LLVM_ABI ValueCreateElementCount (Type *Ty, ElementCount EC)
 Create an expression which evaluates to the number of elements in EC at runtime.
 
LLVM_ABI ValueCreateTypeSize (Type *Ty, TypeSize Size)
 Create an expression which evaluates to the number of units in Size at runtime.
 
LLVM_ABI ValueCreateStepVector (Type *DstType, const Twine &Name="")
 Creates a vector of type DstType with the linear sequence <0, 1, ...>
 
LLVM_ABI CallInstCreateUnaryIntrinsic (Intrinsic::ID ID, Value *V, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with 1 operand which is mangled on its type.
 
LLVM_ABI ValueCreateBinaryIntrinsic (Intrinsic::ID ID, Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with 2 operands which is mangled on the first type.
 
LLVM_ABI CallInstCreateIntrinsic (Intrinsic::ID ID, ArrayRef< Type * > Types, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with Args, mangled using Types.
 
LLVM_ABI CallInstCreateIntrinsic (Type *RetTy, Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with RetTy and Args.
 
CallInstCreateIntrinsic (Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to non-overloaded intrinsic ID with Args.
 
ValueCreateMinNum (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the minnum intrinsic.
 
ValueCreateMaxNum (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the maxnum intrinsic.
 
ValueCreateMinimum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimum intrinsic.
 
ValueCreateMaximum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic.
 
ValueCreateMinimumNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimumnum intrinsic.
 
ValueCreateMaximumNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic.
 
ValueCreateCopySign (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the copysign intrinsic.
 
ValueCreateLdexp (Value *Src, Value *Exp, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the ldexp intrinsic.
 
ValueCreateFMA (Value *Factor1, Value *Factor2, Value *Summand, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the fma intrinsic.
 
CallInstCreateArithmeticFence (Value *Val, Type *DstType, const Twine &Name="")
 Create a call to the arithmetic_fence intrinsic.
 
CallInstCreateExtractVector (Type *DstType, Value *SrcVec, Value *Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
 
CallInstCreateExtractVector (Type *DstType, Value *SrcVec, uint64_t Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
 
CallInstCreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="")
 Create a call to the vector.insert intrinsic.
 
CallInstCreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, uint64_t Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
 
CallInstCreateStackSave (const Twine &Name="")
 Create a call to llvm.stacksave.
 
CallInstCreateStackRestore (Value *Ptr, const Twine &Name="")
 Create a call to llvm.stackrestore.
 
ValueCreateCountTrailingZeroElems (Type *ResTy, Value *Mask, bool ZeroIsPoison=true, const Twine &Name="")
 Create a call to llvm.experimental_cttz_elts.
 
ReturnInstCreateRetVoid ()
 Create a 'ret void' instruction.
 
ReturnInstCreateRet (Value *V)
 Create a 'ret <val>' instruction.
 
ReturnInstCreateAggregateRet (Value *const *retVals, unsigned N)
 Create a sequence of N insertvalue instructions, with one Value from the retVals array each, that build a aggregate return value one value at a time, and a ret instruction to return the resulting aggregate value.
 
BranchInstCreateBr (BasicBlock *Dest)
 Create an unconditional 'br label X' instruction.
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, Instruction *MDSrc)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
 
SwitchInstCreateSwitch (Value *V, BasicBlock *Dest, unsigned NumCases=10, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a switch instruction with the specified value, default dest, and with a hint for the number of cases that will be added (for efficient allocation).
 
IndirectBrInstCreateIndirectBr (Value *Addr, unsigned NumDests=10)
 Create an indirect branch instruction with the specified address operand, with an optional hint for the number of destinations that will be added (for efficient allocation).
 
InvokeInstCreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 Create an invoke instruction.
 
InvokeInstCreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args={}, const Twine &Name="")
 
InvokeInstCreateInvoke (FunctionCallee Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 
InvokeInstCreateInvoke (FunctionCallee Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args={}, const Twine &Name="")
 
CallBrInstCreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args={}, const Twine &Name="")
 Create a callbr instruction.
 
CallBrInstCreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 
CallBrInstCreateCallBr (FunctionCallee Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args={}, const Twine &Name="")
 
CallBrInstCreateCallBr (FunctionCallee Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 
ResumeInstCreateResume (Value *Exn)
 
CleanupReturnInstCreateCleanupRet (CleanupPadInst *CleanupPad, BasicBlock *UnwindBB=nullptr)
 
CatchSwitchInstCreateCatchSwitch (Value *ParentPad, BasicBlock *UnwindBB, unsigned NumHandlers, const Twine &Name="")
 
CatchPadInstCreateCatchPad (Value *ParentPad, ArrayRef< Value * > Args, const Twine &Name="")
 
CleanupPadInstCreateCleanupPad (Value *ParentPad, ArrayRef< Value * > Args={}, const Twine &Name="")
 
CatchReturnInstCreateCatchRet (CatchPadInst *CatchPad, BasicBlock *BB)
 
UnreachableInstCreateUnreachable ()
 
ValueCreateAdd (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWAdd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWAdd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateSub (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWSub (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWSub (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateMul (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWMul (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWMul (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateUDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateExactUDiv (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateSDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateExactSDiv (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateURem (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateSRem (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateShl (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateShl (Value *LHS, const APInt &RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateShl (Value *LHS, uint64_t RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateLShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateLShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateLShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAnd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateAnd (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateAnd (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateAnd (ArrayRef< Value * > Ops)
 
ValueCreateOr (Value *LHS, Value *RHS, const Twine &Name="", bool IsDisjoint=false)
 
ValueCreateOr (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateOr (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateOr (ArrayRef< Value * > Ops)
 
ValueCreateXor (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateXor (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateXor (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateFAdd (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFAddFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFSub (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFSubFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFMul (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFMulFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFDiv (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFDivFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFRem (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFRemFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateBinOpFMF (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateLogicalAnd (Value *Cond1, Value *Cond2, const Twine &Name="")
 
ValueCreateLogicalOr (Value *Cond1, Value *Cond2, const Twine &Name="")
 
ValueCreateLogicalOp (Instruction::BinaryOps Opc, Value *Cond1, Value *Cond2, const Twine &Name="")
 
ValueCreateLogicalOr (ArrayRef< Value * > Ops)
 
LLVM_ABI CallInstCreateConstrainedFPIntrinsic (Intrinsic::ID ID, ArrayRef< Type * > Types, ArrayRef< Value * > Args, FMFSource FMFSource, const Twine &Name, MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 This function is like CreateIntrinsic for constrained fp intrinsics.
 
LLVM_ABI CallInstCreateConstrainedFPBinOp (Intrinsic::ID ID, Value *L, Value *R, FMFSource FMFSource={}, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
LLVM_ABI CallInstCreateConstrainedFPUnroundedBinOp (Intrinsic::ID ID, Value *L, Value *R, FMFSource FMFSource={}, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
ValueCreateNeg (Value *V, const Twine &Name="", bool HasNSW=false)
 
ValueCreateNSWNeg (Value *V, const Twine &Name="")
 
ValueCreateFNeg (Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFNegFMF (Value *V, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateNot (Value *V, const Twine &Name="")
 
ValueCreateUnOp (Instruction::UnaryOps Opc, Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
LLVM_ABI ValueCreateNAryOp (unsigned Opc, ArrayRef< Value * > Ops, const Twine &Name="", MDNode *FPMathTag=nullptr)
 Create either a UnaryOperator or BinaryOperator depending on Opc.
 
AllocaInstCreateAlloca (Type *Ty, unsigned AddrSpace, Value *ArraySize=nullptr, const Twine &Name="")
 
AllocaInstCreateAlloca (Type *Ty, Value *ArraySize=nullptr, const Twine &Name="")
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, const char *Name)
 Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool' for the isVolatile parameter.
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, const Twine &Name="")
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, bool isVolatile, const Twine &Name="")
 
StoreInstCreateStore (Value *Val, Value *Ptr, bool isVolatile=false)
 
LoadInstCreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, const char *Name)
 
LoadInstCreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, const Twine &Name="")
 
LoadInstCreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, bool isVolatile, const Twine &Name="")
 
StoreInstCreateAlignedStore (Value *Val, Value *Ptr, MaybeAlign Align, bool isVolatile=false)
 
FenceInstCreateFence (AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System, const Twine &Name="")
 
AtomicCmpXchgInstCreateAtomicCmpXchg (Value *Ptr, Value *Cmp, Value *New, MaybeAlign Align, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SyncScope::ID SSID=SyncScope::System)
 
AtomicRMWInstCreateAtomicRMW (AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val, MaybeAlign Align, AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System)
 
ValueCreateGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 
ValueCreateInBoundsGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateConstGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
 
ValueCreateConstGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="", GEPNoWrapFlags NWFlags=GEPNoWrapFlags::none())
 
ValueCreateConstInBoundsGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="")
 
ValueCreateConstGEP1_64 (Type *Ty, Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_64 (Type *Ty, Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstGEP2_64 (Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateConstInBoundsGEP2_64 (Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateStructGEP (Type *Ty, Value *Ptr, unsigned Idx, const Twine &Name="")
 
ValueCreatePtrAdd (Value *Ptr, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 
ValueCreateInBoundsPtrAdd (Value *Ptr, Value *Offset, const Twine &Name="")
 
ConstantCreateGlobalStringPtr (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr, bool AddNull=true)
 Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8.
 
ValueCreateTrunc (Value *V, Type *DestTy, const Twine &Name="", bool IsNUW=false, bool IsNSW=false)
 
ValueCreateZExt (Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false)
 
ValueCreateSExt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a ZExt or Trunc from the integer value V to DestTy.
 
ValueCreateSExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a SExt or Trunc from the integer value V to DestTy.
 
ValueCreateFPToUI (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPToSI (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateUIToFP (Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false)
 
ValueCreateSIToFP (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPTrunc (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFPTruncFMF (Value *V, Type *DestTy, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFPExt (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFPExtFMF (Value *V, Type *DestTy, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreatePtrToAddr (Value *V, const Twine &Name="")
 
ValueCreatePtrToInt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateIntToPtr (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateSExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateTruncOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateCast (Instruction::CastOps Op, Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr, FMFSource FMFSource={})
 
ValueCreatePointerCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreatePointerBitCastOrAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateIntCast (Value *V, Type *DestTy, bool isSigned, const Twine &Name="")
 
ValueCreateBitOrPointerCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPCast (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
LLVM_ABI CallInstCreateConstrainedFPCast (Intrinsic::ID ID, Value *V, Type *DestTy, FMFSource FMFSource={}, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
ValueCreateIntCast (Value *, Type *, const char *)=delete
 
LLVM_ABI ValueCreateAggregateCast (Value *V, Type *DestTy)
 Cast between aggregate types that must have identical structure but may differ in their leaf types.
 
ValueCreateICmpEQ (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpNE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpUGT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpUGE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpULT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpULE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSGT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSGE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSLT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSLE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFCmpOEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOLT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOLE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpONE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpORD (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUNO (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpULT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpULE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUNE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateICmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFCmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpFMF (CmpInst::Predicate P, Value *LHS, Value *RHS, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateCmp (CmpInst::Predicate Pred, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpS (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
LLVM_ABI CallInstCreateConstrainedFPCmp (Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Value *R, const Twine &Name="", std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
PHINodeCreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="")
 
CallInstCreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (FunctionCallee Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
LLVM_ABI CallInstCreateConstrainedFPCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
LLVM_ABI ValueCreateSelect (Value *C, Value *True, Value *False, const Twine &Name="", Instruction *MDFrom=nullptr)
 
LLVM_ABI ValueCreateSelectFMF (Value *C, Value *True, Value *False, FMFSource FMFSource, const Twine &Name="", Instruction *MDFrom=nullptr)
 
VAArgInstCreateVAArg (Value *List, Type *Ty, const Twine &Name="")
 
ValueCreateExtractElement (Value *Vec, Value *Idx, const Twine &Name="")
 
ValueCreateExtractElement (Value *Vec, uint64_t Idx, const Twine &Name="")
 
ValueCreateInsertElement (Type *VecTy, Value *NewElt, Value *Idx, const Twine &Name="")
 
ValueCreateInsertElement (Type *VecTy, Value *NewElt, uint64_t Idx, const Twine &Name="")
 
ValueCreateInsertElement (Value *Vec, Value *NewElt, Value *Idx, const Twine &Name="")
 
ValueCreateInsertElement (Value *Vec, Value *NewElt, uint64_t Idx, const Twine &Name="")
 
ValueCreateShuffleVector (Value *V1, Value *V2, Value *Mask, const Twine &Name="")
 
ValueCreateShuffleVector (Value *V1, Value *V2, ArrayRef< int > Mask, const Twine &Name="")
 See class ShuffleVectorInst for a description of the mask representation.
 
ValueCreateShuffleVector (Value *V, ArrayRef< int > Mask, const Twine &Name="")
 Create a unary shuffle.
 
LLVM_ABI ValueCreateVectorInterleave (ArrayRef< Value * > Ops, const Twine &Name="")
 
ValueCreateExtractValue (Value *Agg, ArrayRef< unsigned > Idxs, const Twine &Name="")
 
ValueCreateInsertValue (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const Twine &Name="")
 
LandingPadInstCreateLandingPad (Type *Ty, unsigned NumClauses, const Twine &Name="")
 
ValueCreateFreeze (Value *V, const Twine &Name="")
 
ValueCreateIsNull (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg == 0.
 
ValueCreateIsNotNull (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg != 0.
 
ValueCreateIsNeg (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg < 0.
 
ValueCreateIsNotNeg (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg > -1.
 
LLVM_ABI ValueCreatePtrDiff (Type *ElemTy, Value *LHS, Value *RHS, const Twine &Name="")
 Return the i64 difference between two pointer values, dividing out the size of the pointed-to objects.
 
LLVM_ABI ValueCreateLaunderInvariantGroup (Value *Ptr)
 Create a launder.invariant.group intrinsic call.
 
LLVM_ABI ValueCreateStripInvariantGroup (Value *Ptr)
 Create a strip.invariant.group intrinsic call.
 
LLVM_ABI ValueCreateVectorReverse (Value *V, const Twine &Name="")
 Return a vector value that contains the vector V reversed.
 
LLVM_ABI ValueCreateVectorSplice (Value *V1, Value *V2, int64_t Imm, const Twine &Name="")
 Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector.
 
LLVM_ABI ValueCreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="")
 Return a vector value that contains.
 
LLVM_ABI ValueCreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="")
 Return a vector value that contains.
 
LLVM_ABI ValueCreatePreserveArrayAccessIndex (Type *ElTy, Value *Base, unsigned Dimension, unsigned LastIndex, MDNode *DbgInfo)
 
LLVM_ABI ValueCreatePreserveUnionAccessIndex (Value *Base, unsigned FieldIndex, MDNode *DbgInfo)
 
LLVM_ABI ValueCreatePreserveStructAccessIndex (Type *ElTy, Value *Base, unsigned Index, unsigned FieldIndex, MDNode *DbgInfo)
 
LLVM_ABI ValuecreateIsFPClass (Value *FPNum, unsigned Test)
 
LLVM_ABI CallInstCreateAlignmentAssumption (const DataLayout &DL, Value *PtrValue, unsigned Alignment, Value *OffsetValue=nullptr)
 Create an assume intrinsic call that represents an alignment assumption on the provided pointer.
 
LLVM_ABI CallInstCreateAlignmentAssumption (const DataLayout &DL, Value *PtrValue, Value *Alignment, Value *OffsetValue=nullptr)
 Create an assume intrinsic call that represents an alignment assumption on the provided pointer.
 
LLVM_ABI CallInstCreateDereferenceableAssumption (Value *PtrValue, Value *SizeValue)
 Create an assume intrinsic call that represents an dereferencable assumption on the provided pointer.
 

Additional Inherited Members

- Protected Attributes inherited from llvm::IRBuilderBase
BasicBlockBB
 
BasicBlock::iterator InsertPt
 
LLVMContextContext
 
const IRBuilderFolderFolder
 
const IRBuilderDefaultInserterInserter
 
MDNodeDefaultFPMathTag
 
FastMathFlags FMF
 
bool IsFPConstrained = false
 
fp::ExceptionBehavior DefaultConstrainedExcept = fp::ebStrict
 
RoundingMode DefaultConstrainedRounding = RoundingMode::Dynamic
 
ArrayRef< OperandBundleDefDefaultOperandBundles
 

Detailed Description

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
class llvm::IRBuilder< FolderTy, InserterTy >

This provides a uniform API for creating instructions and inserting them into a basic block: either at the end of a BasicBlock, or at a specific iterator location in a block.

Note that the builder does not expose the full generality of LLVM instructions. For access to extra instruction properties, use the mutators (e.g. setVolatile) on the instructions after they have been created. Convenience state exists to specify fast-math flags and fp-math tags.

The first template argument specifies a class to use for creating constants. This defaults to creating minimally folded constants. The second template argument allows clients to specify custom insertion hooks that are called on every newly created insertion.

Definition at line 2780 of file IRBuilder.h.

Constructor & Destructor Documentation

◆ IRBuilder() [1/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( LLVMContext C,
FolderTy  Folder,
InserterTy  Inserter,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inline

Definition at line 2786 of file IRBuilder.h.

◆ IRBuilder() [2/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( LLVMContext C,
FolderTy  Folder,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inline

Definition at line 2792 of file IRBuilder.h.

◆ IRBuilder() [3/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( LLVMContext C,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inlineexplicit

Definition at line 2797 of file IRBuilder.h.

◆ IRBuilder() [4/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( BasicBlock TheBB,
FolderTy  Folder,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inlineexplicit

Definition at line 2801 of file IRBuilder.h.

◆ IRBuilder() [5/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( BasicBlock TheBB,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inlineexplicit

Definition at line 2810 of file IRBuilder.h.

◆ IRBuilder() [6/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( Instruction IP,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inlineexplicit

Definition at line 2817 of file IRBuilder.h.

◆ IRBuilder() [7/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( BasicBlock TheBB,
BasicBlock::iterator  IP,
FolderTy  Folder,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inline

Definition at line 2824 of file IRBuilder.h.

◆ IRBuilder() [8/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( BasicBlock TheBB,
BasicBlock::iterator  IP,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = {} 
)
inline

Definition at line 2833 of file IRBuilder.h.

◆ IRBuilder() [9/9]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder ( const IRBuilder< FolderTy, InserterTy > &  )
delete

Avoid copying the full IRBuilder.

Prefer using InsertPointGuard or FastMathFlagGuard instead.

Member Function Documentation

◆ getInserter() [1/2]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
InserterTy & llvm::IRBuilder< FolderTy, InserterTy >::getInserter ( )
inline

Definition at line 2845 of file IRBuilder.h.

◆ getInserter() [2/2]

template<typename FolderTy = ConstantFolder, typename InserterTy = IRBuilderDefaultInserter>
const InserterTy & llvm::IRBuilder< FolderTy, InserterTy >::getInserter ( ) const
inline

Definition at line 2846 of file IRBuilder.h.


The documentation for this class was generated from the following file: