LLVM 22.0.0git
Classes | Public Member Functions | Protected Attributes | List of all members
llvm::IRBuilderBase Class Reference

Common base class shared among various IRBuilders. More...

#include "llvm/IR/IRBuilder.h"

Inheritance diagram for llvm::IRBuilderBase:
[legend]

Classes

class  FastMathFlagGuard
 
class  InsertPoint
 InsertPoint - A saved insertion point. More...
 
class  InsertPointGuard
 
class  OperandBundlesGuard
 

Public Member Functions

 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.
 

Protected Attributes

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

Common base class shared among various IRBuilders.

Definition at line 114 of file IRBuilder.h.

Constructor & Destructor Documentation

◆ IRBuilderBase()

llvm::IRBuilderBase::IRBuilderBase ( LLVMContext context,
const IRBuilderFolder Folder,
const IRBuilderDefaultInserter Inserter,
MDNode FPMathTag,
ArrayRef< OperandBundleDef OpBundles 
)
inline

Definition at line 162 of file IRBuilder.h.

References ClearInsertionPoint().

Member Function Documentation

◆ AddMetadataToInst()

void llvm::IRBuilderBase::AddMetadataToInst ( Instruction I) const
inline

Add all entries in MetadataToCopy to I.

Definition at line 280 of file IRBuilder.h.

References I, and SetInstDebugLocation().

Referenced by Insert().

◆ clearFastMathFlags()

void llvm::IRBuilderBase::clearFastMathFlags ( )
inline

Clear the fast-math flags.

Definition at line 339 of file IRBuilder.h.

References llvm::FastMathFlags::clear(), and FMF.

◆ ClearInsertionPoint()

void llvm::IRBuilderBase::ClearInsertionPoint ( )
inline

Clear the insertion point: created instructions will not be inserted into a block.

Definition at line 196 of file IRBuilder.h.

References BB, and InsertPt.

Referenced by llvm::SCEVExpander::clearInsertPoint(), llvm::OpenMPIRBuilder::emitBranch(), IRBuilderBase(), llvm::Negator::Negate(), restoreIP(), and saveAndClearIP().

◆ CollectMetadataToCopy()

void llvm::IRBuilderBase::CollectMetadataToCopy ( Instruction Src,
ArrayRef< unsigned MetadataKinds 
)
inline

Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions.

Entries present in MedataDataToCopy but not on Src will be dropped from MetadataToCopy.

Definition at line 262 of file IRBuilder.h.

References SetCurrentDebugLocation().

Referenced by performBranchToCommonDestFolding(), and llvm::InstCombinerImpl::run().

◆ CreateAdd()

Value * llvm::IRBuilderBase::CreateAdd ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 1403 of file IRBuilder.h.

References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue(), llvm::OpenMPIRBuilder::calculateCanonicalLoopTripCount(), callBufferedPrintfStart(), CheckAndCreateOffsetAdd(), CloneLoopBlocks(), llvm::InstCombinerImpl::commonIDivTransforms(), convertToShadowDataInt(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createFakeIntVal(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), createMemSetLoop(), CreateNSWAdd(), CreateNUWAdd(), llvm::AMDGPU::createSlowPathCmp(), llvm::emitGEPOffset(), llvm::OpenMPIRBuilder::emitScanReduction(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandFPToI(), expandIToFP(), expandVecReduceAdd(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpSubConstant(), foldICmpUSubSatOrUAddSatWithConstant(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldMulShl1(), foldNoWrapAdd(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldPtrToIntOfGEP(), llvm::InstCombinerImpl::foldSquareSumInt(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), GEPToVectorIndex(), llvm::InstCombiner::getFreelyInvertedImpl(), getStrlenWithNull(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), hoistSub(), llvm::memtag::incrementThreadLong(), insertSpills(), llvm::AMDGPU::instrumentAddress(), LowerCTPOP(), llvm::lowerUnaryVectorIntrinsicAsLoop(), matchStridedStart(), llvm::AMDGPU::memToShadow(), promoteAllocaUserToVector(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), rewriteGEPAsOffset(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyX86pmadd(), simplifyX86pmulh(), llvm::SplitBlockAndInsertSimpleForLoop(), llvm::InstCombinerImpl::takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::ObjectSizeOffsetEvaluator::visitGEPOperator(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitURem().

◆ CreateAddReduce()

CallInst * IRBuilderBase::CreateAddReduce ( Value Src)

Create a vector int add reduction intrinsic of the source vector.

Definition at line 366 of file IRBuilder.cpp.

Referenced by llvm::InstCombinerImpl::visitCallInst().

◆ CreateAddrSpaceCast()

Value * llvm::IRBuilderBase::CreateAddrSpaceCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateAggregateCast()

Value * IRBuilderBase::CreateAggregateCast ( Value V,
Type DestTy 
)

Cast between aggregate types that must have identical structure but may differ in their leaf types.

The leaf values are recursively extracted, casted, and then reinserted into a value of type DestTy. The leaf types must be castable using a bitcast or ptrcast, because signedness is not specified.

Definition at line 71 of file IRBuilder.cpp.

References assert(), CreateAggregateCast(), CreateBitOrPointerCast(), CreateExtractValue(), CreateInsertValue(), llvm::PoisonValue::get(), llvm::Type::getArrayElementType(), llvm::Type::getArrayNumElements(), llvm::Type::getStructElementType(), llvm::Type::getStructNumElements(), I, llvm::Type::isAggregateType(), llvm::Type::isArrayTy(), and llvm::Type::isStructTy().

Referenced by CreateAggregateCast(), createMergedFunction(), and createThunk().

◆ CreateAggregateRet()

ReturnInst * llvm::IRBuilderBase::CreateAggregateRet ( Value *const retVals,
unsigned  N 
)
inline

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.

This is a convenience function for code that uses aggregate return values as a vehicle for having multiple return values.

Definition at line 1183 of file IRBuilder.h.

References Context, llvm::ReturnInst::Create(), CreateInsertValue(), llvm::PoisonValue::get(), getCurrentFunctionReturnType(), Insert(), and N.

◆ CreateAlignedLoad() [1/3]

LoadInst * llvm::IRBuilderBase::CreateAlignedLoad ( Type Ty,
Value Ptr,
MaybeAlign  Align,
bool  isVolatile,
const Twine Name = "" 
)
inline

Definition at line 1874 of file IRBuilder.h.

References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), Name, and Ptr.

◆ CreateAlignedLoad() [2/3]

LoadInst * llvm::IRBuilderBase::CreateAlignedLoad ( Type Ty,
Value Ptr,
MaybeAlign  Align,
const char Name 
)
inline

◆ CreateAlignedLoad() [3/3]

LoadInst * llvm::IRBuilderBase::CreateAlignedLoad ( Type Ty,
Value Ptr,
MaybeAlign  Align,
const Twine Name = "" 
)
inline

Definition at line 1869 of file IRBuilder.h.

References CreateAlignedLoad(), Name, and Ptr.

◆ CreateAlignedStore()

StoreInst * llvm::IRBuilderBase::CreateAlignedStore ( Value Val,
Value Ptr,
MaybeAlign  Align,
bool  isVolatile = false 
)
inline

◆ CreateAlignmentAssumption() [1/2]

CallInst * IRBuilderBase::CreateAlignmentAssumption ( const DataLayout DL,
Value PtrValue,
unsigned  Alignment,
Value OffsetValue = nullptr 
)

Create an assume intrinsic call that represents an alignment assumption on the provided pointer.

An optional offset can be provided, and if it is provided, the offset must be subtracted from the provided pointer to get the pointer with the specified alignment.

Definition at line 1240 of file IRBuilder.cpp.

References assert(), DL, getIntPtrTy(), and llvm::Value::getType().

Referenced by AddAlignmentAssumptions(), and llvm::OpenMPIRBuilder::applySimd().

◆ CreateAlignmentAssumption() [2/2]

CallInst * IRBuilderBase::CreateAlignmentAssumption ( const DataLayout DL,
Value PtrValue,
Value Alignment,
Value OffsetValue = nullptr 
)

Create an assume intrinsic call that represents an alignment assumption on the provided pointer.

An optional offset can be provided, and if it is provided, the offset must be subtracted from the provided pointer to get the pointer with the specified alignment.

This overload handles the condition where the Alignment is dependent on an existing value rather than a static value.

Definition at line 1253 of file IRBuilder.cpp.

References assert(), DL, and llvm::Value::getType().

◆ CreateAlloca() [1/2]

AllocaInst * llvm::IRBuilderBase::CreateAlloca ( Type Ty,
unsigned  AddrSpace,
Value ArraySize = nullptr,
const Twine Name = "" 
)
inline

◆ CreateAlloca() [2/2]

AllocaInst * llvm::IRBuilderBase::CreateAlloca ( Type Ty,
Value ArraySize = nullptr,
const Twine Name = "" 
)
inline

Definition at line 1837 of file IRBuilder.h.

References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), and Name.

◆ CreateAnd() [1/4]

Value * llvm::IRBuilderBase::CreateAnd ( ArrayRef< Value * >  Ops)
inline

◆ CreateAnd() [2/4]

Value * llvm::IRBuilderBase::CreateAnd ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 1557 of file IRBuilder.h.

References CreateAnd(), LHS, Name, and RHS.

◆ CreateAnd() [3/4]

Value * llvm::IRBuilderBase::CreateAnd ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 1561 of file IRBuilder.h.

References CreateAnd(), LHS, Name, and RHS.

◆ CreateAnd() [4/4]

Value * llvm::IRBuilderBase::CreateAnd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1551 of file IRBuilder.h.

References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.

Referenced by addBoundsChecking(), llvm::addRuntimeChecks(), applyX86MaskOn1BitsVec(), llvm::buildAtomicRMWValue(), buildPartialUnswitchConditionalBranch(), callBufferedPrintfStart(), checkForNegativeOperand(), llvm::InstCombinerImpl::commonShiftTransforms(), convertToShadowDataInt(), CreateAnd(), createLogicFromTable(), createMaskInstrs(), llvm::AMDGPU::createSlowPathCmp(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), expandAnyOrAllIntrinsic(), expandAtan2Intrinsic(), expandBufferLoadIntrinsic(), expandFPToI(), expandIToFP(), foldAndOrOfICmpsWithPow2AndWithZero(), foldAnyOrAllBitsSet(), foldBitmaskMul(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldComplexAndOrPatterns(), foldCtpopPow2Test(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpXNegX(), foldIntegerRepackThroughZExt(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldOrToXor(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldSwitchToSelect(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), getMask(), llvm::memtag::incrementThreadLong(), insertMaskedValue(), insertSpills(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::AMDGPU::instrumentAddressImpl(), LowerBSWAP(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), performMaskedAtomicOp(), processUMulZExtIdiom(), llvm::KCFIPass::run(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), upgradeMaskedMove(), upgradePMULDQ(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ CreateAndReduce()

CallInst * IRBuilderBase::CreateAndReduce ( Value Src)

Create a vector int AND reduction intrinsic of the source vector.

Definition at line 374 of file IRBuilder.cpp.

Referenced by llvm::InstCombinerImpl::visitCallInst().

◆ CreateArithmeticFence()

CallInst * llvm::IRBuilderBase::CreateArithmeticFence ( Value Val,
Type DstType,
const Twine Name = "" 
)
inline

Create a call to the arithmetic_fence intrinsic.

Definition at line 1086 of file IRBuilder.h.

References CreateIntrinsic(), and Name.

◆ CreateAShr() [1/3]

Value * llvm::IRBuilderBase::CreateAShr ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 1541 of file IRBuilder.h.

References CreateAShr(), LHS, Name, and RHS.

◆ CreateAShr() [2/3]

Value * llvm::IRBuilderBase::CreateAShr ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 1546 of file IRBuilder.h.

References CreateAShr(), LHS, Name, and RHS.

◆ CreateAShr() [3/3]

Value * llvm::IRBuilderBase::CreateAShr ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

◆ CreateAssumption()

CallInst * IRBuilderBase::CreateAssumption ( Value Cond,
ArrayRef< OperandBundleDef OpBundles = {} 
)

Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.

The optional argument OpBundles specifies operand bundles that are added to the call instruction.

Definition at line 463 of file IRBuilder.cpp.

References assert(), BB, Cond, CreateCall(), getInt1Ty(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().

Referenced by CreateDereferenceableAssumption(), generateReproducer(), llvm::lowerObjectSizeCall(), removeUndefIntroducingPredecessor(), and llvm::InstCombinerImpl::visitCallInst().

◆ CreateAtomicCmpXchg()

AtomicCmpXchgInst * llvm::IRBuilderBase::CreateAtomicCmpXchg ( Value Ptr,
Value Cmp,
Value New,
MaybeAlign  Align,
AtomicOrdering  SuccessOrdering,
AtomicOrdering  FailureOrdering,
SyncScope::ID  SSID = SyncScope::System 
)
inline

◆ CreateAtomicRMW()

AtomicRMWInst * llvm::IRBuilderBase::CreateAtomicRMW ( AtomicRMWInst::BinOp  Op,
Value Ptr,
Value Val,
MaybeAlign  Align,
AtomicOrdering  Ordering,
SyncScope::ID  SSID = SyncScope::System 
)
inline

◆ CreateBinaryIntrinsic()

Value * IRBuilderBase::CreateBinaryIntrinsic ( Intrinsic::ID  ID,
Value LHS,
Value RHS,
FMFSource  FMFSource = {},
const Twine Name = "" 
)

◆ CreateBinOp()

Value * llvm::IRBuilderBase::CreateBinOp ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1708 of file IRBuilder.h.

References CreateBinOpFMF(), LHS, Name, Opc, and RHS.

Referenced by buildNew(), canonicalizeLogicFirst(), llvm::InstCombinerImpl::commonShiftTransforms(), createLogicalOp(), CreateNAryOp(), llvm::VPInterleaveRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPReductionEVLRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), factorizeMathWithShlOps(), fixI8UseChain(), foldAndOrOfICmpsWithConstEq(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldBitCastBitwiseLogic(), foldBitwiseLogicWithIntrinsics(), foldComplexAndOrPatterns(), foldDependentIVs(), foldICmpOrXorSubChain(), foldIntrinsicUsingDistributiveLaws(), foldLogicCastConstant(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVectorBinop(), generateNewInstTree(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::getOrderedReduction(), llvm::getShuffleReduction(), hoistBOAssociation(), llvm::Instruction::isLifetimeStartOrEnd(), matchDeMorgansLaws(), narrowUDivURem(), reassociateForUses(), scalarize(), simplifyAndOrWithOpReplaced(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), tryFactorization(), tryNarrowMathIfNoOverflow(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitShl().

◆ CreateBinOpFMF()

Value * llvm::IRBuilderBase::CreateBinOpFMF ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateBitCast()

Value * llvm::IRBuilderBase::CreateBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 2204 of file IRBuilder.h.

References CreateCast(), and Name.

Referenced by applyX86MaskOn1BitsVec(), canonicalizeBitCastExtElt(), llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), CreateBitOrPointerCast(), createCmpXchgInstFun(), createTblForTrunc(), createTblShuffleForZExt(), llvm::coro::Shape::emitDealloc(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), emitX86ScalarSelect(), expandFPToI(), expandIsFPClass(), expandIToFP(), extractMaskedValue(), fitArgInto64Bits(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldCopySignIdioms(), llvm::InstCombinerImpl::foldICmpBitCast(), foldReductionIdiom(), foldTruncInsEltPair(), foldVecExtTruncToExtElt(), foldVecTruncToExtElt(), getAllocaPos(), llvm::VNCoercion::getStoreValueForLoadHelper(), getX86MaskVec(), hoistConditionalLoadsStores(), llvm::InlineFunctionImpl(), insertMaskedValue(), llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVECondLast(), lowerKernelArguments(), llvm::AArch64TargetLowering::optimizeExtendOrTruncateConversion(), optimizeVectorResizeWithIntegerBitCasts(), promoteAllocaUserToVector(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), simplifyRelocatesOffABase(), simplifyX86extrq(), simplifyX86insertq(), simplifyX86MaskedStore(), simplifyX86movmsk(), llvm::coro::AnyRetconABI::splitCoroutine(), splitMergedValStore(), upgradeAMDGCNIntrinsicCall(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), upgradePMULDQ(), upgradeX86IntrinsicCall(), upgradeX86PSLLDQIntrinsics(), upgradeX86PSRLDQIntrinsics(), upgradeX86VPERMT2Intrinsics(), llvm::versionCallSite(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().

◆ CreateBitOrPointerCast()

Value * llvm::IRBuilderBase::CreateBitOrPointerCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateBr()

BranchInst * llvm::IRBuilderBase::CreateBr ( BasicBlock Dest)
inline

◆ CreateCall() [1/4]

CallInst * llvm::IRBuilderBase::CreateCall ( FunctionCallee  Callee,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2536 of file IRBuilder.h.

References CreateCall(), and Name.

◆ CreateCall() [2/4]

CallInst * llvm::IRBuilderBase::CreateCall ( FunctionCallee  Callee,
ArrayRef< Value * >  Args = {},
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2530 of file IRBuilder.h.

◆ CreateCall() [3/4]

CallInst * llvm::IRBuilderBase::CreateCall ( FunctionType FTy,
Value Callee,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateCall() [4/4]

CallInst * llvm::IRBuilderBase::CreateCall ( FunctionType FTy,
Value Callee,
ArrayRef< Value * >  Args = {},
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2508 of file IRBuilder.h.

Referenced by callAppendArgs(), callAppendStringN(), callBufferedPrintfStart(), callPrintfBegin(), convertToRelLookupTable(), llvm::sandboxir::CallInst::create(), CreateAssumption(), llvm::OpenMPIRBuilder::createBarrier(), llvm::OpenMPIRBuilder::createCachedThreadPrivate(), CreateCall(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCancellationPoint(), CreateConstrainedFPCall(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createCritical(), CreateFree(), CreateGCRelocates(), CreateGCStatepointCallCommon(), CreateLaunderInvariantGroup(), CreateMalloc(), llvm::OpenMPIRBuilder::createMasked(), llvm::OpenMPIRBuilder::createMaster(), llvm::coro::createMustTailCall(), llvm::OpenMPIRBuilder::createOMPAlloc(), llvm::OpenMPIRBuilder::createOMPFree(), llvm::OpenMPIRBuilder::createOMPInteropDestroy(), llvm::OpenMPIRBuilder::createOMPInteropInit(), llvm::OpenMPIRBuilder::createOMPInteropUse(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createOrderedThreadsSimd(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::orc::ReOptimizeLayer::createReoptimizeCall(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSingle(), CreateStripInvariantGroup(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), createTargetLoopWorkshareCall(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::OpenMPIRBuilder::createTeams(), createThunk(), llvm::orc::IRSpeculationLayer::emit(), llvm::coro::Shape::emitAlloc(), llvm::AtomicInfo::EmitAtomicLibcall(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::coro::Shape::emitDealloc(), llvm::OpenMPIRBuilder::emitFlush(), emitGetSwiftErrorValue(), llvm::OpenMPIRBuilder::emitMapperCall(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), emitNoUnwindRuntimeCall(), emitSetSwiftErrorValue(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), llvm::OpenMPIRBuilder::emitTaskwaitImpl(), llvm::OpenMPIRBuilder::emitTaskyieldImpl(), emitTPIDR2Save(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), llvm::VPWidenIntrinsicRecipe::execute(), llvm::VPWidenCallRecipe::execute(), expandIToFP(), foldFrexpOfSelect(), llvm::AMDGPU::generateCrashCode(), generateUnsignedDivisionCode(), llvm::memtag::getAndroidSlotPtr(), llvm::OpenMPIRBuilder::getOrCreateThreadID(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), hostParallelCallback(), llvm::InlineFunctionImpl(), InsertCall(), llvm::SampleProfileProber::instrumentOneFunc(), lowerAwaitSuspend(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleavedStore(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), lowerObjCCall(), llvm::lowerUnaryVectorIntrinsicAsLoop(), llvm::orc::makeStub(), processUGT_ADDCST_ADD(), ReplaceCallWith(), replaceWithTLIFunction(), llvm::GCNTTIImpl::simplifyAMDGCNLaneIntrinsicDemanded(), targetParallelCallback(), llvm::dxil::DXILOpBuilder::tryCreateOp(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), upgradeX86IntrinsicCall(), UseTlsOffset(), useTpOffset(), and llvm::InstCombinerImpl::visitCallInst().

◆ CreateCallBr() [1/4]

CallBrInst * llvm::IRBuilderBase::CreateCallBr ( FunctionCallee  Callee,
BasicBlock DefaultDest,
ArrayRef< BasicBlock * >  IndirectDests,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "" 
)
inline

Definition at line 1299 of file IRBuilder.h.

References CreateCallBr(), and Name.

◆ CreateCallBr() [2/4]

CallBrInst * llvm::IRBuilderBase::CreateCallBr ( FunctionCallee  Callee,
BasicBlock DefaultDest,
ArrayRef< BasicBlock * >  IndirectDests,
ArrayRef< Value * >  Args = {},
const Twine Name = "" 
)
inline

Definition at line 1292 of file IRBuilder.h.

◆ CreateCallBr() [3/4]

CallBrInst * llvm::IRBuilderBase::CreateCallBr ( FunctionType Ty,
Value Callee,
BasicBlock DefaultDest,
ArrayRef< BasicBlock * >  IndirectDests,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "" 
)
inline

Definition at line 1281 of file IRBuilder.h.

References llvm::CallBrInst::Create(), Insert(), and Name.

◆ CreateCallBr() [4/4]

CallBrInst * llvm::IRBuilderBase::CreateCallBr ( FunctionType Ty,
Value Callee,
BasicBlock DefaultDest,
ArrayRef< BasicBlock * >  IndirectDests,
ArrayRef< Value * >  Args = {},
const Twine Name = "" 
)
inline

Create a callbr instruction.

Definition at line 1273 of file IRBuilder.h.

Referenced by CreateCallBr().

◆ CreateCast()

Value * llvm::IRBuilderBase::CreateCast ( Instruction::CastOps  Op,
Value V,
Type DestTy,
const Twine Name = "",
MDNode FPMathTag = nullptr,
FMFSource  FMFSource = {} 
)
inline

◆ CreateCatchPad()

CatchPadInst * llvm::IRBuilderBase::CreateCatchPad ( Value ParentPad,
ArrayRef< Value * >  Args,
const Twine Name = "" 
)
inline

Definition at line 1324 of file IRBuilder.h.

References llvm::CatchPadInst::Create(), Insert(), and Name.

◆ CreateCatchRet()

CatchReturnInst * llvm::IRBuilderBase::CreateCatchRet ( CatchPadInst CatchPad,
BasicBlock BB 
)
inline

Definition at line 1335 of file IRBuilder.h.

References BB, llvm::CatchReturnInst::Create(), and Insert().

Referenced by llvm::sandboxir::CatchReturnInst::create().

◆ CreateCatchSwitch()

CatchSwitchInst * llvm::IRBuilderBase::CreateCatchSwitch ( Value ParentPad,
BasicBlock UnwindBB,
unsigned  NumHandlers,
const Twine Name = "" 
)
inline

Definition at line 1317 of file IRBuilder.h.

References llvm::CatchSwitchInst::Create(), Insert(), and Name.

Referenced by llvm::sandboxir::CatchSwitchInst::create().

◆ CreateCleanupPad()

CleanupPadInst * llvm::IRBuilderBase::CreateCleanupPad ( Value ParentPad,
ArrayRef< Value * >  Args = {},
const Twine Name = "" 
)
inline

Definition at line 1329 of file IRBuilder.h.

Referenced by llvm::sandboxir::CleanupPadInst::create().

◆ CreateCleanupRet()

CleanupReturnInst * llvm::IRBuilderBase::CreateCleanupRet ( CleanupPadInst CleanupPad,
BasicBlock UnwindBB = nullptr 
)
inline

◆ CreateCmp()

Value * llvm::IRBuilderBase::CreateCmp ( CmpInst::Predicate  Pred,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateCondBr() [1/2]

BranchInst * llvm::IRBuilderBase::CreateCondBr ( Value Cond,
BasicBlock True,
BasicBlock False,
Instruction MDSrc 
)
inline

Create a conditional 'br Cond, TrueDest, FalseDest' instruction.

Copy branch meta data if available.

Definition at line 1206 of file IRBuilder.h.

References Cond, llvm::Instruction::copyMetadata(), llvm::BranchInst::Create(), and Insert().

◆ CreateCondBr() [2/2]

BranchInst * llvm::IRBuilderBase::CreateCondBr ( Value Cond,
BasicBlock True,
BasicBlock False,
MDNode BranchWeights = nullptr,
MDNode Unpredictable = nullptr 
)
inline

Create a conditional 'br Cond, TrueDest, FalseDest' instruction.

Definition at line 1197 of file IRBuilder.h.

References Cond, llvm::BranchInst::Create(), and Insert().

Referenced by buildPartialInvariantUnswitchConditionalBranch(), buildPartialUnswitchConditionalBranch(), CloneLoopBlocks(), llvm::ConstantFoldTerminator(), llvm::OpenMPIRBuilder::createAtomicCompare(), createCondBranch(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), createMemSetLoop(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::deleteDeadLoop(), despeculateCountZeros(), llvm::orc::IRSpeculationLayer::emit(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::OpenMPIRBuilder::emitScanReduction(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), llvm::VPBranchOnMaskRecipe::execute(), expandFPToI(), expandIToFP(), generateUnsignedDivisionCode(), getStrlenWithNull(), llvm::coro::BaseCloner::handleFinalSuspend(), injectPendingInvariantConditions(), llvm::lowerUnaryVectorIntrinsicAsLoop(), simplifySwitchOfCmpIntrinsic(), llvm::SplitBlockAndInsertSimpleForLoop(), llvm::splitLoopBound(), switchToLookupTable(), and llvm::LoopVersioning::versionLoop().

◆ CreateConstGEP1_32()

Value * llvm::IRBuilderBase::CreateConstGEP1_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
const Twine Name = "" 
)
inline

◆ CreateConstGEP1_64()

Value * llvm::IRBuilderBase::CreateConstGEP1_64 ( Type Ty,
Value Ptr,
uint64_t  Idx0,
const Twine Name = "" 
)
inline

◆ CreateConstGEP2_32()

Value * llvm::IRBuilderBase::CreateConstGEP2_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
unsigned  Idx1,
const Twine Name = "",
GEPNoWrapFlags  NWFlags = GEPNoWrapFlags::none() 
)
inline

◆ CreateConstGEP2_64()

Value * llvm::IRBuilderBase::CreateConstGEP2_64 ( Type Ty,
Value Ptr,
uint64_t  Idx0,
uint64_t  Idx1,
const Twine Name = "" 
)
inline

◆ CreateConstInBoundsGEP1_32()

Value * llvm::IRBuilderBase::CreateConstInBoundsGEP1_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
const Twine Name = "" 
)
inline

◆ CreateConstInBoundsGEP1_64()

Value * llvm::IRBuilderBase::CreateConstInBoundsGEP1_64 ( Type Ty,
Value Ptr,
uint64_t  Idx0,
const Twine Name = "" 
)
inline

◆ CreateConstInBoundsGEP2_32()

Value * llvm::IRBuilderBase::CreateConstInBoundsGEP2_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
unsigned  Idx1,
const Twine Name = "" 
)
inline

◆ CreateConstInBoundsGEP2_64()

Value * llvm::IRBuilderBase::CreateConstInBoundsGEP2_64 ( Type Ty,
Value Ptr,
uint64_t  Idx0,
uint64_t  Idx1,
const Twine Name = "" 
)
inline

◆ CreateConstrainedFPBinOp()

CallInst * IRBuilderBase::CreateConstrainedFPBinOp ( 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 
)

◆ CreateConstrainedFPCall()

CallInst * IRBuilderBase::CreateConstrainedFPCall ( Function Callee,
ArrayRef< Value * >  Args,
const Twine Name = "",
std::optional< RoundingMode Rounding = std::nullopt,
std::optional< fp::ExceptionBehavior Except = std::nullopt 
)

◆ CreateConstrainedFPCast()

CallInst * IRBuilderBase::CreateConstrainedFPCast ( 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 
)

◆ CreateConstrainedFPCmp()

CallInst * IRBuilderBase::CreateConstrainedFPCmp ( Intrinsic::ID  ID,
CmpInst::Predicate  P,
Value L,
Value R,
const Twine Name = "",
std::optional< fp::ExceptionBehavior Except = std::nullopt 
)

Definition at line 978 of file IRBuilder.cpp.

References llvm::CallingConv::C, CreateIntrinsic(), Name, P, and setConstrainedFPCallAttr().

◆ CreateConstrainedFPIntrinsic()

CallInst * IRBuilderBase::CreateConstrainedFPIntrinsic ( 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.

It sets the rounding mode and exception behavior of the created intrinsic call according to Rounding and Except and it sets FPMathTag as the 'fpmath' metadata, using defaults if a value equals nullopt/null.

Definition at line 887 of file IRBuilder.cpp.

References llvm::CallingConv::C, CreateIntrinsic(), FMF, llvm::FMFSource::get(), Name, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and setConstrainedFPCallAttr().

◆ CreateConstrainedFPUnroundedBinOp()

CallInst * IRBuilderBase::CreateConstrainedFPUnroundedBinOp ( Intrinsic::ID  ID,
Value L,
Value R,
FMFSource  FMFSource = {},
const Twine Name = "",
MDNode FPMathTag = nullptr,
std::optional< fp::ExceptionBehavior Except = std::nullopt 
)

◆ CreateCopySign()

Value * llvm::IRBuilderBase::CreateCopySign ( Value LHS,
Value RHS,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create call to the copysign intrinsic.

Definition at line 1058 of file IRBuilder.h.

Referenced by foldCopySignIdioms(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFNeg().

◆ CreateCountTrailingZeroElems()

Value * llvm::IRBuilderBase::CreateCountTrailingZeroElems ( Type ResTy,
Value Mask,
bool  ZeroIsPoison = true,
const Twine Name = "" 
)
inline

Create a call to llvm.experimental_cttz_elts.

Definition at line 1134 of file IRBuilder.h.

References CreateIntrinsic(), getInt1(), and Name.

Referenced by llvm::VPUnrollPartAccessor< 1 >::getUnrollPart().

◆ CreateDereferenceableAssumption()

CallInst * IRBuilderBase::CreateDereferenceableAssumption ( Value PtrValue,
Value SizeValue 
)

Create an assume intrinsic call that represents an dereferencable assumption on the provided pointer.

Definition at line 1262 of file IRBuilder.cpp.

References assert(), CreateAssumption(), getContext(), llvm::ConstantInt::getTrue(), and llvm::Value::getType().

◆ CreateElementCount()

Value * IRBuilderBase::CreateElementCount ( Type Ty,
ElementCount  EC 
)

Create an expression which evaluates to the number of elements in EC at runtime.

This can result in poison if type Ty is not big enough to hold the value.

Definition at line 123 of file IRBuilder.cpp.

References CreateVScaleMultiple().

Referenced by llvm::EpilogueVectorizerMainLoop::createIterationCountCheck(), getMemOperands(), instCombineSMECntsElts(), instCombineSVECntElts(), llvm::lowerUnaryVectorIntrinsicAsLoop(), and llvm::SplitBlockAndInsertForEachLane().

◆ CreateElementUnorderedAtomicMemCpy()

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemCpy ( 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.

DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.

If the pointers aren't i8*, they will be converted. If alias metadata is specified, it will be added to the instruction.

Definition at line 231 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), getInt32(), and Size.

◆ CreateElementUnorderedAtomicMemMove()

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemMove ( 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.

DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.

If the pointers aren't i8*, they will be converted. If alias metadata is specified, it will be added to the instruction.

Definition at line 330 of file IRBuilder.cpp.

References llvm::CallBase::addParamAttr(), assert(), CreateIntrinsic(), llvm::Value::getContext(), getInt32(), llvm::Attribute::getWithAlignment(), llvm::Instruction::setAAMetadata(), and Size.

◆ CreateElementUnorderedAtomicMemSet() [1/2]

CallInst * llvm::IRBuilderBase::CreateElementUnorderedAtomicMemSet ( Value Ptr,
Value Val,
uint64_t  Size,
Align  Alignment,
uint32_t  ElementSize,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value.

If the pointer isn't an i8*, it will be converted. If alias metadata is specified, it will be added to the instruction.

Definition at line 651 of file IRBuilder.h.

References CreateElementUnorderedAtomicMemSet(), getInt64(), Ptr, and Size.

Referenced by CreateElementUnorderedAtomicMemSet().

◆ CreateElementUnorderedAtomicMemSet() [2/2]

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemSet ( Value Ptr,
Value Val,
Value Size,
Align  Alignment,
uint32_t  ElementSize,
const AAMDNodes AAInfo = AAMDNodes() 
)

Definition at line 194 of file IRBuilder.cpp.

References CreateIntrinsic(), getInt32(), Ptr, llvm::Instruction::setAAMetadata(), and Size.

◆ CreateExactSDiv()

Value * llvm::IRBuilderBase::CreateExactSDiv ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1476 of file IRBuilder.h.

References CreateSDiv(), LHS, Name, and RHS.

Referenced by CreatePtrDiff().

◆ CreateExactUDiv()

Value * llvm::IRBuilderBase::CreateExactUDiv ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1463 of file IRBuilder.h.

References CreateUDiv(), LHS, Name, and RHS.

Referenced by llvm::OpenMPIRBuilder::emitUserDefinedMapper(), and getMemOperands().

◆ CreateExtractElement() [1/2]

Value * llvm::IRBuilderBase::CreateExtractElement ( Value Vec,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Definition at line 2566 of file IRBuilder.h.

References CreateExtractElement(), getInt64(), Idx, and Name.

◆ CreateExtractElement() [2/2]

Value * llvm::IRBuilderBase::CreateExtractElement ( Value Vec,
Value Idx,
const Twine Name = "" 
)
inline

◆ CreateExtractValue()

Value * llvm::IRBuilderBase::CreateExtractValue ( Value Agg,
ArrayRef< unsigned Idxs,
const Twine Name = "" 
)
inline

◆ CreateExtractVector() [1/2]

CallInst * llvm::IRBuilderBase::CreateExtractVector ( Type DstType,
Value SrcVec,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Create a call to the vector.extract intrinsic.

Definition at line 1101 of file IRBuilder.h.

References CreateExtractVector(), getInt64(), Idx, and Name.

◆ CreateExtractVector() [2/2]

CallInst * llvm::IRBuilderBase::CreateExtractVector ( Type DstType,
Value SrcVec,
Value Idx,
const Twine Name = "" 
)
inline

◆ CreateFAdd()

Value * llvm::IRBuilderBase::CreateFAdd ( Value L,
Value R,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFAddFMF()

Value * llvm::IRBuilderBase::CreateFAddFMF ( Value L,
Value R,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFAddReduce()

CallInst * IRBuilderBase::CreateFAddReduce ( Value Acc,
Value Src 
)

Create a sequential vector fadd reduction intrinsic of the source vector.

The first parameter is a scalar accumulator value. An unordered reduction can be created by adding the reassoc fast-math flag to the resulting sequential reduction.

Definition at line 356 of file IRBuilder.cpp.

References CreateIntrinsic().

Referenced by llvm::createSimpleReduction().

◆ CreateFCmp()

Value * llvm::IRBuilderBase::CreateFCmp ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFCmpFMF()

Value * llvm::IRBuilderBase::CreateFCmpFMF ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2457 of file IRBuilder.h.

References LHS, Name, P, and RHS.

Referenced by llvm::VPWidenRecipe::execute(), getFCmpValue(), matchIsFiniteTest(), and reassociateFCmps().

◆ CreateFCmpOEQ()

Value * llvm::IRBuilderBase::CreateFCmpOEQ ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2369 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_OEQ, LHS, Name, and RHS.

Referenced by expandAtan2Intrinsic().

◆ CreateFCmpOGE()

Value * llvm::IRBuilderBase::CreateFCmpOGE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2379 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_OGE, LHS, Name, and RHS.

Referenced by expandAtan2Intrinsic(), and optimizeSQRT().

◆ CreateFCmpOGT()

Value * llvm::IRBuilderBase::CreateFCmpOGT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2374 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_OGT, LHS, Name, and RHS.

◆ CreateFCmpOLE()

Value * llvm::IRBuilderBase::CreateFCmpOLE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2389 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_OLE, LHS, Name, and RHS.

◆ CreateFCmpOLT()

Value * llvm::IRBuilderBase::CreateFCmpOLT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFCmpONE()

Value * llvm::IRBuilderBase::CreateFCmpONE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2394 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_ONE, LHS, Name, and RHS.

◆ CreateFCmpORD()

Value * llvm::IRBuilderBase::CreateFCmpORD ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2399 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_ORD, LHS, Name, and RHS.

Referenced by optimizeSQRT().

◆ CreateFCmpS()

Value * llvm::IRBuilderBase::CreateFCmpS ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2473 of file IRBuilder.h.

References LHS, Name, P, and RHS.

◆ CreateFCmpUEQ()

Value * llvm::IRBuilderBase::CreateFCmpUEQ ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2409 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_UEQ, LHS, Name, and RHS.

◆ CreateFCmpUGE()

Value * llvm::IRBuilderBase::CreateFCmpUGE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2419 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_UGE, LHS, Name, and RHS.

◆ CreateFCmpUGT()

Value * llvm::IRBuilderBase::CreateFCmpUGT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2414 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_UGT, LHS, Name, and RHS.

◆ CreateFCmpULE()

Value * llvm::IRBuilderBase::CreateFCmpULE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2429 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_ULE, LHS, Name, and RHS.

◆ CreateFCmpULT()

Value * llvm::IRBuilderBase::CreateFCmpULT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2424 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_ULT, LHS, Name, and RHS.

◆ CreateFCmpUNE()

Value * llvm::IRBuilderBase::CreateFCmpUNE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2434 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_UNE, LHS, Name, and RHS.

Referenced by expandAnyOrAllIntrinsic().

◆ CreateFCmpUNO()

Value * llvm::IRBuilderBase::CreateFCmpUNO ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2404 of file IRBuilder.h.

References CreateFCmp(), llvm::CmpInst::FCMP_UNO, LHS, Name, and RHS.

◆ CreateFDiv()

Value * llvm::IRBuilderBase::CreateFDiv ( Value L,
Value R,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFDivFMF()

Value * llvm::IRBuilderBase::CreateFDivFMF ( Value L,
Value R,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFence()

FenceInst * llvm::IRBuilderBase::CreateFence ( AtomicOrdering  Ordering,
SyncScope::ID  SSID = SyncScope::System,
const Twine Name = "" 
)
inline

◆ CreateFMA()

Value * llvm::IRBuilderBase::CreateFMA ( Value Factor1,
Value Factor2,
Value Summand,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create call to the fma intrinsic.

Definition at line 1073 of file IRBuilder.h.

Referenced by upgradeX86IntrinsicCall().

◆ CreateFMul()

Value * llvm::IRBuilderBase::CreateFMul ( Value L,
Value R,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFMulFMF()

Value * llvm::IRBuilderBase::CreateFMulFMF ( Value L,
Value R,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFMulReduce()

CallInst * IRBuilderBase::CreateFMulReduce ( Value Acc,
Value Src 
)

Create a sequential vector fmul reduction intrinsic of the source vector.

The first parameter is a scalar accumulator value. An unordered reduction can be created by adding the reassoc fast-math flag to the resulting sequential reduction.

Definition at line 361 of file IRBuilder.cpp.

References CreateIntrinsic().

Referenced by llvm::createSimpleReduction().

◆ CreateFNeg()

Value * llvm::IRBuilderBase::CreateFNeg ( Value V,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFNegFMF()

Value * llvm::IRBuilderBase::CreateFNegFMF ( Value V,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFPCast()

Value * llvm::IRBuilderBase::CreateFPCast ( Value V,
Type DestTy,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2298 of file IRBuilder.h.

References CreateCast(), llvm::Type::getScalarSizeInBits(), and Name.

Referenced by convertTo16Bit().

◆ CreateFPExt()

Value * llvm::IRBuilderBase::CreateFPExt ( Value V,
Type DestTy,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFPExtFMF()

Value * llvm::IRBuilderBase::CreateFPExtFMF ( Value V,
Type DestTy,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 2182 of file IRBuilder.h.

References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.

Referenced by CreateFPExt().

◆ CreateFPMaximumReduce()

CallInst * IRBuilderBase::CreateFPMaximumReduce ( Value Src)

Create a vector float maximum reduction intrinsic of the source vector.

This variant follows the NaN and signed zero semantic of llvm.maximum intrinsic.

Definition at line 406 of file IRBuilder.cpp.

◆ CreateFPMaxReduce()

CallInst * IRBuilderBase::CreateFPMaxReduce ( Value Src)

Create a vector float max reduction intrinsic of the source vector.

Definition at line 398 of file IRBuilder.cpp.

◆ CreateFPMinimumReduce()

CallInst * IRBuilderBase::CreateFPMinimumReduce ( Value Src)

Create a vector float minimum reduction intrinsic of the source vector.

This variant follows the NaN and signed zero semantic of llvm.minimum intrinsic.

Definition at line 410 of file IRBuilder.cpp.

◆ CreateFPMinReduce()

CallInst * IRBuilderBase::CreateFPMinReduce ( Value Src)

Create a vector float min reduction intrinsic of the source vector.

Definition at line 402 of file IRBuilder.cpp.

◆ CreateFPToSI()

Value * llvm::IRBuilderBase::CreateFPToSI ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 2135 of file IRBuilder.h.

References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.

Referenced by expandFPToI().

◆ CreateFPToUI()

Value * llvm::IRBuilderBase::CreateFPToUI ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateFPTrunc()

Value * llvm::IRBuilderBase::CreateFPTrunc ( Value V,
Type DestTy,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFPTruncFMF()

Value * llvm::IRBuilderBase::CreateFPTruncFMF ( Value V,
Type DestTy,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateFree()

CallInst * IRBuilderBase::CreateFree ( Value Source,
ArrayRef< OperandBundleDef Bundles = {} 
)

Generate the IR for a call to the builtin free function.

CreateFree - Generate the IR for a call to the builtin free function.

Definition at line 311 of file IRBuilder.cpp.

References assert(), BB, CreateCall(), F, llvm::FunctionCallee::getCallee(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::PointerType::getUnqual(), and llvm::Type::getVoidTy().

◆ CreateFreeze()

Value * llvm::IRBuilderBase::CreateFreeze ( Value V,
const Twine Name = "" 
)
inline

◆ CreateFRem()

Value * llvm::IRBuilderBase::CreateFRem ( Value L,
Value R,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

Definition at line 1689 of file IRBuilder.h.

References CreateFRemFMF(), and Name.

◆ CreateFRemFMF()

Value * llvm::IRBuilderBase::CreateFRemFMF ( Value L,
Value R,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFSub()

Value * llvm::IRBuilderBase::CreateFSub ( Value L,
Value R,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateFSubFMF()

Value * llvm::IRBuilderBase::CreateFSubFMF ( Value L,
Value R,
FMFSource  FMFSource,
const Twine Name = "",
MDNode FPMD = nullptr 
)
inline

◆ CreateGCGetPointerBase()

CallInst * IRBuilderBase::CreateGCGetPointerBase ( 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.

Definition at line 801 of file IRBuilder.cpp.

References CreateIntrinsic(), llvm::Value::getType(), and Name.

◆ CreateGCGetPointerOffset()

CallInst * IRBuilderBase::CreateGCGetPointerOffset ( 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.

Definition at line 808 of file IRBuilder.cpp.

References CreateIntrinsic(), llvm::Value::getType(), and Name.

◆ CreateGCRelocate()

CallInst * IRBuilderBase::CreateGCRelocate ( 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.

Definition at line 791 of file IRBuilder.cpp.

References CreateIntrinsic(), getInt32(), and Name.

◆ CreateGCResult()

CallInst * IRBuilderBase::CreateGCResult ( 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.

Definition at line 782 of file IRBuilder.cpp.

References CreateIntrinsic(), and Name.

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointCall() [1/3]

CallInst * IRBuilderBase::CreateGCStatepointCall ( 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.

Definition at line 713 of file IRBuilder.cpp.

References Name, and llvm::None.

◆ CreateGCStatepointCall() [2/3]

CallInst * IRBuilderBase::CreateGCStatepointCall ( 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.

Definition at line 693 of file IRBuilder.cpp.

References Name, and llvm::None.

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointCall() [3/3]

CallInst * IRBuilderBase::CreateGCStatepointCall ( 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.

Definition at line 702 of file IRBuilder.cpp.

References Name.

◆ CreateGCStatepointInvoke() [1/3]

InvokeInst * IRBuilderBase::CreateGCStatepointInvoke ( 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 = "" 
)

Definition at line 771 of file IRBuilder.cpp.

References Name, and llvm::None.

◆ CreateGCStatepointInvoke() [2/3]

InvokeInst * IRBuilderBase::CreateGCStatepointInvoke ( 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.

Definition at line 749 of file IRBuilder.cpp.

References Name, and llvm::None.

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointInvoke() [3/3]

InvokeInst * IRBuilderBase::CreateGCStatepointInvoke ( 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.

Definition at line 760 of file IRBuilder.cpp.

References Name.

◆ CreateGEP()

Value * llvm::IRBuilderBase::CreateGEP ( Type Ty,
Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "",
GEPNoWrapFlags  NW = GEPNoWrapFlags::none() 
)
inline

◆ CreateGlobalString()

GlobalVariable * IRBuilderBase::CreateGlobalString ( StringRef  Str,
const Twine Name = "",
unsigned  AddressSpace = 0,
Module M = nullptr,
bool  AddNull = true 
)

Make a new global variable with initializer type i8*.

CreateGlobalString - Make a new global variable with an initializer that has array of i8 type filled in with the nul terminated string value specified.

Make a new global variable with an initializer that has array of i8 type filled in with the null terminated string value specified. The new global variable will be marked mergable with any others of the same contents. If Name is specified, it is the name of the global variable created.

If no module is given via M, it is take from the insertion point basic block.

If Name is specified, it is the name of the global variable created.

Definition at line 43 of file IRBuilder.cpp.

References BB, Context, getInt8Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::ConstantDataArray::getString(), llvm::Value::getType(), llvm::GlobalValue::Global, Name, llvm::GlobalValue::NotThreadLocal, and llvm::GlobalValue::PrivateLinkage.

Referenced by CreateGlobalStringPtr(), llvm::OpenMPIRBuilder::getOrCreateSrcLocStr(), and runSanitizeRealtimeBlocking().

◆ CreateGlobalStringPtr()

Constant * llvm::IRBuilderBase::CreateGlobalStringPtr ( StringRef  Str,
const Twine Name = "",
unsigned  AddressSpace = 0,
Module M = nullptr,
bool  AddNull = true 
)
inline

Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8.

If no module is given via M, it is take from the insertion point basic block.

Definition at line 2053 of file IRBuilder.h.

References Context, CreateGlobalString(), llvm::ConstantExpr::getInBoundsGetElementPtr(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getValueType(), and Name.

◆ CreateICmp()

Value * llvm::IRBuilderBase::CreateICmp ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 2439 of file IRBuilder.h.

References llvm::IRBuilderFolder::FoldCmp(), Folder, Insert(), LHS, Name, P, and RHS.

Referenced by buildNew(), llvm::OpenMPIRBuilder::calculateCanonicalLoopTripCount(), llvm::InstCombinerImpl::commonShiftTransforms(), CreateCmp(), CreateICmpEQ(), CreateICmpNE(), CreateICmpSGE(), CreateICmpSGT(), CreateICmpSLE(), CreateICmpSLT(), CreateICmpUGE(), CreateICmpUGT(), CreateICmpULE(), CreateICmpULT(), createInvariantCond(), llvm::EpilogueVectorizerMainLoop::createIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPWidenRecipe::execute(), llvm::SCEVExpander::expandComparePredicate(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfICmpsWithPow2AndWithZero(), foldClampRangeOfTwo(), foldCtpop(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpDivConstant(), foldICmpOrChain(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXorSubChain(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldICmpWithLowBitMaskedVal(), foldICmpWithTruncSignExtendedVal(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldNegativePower2AndShiftedMask(), foldOrUnsignedUMulOverflowICmp(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldURemOfLoopIncrement(), llvm::SCEVExpander::generateOverflowCheck(), generateReproducer(), getNewICmpValue(), hoistMinMax(), llvm::InstCombinerImpl::insertRangeTest(), llvm::lowerUnaryVectorIntrinsicAsLoop(), reassociateMinMaxWithConstants(), RunTermFold(), llvm::InstCombinerImpl::simplifyRangeCheck(), simplifySwitchOfCmpIntrinsic(), sinkMinMaxInBB(), llvm::splitLoopBound(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), upgradeMaskedCompare(), upgradeX86IntrinsicCall(), upgradeX86vpcom(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitOr().

◆ CreateICmpEQ()

Value * llvm::IRBuilderBase::CreateICmpEQ ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpNE()

Value * llvm::IRBuilderBase::CreateICmpNE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpSGE()

Value * llvm::IRBuilderBase::CreateICmpSGE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpSGT()

Value * llvm::IRBuilderBase::CreateICmpSGT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpSLE()

Value * llvm::IRBuilderBase::CreateICmpSLE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 2365 of file IRBuilder.h.

References CreateICmp(), llvm::CmpInst::ICMP_SLE, LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue(), and upgradeNVVMIntrinsicCall().

◆ CreateICmpSLT()

Value * llvm::IRBuilderBase::CreateICmpSLT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpUGE()

Value * llvm::IRBuilderBase::CreateICmpUGE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpUGT()

Value * llvm::IRBuilderBase::CreateICmpUGT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateICmpULE()

Value * llvm::IRBuilderBase::CreateICmpULE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 2349 of file IRBuilder.h.

References CreateICmp(), llvm::CmpInst::ICMP_ULE, LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue(), and upgradeNVVMIntrinsicCall().

◆ CreateICmpULT()

Value * llvm::IRBuilderBase::CreateICmpULT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateInBoundsGEP()

Value * llvm::IRBuilderBase::CreateInBoundsGEP ( Type Ty,
Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "" 
)
inline

◆ CreateInBoundsPtrAdd()

Value * llvm::IRBuilderBase::CreateInBoundsPtrAdd ( Value Ptr,
Value Offset,
const Twine Name = "" 
)
inline

◆ CreateIndirectBr()

IndirectBrInst * llvm::IRBuilderBase::CreateIndirectBr ( Value Addr,
unsigned  NumDests = 10 
)
inline

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

Definition at line 1230 of file IRBuilder.h.

References Addr, llvm::IndirectBrInst::Create(), and Insert().

◆ CreateInsertElement() [1/4]

Value * llvm::IRBuilderBase::CreateInsertElement ( Type VecTy,
Value NewElt,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Definition at line 2576 of file IRBuilder.h.

References CreateInsertElement(), llvm::PoisonValue::get(), Idx, and Name.

◆ CreateInsertElement() [2/4]

Value * llvm::IRBuilderBase::CreateInsertElement ( Type VecTy,
Value NewElt,
Value Idx,
const Twine Name = "" 
)
inline

◆ CreateInsertElement() [3/4]

Value * llvm::IRBuilderBase::CreateInsertElement ( Value Vec,
Value NewElt,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Definition at line 2588 of file IRBuilder.h.

References CreateInsertElement(), getInt64(), Idx, and Name.

◆ CreateInsertElement() [4/4]

Value * llvm::IRBuilderBase::CreateInsertElement ( Value Vec,
Value NewElt,
Value Idx,
const Twine Name = "" 
)
inline

◆ CreateInsertValue()

Value * llvm::IRBuilderBase::CreateInsertValue ( Value Agg,
Value Val,
ArrayRef< unsigned Idxs,
const Twine Name = "" 
)
inline

◆ CreateInsertVector() [1/2]

CallInst * llvm::IRBuilderBase::CreateInsertVector ( Type DstType,
Value SrcVec,
Value SubVec,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Create a call to the vector.extract intrinsic.

Definition at line 1115 of file IRBuilder.h.

References CreateInsertVector(), getInt64(), Idx, and Name.

◆ CreateInsertVector() [2/2]

CallInst * llvm::IRBuilderBase::CreateInsertVector ( Type DstType,
Value SrcVec,
Value SubVec,
Value Idx,
const Twine Name = "" 
)
inline

◆ CreateIntCast() [1/2]

Value * llvm::IRBuilderBase::CreateIntCast ( Value ,
Type ,
const char  
)
delete

◆ CreateIntCast() [2/2]

Value * llvm::IRBuilderBase::CreateIntCast ( Value V,
Type DestTy,
bool  isSigned,
const Twine Name = "" 
)
inline

◆ CreateIntMaxReduce()

CallInst * IRBuilderBase::CreateIntMaxReduce ( Value Src,
bool  IsSigned = false 
)

Create a vector integer max reduction intrinsic of the source vector.

Definition at line 386 of file IRBuilder.cpp.

Referenced by llvm::createFindLastIVReduction().

◆ CreateIntMinReduce()

CallInst * IRBuilderBase::CreateIntMinReduce ( Value Src,
bool  IsSigned = false 
)

Create a vector integer min reduction intrinsic of the source vector.

Definition at line 392 of file IRBuilder.cpp.

Referenced by llvm::createFindLastIVReduction().

◆ CreateIntrinsic() [1/3]

CallInst * IRBuilderBase::CreateIntrinsic ( 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.

If FMFSource is provided, copy fast-math-flags from that instruction to the intrinsic.

Definition at line 834 of file IRBuilder.cpp.

References BB, llvm::BasicBlock::getModule(), llvm::Intrinsic::getOrInsertDeclaration(), and Name.

Referenced by addBoundsChecking(), llvm::buildAtomicRMWValue(), callIntrinsic(), llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateArithmeticFence(), CreateConstrainedFPBinOp(), CreateConstrainedFPCast(), CreateConstrainedFPCmp(), CreateConstrainedFPIntrinsic(), CreateConstrainedFPUnroundedBinOp(), CreateCountTrailingZeroElems(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateExtractVector(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateGCGetPointerBase(), CreateGCGetPointerOffset(), CreateGCRelocate(), CreateGCResult(), CreateInsertVector(), CreateInvariantStart(), createIsFPClass(), CreateLifetimeEnd(), CreateLifetimeStart(), createMaskInstrs(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), llvm::createMinMaxOp(), CreateNoAliasScopeDeclaration(), createNVVMInternalAddrspaceWrap(), llvm::createOrderedReduction(), createPopcntIntrinsic(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), createRawLoad(), createRawStore(), createReverseEVL(), llvm::createSimpleReduction(), CreateStackRestore(), CreateStackSave(), CreateStepVector(), createTblForTrunc(), CreateThreadLocalAddress(), createTileStore(), createTypedBufferLoad(), createTypedBufferStore(), CreateVectorInterleave(), CreateVScale(), llvm::AArch64TargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitLoadLinked(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitTrailingFence(), llvm::VPHistogramRecipe::execute(), llvm::VPInterleaveRecipe::execute(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), expandAbs(), expandAtan2Intrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandClampIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandIntegerDotIntrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), expandPowIntrinsic(), FlattenLoopPair(), foldCtpop(), foldFDivPowDivisor(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpIntrinsicWithIntrinsic(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldReversedIntrinsicOperands(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), foldSqrt(), foldSubOfMinMax(), llvm::AMDGPU::genAMDGPUReportBlock(), generateNewInstTree(), llvm::SCEVExpander::generateOverflowCheck(), llvm::memtag::getFP(), inlineRetainOrClaimRVCalls(), InsertIntrinsicCalls(), InsertTrap(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECondLast(), instCombineSVELast(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESrshl(), instCombineSVEUxt(), instCombineSVEVectorFuseMulAddSub(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), lowerIntrinsicToFunction(), lowerKernelArguments(), lowerPtrAnnotation(), llvm::ARMTargetLowering::makeDMB(), matchOrConcat(), modifyIntrinsicCall(), processUMulZExtIdiom(), llvm::memtag::readRegister(), reassociateMinMaxWithConstants(), reduceSwitchRange(), replaceWithTileLoad(), llvm::KCFIPass::run(), scalarizeMaskedVectorHistogram(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifySwitchOfPowersOfTwo(), simplifyX86addcarry(), simplifyX86extrq(), simplifyX86insertq(), simplifyX86pmadd(), toSpvLifetimeIntrinsic(), tryCombineFromSVBoolBinOp(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), tryToFPToSat(), tryToRecognizePopCount(), upgradeAArch64IntrinsicCall(), upgradeAbs(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), upgradeNVVMIntrinsicCall(), upgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86IntrinsicCall(), upgradeX86MaskedShift(), upgradeX86Rotate(), upgradeX86VPERMT2Intrinsics(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ CreateIntrinsic() [2/3]

CallInst * llvm::IRBuilderBase::CreateIntrinsic ( Intrinsic::ID  ID,
ArrayRef< Value * >  Args,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create a call to non-overloaded intrinsic ID with Args.

If FMFSource is provided, copy fast-math-flags from that instruction to the intrinsic.

Definition at line 1006 of file IRBuilder.h.

◆ CreateIntrinsic() [3/3]

CallInst * IRBuilderBase::CreateIntrinsic ( Type RetTy,
Intrinsic::ID  ID,
ArrayRef< Value * >  Args,
FMFSource  FMFSource = {},
const Twine Name = "" 
)

◆ CreateIntToPtr()

Value * llvm::IRBuilderBase::CreateIntToPtr ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateInvariantStart()

CallInst * IRBuilderBase::CreateInvariantStart ( Value Ptr,
ConstantInt Size = nullptr 
)

Create a call to invariant.start intrinsic.

If the pointer isn't i8* it will be converted.

Definition at line 426 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), getInt64(), getInt64Ty(), Ptr, and Size.

◆ CreateInvoke() [1/4]

InvokeInst * llvm::IRBuilderBase::CreateInvoke ( FunctionCallee  Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "" 
)
inline

Definition at line 1257 of file IRBuilder.h.

References CreateInvoke(), and Name.

◆ CreateInvoke() [2/4]

InvokeInst * llvm::IRBuilderBase::CreateInvoke ( FunctionCallee  Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args = {},
const Twine Name = "" 
)
inline

Definition at line 1265 of file IRBuilder.h.

◆ CreateInvoke() [3/4]

InvokeInst * llvm::IRBuilderBase::CreateInvoke ( FunctionType Ty,
Value Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "" 
)
inline

Create an invoke instruction.

Definition at line 1235 of file IRBuilder.h.

References llvm::InvokeInst::Create(), II, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().

Referenced by CreateGCStatepointInvokeCommon(), CreateInvoke(), and lowerAwaitSuspend().

◆ CreateInvoke() [4/4]

InvokeInst * llvm::IRBuilderBase::CreateInvoke ( FunctionType Ty,
Value Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args = {},
const Twine Name = "" 
)
inline

Definition at line 1246 of file IRBuilder.h.

◆ createIsFPClass()

Value * IRBuilderBase::createIsFPClass ( Value FPNum,
unsigned  Test 
)

◆ CreateIsNeg()

Value * llvm::IRBuilderBase::CreateIsNeg ( Value Arg,
const Twine Name = "" 
)
inline

◆ CreateIsNotNeg()

Value * llvm::IRBuilderBase::CreateIsNotNeg ( Value Arg,
const Twine Name = "" 
)
inline

◆ CreateIsNotNull()

Value * llvm::IRBuilderBase::CreateIsNotNull ( Value Arg,
const Twine Name = "" 
)
inline

◆ CreateIsNull()

Value * llvm::IRBuilderBase::CreateIsNull ( Value Arg,
const Twine Name = "" 
)
inline

◆ CreateLandingPad()

LandingPadInst * llvm::IRBuilderBase::CreateLandingPad ( Type Ty,
unsigned  NumClauses,
const Twine Name = "" 
)
inline

Definition at line 2632 of file IRBuilder.h.

References llvm::LandingPadInst::Create(), Insert(), and Name.

◆ CreateLaunderInvariantGroup()

Value * IRBuilderBase::CreateLaunderInvariantGroup ( Value Ptr)

Create a launder.invariant.group intrinsic call.

If Ptr type is different from pointer to i8, it's casted to pointer to i8 in the same address space before call and casted back to Ptr type after call.

Definition at line 1038 of file IRBuilder.cpp.

References assert(), BB, CreateCall(), llvm::Function::getFunctionType(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getReturnType(), and Ptr.

Referenced by simplifyInvariantGroupIntrinsic().

◆ CreateLdexp()

Value * llvm::IRBuilderBase::CreateLdexp ( Value Src,
Value Exp,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create call to the ldexp intrinsic.

Definition at line 1065 of file IRBuilder.h.

Referenced by llvm::InstCombinerImpl::visitCallInst().

◆ CreateLifetimeEnd()

CallInst * IRBuilderBase::CreateLifetimeEnd ( Value Ptr)

Create a lifetime.end intrinsic.

Definition at line 420 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), and Ptr.

Referenced by llvm::InlineFunctionImpl(), and llvm::UpgradeIntrinsicCall().

◆ CreateLifetimeStart()

CallInst * IRBuilderBase::CreateLifetimeStart ( Value Ptr)

Create a lifetime.start intrinsic.

Definition at line 414 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), and Ptr.

Referenced by llvm::InlineFunctionImpl(), and llvm::UpgradeIntrinsicCall().

◆ CreateLoad() [1/3]

LoadInst * llvm::IRBuilderBase::CreateLoad ( Type Ty,
Value Ptr,
bool  isVolatile,
const Twine Name = "" 
)
inline

Definition at line 1855 of file IRBuilder.h.

References CreateAlignedLoad(), Name, and Ptr.

◆ CreateLoad() [2/3]

LoadInst * llvm::IRBuilderBase::CreateLoad ( Type Ty,
Value Ptr,
const char Name 
)
inline

Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool' for the isVolatile parameter.

Definition at line 1847 of file IRBuilder.h.

References CreateAlignedLoad(), Name, and Ptr.

Referenced by llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createCopyPrivate(), createFakeIntVal(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), dynamicallyLoadArray(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), emitMemcpyExpansion(), llvm::OpenMPIRBuilder::emitScanReduction(), emitSetAndGetSwiftErrorValueAround(), fixI8UseChain(), getStrlenWithNull(), llvm::coro::BaseCloner::handleFinalSuspend(), hostParallelCallback(), insertSpills(), instCombineSVELD1(), loadSharedDataFromTaskDescriptor(), llvm::lowerAtomicRMWInst(), lowerSubFn(), llvm::orc::makeStub(), populateReductionFunction(), promoteAllocaUserToVector(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), replaceSwiftErrorOps(), replaceWithIndirectUse(), llvm::KCFIPass::run(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), targetParallelCallback(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitExtractValueInst(), DataScalarizerVisitor::visitLoadInst(), and llvm::InstCombinerImpl::visitLoadInst().

◆ CreateLoad() [3/3]

LoadInst * llvm::IRBuilderBase::CreateLoad ( Type Ty,
Value Ptr,
const Twine Name = "" 
)
inline

Definition at line 1851 of file IRBuilder.h.

References CreateAlignedLoad(), Name, and Ptr.

◆ CreateLogicalAnd()

Value * llvm::IRBuilderBase::CreateLogicalAnd ( Value Cond1,
Value Cond2,
const Twine Name = "" 
)
inline

◆ CreateLogicalOp()

Value * llvm::IRBuilderBase::CreateLogicalOp ( Instruction::BinaryOps  Opc,
Value Cond1,
Value Cond2,
const Twine Name = "" 
)
inline

◆ CreateLogicalOr() [1/2]

Value * llvm::IRBuilderBase::CreateLogicalOr ( ArrayRef< Value * >  Ops)
inline

◆ CreateLogicalOr() [2/2]

Value * llvm::IRBuilderBase::CreateLogicalOr ( Value Cond1,
Value Cond2,
const Twine Name = "" 
)
inline

◆ CreateLShr() [1/3]

Value * llvm::IRBuilderBase::CreateLShr ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 1522 of file IRBuilder.h.

References CreateLShr(), LHS, Name, and RHS.

◆ CreateLShr() [2/3]

Value * llvm::IRBuilderBase::CreateLShr ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 1527 of file IRBuilder.h.

References CreateLShr(), LHS, Name, and RHS.

◆ CreateLShr() [3/3]

Value * llvm::IRBuilderBase::CreateLShr ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 1513 of file IRBuilder.h.

References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.

Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateLShr(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), expandBufferStoreIntrinsic(), expandFPToI(), expandIToFP(), extractIntPart(), extractMaskedValue(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpWithHighBitMask(), foldIDivShl(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generateUnsignedDivisionCode(), getMul64(), getShiftedValue(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::AMDGPU::instrumentAddress(), legalizeGetHighLowi64Bytes(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), lowerFunnelShifts(), lowerKernelArguments(), llvm::AMDGPU::memToShadow(), mergeConsecutivePartStores(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyX86immShift(), simplifyX86pmulh(), simplifyX86varShift(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), switchToLookupTable(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitXor().

◆ CreateMalloc() [1/2]

CallInst * IRBuilderBase::CreateMalloc ( Type IntPtrTy,
Type AllocTy,
Value AllocSize,
Value ArraySize,
ArrayRef< OperandBundleDef OpB,
Function MallocF = nullptr,
const Twine Name = "" 
)

◆ CreateMalloc() [2/2]

CallInst * IRBuilderBase::CreateMalloc ( Type IntPtrTy,
Type AllocTy,
Value AllocSize,
Value ArraySize,
Function MallocF = nullptr,
const Twine Name = "" 
)

CreateMalloc - Generate the IR for a call to malloc:

  1. Compute the malloc call's argument as the specified type's size, possibly multiplied by the array size if the array size is not constant 1.
  2. Call malloc with that argument.

Definition at line 302 of file IRBuilder.cpp.

References CreateMalloc(), and Name.

◆ CreateMaskedCompressStore()

CallInst * IRBuilderBase::CreateMaskedCompressStore ( Value Val,
Value Ptr,
MaybeAlign  Align,
Value Mask = nullptr 
)

Create a call to Masked Compress Store intrinsic.

Create a call to Masked Compress Store intrinsic Val - data to be stored, Ptr - base pointer for the store Align - alignment of Ptr Mask - vector of booleans which indicates what vector lanes should be accessed in memory.

Definition at line 618 of file IRBuilder.cpp.

References llvm::CallBase::addParamAttr(), assert(), llvm::Value::getContext(), llvm::Value::getType(), llvm::Attribute::getWithAlignment(), llvm::Type::isVectorTy(), and Ptr.

◆ CreateMaskedExpandLoad()

CallInst * IRBuilderBase::CreateMaskedExpandLoad ( Type Ty,
Value Ptr,
MaybeAlign  Align,
Value Mask = nullptr,
Value PassThru = nullptr,
const Twine Name = "" 
)

Create a call to Masked Expand Load intrinsic.

Create a call to Masked Expand Load intrinsic Ty - vector type to load Ptr - base pointer for the load Align - alignment of Ptr Mask - vector of booleans which indicates what vector lanes should be accessed in memory PassThru - pass-through value that is used to fill the masked-off lanes of the result Name - name of the result variable.

Definition at line 595 of file IRBuilder.cpp.

References llvm::CallBase::addParamAttr(), assert(), llvm::PoisonValue::get(), llvm::Value::getContext(), llvm::Attribute::getWithAlignment(), llvm::Type::isVectorTy(), Name, and Ptr.

◆ CreateMaskedGather()

CallInst * IRBuilderBase::CreateMaskedGather ( Type Ty,
Value Ptrs,
Align  Alignment,
Value Mask = nullptr,
Value PassThru = nullptr,
const Twine Name = "" 
)

Create a call to Masked Gather intrinsic.

Create a call to a Masked Gather intrinsic.

Ty - vector type to gather Ptrs - vector of pointers for loading Align - alignment for one element Mask - vector of booleans which indicates what vector lanes should be accessed in memory PassThru - pass-through value that is used to fill the masked-off lanes of the result Name - name of the result variable

Definition at line 538 of file IRBuilder.cpp.

References assert(), llvm::PoisonValue::get(), getAllOnesMask(), getInt32(), llvm::Value::getType(), Name, and llvm::Align::value().

Referenced by llvm::VPWidenLoadRecipe::execute().

◆ CreateMaskedLoad()

CallInst * IRBuilderBase::CreateMaskedLoad ( Type Ty,
Value Ptr,
Align  Alignment,
Value Mask,
Value PassThru = nullptr,
const Twine Name = "" 
)

Create a call to Masked Load intrinsic.

Create a call to a Masked Load intrinsic.

Ty - vector type to load Ptr - base pointer for the load Alignment - alignment of the source location Mask - vector of booleans which indicates what vector lanes should be accessed in memory PassThru - pass-through value that is used to fill the masked-off lanes of the result Name - name of the result variable

Definition at line 488 of file IRBuilder.cpp.

References assert(), llvm::PoisonValue::get(), getInt32(), llvm::Type::isVectorTy(), Name, Ptr, and llvm::Align::value().

Referenced by llvm::VPInterleaveRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), hoistConditionalLoadsStores(), instCombineLD1GatherIndex(), instCombineSVELD1(), simplifyX86MaskedLoad(), and upgradeMaskedLoad().

◆ CreateMaskedScatter()

CallInst * IRBuilderBase::CreateMaskedScatter ( Value Data,
Value Ptrs,
Align  Alignment,
Value Mask = nullptr 
)

Create a call to Masked Scatter intrinsic.

Create a call to a Masked Scatter intrinsic.

Data - data to be stored, Ptrs - the vector of pointers, where the Data elements should be stored Align - alignment for one element Mask - vector of booleans which indicates what vector lanes should be accessed in memory

Definition at line 569 of file IRBuilder.cpp.

References llvm::Data, getAllOnesMask(), getInt32(), llvm::Value::getType(), and llvm::Align::value().

Referenced by llvm::VPWidenStoreRecipe::execute().

◆ CreateMaskedStore()

CallInst * IRBuilderBase::CreateMaskedStore ( Value Val,
Value Ptr,
Align  Alignment,
Value Mask 
)

Create a call to Masked Store intrinsic.

Create a call to a Masked Store intrinsic.

Val - data to be stored, Ptr - base pointer for the store Alignment - alignment of the destination location Mask - vector of booleans which indicates what vector lanes should be accessed in memory

Definition at line 508 of file IRBuilder.cpp.

References assert(), getInt32(), llvm::Value::getType(), llvm::Type::isVectorTy(), Ptr, and llvm::Align::value().

Referenced by llvm::VPInterleaveRecipe::execute(), llvm::VPWidenStoreRecipe::execute(), hoistConditionalLoadsStores(), instCombineST1ScatterIndex(), instCombineSVEST1(), simplifyX86MaskedStore(), and upgradeMaskedStore().

◆ CreateMaximum()

Value * llvm::IRBuilderBase::CreateMaximum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the maximum intrinsic.

Definition at line 1041 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue().

◆ CreateMaximumNum()

Value * llvm::IRBuilderBase::CreateMaximumNum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the maximum intrinsic.

Definition at line 1052 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, Name, and RHS.

Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateMaxNum()

Value * llvm::IRBuilderBase::CreateMaxNum ( Value LHS,
Value RHS,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create call to the maxnum intrinsic.

Definition at line 1024 of file IRBuilder.h.

Referenced by llvm::buildAtomicRMWValue(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateMemCpy() [1/2]

CallInst * llvm::IRBuilderBase::CreateMemCpy ( Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
uint64_t  Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Create and insert a memcpy between the specified pointers.

If the pointers aren't i8*, they will be converted. If alias metadata is specified, it will be added to the instruction. and noalias tags.

Definition at line 687 of file IRBuilder.h.

References CreateMemCpy(), getInt64(), and Size.

Referenced by callBufferedPrintfArgPush(), CreateMemCpy(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), and HandleByValArgumentInit().

◆ CreateMemCpy() [2/2]

CallInst * llvm::IRBuilderBase::CreateMemCpy ( Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
Value Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Definition at line 701 of file IRBuilder.h.

References CreateMemTransferInst(), and Size.

◆ CreateMemCpyInline()

CallInst * llvm::IRBuilderBase::CreateMemCpyInline ( Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
Value Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Definition at line 709 of file IRBuilder.h.

References CreateMemTransferInst(), and Size.

◆ CreateMemMove() [1/2]

CallInst * llvm::IRBuilderBase::CreateMemMove ( Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
uint64_t  Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Definition at line 729 of file IRBuilder.h.

References CreateMemMove(), getInt64(), and Size.

Referenced by CreateMemMove().

◆ CreateMemMove() [2/2]

CallInst * llvm::IRBuilderBase::CreateMemMove ( Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
Value Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Definition at line 737 of file IRBuilder.h.

References CreateMemTransferInst(), and Size.

◆ CreateMemSet() [1/2]

CallInst * llvm::IRBuilderBase::CreateMemSet ( Value Ptr,
Value Val,
uint64_t  Size,
MaybeAlign  Align,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)
inline

Create and insert a memset to the specified pointer and the specified value.

If the pointer isn't an i8*, it will be converted. If alias metadata is specified, it will be added to the instruction.

Definition at line 630 of file IRBuilder.h.

References CreateMemSet(), getInt64(), Ptr, and Size.

Referenced by CreateMemSet(), lowerIntrinsicToFunction(), OptimizeGlobalAddressOfAllocation(), and llvm::InstCombinerImpl::visitAllocSite().

◆ CreateMemSet() [2/2]

CallInst * IRBuilderBase::CreateMemSet ( Value Ptr,
Value Val,
Value Size,
MaybeAlign  Align,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)

Definition at line 165 of file IRBuilder.cpp.

References CreateIntrinsic(), getInt1(), Ptr, llvm::Instruction::setAAMetadata(), and Size.

◆ CreateMemSetInline()

CallInst * IRBuilderBase::CreateMemSetInline ( Value Dst,
MaybeAlign  DstAlign,
Value Val,
Value Size,
bool  IsVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)

Definition at line 179 of file IRBuilder.cpp.

References CreateIntrinsic(), getInt1(), llvm::Instruction::setAAMetadata(), and Size.

◆ CreateMemTransferInst()

CallInst * IRBuilderBase::CreateMemTransferInst ( Intrinsic::ID  IntrID,
Value Dst,
MaybeAlign  DstAlign,
Value Src,
MaybeAlign  SrcAlign,
Value Size,
bool  isVolatile = false,
const AAMDNodes AAInfo = AAMDNodes() 
)

◆ CreateMinimum()

Value * llvm::IRBuilderBase::CreateMinimum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the minimum intrinsic.

Definition at line 1036 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue().

◆ CreateMinimumNum()

Value * llvm::IRBuilderBase::CreateMinimumNum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the minimumnum intrinsic.

Definition at line 1046 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, Name, and RHS.

Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateMinNum()

Value * llvm::IRBuilderBase::CreateMinNum ( Value LHS,
Value RHS,
FMFSource  FMFSource = {},
const Twine Name = "" 
)
inline

Create call to the minnum intrinsic.

Definition at line 1012 of file IRBuilder.h.

Referenced by llvm::buildAtomicRMWValue(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateMul()

Value * llvm::IRBuilderBase::CreateMul ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

◆ CreateMulReduce()

CallInst * IRBuilderBase::CreateMulReduce ( Value Src)

Create a vector int mul reduction intrinsic of the source vector.

Definition at line 370 of file IRBuilder.cpp.

◆ CreateNAryOp()

Value * IRBuilderBase::CreateNAryOp ( unsigned  Opc,
ArrayRef< Value * >  Ops,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)

Create either a UnaryOperator or BinaryOperator depending on Opc.

Correct number of operands must be passed accordingly.

Definition at line 922 of file IRBuilder.cpp.

References assert(), CreateBinOp(), CreateUnOp(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isUnaryOp(), llvm_unreachable, Name, Opc, and llvm::ArrayRef< T >::size().

Referenced by llvm::VPWidenRecipe::execute().

◆ CreateNeg()

Value * llvm::IRBuilderBase::CreateNeg ( Value V,
const Twine Name = "",
bool  HasNSW = false 
)
inline

◆ CreateNoAliasScopeDeclaration() [1/2]

Instruction * llvm::IRBuilderBase::CreateNoAliasScopeDeclaration ( MDNode ScopeTag)
inline

◆ CreateNoAliasScopeDeclaration() [2/2]

Instruction * IRBuilderBase::CreateNoAliasScopeDeclaration ( Value Scope)

Create a llvm.experimental.noalias.scope.decl intrinsic call.

Definition at line 474 of file IRBuilder.cpp.

References CreateIntrinsic().

Referenced by AddAliasScopeMetadata(), and CreateNoAliasScopeDeclaration().

◆ CreateNot()

Value * llvm::IRBuilderBase::CreateNot ( Value V,
const Twine Name = "" 
)
inline

◆ CreateNSWAdd()

Value * llvm::IRBuilderBase::CreateNSWAdd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1412 of file IRBuilder.h.

References CreateAdd(), LHS, Name, and RHS.

◆ CreateNSWMul()

Value * llvm::IRBuilderBase::CreateNSWMul ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1446 of file IRBuilder.h.

References CreateMul(), LHS, Name, and RHS.

Referenced by llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitMul().

◆ CreateNSWNeg()

Value * llvm::IRBuilderBase::CreateNSWNeg ( Value V,
const Twine Name = "" 
)
inline

Definition at line 1786 of file IRBuilder.h.

References CreateNeg(), and Name.

◆ CreateNSWSub()

Value * llvm::IRBuilderBase::CreateNSWSub ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1429 of file IRBuilder.h.

References CreateSub(), LHS, Name, and RHS.

◆ CreateNUWAdd()

Value * llvm::IRBuilderBase::CreateNUWAdd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateNUWMul()

Value * llvm::IRBuilderBase::CreateNUWMul ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1450 of file IRBuilder.h.

References CreateMul(), LHS, Name, and RHS.

Referenced by llvm::OpenMPIRBuilder::collapseLoops(), and ShapeCalculator::getColFromRow().

◆ CreateNUWSub()

Value * llvm::IRBuilderBase::CreateNUWSub ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1433 of file IRBuilder.h.

References CreateSub(), LHS, Name, and RHS.

Referenced by llvm::OpenMPIRBuilder::emitScanReduction().

◆ CreateOr() [1/4]

Value * llvm::IRBuilderBase::CreateOr ( ArrayRef< Value * >  Ops)
inline

◆ CreateOr() [2/4]

Value * llvm::IRBuilderBase::CreateOr ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 1583 of file IRBuilder.h.

References CreateOr(), LHS, Name, and RHS.

◆ CreateOr() [3/4]

Value * llvm::IRBuilderBase::CreateOr ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 1587 of file IRBuilder.h.

References CreateOr(), LHS, Name, and RHS.

◆ CreateOr() [4/4]

Value * llvm::IRBuilderBase::CreateOr ( Value LHS,
Value RHS,
const Twine Name = "",
bool  IsDisjoint = false 
)
inline

Definition at line 1573 of file IRBuilder.h.

References llvm::BinaryOperator::CreateDisjoint(), llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.

Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::buildAtomicRMWValue(), buildPartialUnswitchConditionalBranch(), checkForNegativeOperand(), createLogicFromTable(), CreateOr(), llvm::OpenMPIRBuilder::createTask(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), expandAnyOrAllIntrinsic(), expandBufferLoadIntrinsic(), expandFPToI(), expandIToFP(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), foldComplexAndOrPatterns(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldLogOpOfMaskedICmps(), foldMinimumOverTrailingOrLeadingZeroCount(), foldSelectICmpAndAnd(), foldSwitchToSelect(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), getBoundsCheckCond(), llvm::VNCoercion::getMemInstValueForLoad(), insertMaskedValue(), LowerBSWAP(), LowerCTLZ(), lowerFunnelShifts(), matchOrConcat(), matchStridedStart(), mergeConditionalStoreToAddress(), optimizeShiftInOrChain(), performMaskedAtomicOp(), llvm::promoteCallWithVTableCmp(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), upgradeX86IntrinsicCall(), llvm::LoopVersioning::versionLoop(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitXor().

◆ CreateOrReduce()

CallInst * IRBuilderBase::CreateOrReduce ( Value Src)

Create a vector int OR reduction intrinsic of the source vector.

Definition at line 378 of file IRBuilder.cpp.

Referenced by llvm::createAnyOfReduction(), and llvm::InstCombinerImpl::visitCallInst().

◆ CreatePHI()

PHINode * llvm::IRBuilderBase::CreatePHI ( Type Ty,
unsigned  NumReservedValues,
const Twine Name = "" 
)
inline

◆ CreatePointerBitCastOrAddrSpaceCast()

Value * llvm::IRBuilderBase::CreatePointerBitCastOrAddrSpaceCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreatePointerCast()

Value * llvm::IRBuilderBase::CreatePointerCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreatePreserveArrayAccessIndex()

Value * IRBuilderBase::CreatePreserveArrayAccessIndex ( Type ElTy,
Value Base,
unsigned  Dimension,
unsigned  LastIndex,
MDNode DbgInfo 
)

◆ CreatePreserveStructAccessIndex()

Value * IRBuilderBase::CreatePreserveStructAccessIndex ( Type ElTy,
Value Base,
unsigned  Index,
unsigned  FieldIndex,
MDNode DbgInfo 
)

◆ CreatePreserveUnionAccessIndex()

Value * IRBuilderBase::CreatePreserveUnionAccessIndex ( Value Base,
unsigned  FieldIndex,
MDNode DbgInfo 
)

◆ CreatePtrAdd()

Value * llvm::IRBuilderBase::CreatePtrAdd ( Value Ptr,
Value Offset,
const Twine Name = "",
GEPNoWrapFlags  NW = GEPNoWrapFlags::none() 
)
inline

◆ CreatePtrDiff()

Value * IRBuilderBase::CreatePtrDiff ( 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.

This is intended to implement C-style pointer subtraction. As such, the pointers must be appropriately aligned for their element types and pointing into the same object.

Definition at line 1027 of file IRBuilder.cpp.

References assert(), Context, CreateExactSDiv(), CreatePtrToInt(), CreateSub(), llvm::Type::getInt64Ty(), llvm::ConstantExpr::getSizeOf(), llvm::Value::getType(), LHS, Name, and RHS.

◆ CreatePtrToAddr()

Value * llvm::IRBuilderBase::CreatePtrToAddr ( Value V,
const Twine Name = "" 
)
inline

◆ CreatePtrToInt()

Value * llvm::IRBuilderBase::CreatePtrToInt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateResume()

ResumeInst * llvm::IRBuilderBase::CreateResume ( Value Exn)
inline

Definition at line 1308 of file IRBuilder.h.

References llvm::ResumeInst::Create(), and Insert().

Referenced by llvm::sandboxir::ResumeInst::create().

◆ CreateRet()

ReturnInst * llvm::IRBuilderBase::CreateRet ( Value V)
inline

◆ CreateRetVoid()

ReturnInst * llvm::IRBuilderBase::CreateRetVoid ( )
inline

◆ CreateSDiv()

Value * llvm::IRBuilderBase::CreateSDiv ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

◆ CreateSelect()

Value * IRBuilderBase::CreateSelect ( Value C,
Value True,
Value False,
const Twine Name = "",
Instruction MDFrom = nullptr 
)

Definition at line 1005 of file IRBuilder.cpp.

References llvm::CallingConv::C, CreateSelectFMF(), and Name.

Referenced by llvm::buildAtomicRMWValue(), llvm::buildCmpXchgValue(), llvm::OpenMPIRBuilder::calculateCanonicalLoopTripCount(), llvm::createAnyOfReduction(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::createFindLastIVReduction(), CreateLogicalAnd(), CreateLogicalOr(), llvm::createMinMaxOp(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTeams(), emitRsqIEEE1ULP(), emitTargetCall(), emitX86ScalarSelect(), emitX86Select(), llvm::VPWidenSelectRecipe::execute(), llvm::VPReductionRecipe::execute(), expandAtan2Intrinsic(), expandFPToI(), expandStepIntrinsic(), expandUsubSat(), fixI8UseChain(), foldMulSelectToNegate(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSetClearBits(), foldSwitchToSelect(), foldURemOfLoopIncrement(), generateNewInstTree(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVESel(), llvm::lowerObjectSizeCall(), OffsetResult::materialize(), preparePlanForEpilogueVectorLoop(), reassociateMinMaxWithConstants(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySVEIntrinsicBinOp(), simplifyX86pack(), llvm::InstCombinerImpl::takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), upgradeMaskedMove(), upgradeNVVMIntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), and llvm::ObjectSizeOffsetEvaluator::visitSelectInst().

◆ CreateSelectFMF()

Value * IRBuilderBase::CreateSelectFMF ( Value C,
Value True,
Value False,
FMFSource  FMFSource,
const Twine Name = "",
Instruction MDFrom = nullptr 
)

◆ CreateSExt()

Value * llvm::IRBuilderBase::CreateSExt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateSExtOrBitCast()

Value * llvm::IRBuilderBase::CreateSExtOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 2222 of file IRBuilder.h.

References CreateCast(), llvm::Type::getScalarSizeInBits(), and Name.

◆ CreateSExtOrTrunc()

Value * llvm::IRBuilderBase::CreateSExtOrTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Create a SExt or Trunc from the integer value V to DestTy.

Return the value untouched if the type of V is already DestTy.

Definition at line 2115 of file IRBuilder.h.

References assert(), CreateSExt(), CreateTrunc(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntOrIntVectorTy(), and Name.

Referenced by llvm::VPScalarIVStepsRecipe::execute(), fixI8UseChain(), hostParallelCallback(), llvm::simplifyInstruction(), and targetParallelCallback().

◆ CreateShl() [1/3]

Value * llvm::IRBuilderBase::CreateShl ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 1501 of file IRBuilder.h.

References CreateShl(), LHS, Name, and RHS.

◆ CreateShl() [2/3]

Value * llvm::IRBuilderBase::CreateShl ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 1507 of file IRBuilder.h.

References CreateShl(), LHS, Name, and RHS.

◆ CreateShl() [3/3]

Value * llvm::IRBuilderBase::CreateShl ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 1492 of file IRBuilder.h.

References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.

Referenced by canonicalizeLowbitMask(), combineAddSubWithShlAddSub(), llvm::InstCombinerImpl::commonIDivTransforms(), convertToRelLookupTable(), convertToShadowDataInt(), createMaskInstrs(), CreateShl(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::OpenMPIRBuilder::emitScanReduction(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), expandBufferLoadIntrinsic(), expandFPToI(), expandIToFP(), llvm::InstCombinerImpl::foldAddWithConstant(), foldConsecutiveLoads(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldIDivShl(), foldIntegerRepackThroughZExt(), foldMulShl1(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generateUnsignedDivisionCode(), llvm::VNCoercion::getMemInstValueForLoad(), getShiftedValue(), llvm::memtag::incrementThreadLong(), insertMaskedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), LowerBSWAP(), lowerFunnelShifts(), matchOrConcat(), matchStridedStart(), simplifyValueKnownNonZero(), simplifyX86immShift(), simplifyX86varShift(), upgradePMULDQ(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), and llvm::InstCombinerImpl::visitTrunc().

◆ CreateShuffleVector() [1/3]

Value * llvm::IRBuilderBase::CreateShuffleVector ( Value V,
ArrayRef< int >  Mask,
const Twine Name = "" 
)
inline

Create a unary shuffle.

The second vector operand of the IR instruction is poison.

Definition at line 2610 of file IRBuilder.h.

References CreateShuffleVector(), llvm::PoisonValue::get(), and Name.

◆ CreateShuffleVector() [2/3]

Value * llvm::IRBuilderBase::CreateShuffleVector ( Value V1,
Value V2,
ArrayRef< int >  Mask,
const Twine Name = "" 
)
inline

See class ShuffleVectorInst for a description of the mask representation.

Definition at line 2601 of file IRBuilder.h.

References Folder, llvm::IRBuilderFolder::FoldShuffleVector(), Insert(), and Name.

◆ CreateShuffleVector() [3/3]

Value * llvm::IRBuilderBase::CreateShuffleVector ( Value V1,
Value V2,
Value Mask,
const Twine Name = "" 
)
inline

Definition at line 2593 of file IRBuilder.h.

References CreateShuffleVector(), llvm::ShuffleVectorInst::getShuffleMask(), and Name.

Referenced by applyX86MaskOn1BitsVec(), concatenateTwoVectors(), concatSubVector(), llvm::sandboxir::ShuffleVectorInst::create(), createExtractVector(), createShiftShuffle(), CreateShuffleVector(), createTblForTrunc(), createTblShuffleForSExt(), createTblShuffleForZExt(), CreateVectorReverse(), CreateVectorSplat(), CreateVectorSplice(), llvm::VPInterleaveRecipe::execute(), expandBufferStoreIntrinsic(), foldCastShuffle(), foldIntegerPackFromVector(), llvm::InstCombinerImpl::foldSelectShuffle(), foldShuffleOfUnaryOps(), llvm::InstCombinerImpl::foldVectorBinop(), generateNewInstTree(), llvm::getShuffleReduction(), getX86MaskVec(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEDupqLane(), interleaveVectors(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleavedStore(), lowerKernelArguments(), narrowVectorSelect(), promoteAllocaUserToVector(), reorderSubVector(), scalarizeMaskedExpandLoad(), llvm::GCNTTIImpl::simplifyAMDGCNLaneIntrinsicDemanded(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyNeonTbl1(), simplifyX86extrq(), simplifyX86immShift(), simplifyX86insertps(), simplifyX86insertq(), simplifyX86pack(), simplifyX86pmadd(), simplifyX86pshufb(), simplifyX86vpermilvar(), simplifyX86vpermv(), simplifyX86vpermv3(), tryInterleave(), upgradeAArch64IntrinsicCall(), upgradeX86ALIGNIntrinsics(), upgradeX86IntrinsicCall(), upgradeX86PSLLDQIntrinsics(), upgradeX86PSRLDQIntrinsics(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().

◆ CreateSIToFP()

Value * llvm::IRBuilderBase::CreateSIToFP ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateSRem()

Value * llvm::IRBuilderBase::CreateSRem ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateStackRestore()

CallInst * llvm::IRBuilderBase::CreateStackRestore ( Value Ptr,
const Twine Name = "" 
)
inline

Create a call to llvm.stackrestore.

Definition at line 1128 of file IRBuilder.h.

References CreateIntrinsic(), Name, and Ptr.

Referenced by llvm::InlineFunctionImpl(), lowerLocalAllocas(), and RemovePreallocated().

◆ CreateStackSave()

CallInst * llvm::IRBuilderBase::CreateStackSave ( const Twine Name = "")
inline

Create a call to llvm.stacksave.

Definition at line 1121 of file IRBuilder.h.

References BB, Context, CreateIntrinsic(), DL, llvm::BasicBlock::getDataLayout(), and Name.

Referenced by llvm::InlineFunctionImpl(), lowerLocalAllocas(), and RemovePreallocated().

◆ CreateStepVector()

Value * IRBuilderBase::CreateStepVector ( Type DstType,
const Twine Name = "" 
)

◆ CreateStore()

StoreInst * llvm::IRBuilderBase::CreateStore ( Value Val,
Value Ptr,
bool  isVolatile = false 
)
inline

Definition at line 1860 of file IRBuilder.h.

References CreateAlignedStore(), and Ptr.

Referenced by callBufferedPrintfArgPush(), copyArrayElemsForMemCpy(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), emitMemcpyExpansion(), emitMemsetExpansion(), llvm::OpenMPIRBuilder::emitScanReduction(), emitSetAndGetSwiftErrorValueAround(), emitTaskDependencies(), fixI8UseChain(), hostParallelCallback(), insertSpills(), instCombineSVEST1(), llvm::lowerAtomicRMWInst(), markCoroutineAsDone(), mergeConditionalStoreToAddress(), populateReductionFunction(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), replaceSwiftErrorOps(), salvageDebugInfoImpl(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::coro::AnyRetconABI::splitCoroutine(), targetParallelCallback(), and DataScalarizerVisitor::visitStoreInst().

◆ CreateStripInvariantGroup()

Value * IRBuilderBase::CreateStripInvariantGroup ( Value Ptr)

Create a strip.invariant.group intrinsic call.

If Ptr type is different from pointer to i8, it's casted to pointer to i8 in the same address space before call and casted back to Ptr type after call.

Definition at line 1054 of file IRBuilder.cpp.

References assert(), BB, CreateCall(), llvm::Function::getFunctionType(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getReturnType(), and Ptr.

Referenced by simplifyInvariantGroupIntrinsic().

◆ CreateStructGEP()

Value * llvm::IRBuilderBase::CreateStructGEP ( Type Ty,
Value Ptr,
unsigned  Idx,
const Twine Name = "" 
)
inline

◆ CreateSub()

Value * llvm::IRBuilderBase::CreateSub ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 1420 of file IRBuilder.h.

References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.

Referenced by llvm::buildAtomicRMWValue(), llvm::OpenMPIRBuilder::calculateCanonicalLoopTripCount(), checkForNegativeOperand(), llvm::EpilogueVectorizerMainLoop::createIterationCountCheck(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), CreateNeg(), CreateNSWSub(), CreateNUWSub(), CreatePtrDiff(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPVectorEndPointerRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), expandAbs(), expandFPToI(), expandIToFP(), expandSignIntrinsic(), expandUsubSat(), foldAndOrOfICmpEqConstantAndICmp(), foldCtpop(), llvm::InstCombinerImpl::foldICmpBinOp(), foldICmpIntrinsicWithIntrinsic(), foldMulShl1(), foldSwitchToSelect(), llvm::SCEVExpander::generateOverflowCheck(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), generateUnsignedRemainderCode(), llvm::VPLane::getAsRuntimeExpr(), getBoundsCheckCond(), llvm::InstCombiner::getFreelyInvertedImpl(), getStrlenWithNull(), hoistAdd(), hoistSub(), inlineGetBaseAndOffset(), llvm::InstCombinerImpl::insertRangeTest(), lowerFunnelShifts(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::lowerObjectSizeCall(), makeStatepointExplicitImpl(), llvm::InstCombinerImpl::OptimizePointerDifference(), reduceSwitchRange(), replaceSubOverflowUses(), llvm::simplifyInstruction(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifyValueKnownNonZero(), switchToLookupTable(), llvm::InstCombinerImpl::takeLog2(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitURem().

◆ CreateSwitch()

SwitchInst * llvm::IRBuilderBase::CreateSwitch ( Value V,
BasicBlock Dest,
unsigned  NumCases = 10,
MDNode BranchWeights = nullptr,
MDNode Unpredictable = nullptr 
)
inline

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

Definition at line 1220 of file IRBuilder.h.

References llvm::SwitchInst::Create(), and Insert().

Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createSections(), expandIToFP(), expandToSwitch(), foldMemChr(), llvm::Instruction::isVolatile(), and rewritePHIsForCleanupPad().

◆ CreateThreadLocalAddress()

CallInst * IRBuilderBase::CreateThreadLocalAddress ( Value Ptr)

◆ CreateTrunc()

Value * llvm::IRBuilderBase::CreateTrunc ( Value V,
Type DestTy,
const Twine Name = "",
bool  IsNUW = false,
bool  IsNSW = false 
)
inline

Definition at line 2068 of file IRBuilder.h.

References llvm::CastInst::Create(), llvm::IRBuilderFolder::FoldCast(), Folder, I, Insert(), and Name.

Referenced by callBufferedPrintfStart(), createMaskInstrs(), CreateSExtOrTrunc(), CreateStepVector(), CreateZExtOrTrunc(), DoFlattenLoopPair(), dropRedundantMaskingOfLeftShiftInput(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), expandBufferStoreIntrinsic(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandIToFP(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), extractIntPart(), extractMaskedValue(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldMemChr(), llvm::InstCombiner::getFreelyInvertedImpl(), getMul64(), legalizeGetHighLowi64Bytes(), lowerKernelArguments(), mergeConsecutivePartStores(), llvm::AArch64TargetLowering::optimizeExtendOrTruncateConversion(), processUGT_ADDCST_ADD(), shrinkSplatShuffle(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyX86pack(), simplifyX86pmulh(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), switchToLookupTable(), llvm::InstCombinerImpl::takeLog2(), tryNarrowMathIfNoOverflow(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().

◆ CreateTruncOrBitCast()

Value * llvm::IRBuilderBase::CreateTruncOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateTypeSize()

Value * IRBuilderBase::CreateTypeSize ( Type Ty,
TypeSize  Size 
)

Create an expression which evaluates to the number of units in Size at runtime.

This works for both units of bits and bytes. This can result in poison if type Ty is not big enough to hold the value.

Definition at line 130 of file IRBuilder.cpp.

References CreateVScaleMultiple(), and Size.

Referenced by llvm::emitGEPOffset(), getBoundsCheckCond(), llvm::AMDGPU::instrumentAddress(), unpackLoadToAggregate(), unpackStoreToAggregate(), and llvm::ObjectSizeOffsetEvaluator::visitAllocaInst().

◆ CreateUDiv()

Value * llvm::IRBuilderBase::CreateUDiv ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

◆ CreateUIToFP()

Value * llvm::IRBuilderBase::CreateUIToFP ( Value V,
Type DestTy,
const Twine Name = "",
bool  IsNonNeg = false 
)
inline

◆ CreateUnaryIntrinsic()

CallInst * IRBuilderBase::CreateUnaryIntrinsic ( Intrinsic::ID  ID,
Value V,
FMFSource  FMFSource = {},
const Twine Name = "" 
)

◆ CreateUnOp()

Value * llvm::IRBuilderBase::CreateUnOp ( Instruction::UnaryOps  Opc,
Value V,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

◆ CreateUnreachable()

UnreachableInst * llvm::IRBuilderBase::CreateUnreachable ( )
inline

◆ CreateURem()

Value * llvm::IRBuilderBase::CreateURem ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateVAArg()

VAArgInst * llvm::IRBuilderBase::CreateVAArg ( Value List,
Type Ty,
const Twine Name = "" 
)
inline

Definition at line 2555 of file IRBuilder.h.

References Insert(), llvm::List, and Name.

◆ CreateVectorInterleave()

Value * IRBuilderBase::CreateVectorInterleave ( ArrayRef< Value * >  Ops,
const Twine Name = "" 
)

◆ CreateVectorReverse()

Value * IRBuilderBase::CreateVectorReverse ( Value V,
const Twine Name = "" 
)

◆ CreateVectorSplat() [1/2]

Value * IRBuilderBase::CreateVectorSplat ( ElementCount  EC,
Value V,
const Twine Name = "" 
)

Return a vector value that contains.

  • V broadcasted to EC elements.

Definition at line 1121 of file IRBuilder.cpp.

References assert(), CreateInsertElement(), CreateShuffleVector(), llvm::VectorType::get(), llvm::PoisonValue::get(), getInt64(), Name, Poison, and llvm::SmallVectorImpl< T >::resize().

◆ CreateVectorSplat() [2/2]

Value * IRBuilderBase::CreateVectorSplat ( unsigned  NumElts,
Value V,
const Twine Name = "" 
)

◆ CreateVectorSplice()

Value * IRBuilderBase::CreateVectorSplice ( Value V1,
Value V2,
int64_t  Imm,
const Twine Name = "" 
)

Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector.

If the immediate is positive, a vector is extracted from concat(V1, V2), starting at Imm. If the immediate is negative, we extract -Imm elements from V1 and the remaining elements from V2. Imm is a signed integer in the range -VL <= Imm < VL (where VL is the runtime vector length of the source/result vector)

Definition at line 1087 of file IRBuilder.cpp.

References assert(), BB, llvm::CallInst::Create(), CreateShuffleVector(), F, getInt32(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), I, Idx, Insert(), and Name.

◆ CreateVScale()

Value * llvm::IRBuilderBase::CreateVScale ( Type Ty,
const Twine Name = "" 
)
inline

◆ CreateXor() [1/3]

Value * llvm::IRBuilderBase::CreateXor ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 1605 of file IRBuilder.h.

References CreateXor(), LHS, Name, and RHS.

◆ CreateXor() [2/3]

Value * llvm::IRBuilderBase::CreateXor ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 1609 of file IRBuilder.h.

References CreateXor(), LHS, Name, and RHS.

◆ CreateXor() [3/3]

Value * llvm::IRBuilderBase::CreateXor ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

◆ CreateXorReduce()

CallInst * IRBuilderBase::CreateXorReduce ( Value Src)

Create a vector int XOR reduction intrinsic of the source vector.

Definition at line 382 of file IRBuilder.cpp.

◆ CreateZExt()

Value * llvm::IRBuilderBase::CreateZExt ( Value V,
Type DestTy,
const Twine Name = "",
bool  IsNonNeg = false 
)
inline

Definition at line 2082 of file IRBuilder.h.

References llvm::IRBuilderFolder::FoldCast(), Folder, I, Insert(), and Name.

Referenced by bitTrackingDCE(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::OpenMPIRBuilder::createAtomicCompare(), createTblShuffleForZExt(), CreateZExtOrTrunc(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), expandBufferLoadIntrinsic(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), expandIToFP(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandSignIntrinsic(), fitArgInto64Bits(), foldAnyOrAllBitsSet(), foldConsecutiveLoads(), foldCttzCtlz(), foldIntegerRepackThroughZExt(), foldNoWrapAdd(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), getMemOperands(), getMul64(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), injectPendingInvariantConditions(), insertMaskedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), matchOrConcat(), processNonStringArg(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), simplifyX86addcarry(), sinkMinMaxInBB(), llvm::InstCombinerImpl::takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), tryInterleave(), tryNarrowMathIfNoOverflow(), upgradeNVVMIntrinsicCall(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitZExt().

◆ CreateZExtOrBitCast()

Value * llvm::IRBuilderBase::CreateZExtOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ CreateZExtOrTrunc()

Value * llvm::IRBuilderBase::CreateZExtOrTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

◆ getAllOnesMask()

Value * llvm::IRBuilderBase::getAllOnesMask ( ElementCount  NumElts)
inline

Return an all true boolean vector (mask) with NumElts lanes.

Definition at line 862 of file IRBuilder.h.

References Context, llvm::VectorType::get(), llvm::Constant::getAllOnesValue(), and llvm::Type::getInt1Ty().

Referenced by CreateMaskedGather(), CreateMaskedScatter(), and getMemOperands().

◆ getBFloatTy()

Type * llvm::IRBuilderBase::getBFloatTy ( )
inline

Fetch the type representing a 16-bit brain floating point value.

Definition at line 585 of file IRBuilder.h.

References Context, and llvm::Type::getBFloatTy().

Referenced by llvm::UpgradeIntrinsicCall(), and upgradeNVVMIntrinsicCall().

◆ getContext()

LLVMContext & llvm::IRBuilderBase::getContext ( ) const
inline

◆ getCurrentDebugLocation()

DebugLoc IRBuilderBase::getCurrentDebugLocation ( ) const

◆ getCurrentFunctionReturnType()

Type * IRBuilderBase::getCurrentFunctionReturnType ( ) const

Get the return type of the current function that we're emitting into.

Definition at line 58 of file IRBuilder.cpp.

References assert(), BB, llvm::BasicBlock::getParent(), and llvm::Function::getReturnType().

Referenced by CreateAggregateRet().

◆ getDefaultConstrainedExcept()

fp::ExceptionBehavior llvm::IRBuilderBase::getDefaultConstrainedExcept ( )
inline

Get the exception handling used with constrained floating point.

Definition at line 377 of file IRBuilder.h.

References DefaultConstrainedExcept.

◆ getDefaultConstrainedRounding()

RoundingMode llvm::IRBuilderBase::getDefaultConstrainedRounding ( )
inline

Get the rounding mode handling used with constrained floating point.

Definition at line 382 of file IRBuilder.h.

References DefaultConstrainedRounding.

◆ getDefaultFPMathTag()

MDNode * llvm::IRBuilderBase::getDefaultFPMathTag ( ) const
inline

Get the floating point math metadata being used.

Definition at line 331 of file IRBuilder.h.

References DefaultFPMathTag.

◆ getDoubleTy()

Type * llvm::IRBuilderBase::getDoubleTy ( )
inline

Fetch the type representing a 64-bit floating point value.

Definition at line 595 of file IRBuilder.h.

References Context, and llvm::Type::getDoubleTy().

Referenced by llvm::OpenMPIRBuilder::emitScanReduction(), expandBufferLoadIntrinsic(), instCombineSVECondLast(), and processNonStringArg().

◆ getFalse()

ConstantInt * llvm::IRBuilderBase::getFalse ( )
inline

◆ getFastMathFlags() [1/2]

FastMathFlags & llvm::IRBuilderBase::getFastMathFlags ( )
inline

Definition at line 336 of file IRBuilder.h.

References FMF.

◆ getFastMathFlags() [2/2]

FastMathFlags llvm::IRBuilderBase::getFastMathFlags ( ) const
inline

Get the flags to be applied to created floating point ops.

Definition at line 334 of file IRBuilder.h.

References FMF.

Referenced by llvm::createSimpleReduction().

◆ getFloatTy()

Type * llvm::IRBuilderBase::getFloatTy ( )
inline

Fetch the type representing a 32-bit floating point value.

Definition at line 590 of file IRBuilder.h.

References Context, and llvm::Type::getFloatTy().

Referenced by instCombineSVECondLast(), and upgradeNVVMIntrinsicCall().

◆ getHalfTy()

Type * llvm::IRBuilderBase::getHalfTy ( )
inline

Fetch the type representing a 16-bit floating point value.

Definition at line 580 of file IRBuilder.h.

References Context, and llvm::Type::getHalfTy().

Referenced by instCombineSVECondLast().

◆ getIndexTy()

IntegerType * llvm::IRBuilderBase::getIndexTy ( const DataLayout DL,
unsigned  AddrSpace 
)
inline

Fetch the type of an integer that should be used to index GEP operations within AddressSpace.

Definition at line 617 of file IRBuilder.h.

References Context, and DL.

Referenced by llvm::OpenMPIRBuilder::createReductions(), and llvm::OpenMPIRBuilder::createReductionsGPU().

◆ GetInsertBlock()

BasicBlock * llvm::IRBuilderBase::GetInsertBlock ( ) const
inline

Definition at line 201 of file IRBuilder.h.

References BB.

Referenced by callAppendArgs(), callAppendStringN(), callBufferedPrintfArgPush(), callBufferedPrintfStart(), callPrintfBegin(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCanonicalScanLoops(), llvm::OpenMPIRBuilder::createDistribute(), CreateGCStatepointCallCommon(), CreateGCStatepointInvokeCommon(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::OpenMPIRBuilder::createTeams(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::AtomicInfo::EmitAtomicLibcall(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::OpenMPIRBuilder::emitBlock(), llvm::OpenMPIRBuilder::emitBranch(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), emitMemcpyExpansion(), emitMemsetExpansion(), llvm::OpenMPIRBuilder::emitScanReduction(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), llvm::VPWidenIntrinsicRecipe::execute(), expandFPToI(), expandIToFP(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), generateUnsignedDivisionCode(), llvm::memtag::getAndroidSlotPtr(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), llvm::memtag::getFP(), getGEPIndexTy(), llvm::TargetLoweringBase::getIRStackGuard(), llvm::RISCVTargetLowering::getIRStackGuard(), llvm::X86TargetLowering::getIRStackGuard(), llvm::memtag::getPC(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getStrlenWithNull(), hostParallelCallback(), InsertCall(), InsertTrap(), populateReductionFunction(), processNonStringArg(), llvm::memtag::readRegister(), restoreIPandDebugLoc(), saveAndClearIP(), saveIP(), llvm::VPTransformState::setDebugLocFrom(), llvm::GCNTTIImpl::simplifyAMDGCNLaneIntrinsicDemanded(), llvm::spliceBB(), llvm::splitBB(), llvm::splitBBWithSuffix(), targetParallelCallback(), UseTlsOffset(), useTpOffset(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

◆ GetInsertPoint()

BasicBlock::iterator llvm::IRBuilderBase::GetInsertPoint ( ) const
inline

◆ getInt()

ConstantInt * llvm::IRBuilderBase::getInt ( const APInt AI)
inline

◆ getInt1()

ConstantInt * llvm::IRBuilderBase::getInt1 ( bool  V)
inline

◆ getInt128Ty()

IntegerType * llvm::IRBuilderBase::getInt128Ty ( )
inline

Fetch the type representing a 128-bit integer.

Definition at line 572 of file IRBuilder.h.

References Context, and llvm::Type::getInt128Ty().

Referenced by expandIToFP().

◆ getInt16()

ConstantInt * llvm::IRBuilderBase::getInt16 ( uint16_t  C)
inline

Get a constant 16-bit value.

Definition at line 517 of file IRBuilder.h.

References llvm::CallingConv::C, and getInt16Ty().

Referenced by ShapeCalculator::getColFromRow(), and ShapeCalculator::getRowFromCol().

◆ getInt16Ty()

IntegerType * llvm::IRBuilderBase::getInt16Ty ( )
inline

Fetch the type representing a 16-bit integer.

Definition at line 557 of file IRBuilder.h.

References Context, and llvm::Type::getInt16Ty().

Referenced by getInt16(), llvm::UpgradeIntrinsicCall(), and upgradeX86IntrinsicCall().

◆ getInt1Ty()

IntegerType * llvm::IRBuilderBase::getInt1Ty ( )
inline

◆ getInt32()

ConstantInt * llvm::IRBuilderBase::getInt32 ( uint32_t  C)
inline

Get a constant 32-bit value.

Definition at line 522 of file IRBuilder.h.

References llvm::CallingConv::C, and getInt32Ty().

Referenced by appendToGlobalArray(), callAppendArgs(), callAppendStringN(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), createFakeIntVal(), CreateGCRelocate(), CreateGCRelocates(), createIsFPClass(), CreateMaskedGather(), CreateMaskedLoad(), CreateMaskedScatter(), CreateMaskedStore(), createOrdering(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTeams(), createTypedBufferLoad(), CreateVectorSplice(), dynamicallyLoadArray(), llvm::emitAMDGPUPrintfCall(), emitDXILVersionTupleMD(), llvm::OpenMPIRBuilder::emitMapperCall(), emitMemcpyExpansion(), emitMemsetExpansion(), llvm::OpenMPIRBuilder::emitScanReduction(), emitShaderModelVersionMD(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetTask(), emitValidatorVersionMD(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandFloatDotIntrinsic(), expandIToFP(), fixI8UseChain(), llvm::InstCombinerImpl::foldICmpBitCast(), foldVecExtTruncToExtElt(), foldVecTruncToExtElt(), llvm::VPLane::getAsRuntimeExpr(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::getOrderedReduction(), llvm::getShuffleReduction(), getSign32(), llvm::OpenMPIRBuilder::getSizeInBytes(), hostParallelCallback(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::SampleProfileProber::instrumentOneFunc(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::makeDMB(), nullifySetjmp(), optimizeIntegerToVectorInsertions(), simplifyAllocaArraySize(), targetParallelCallback(), llvm::dxil::DXILOpBuilder::tryCreateOp(), upgradeNVVMIntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), and llvm::InstCombinerImpl::visitExtractValueInst().

◆ getInt32Ty()

IntegerType * llvm::IRBuilderBase::getInt32Ty ( )
inline

◆ getInt64()

ConstantInt * llvm::IRBuilderBase::getInt64 ( uint64_t  C)
inline

Get a constant 64-bit value.

Definition at line 527 of file IRBuilder.h.

References llvm::CallingConv::C, and getInt64Ty().

Referenced by appendArg(), llvm::VNCoercion::coerceAvailableValueToLoadType(), constructPointer(), CreateElementUnorderedAtomicMemSet(), CreateExtractElement(), CreateExtractVector(), CreateInsertElement(), CreateInsertVector(), CreateInvariantStart(), CreateMemCpy(), CreateMemMove(), CreateMemSet(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTask(), createTileStore(), CreateVectorSplat(), llvm::emitAMDGPUPrintfCall(), llvm::OpenMPIRBuilder::emitMapperCall(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), emitTaskDependencies(), emitTPIDR2Save(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandIToFP(), llvm::OpenMPIRBuilder::getKernelArgsVector(), getMul64(), getStrlenWithNull(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), HandleByValArgumentInit(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineSVEDupqLane(), llvm::SampleProfileProber::instrumentOneFunc(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), replaceWithTileLoad(), llvm::setProbeDistributionFactor(), llvm::coro::AnyRetconABI::splitCoroutine(), targetParallelCallback(), toSpvLifetimeIntrinsic(), upgradeNVVMIntrinsicCall(), llvm::InstCombinerImpl::visitExtractElementInst(), and llvm::InstCombinerImpl::visitInsertElementInst().

◆ getInt64Ty()

IntegerType * llvm::IRBuilderBase::getInt64Ty ( )
inline

◆ getInt8()

ConstantInt * llvm::IRBuilderBase::getInt8 ( uint8_t  C)
inline

Get a constant 8-bit value.

Definition at line 512 of file IRBuilder.h.

References llvm::CallingConv::C, and getInt8Ty().

Referenced by createTblForTrunc(), getStrlenWithNull(), llvm::HexagonTargetLowering::LowerConstantPool(), and upgradeX86IntrinsicCall().

◆ getInt8Ty()

IntegerType * llvm::IRBuilderBase::getInt8Ty ( )
inline

◆ getIntN()

ConstantInt * llvm::IRBuilderBase::getIntN ( unsigned  N,
uint64_t  C 
)
inline

◆ getIntNTy()

IntegerType * llvm::IRBuilderBase::getIntNTy ( unsigned  N)
inline

◆ getIntPtrTy()

IntegerType * llvm::IRBuilderBase::getIntPtrTy ( const DataLayout DL,
unsigned  AddrSpace = 0 
)
inline

Fetch the type of an integer with size at least as big as that of a pointer in the given address space.

Definition at line 611 of file IRBuilder.h.

References Context, and DL.

Referenced by CreateAlignmentAssumption(), llvm::memtag::getFP(), llvm::memtag::getPC(), and llvm::memtag::readRegister().

◆ getIsFPConstrained()

bool llvm::IRBuilderBase::getIsFPConstrained ( )
inline

Query for the use of constrained floating point math.

Definition at line 354 of file IRBuilder.h.

References IsFPConstrained.

◆ getPtrTy()

PointerType * llvm::IRBuilderBase::getPtrTy ( unsigned  AddrSpace = 0)
inline

◆ getTrue()

ConstantInt * llvm::IRBuilderBase::getTrue ( )
inline

◆ getVoidTy()

Type * llvm::IRBuilderBase::getVoidTy ( )
inline

◆ Insert() [1/3]

Constant * llvm::IRBuilderBase::Insert ( Constant C,
const Twine = "" 
) const
inline

No-op overload to handle constants.

Definition at line 179 of file IRBuilder.h.

References llvm::CallingConv::C.

◆ Insert() [2/3]

template<typename InstTy >
InstTy * llvm::IRBuilderBase::Insert ( InstTy *  I,
const Twine Name = "" 
) const
inline

Insert and return the specified instruction.

Definition at line 172 of file IRBuilder.h.

References AddMetadataToInst(), I, Inserter, llvm::IRBuilderDefaultInserter::InsertHelper(), InsertPt, and Name.

Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), CreateAggregateRet(), CreateAlignedLoad(), CreateAlignedStore(), CreateAlloca(), CreateAnd(), CreateAShr(), CreateAtomicCmpXchg(), CreateAtomicRMW(), CreateBinOpFMF(), CreateBr(), CreateCall(), CreateCallBr(), CreateCatchPad(), CreateCatchRet(), CreateCatchSwitch(), CreateCleanupRet(), CreateCondBr(), CreateConstGEP1_32(), CreateConstGEP1_64(), CreateConstGEP2_32(), CreateConstGEP2_64(), CreateConstInBoundsGEP1_32(), CreateConstInBoundsGEP1_64(), CreateConstInBoundsGEP2_32(), CreateConstInBoundsGEP2_64(), CreateExtractElement(), CreateExtractValue(), CreateFAddFMF(), CreateFDivFMF(), CreateFence(), CreateFMulFMF(), CreateFNegFMF(), CreateFreeze(), CreateFRemFMF(), CreateFSubFMF(), CreateGEP(), CreateICmp(), CreateIndirectBr(), CreateInsertElement(), CreateInsertValue(), CreateInvoke(), CreateLandingPad(), CreateLShr(), CreateOr(), CreatePHI(), CreatePointerBitCastOrAddrSpaceCast(), CreatePointerCast(), CreateResume(), CreateRet(), CreateRetVoid(), CreateSDiv(), CreateSelectFMF(), CreateShuffleVector(), CreateSRem(), CreateSwitch(), CreateTrunc(), CreateUDiv(), CreateUIToFP(), CreateUnOp(), CreateUnreachable(), CreateURem(), CreateVAArg(), CreateVectorReverse(), CreateVectorSplice(), CreateXor(), CreateZExt(), dropRedundantMaskingOfLeftShiftInput(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), Insert(), llvm::Negator::Negate(), optimizeSQRT(), phiNodeRemapHelper(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), replaceWithIndirectUse(), rewriteGlobalVariablesInConstant(), scalarizeInstruction(), and llvm::InstCombinerImpl::visitShl().

◆ Insert() [3/3]

Value * llvm::IRBuilderBase::Insert ( Value V,
const Twine Name = "" 
) const
inline

Definition at line 183 of file IRBuilder.h.

References assert(), I, Insert(), and Name.

◆ restoreIP()

void llvm::IRBuilderBase::restoreIP ( InsertPoint  IP)
inline

Sets the current insert point to a previously-saved location.

Definition at line 323 of file IRBuilder.h.

References ClearInsertionPoint(), llvm::IRBuilderBase::InsertPoint::getBlock(), llvm::IRBuilderBase::InsertPoint::getPoint(), llvm::IRBuilderBase::InsertPoint::isSet(), and SetInsertPoint().

Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCancellationPoint(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::OpenMPIRBuilder::createCanonicalScanLoops(), createFakeIntVal(), llvm::OpenMPIRBuilder::createMapperAllocas(), llvm::OpenMPIRBuilder::createOrderedDepend(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSection(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createTarget(), llvm::OpenMPIRBuilder::createTargetData(), createTargetLoopWorkshareCall(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitScanReduction(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTaskDependencies(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), populateReductionFunction(), restoreIPandDebugLoc(), targetParallelCallback(), llvm::OpenMPIRBuilder::tileLoops(), llvm::OpenMPIRBuilder::updateToLocation(), workshareLoopTargetCallback(), and llvm::IRBuilderBase::InsertPointGuard::~InsertPointGuard().

◆ saveAndClearIP()

InsertPoint llvm::IRBuilderBase::saveAndClearIP ( )
inline

Returns the current insert point, clearing it in the process.

Definition at line 316 of file IRBuilder.h.

References ClearInsertionPoint(), GetInsertBlock(), and GetInsertPoint().

◆ saveIP()

InsertPoint llvm::IRBuilderBase::saveIP ( ) const
inline

Returns the current insert point.

Definition at line 311 of file IRBuilder.h.

References GetInsertBlock(), and GetInsertPoint().

Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createBarrier(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCancellationPoint(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::OpenMPIRBuilder::createCanonicalScanLoops(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createDistribute(), llvm::OpenMPIRBuilder::createOrderedDepend(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTarget(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::OpenMPIRBuilder::createTeams(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitScanReduction(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTaskDependencies(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), llvm::VPTransformState::get(), llvm::OpenMPIRBuilder::getInsertionPoint(), populateReductionFunction(), llvm::spliceBB(), llvm::splitBB(), and targetParallelCallback().

◆ setConstrainedFPCallAttr()

void llvm::IRBuilderBase::setConstrainedFPCallAttr ( CallBase I)
inline

◆ setConstrainedFPFunctionAttr()

void llvm::IRBuilderBase::setConstrainedFPFunctionAttr ( )
inline

Definition at line 386 of file IRBuilder.h.

References assert(), BB, F, and llvm::BasicBlock::getParent().

◆ SetCurrentDebugLocation()

void llvm::IRBuilderBase::SetCurrentDebugLocation ( DebugLoc  L)
inline

◆ setDefaultConstrainedExcept()

void llvm::IRBuilderBase::setDefaultConstrainedExcept ( fp::ExceptionBehavior  NewExcept)
inline

Set the exception handling to be used with constrained floating point.

Definition at line 357 of file IRBuilder.h.

References assert(), llvm::convertExceptionBehaviorToStr(), and DefaultConstrainedExcept.

◆ setDefaultConstrainedRounding()

void llvm::IRBuilderBase::setDefaultConstrainedRounding ( RoundingMode  NewRounding)
inline

Set the rounding mode handling to be used with constrained floating point.

Definition at line 367 of file IRBuilder.h.

References assert(), llvm::convertRoundingModeToStr(), and DefaultConstrainedRounding.

◆ setDefaultFPMathTag()

void llvm::IRBuilderBase::setDefaultFPMathTag ( MDNode FPMathTag)
inline

Set the floating point math metadata to be used.

Definition at line 342 of file IRBuilder.h.

References DefaultFPMathTag.

◆ setDefaultOperandBundles()

void llvm::IRBuilderBase::setDefaultOperandBundles ( ArrayRef< OperandBundleDef OpBundles)
inline

◆ setFastMathFlags()

void llvm::IRBuilderBase::setFastMathFlags ( FastMathFlags  NewFMF)
inline

◆ SetInsertPoint() [1/4]

void llvm::IRBuilderBase::SetInsertPoint ( BasicBlock TheBB)
inline

This specifies that created instructions should be appended to the end of the specified block.

Definition at line 207 of file IRBuilder.h.

References BB, llvm::BasicBlock::end(), and InsertPt.

Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::OpenMPIRBuilder::applySimd(), buildNew(), convertToRelLookupTable(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCancellationPoint(), llvm::OpenMPIRBuilder::createCanonicalScanLoops(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createDistribute(), llvm::EpilogueVectorizerMainLoop::createIterationCountCheck(), llvm::OpenMPIRBuilder::createLoopSkeleton(), createMemMoveLoopKnownSize(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), createRetPHINode(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createScan(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::OpenMPIRBuilder::createTeams(), llvm::deleteDeadLoop(), despeculateCountZeros(), DoFlattenLoopPair(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::OpenMPIRBuilder::emitBlock(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::OpenMPIRBuilder::emitScanReduction(), emitSetAndGetSwiftErrorValueAround(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), emitTaskDependencies(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), evaluateInDifferentElementOrder(), llvm::VPIRInstruction::execute(), llvm::VPIRPhi::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPBasicBlock::execute(), llvm::VPIRBasicBlock::execute(), llvm::SCEVExpander::expandComparePredicate(), expandFPToI(), expandIToFP(), llvm::SCEVExpander::expandUnionPredicate(), llvm::InnerLoopVectorizer::fixNonInductionPHIs(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldConsecutiveLoads(), foldDependentIVs(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), foldFrexpOfSelect(), foldGEPOfPhi(), llvm::InstCombinerImpl::foldICmpWithConstant(), foldMemChr(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldURemOfLoopIncrement(), freelyInvert(), llvm::AMDGPU::genAMDGPUReportBlock(), llvm::AMDGPU::generateCrashCode(), llvm::SCEVExpander::generateOverflowCheck(), generateReproducer(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), generateUnsignedRemainderCode(), llvm::VPTransformState::get(), getAllocaPos(), ShapeCalculator::getColFromRow(), llvm::InstCombiner::getFreelyInvertedImpl(), ShapeCalculator::getRowFromCol(), getStrlenWithNull(), llvm::coro::BaseCloner::handleFinalSuspend(), hoistConditionalLoadsStores(), hoistGEP(), hoistMinMax(), hostParallelCallback(), initIRBuilder(), injectPendingInvariantConditions(), inlineRetainOrClaimRVCalls(), InsertIntrinsicCalls(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::AMDGPU::instrumentAddress(), llvm::AMDGPU::instrumentAddressImpl(), LLVMPositionBuilderImpl(), lowerAwaitSuspend(), lowerLocalAllocas(), llvm::lowerObjectSizeCall(), lowerPtrAnnotation(), lowerSubFn(), makeStatepointExplicitImpl(), matchStridedStart(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::EscapeEnumerator::Next(), optimizeSQRT(), phiNodeRemapHelper(), populateReductionFunction(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), promoteAllocaUserToVector(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), reduceSwitchRange(), RemovePreallocated(), removeUndefIntroducingPredecessor(), replaceCoroEndAsync(), replaceIfBranchTargets(), replaceWithIndirectUse(), restoreIP(), rewritePHIsForCleanupPad(), llvm::InstCombinerImpl::run(), llvm::KCFIPass::run(), salvageDebugInfoImpl(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), setInsertionPoint(), llvm::SCEVExpander::setInsertPoint(), simplifyAMDGCNImageIntrinsic(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifySwitchOfCmpIntrinsic(), simplifySwitchOfPowersOfTwo(), simplifyUsingControlFlow(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::spliceBB(), llvm::splitBB(), llvm::SplitBlockAndInsertForEachLane(), llvm::splitLoopBound(), splitMergedValStore(), switchToLookupTable(), targetParallelCallback(), llvm::OpenMPIRBuilder::tileLoops(), tryInterleave(), trySwitchToSelect(), llvm::UnrollRuntimeLoopRemainder(), llvm::UpgradeIntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), versionCallSiteWithCond(), llvm::LoopVersioning::versionLoop(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and llvm::InstCombinerImpl::visitSwitchInst().

◆ SetInsertPoint() [2/4]

void llvm::IRBuilderBase::SetInsertPoint ( BasicBlock TheBB,
BasicBlock::iterator  IP 
)
inline

This specifies that created instructions should be inserted at the specified point.

Definition at line 223 of file IRBuilder.h.

References BB, llvm::BasicBlock::end(), InsertPt, and SetCurrentDebugLocation().

◆ SetInsertPoint() [3/4]

void llvm::IRBuilderBase::SetInsertPoint ( BasicBlock::iterator  IP)
inline

This specifies that created instructions should be inserted at the specified point, but also requires that IP is dereferencable.

Definition at line 232 of file IRBuilder.h.

References BB, llvm::BasicBlock::getParent(), InsertPt, and SetCurrentDebugLocation().

◆ SetInsertPoint() [4/4]

void llvm::IRBuilderBase::SetInsertPoint ( Instruction I)
inline

This specifies that created instructions should be inserted before the specified instruction.

Definition at line 214 of file IRBuilder.h.

References assert(), BB, llvm::BasicBlock::end(), I, InsertPt, and SetCurrentDebugLocation().

◆ SetInsertPointPastAllocas()

void llvm::IRBuilderBase::SetInsertPointPastAllocas ( Function F)
inline

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.

Definition at line 241 of file IRBuilder.h.

References BB, F, llvm::BasicBlock::getFirstNonPHIOrDbgOrAlloca(), and InsertPt.

◆ SetInstDebugLocation()

void IRBuilderBase::SetInstDebugLocation ( Instruction I) const

If this builder has a current debug location, set it on the specified instruction.

Definition at line 64 of file IRBuilder.cpp.

References I, and llvm::DebugLoc::orElse().

Referenced by AddMetadataToInst().

◆ setIsFPConstrained()

void llvm::IRBuilderBase::setIsFPConstrained ( bool  IsCon)
inline

Enable/Disable use of constrained floating point math.

When enabled the CreateF<op>() calls instead create constrained floating point intrinsic calls. Fast math flags are unaffected by this setting.

Definition at line 351 of file IRBuilder.h.

References IsFPConstrained.

Referenced by llvm::lowerAtomicRMWInst().

◆ SetNoSanitizeMetadata()

void llvm::IRBuilderBase::SetNoSanitizeMetadata ( )
inline

Set nosanitize metadata.

Definition at line 254 of file IRBuilder.h.

References llvm::MDNode::get(), and getContext().

Referenced by BuilderTy::BuilderTy().

Member Data Documentation

◆ BB

BasicBlock* llvm::IRBuilderBase::BB
protected

◆ Context

LLVMContext& llvm::IRBuilderBase::Context
protected

◆ DefaultConstrainedExcept

fp::ExceptionBehavior llvm::IRBuilderBase::DefaultConstrainedExcept = fp::ebStrict
protected

◆ DefaultConstrainedRounding

RoundingMode llvm::IRBuilderBase::DefaultConstrainedRounding = RoundingMode::Dynamic
protected

◆ DefaultFPMathTag

MDNode* llvm::IRBuilderBase::DefaultFPMathTag
protected

◆ DefaultOperandBundles

ArrayRef<OperandBundleDef> llvm::IRBuilderBase::DefaultOperandBundles
protected

◆ FMF

FastMathFlags llvm::IRBuilderBase::FMF
protected

◆ Folder

const IRBuilderFolder& llvm::IRBuilderBase::Folder
protected

◆ Inserter

const IRBuilderDefaultInserter& llvm::IRBuilderBase::Inserter
protected

Definition at line 150 of file IRBuilder.h.

Referenced by Insert().

◆ InsertPt

BasicBlock::iterator llvm::IRBuilderBase::InsertPt
protected

◆ IsFPConstrained

bool llvm::IRBuilderBase::IsFPConstrained = false
protected

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