LLVM  13.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]
Collaboration diagram for llvm::IRBuilder< FolderTy, InserterTy >:
Collaboration graph
[legend]

Public Member Functions

 IRBuilder (LLVMContext &C, FolderTy Folder, InserterTy Inserter=InserterTy(), MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (LLVMContext &C, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (Instruction *IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, FolderTy Folder, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (const IRBuilder &)=delete
 Avoid copying the full IRBuilder. More...
 
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. More...
 
ConstantInsert (Constant *C, const Twine &="") const
 No-op overload to handle constants. More...
 
ValueInsert (Value *V, const Twine &Name="") const
 
void ClearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block. More...
 
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. More...
 
void SetInsertPoint (Instruction *I)
 This specifies that created instructions should be inserted before the specified instruction. More...
 
void SetInsertPoint (BasicBlock *TheBB, BasicBlock::iterator IP)
 This specifies that created instructions should be inserted at the specified point. More...
 
void SetCurrentDebugLocation (DebugLoc L)
 Set location information used by debugging information. More...
 
void CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds)
 Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions. More...
 
DebugLoc getCurrentDebugLocation () const
 Get location information used by debugging information. More...
 
void SetInstDebugLocation (Instruction *I) const
 If this builder has a current debug location, set it on the specified instruction. More...
 
void AddMetadataToInst (Instruction *I) const
 Add all entries in MetadataToCopy to I. More...
 
TypegetCurrentFunctionReturnType () const
 Get the return type of the current function that we're emitting into. More...
 
InsertPoint saveIP () const
 Returns the current insert point. More...
 
InsertPoint saveAndClearIP ()
 Returns the current insert point, clearing it in the process. More...
 
void restoreIP (InsertPoint IP)
 Sets the current insert point to a previously-saved location. More...
 
MDNodegetDefaultFPMathTag () const
 Get the floating point math metadata being used. More...
 
FastMathFlags getFastMathFlags () const
 Get the flags to be applied to created floating point ops. More...
 
FastMathFlagsgetFastMathFlags ()
 
void clearFastMathFlags ()
 Clear the fast-math flags. More...
 
void setDefaultFPMathTag (MDNode *FPMathTag)
 Set the floating point math metadata to be used. More...
 
void setFastMathFlags (FastMathFlags NewFMF)
 Set the fast-math flags to be used with generated fp-math operators. More...
 
void setIsFPConstrained (bool IsCon)
 Enable/Disable use of constrained floating point math. More...
 
bool getIsFPConstrained ()
 Query for the use of constrained floating point math. More...
 
void setDefaultConstrainedExcept (fp::ExceptionBehavior NewExcept)
 Set the exception handling to be used with constrained floating point. More...
 
void setDefaultConstrainedRounding (RoundingMode NewRounding)
 Set the rounding mode handling to be used with constrained floating point. More...
 
fp::ExceptionBehavior getDefaultConstrainedExcept ()
 Get the exception handling used with constrained floating point. More...
 
RoundingMode getDefaultConstrainedRounding ()
 Get the rounding mode handling used with constrained floating point. More...
 
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*. More...
 
ConstantIntgetInt1 (bool V)
 Get a constant value representing either true or false. More...
 
ConstantIntgetTrue ()
 Get the constant value for i1 true. More...
 
ConstantIntgetFalse ()
 Get the constant value for i1 false. More...
 
ConstantIntgetInt8 (uint8_t C)
 Get a constant 8-bit value. More...
 
ConstantIntgetInt16 (uint16_t C)
 Get a constant 16-bit value. More...
 
ConstantIntgetInt32 (uint32_t C)
 Get a constant 32-bit value. More...
 
ConstantIntgetInt64 (uint64_t C)
 Get a constant 64-bit value. More...
 
ConstantIntgetIntN (unsigned N, uint64_t C)
 Get a constant N-bit value, zero extended or truncated from a 64-bit value. More...
 
ConstantIntgetInt (const APInt &AI)
 Get a constant integer value. More...
 
IntegerTypegetInt1Ty ()
 Fetch the type representing a single bit. More...
 
IntegerTypegetInt8Ty ()
 Fetch the type representing an 8-bit integer. More...
 
IntegerTypegetInt16Ty ()
 Fetch the type representing a 16-bit integer. More...
 
IntegerTypegetInt32Ty ()
 Fetch the type representing a 32-bit integer. More...
 
IntegerTypegetInt64Ty ()
 Fetch the type representing a 64-bit integer. More...
 
IntegerTypegetInt128Ty ()
 Fetch the type representing a 128-bit integer. More...
 
IntegerTypegetIntNTy (unsigned N)
 Fetch the type representing an N-bit integer. More...
 
TypegetHalfTy ()
 Fetch the type representing a 16-bit floating point value. More...
 
TypegetBFloatTy ()
 Fetch the type representing a 16-bit brain floating point value. More...
 
TypegetFloatTy ()
 Fetch the type representing a 32-bit floating point value. More...
 
TypegetDoubleTy ()
 Fetch the type representing a 64-bit floating point value. More...
 
TypegetVoidTy ()
 Fetch the type representing void. More...
 
PointerTypegetInt8PtrTy (unsigned AddrSpace=0)
 Fetch the type representing a pointer to an 8-bit integer value. More...
 
IntegerTypegetIntPtrTy (const DataLayout &DL, unsigned AddrSpace=0)
 Fetch the type representing a pointer to an integer value. More...
 
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. More...
 
CallInstCreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, 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. More...
 
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. More...
 
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)
 
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. More...
 
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. More...
 
CallInstCreateFAddReduce (Value *Acc, Value *Src)
 Create a vector fadd reduction intrinsic of the source vector. More...
 
CallInstCreateFMulReduce (Value *Acc, Value *Src)
 Create a vector fmul reduction intrinsic of the source vector. More...
 
CallInstCreateAddReduce (Value *Src)
 Create a vector int add reduction intrinsic of the source vector. More...
 
CallInstCreateMulReduce (Value *Src)
 Create a vector int mul reduction intrinsic of the source vector. More...
 
CallInstCreateAndReduce (Value *Src)
 Create a vector int AND reduction intrinsic of the source vector. More...
 
CallInstCreateOrReduce (Value *Src)
 Create a vector int OR reduction intrinsic of the source vector. More...
 
CallInstCreateXorReduce (Value *Src)
 Create a vector int XOR reduction intrinsic of the source vector. More...
 
CallInstCreateIntMaxReduce (Value *Src, bool IsSigned=false)
 Create a vector integer max reduction intrinsic of the source vector. More...
 
CallInstCreateIntMinReduce (Value *Src, bool IsSigned=false)
 Create a vector integer min reduction intrinsic of the source vector. More...
 
CallInstCreateFPMaxReduce (Value *Src)
 Create a vector float max reduction intrinsic of the source vector. More...
 
CallInstCreateFPMinReduce (Value *Src)
 Create a vector float min reduction intrinsic of the source vector. More...
 
CallInstCreateLifetimeStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.start intrinsic. More...
 
CallInstCreateLifetimeEnd (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.end intrinsic. More...
 
CallInstCreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a call to invariant.start intrinsic. More...
 
CallInstCreateMaskedLoad (Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Load intrinsic. More...
 
CallInstCreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask)
 Create a call to Masked Store intrinsic. More...
 
CallInstCreateMaskedGather (Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Gather intrinsic. More...
 
CallInstCreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr)
 Create a call to Masked Scatter intrinsic. More...
 
CallInstCreateAssumption (Value *Cond, ArrayRef< OperandBundleDef > OpBundles=llvm::None)
 Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true. More...
 
InstructionCreateNoAliasScopeDeclaration (Value *Scope)
 Create a llvm.experimental.noalias.scope.decl intrinsic call. More...
 
InstructionCreateNoAliasScopeDeclaration (MDNode *ScopeTag)
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef< Value * > CallArgs, 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. More...
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, uint32_t Flags, ArrayRef< Value * > CallArgs, Optional< ArrayRef< Use >> TransitionArgs, 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. More...
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef< Use > CallArgs, Optional< ArrayRef< Value * >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 Conveninence function for the common case when CallArgs are filled in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer. More...
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > InvokeArgs, 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. More...
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef< Value * > InvokeArgs, Optional< ArrayRef< Use >> TransitionArgs, 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. More...
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Use > InvokeArgs, 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. More...
 
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. More...
 
ValueCreateVScale (Constant *Scaling, const Twine &Name="")
 Create a call to llvm.vscale, multiplied by Scaling. More...
 
ValueCreateStepVector (Type *DstType, const Twine &Name="")
 Creates a vector of type DstType with the linear sequence <0, 1, ...> More...
 
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. More...
 
CallInstCreateBinaryIntrinsic (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. More...
 
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. More...
 
CallInstCreateMinNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minnum intrinsic. More...
 
CallInstCreateMaxNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maxnum intrinsic. More...
 
CallInstCreateMinimum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimum intrinsic. More...
 
CallInstCreateMaximum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic. More...
 
CallInstCreateExtractVector (Type *DstType, Value *SrcVec, Value *Idx, const Twine &Name="")
 Create a call to the experimental.vector.extract intrinsic. More...
 
CallInstCreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="")
 Create a call to the experimental.vector.insert intrinsic. More...
 
ReturnInstCreateRetVoid ()
 Create a 'ret void' instruction. More...
 
ReturnInstCreateRet (Value *V)
 Create a 'ret <val>' instruction. More...
 
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. More...
 
BranchInstCreateBr (BasicBlock *Dest)
 Create an unconditional 'br label X' instruction. More...
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More...
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, Instruction *MDSrc)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More...
 
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). More...
 
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). More...
 
InvokeInstCreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 Create an invoke instruction. More...
 
InvokeInstCreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args=None, 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=None, const Twine &Name="")
 
CallBrInstCreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args=None, const Twine &Name="")
 Create a callbr instruction. More...
 
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=None, 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=None, 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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="")
 
CallInstCreateConstrainedFPBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None)
 
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. More...
 
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. More...
 
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. More...
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, const Twine &Name="")
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, bool isVolatile, const Twine &Name="")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateLoad(Value *Ptr, const char *Name), "Use the version that explicitly specifies the " "loaded type instead")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateLoad(Value *Ptr, const Twine &Name=""), "Use the version that explicitly specifies the " "loaded type instead")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateLoad(Value *Ptr, bool isVolatile, const Twine &Name=""), "Use the version that explicitly specifies the " "loaded type instead")
 
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="")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, const char *Name), "Use the version that explicitly specifies the " "loaded type instead")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, const Twine &Name=""), "Use the version that explicitly specifies the " "loaded type instead")
 
 LLVM_ATTRIBUTE_DEPRECATED (LoadInst *CreateAlignedLoad(Value *Ptr, MaybeAlign Align, bool isVolatile, const Twine &Name=""), "Use the version that explicitly specifies the " "loaded type instead")
 
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 (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateInBoundsGEP (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateInBoundsGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateGEP (Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateInBoundsGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateConstGEP1_32 (Value *Ptr, unsigned Idx0, 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="")
 
ValueCreateConstGEP1_64 (Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_64 (Type *Ty, Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_64 (Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstGEP2_64 (Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateConstGEP2_64 (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="")
 
ValueCreateConstInBoundsGEP2_64 (Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateStructGEP (Type *Ty, Value *Ptr, unsigned Idx, const Twine &Name="")
 
ValueCreateStructGEP (Value *Ptr, unsigned Idx, 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. More...
 
ValueCreateTrunc (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExt (Value *V, Type *DestTy, const Twine &Name="")
 
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. More...
 
ValueCreateSExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a SExt or Trunc from the integer value V to DestTy. More...
 
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, Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None)
 
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="", Optional< fp::ExceptionBehavior > Except=None)
 
PHINodeCreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="")
 
CallInstCreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args=None, 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=None, 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="", Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None)
 
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 (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="")
 
 LLVM_ATTRIBUTE_DEPRECATED (Value *CreateShuffleVector(Value *V1, Value *V2, ArrayRef< uint32_t > Mask, const Twine &Name=""), "Pass indices as 'int' instead")
 
ValueCreateShuffleVector (Value *V1, Value *V2, ArrayRef< int > Mask, const Twine &Name="")
 See class ShuffleVectorInst for a description of the mask representation. More...
 
ValueCreateShuffleVector (Value *V, ArrayRef< int > Mask, const Twine &Name="")
 Create a unary shuffle. More...
 
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 an i1 value testing if Arg is null. More...
 
ValueCreateIsNotNull (Value *Arg, const Twine &Name="")
 Return an i1 value testing if Arg is not null. More...
 
ValueCreatePtrDiff (Value *LHS, Value *RHS, const Twine &Name="")
 Return the i64 difference between two pointer values, dividing out the size of the pointed-to objects. More...
 
ValueCreateLaunderInvariantGroup (Value *Ptr)
 Create a launder.invariant.group intrinsic call. More...
 
ValueCreateStripInvariantGroup (Value *Ptr)
 Create a strip.invariant.group intrinsic call. More...
 
ValueCreateVectorReverse (Value *V, const Twine &Name="")
 Return a vector value that contains the vector V reversed. More...
 
ValueCreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="")
 Return a vector value that contains. More...
 
ValueCreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="")
 Return a vector value that contains. More...
 
ValueCreateExtractInteger (const DataLayout &DL, Value *From, IntegerType *ExtractedTy, uint64_t Offset, const Twine &Name)
 Return a value that has been extracted from a larger integer type. More...
 
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)
 
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. More...
 
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. More...
 

Additional Inherited Members

- Protected Attributes inherited from llvm::IRBuilderBase
BasicBlockBB
 
BasicBlock::iterator InsertPt
 
LLVMContextContext
 
const IRBuilderFolderFolder
 
const IRBuilderDefaultInserterInserter
 
MDNodeDefaultFPMathTag
 
FastMathFlags FMF
 
bool IsFPConstrained
 
fp::ExceptionBehavior DefaultConstrainedExcept
 
RoundingMode DefaultConstrainedRounding
 
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 2586 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 = None 
)
inline

Definition at line 2592 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 = None 
)
inlineexplicit

Definition at line 2598 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 = None 
)
inlineexplicit

Definition at line 2602 of file IRBuilder.h.

◆ IRBuilder() [4/8]

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

Definition at line 2610 of file IRBuilder.h.

◆ IRBuilder() [5/8]

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

Definition at line 2617 of file IRBuilder.h.

◆ 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 = None 
)
inline

Definition at line 2624 of file IRBuilder.h.

◆ 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 = None 
)
inline

Definition at line 2632 of file IRBuilder.h.

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


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