LLVM 19.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 >:
Inheritance graph
[legend]

Public Member Functions

 IRBuilder (LLVMContext &C, FolderTy Folder, InserterTy Inserter=InserterTy(), MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (LLVMContext &C, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (BasicBlock *TheBB, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (BasicBlock *TheBB, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (Instruction *IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 
 IRBuilder (const IRBuilder &)=delete
 Avoid copying the full IRBuilder.
 
InserterTy & getInserter ()
 
- 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 CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds)
 Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions.
 
DebugLoc getCurrentDebugLocation () const
 Get location information used by debugging information.
 
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.
 
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)
 
GlobalVariableCreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr)
 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, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert a memset to the specified pointer and the specified value.
 
CallInstCreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val, Value *Size, bool IsVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, uint64_t Size, Align Alignment, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value.
 
CallInstCreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF=nullptr, const Twine &Name="")
 
CallInstCreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, Function *MallocF=nullptr, const Twine &Name="")
 CreateMalloc - Generate the IR for a call to malloc:
 
CallInstCreateFree (Value *Source, ArrayRef< OperandBundleDef > Bundles=std::nullopt)
 Generate the IR for a call to the builtin free function.
 
CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size, Align Alignment, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert a memcpy between the specified pointers.
 
CallInstCreateMemTransferInst (Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateElementUnorderedAtomicMemCpy (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 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, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateElementUnorderedAtomicMemMove (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert an element unordered-atomic memmove between the specified pointers.
 
CallInstCreateFAddReduce (Value *Acc, Value *Src)
 Create a sequential vector fadd reduction intrinsic of the source vector.
 
CallInstCreateFMulReduce (Value *Acc, Value *Src)
 Create a sequential vector fmul reduction intrinsic of the source vector.
 
CallInstCreateAddReduce (Value *Src)
 Create a vector int add reduction intrinsic of the source vector.
 
CallInstCreateMulReduce (Value *Src)
 Create a vector int mul reduction intrinsic of the source vector.
 
CallInstCreateAndReduce (Value *Src)
 Create a vector int AND reduction intrinsic of the source vector.
 
CallInstCreateOrReduce (Value *Src)
 Create a vector int OR reduction intrinsic of the source vector.
 
CallInstCreateXorReduce (Value *Src)
 Create a vector int XOR reduction intrinsic of the source vector.
 
CallInstCreateIntMaxReduce (Value *Src, bool IsSigned=false)
 Create a vector integer max reduction intrinsic of the source vector.
 
CallInstCreateIntMinReduce (Value *Src, bool IsSigned=false)
 Create a vector integer min reduction intrinsic of the source vector.
 
CallInstCreateFPMaxReduce (Value *Src)
 Create a vector float max reduction intrinsic of the source vector.
 
CallInstCreateFPMinReduce (Value *Src)
 Create a vector float min reduction intrinsic of the source vector.
 
CallInstCreateFPMaximumReduce (Value *Src)
 Create a vector float maximum reduction intrinsic of the source vector.
 
CallInstCreateFPMinimumReduce (Value *Src)
 Create a vector float minimum reduction intrinsic of the source vector.
 
CallInstCreateLifetimeStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.start intrinsic.
 
CallInstCreateLifetimeEnd (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.end intrinsic.
 
CallInstCreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a call to invariant.start intrinsic.
 
CallInstCreateThreadLocalAddress (Value *Ptr)
 Create a call to llvm.threadlocal.address intrinsic.
 
CallInstCreateMaskedLoad (Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Load intrinsic.
 
CallInstCreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask)
 Create a call to Masked Store intrinsic.
 
CallInstCreateMaskedGather (Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Gather intrinsic.
 
CallInstCreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr)
 Create a call to Masked Scatter intrinsic.
 
CallInstCreateMaskedExpandLoad (Type *Ty, Value *Ptr, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Expand Load intrinsic.
 
CallInstCreateMaskedCompressStore (Value *Val, Value *Ptr, Value *Mask=nullptr)
 Create a call to Masked Compress Store intrinsic.
 
ValuegetAllOnesMask (ElementCount NumElts)
 Return an all true boolean vector (mask) with NumElts lanes.
 
CallInstCreateAssumption (Value *Cond, ArrayRef< OperandBundleDef > OpBundles=std::nullopt)
 Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.
 
InstructionCreateNoAliasScopeDeclaration (Value *Scope)
 Create a llvm.experimental.noalias.scope.decl intrinsic call.
 
InstructionCreateNoAliasScopeDeclaration (MDNode *ScopeTag)
 
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.
 
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.
 
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.
 
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.
 
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.
 
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="")
 
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.
 
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.
 
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.
 
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 (Constant *Scaling, const Twine &Name="")
 Create a call to llvm.vscale, multiplied by Scaling.
 
ValueCreateElementCount (Type *DstType, ElementCount EC)
 Create an expression which evaluates to the number of elements in EC at runtime.
 
ValueCreateTypeSize (Type *DstType, TypeSize Size)
 Create an expression which evaluates to the number of units in Size at runtime.
 
ValueCreateStepVector (Type *DstType, const Twine &Name="")
 Creates a vector of type DstType with the linear sequence <0, 1, ...>
 
CallInstCreateUnaryIntrinsic (Intrinsic::ID ID, Value *V, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with 1 operand which is mangled on its type.
 
ValueCreateBinaryIntrinsic (Intrinsic::ID ID, Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with 2 operands which is mangled on the first type.
 
CallInstCreateIntrinsic (Intrinsic::ID ID, ArrayRef< Type * > Types, ArrayRef< Value * > Args, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with Args, mangled using Types.
 
CallInstCreateIntrinsic (Type *RetTy, Intrinsic::ID ID, ArrayRef< Value * > Args, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with RetTy and Args.
 
ValueCreateMinNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minnum intrinsic.
 
ValueCreateMaxNum (Value *LHS, Value *RHS, 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.
 
ValueCreateCopySign (Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create call to the copysign 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.
 
CallInstCreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="")
 Create a call to the vector.insert intrinsic.
 
CallInstCreateStackSave (const Twine &Name="")
 Create a call to llvm.stacksave.
 
CallInstCreateStackRestore (Value *Ptr, const Twine &Name="")
 Create a call to llvm.stackrestore.
 
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=std::nullopt, 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=std::nullopt, const Twine &Name="")
 
CallBrInstCreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args=std::nullopt, 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=std::nullopt, 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=std::nullopt, 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="")
 
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, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateFSub (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFSubFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateFMul (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFMulFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateFDiv (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFDivFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateFRem (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
 
ValueCreateFRemFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, 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)
 
CallInstCreateConstrainedFPBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
CallInstCreateConstrainedFPUnroundedBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
ValueCreateNeg (Value *V, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWNeg (Value *V, const Twine &Name="")
 
ValueCreateNUWNeg (Value *V, const Twine &Name="")
 
ValueCreateFNeg (Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFNegFMF (Value *V, Instruction *FMFSource, const Twine &Name="")
 Copy fast-math-flags from an instruction rather than using the builder's default FMF.
 
ValueCreateNot (Value *V, const Twine &Name="")
 
ValueCreateUnOp (Instruction::UnaryOps Opc, Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
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="", bool IsInBounds=false)
 
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="")
 
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="", bool IsInBounds=false)
 
ValueCreateInBoundsPtrAdd (Value *Ptr, Value *Offset, const Twine &Name="")
 
ConstantCreateGlobalStringPtr (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr)
 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="")
 
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="")
 
ValueCreateSIToFP (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPTrunc (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPExt (Value *V, Type *DestTy, 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="")
 
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="")
 
CallInstCreateConstrainedFPCast (Intrinsic::ID ID, Value *V, Type *DestTy, Instruction *FMFSource=nullptr, 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
 
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)
 
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)
 
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=std::nullopt, 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=std::nullopt, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateConstrainedFPCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
 
ValueCreateSelect (Value *C, Value *True, Value *False, 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.
 
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.
 
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.
 
ValueCreateLaunderInvariantGroup (Value *Ptr)
 Create a launder.invariant.group intrinsic call.
 
ValueCreateStripInvariantGroup (Value *Ptr)
 Create a strip.invariant.group intrinsic call.
 
ValueCreateVectorReverse (Value *V, const Twine &Name="")
 Return a vector value that contains the vector V reversed.
 
ValueCreateVectorSplice (Value *V1, Value *V2, int64_t Imm, const Twine &Name="")
 Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector.
 
ValueCreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="")
 Return a vector value that contains.
 
ValueCreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="")
 Return a vector value that contains.
 
ValueCreatePreserveArrayAccessIndex (Type *ElTy, Value *Base, unsigned Dimension, unsigned LastIndex, MDNode *DbgInfo)
 
ValueCreatePreserveUnionAccessIndex (Value *Base, unsigned FieldIndex, MDNode *DbgInfo)
 
ValueCreatePreserveStructAccessIndex (Type *ElTy, Value *Base, unsigned Index, unsigned FieldIndex, MDNode *DbgInfo)
 
ValuecreateIsFPClass (Value *FPNum, unsigned Test)
 
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.
 
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.
 

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 2649 of file IRBuilder.h.

Constructor & Destructor Documentation

◆ IRBuilder() [1/8]

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

Definition at line 2655 of file IRBuilder.h.

◆ IRBuilder() [2/8]

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

Definition at line 2661 of file IRBuilder.h.

◆ IRBuilder() [3/8]

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

Definition at line 2665 of file IRBuilder.h.

References llvm::IRBuilderBase::SetInsertPoint().

◆ IRBuilder() [4/8]

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

Definition at line 2674 of file IRBuilder.h.

References llvm::IRBuilderBase::SetInsertPoint().

◆ IRBuilder() [5/8]

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

Definition at line 2681 of file IRBuilder.h.

References llvm::IRBuilderBase::SetInsertPoint().

◆ IRBuilder() [6/8]

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 = std::nullopt 
)
inline

Definition at line 2688 of file IRBuilder.h.

References llvm::IRBuilderBase::SetInsertPoint().

◆ IRBuilder() [7/8]

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

Definition at line 2697 of file IRBuilder.h.

References llvm::IRBuilderBase::SetInsertPoint().

◆ IRBuilder() [8/8]

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()

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

Definition at line 2709 of file IRBuilder.h.


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