LLVM 24.0.0git
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  InsertPointGuard
class  OperandBundlesGuard

Public Types

using InsertPoint = BasicBlock::iterator
 InsertPoint - A saved insertion point.

Public Member Functions

 IRBuilderBase (const IRBuilderBase &)=delete
template<typename InstTy>
InstTy * Insert (InstTy *I, const Twine &Name="") const
 Insert and return the specified instruction.
Constant * Insert (Constant *C, const Twine &="") const
 No-op overload to handle constants.
Value * Insert (Value *V, const Twine &Name="") const
void ClearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block.
BasicBlock * GetInsertBlock () const
BasicBlock::iterator GetInsertPoint () const
LLVMContext & getContext () const
const DataLayout & getDataLayout () const
 Get data layout.
Module * getModule () const
 Get the module.
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.
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 (const DebugLoc &L)
 Set location information used by debugging information.
void SetCurrentDebugLocation (DebugLoc &&L)
 Set location information used by debugging information.
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.
LLVM_ABI Type * getCurrentFunctionReturnType () 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.
MDNode * getDefaultFPMathTag () const
 Get the floating point math metadata being used.
FastMathFlags getFastMathFlags () const
 Get the flags to be applied to created floating point ops.
FastMathFlags & getFastMathFlags ()
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)
void enableGEPCanonicalization ()
LLVM_ABI GlobalVariable * CreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr, bool AddNull=true)
 Make a new global variable with initializer type i8*.
ConstantInt * getInt1 (bool V)
 Get a constant value representing either true or false.
ConstantInt * getTrue ()
 Get the constant value for i1 true.
ConstantInt * getFalse ()
 Get the constant value for i1 false.
ConstantInt * getInt8 (uint8_t C)
 Get a constant 8-bit value.
ConstantInt * getInt16 (uint16_t C)
 Get a constant 16-bit value.
ConstantInt * getInt32 (uint32_t C)
 Get a constant 32-bit value.
ConstantInt * getInt64 (uint64_t C)
 Get a constant 64-bit value.
ConstantInt * getIntN (unsigned N, uint64_t C)
 Get a constant N-bit value, zero extended from a 64-bit value.
ConstantInt * getInt (const APInt &AI)
 Get a constant integer value.
ByteType * getByte8Ty ()
 Fetch the type representing an 8-bit byte.
ByteType * getByte16Ty ()
 Fetch the type representing a 16-bit byte.
ByteType * getByte32Ty ()
 Fetch the type representing a 32-bit byte.
ByteType * getByte64Ty ()
 Fetch the type representing a 64-bit byte.
ByteType * getByte128Ty ()
 Fetch the type representing a 128-bit byte.
ByteType * getByteNTy (unsigned N)
 Fetch the type representing an N-bit byte.
IntegerType * getInt1Ty ()
 Fetch the type representing a single bit.
IntegerType * getInt8Ty ()
 Fetch the type representing an 8-bit integer.
IntegerType * getInt16Ty ()
 Fetch the type representing a 16-bit integer.
IntegerType * getInt32Ty ()
 Fetch the type representing a 32-bit integer.
IntegerType * getInt64Ty ()
 Fetch the type representing a 64-bit integer.
IntegerType * getInt128Ty ()
 Fetch the type representing a 128-bit integer.
IntegerType * getIntNTy (unsigned N)
 Fetch the type representing an N-bit integer.
Type * getHalfTy ()
 Fetch the type representing a 16-bit floating point value.
Type * getBFloatTy ()
 Fetch the type representing a 16-bit brain floating point value.
Type * getFloatTy ()
 Fetch the type representing a 32-bit floating point value.
Type * getDoubleTy ()
 Fetch the type representing a 64-bit floating point value.
Type * getVoidTy ()
 Fetch the type representing void.
PointerType * getPtrTy (unsigned AddrSpace=0)
 Fetch the type representing a pointer.
ByteType * getBytePtrTy (const DataLayout &DL, unsigned AddrSpace=0)
 Fetch the type of a byte with size at least as big as that of a pointer in the given address space.
IntegerType * getIntPtrTy (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.
IntegerType * getIndexTy (const DataLayout &DL, unsigned AddrSpace)
 Fetch the type of an integer that should be used to index GEP operations within AddressSpace.
CallInst * CreateMemSet (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 CallInst * CreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
LLVM_ABI CallInst * CreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val, Value *Size, bool IsVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
CallInst * CreateElementUnorderedAtomicMemSet (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 CallInst * CreateMalloc (Type *IntPtrTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF=nullptr, const Twine &Name="")
LLVM_ABI CallInst * CreateMalloc (Type *IntPtrTy, Value *AllocSize, Value *ArraySize, Function *MallocF=nullptr, const Twine &Name="")
 CreateMalloc - Generate the IR for a call to malloc:
LLVM_ABI CallInst * CreateFree (Value *Source, ArrayRef< OperandBundleDef > Bundles={})
 Generate the IR for a call to the builtin free function.
LLVM_ABI CallInst * CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size, Align Alignment, uint32_t ElementSize, const AAMDNodes &AAInfo=AAMDNodes())
CallInst * CreateMemCpy (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 CallInst * CreateMemTransferInst (Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
CallInst * CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
CallInst * CreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
LLVM_ABI CallInst * 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.
CallInst * CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
CallInst * CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, const AAMDNodes &AAInfo=AAMDNodes())
LLVM_ABI CallInst * 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.
LLVM_ABI Value * CreateFAddReduce (Value *Acc, Value *Src)
 Create a sequential vector fadd reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFMulReduce (Value *Acc, Value *Src)
 Create a sequential vector fmul reduction intrinsic of the source vector.
LLVM_ABI Value * CreateAddReduce (Value *Src)
 Create a vector int add reduction intrinsic of the source vector.
LLVM_ABI Value * CreateMulReduce (Value *Src)
 Create a vector int mul reduction intrinsic of the source vector.
LLVM_ABI Value * CreateAndReduce (Value *Src)
 Create a vector int AND reduction intrinsic of the source vector.
LLVM_ABI Value * CreateOrReduce (Value *Src)
 Create a vector int OR reduction intrinsic of the source vector.
LLVM_ABI Value * CreateXorReduce (Value *Src)
 Create a vector int XOR reduction intrinsic of the source vector.
LLVM_ABI Value * CreateIntMaxReduce (Value *Src, bool IsSigned=false)
 Create a vector integer max reduction intrinsic of the source vector.
LLVM_ABI Value * CreateIntMinReduce (Value *Src, bool IsSigned=false)
 Create a vector integer min reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMaxReduce (Value *Src)
 Create a vector float max reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMinReduce (Value *Src)
 Create a vector float min reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMaximumReduce (Value *Src)
 Create a vector float maximum reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMinimumReduce (Value *Src)
 Create a vector float minimum reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMaximumNumReduce (Value *Src)
 Create a vector float maximum reduction intrinsic of the source vector.
LLVM_ABI Value * CreateFPMinimumNumReduce (Value *Src)
 Create a vector float minimum reduction intrinsic of the source vector.
LLVM_ABI CallInst * CreateLifetimeStart (Value *Ptr)
 Create a lifetime.start intrinsic.
LLVM_ABI CallInst * CreateLifetimeEnd (Value *Ptr)
 Create a lifetime.end intrinsic.
LLVM_ABI CallInst * CreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a call to invariant.start intrinsic.
LLVM_ABI CallInst * CreateThreadLocalAddress (Value *Ptr)
 Create a call to llvm.threadlocal.address intrinsic.
LLVM_ABI CallInst * CreateMaskedLoad (Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Load intrinsic.
LLVM_ABI CallInst * CreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask)
 Create a call to Masked Store intrinsic.
LLVM_ABI CallInst * CreateMaskedGather (Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Gather intrinsic.
LLVM_ABI CallInst * CreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr)
 Create a call to Masked Scatter intrinsic.
LLVM_ABI CallInst * CreateMaskedExpandLoad (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 CallInst * CreateMaskedCompressStore (Value *Val, Value *Ptr, MaybeAlign Align, Value *Mask=nullptr)
 Create a call to Masked Compress Store intrinsic.
Value * getAllOnesMask (ElementCount NumElts)
 Return an all true boolean vector (mask) with NumElts lanes.
LLVM_ABI CallInst * CreateAssumption (Value *Cond)
 Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.
LLVM_ABI CallInst * CreateAssumption (ArrayRef< OperandBundleDef > OpBundles)
 Create an assume intrinsic call that allows the optimizer to assume that the provided operand bundles hold.
LLVM_ABI Instruction * CreateNoAliasScopeDeclaration (Value *Scope)
 Create a llvm.experimental.noalias.scope.decl intrinsic call.
Instruction * CreateNoAliasScopeDeclaration (MDNode *ScopeTag)
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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.
LLVM_ABI InvokeInst * 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.
LLVM_ABI InvokeInst * 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.
LLVM_ABI InvokeInst * 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="")
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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.
Value * CreateVScale (Type *Ty, const Twine &Name="")
 Create a call to llvm.vscale.<Ty>().
LLVM_ABI Value * CreateElementCount (Type *Ty, ElementCount EC)
 Create an expression which evaluates to the number of elements in EC at runtime.
LLVM_ABI Value * CreateTypeSize (Type *Ty, TypeSize Size)
 Create an expression which evaluates to the number of units in Size at runtime.
LLVM_ABI Value * CreateAllocationSize (Type *DestTy, AllocaInst *AI)
 Get allocation size of an alloca as a runtime Value* (handles both static and dynamic allocas and vscale factor).
LLVM_ABI Value * CreateStepVector (Type *DstType, const Twine &Name="")
 Creates a vector of type DstType with the linear sequence <0, 1, ...>
LLVM_ABI Value * CreateUnaryIntrinsic (Intrinsic::ID ID, Value *Op, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with 1 operand which is mangled on its type.
LLVM_ABI Value * CreateBinaryIntrinsic (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 CallInst * CreateIntrinsicWithoutFolding (Intrinsic::ID ID, ArrayRef< Type * > OverloadTypes, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="", ArrayRef< OperandBundleDef > OpBundles={})
 Create a call to intrinsic ID with Args, mangled using OverloadTypes.
LLVM_ABI CallInst * CreateIntrinsicWithoutFolding (Type *RetTy, Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to intrinsic ID with RetTy and Args.
CallInst * CreateIntrinsicWithoutFolding (Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="")
 Create a call to non-overloaded intrinsic ID with Args.
LLVM_ABI Value * CreateIntrinsic (Intrinsic::ID ID, ArrayRef< Type * > OverloadTypes, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="", ArrayRef< OperandBundleDef > OpBundles={}, function_ref< void(CallInst *)> SetFn=[](CallInst *) {})
 Variant to create a possibly constant-folded intrinsic.
LLVM_ABI Value * CreateIntrinsic (Type *RetTy, Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="", function_ref< void(CallInst *)> SetFn=[](CallInst *) {})
 Variant to create a possibly constant-folded intrinsic.
Value * CreateIntrinsic (Intrinsic::ID ID, ArrayRef< Value * > Args, FMFSource FMFSource={}, const Twine &Name="", function_ref< void(CallInst *)> SetFn=[](CallInst *) {})
 Variant to create a possibly constant-folded intrinsic.
Value * CreateFAbs (Value *V, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the fabs intrinsic.
Value * CreateMinNum (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the minnum intrinsic.
Value * CreateMaxNum (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the maxnum intrinsic.
Value * CreateMinimum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimum intrinsic.
Value * CreateMaximum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic.
Value * CreateMinimumNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimumnum intrinsic.
Value * CreateMaximumNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic.
Value * CreateCopySign (Value *LHS, Value *RHS, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the copysign intrinsic.
Value * CreateLdexp (Value *Src, Value *Exp, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the ldexp intrinsic.
Value * CreateFMA (Value *Factor1, Value *Factor2, Value *Summand, FMFSource FMFSource={}, const Twine &Name="")
 Create call to the fma intrinsic.
Value * CreateArithmeticFence (Value *Val, Type *DstType, const Twine &Name="")
 Create a call to the arithmetic_fence intrinsic.
Value * CreateExtractVector (Type *DstType, Value *SrcVec, Value *Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
Value * CreateExtractVector (Type *DstType, Value *SrcVec, uint64_t Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
Value * CreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="")
 Create a call to the vector.insert intrinsic.
Value * CreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, uint64_t Idx, const Twine &Name="")
 Create a call to the vector.extract intrinsic.
CallInst * CreateStackSave (const Twine &Name="")
 Create a call to llvm.stacksave.
CallInst * CreateStackRestore (Value *Ptr, const Twine &Name="")
 Create a call to llvm.stackrestore.
Value * CreateCountTrailingZeroElems (Type *ResTy, Value *Mask, bool ZeroIsPoison=true, const Twine &Name="")
 Create a call to llvm.experimental_cttz_elts.
ReturnInst * CreateRetVoid ()
 Create a 'ret void' instruction.
ReturnInst * CreateRet (Value *V)
 Create a 'ret <val>' instruction.
ReturnInst * CreateAggregateRet (ArrayRef< Value * > RetVals)
 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.
UncondBrInst * CreateBr (BasicBlock *Dest)
 Create an unconditional 'br label X' instruction.
CondBrInst * CreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
CondBrInst * CreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, Instruction *MDSrc)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
SwitchInst * CreateSwitch (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).
IndirectBrInst * CreateIndirectBr (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).
InvokeInst * CreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 Create an invoke instruction.
InvokeInst * CreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args={}, const Twine &Name="")
InvokeInst * CreateInvoke (FunctionCallee Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
InvokeInst * CreateInvoke (FunctionCallee Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args={}, const Twine &Name="")
CallBrInst * CreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args={}, const Twine &Name="")
 Create a callbr instruction.
CallBrInst * CreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
CallBrInst * CreateCallBr (FunctionCallee Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args={}, const Twine &Name="")
CallBrInst * CreateCallBr (FunctionCallee Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
ResumeInst * CreateResume (Value *Exn)
CleanupReturnInst * CreateCleanupRet (CleanupPadInst *CleanupPad, BasicBlock *UnwindBB=nullptr)
CatchSwitchInst * CreateCatchSwitch (Value *ParentPad, BasicBlock *UnwindBB, unsigned NumHandlers, const Twine &Name="")
CatchPadInst * CreateCatchPad (Value *ParentPad, ArrayRef< Value * > Args, const Twine &Name="")
CleanupPadInst * CreateCleanupPad (Value *ParentPad, ArrayRef< Value * > Args={}, const Twine &Name="")
CatchReturnInst * CreateCatchRet (CatchPadInst *CatchPad, BasicBlock *BB)
UnreachableInst * CreateUnreachable ()
Value * CreateAdd (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateNSWAdd (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateNUWAdd (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateSub (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateNSWSub (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateNUWSub (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateMul (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateNSWMul (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateNUWMul (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateUDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
Value * CreateExactUDiv (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateSDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
Value * CreateExactSDiv (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateURem (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateSRem (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateShl (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateShl (Value *LHS, const APInt &RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateShl (Value *LHS, uint64_t RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
Value * CreateLShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
Value * CreateLShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
Value * CreateLShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
Value * CreateAShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
Value * CreateAShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
Value * CreateAShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
Value * CreateAnd (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateAnd (Value *LHS, const APInt &RHS, const Twine &Name="")
Value * CreateAnd (Value *LHS, uint64_t RHS, const Twine &Name="")
Value * CreateAnd (ArrayRef< Value * > Ops)
Value * CreateOr (Value *LHS, Value *RHS, const Twine &Name="", bool IsDisjoint=false)
Value * CreateOr (Value *LHS, const APInt &RHS, const Twine &Name="")
Value * CreateOr (Value *LHS, uint64_t RHS, const Twine &Name="")
Value * CreateOr (ArrayRef< Value * > Ops)
Value * CreateDisjointOr (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateXor (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateXor (Value *LHS, const APInt &RHS, const Twine &Name="")
Value * CreateXor (Value *LHS, uint64_t RHS, const Twine &Name="")
Value * CreateFAdd (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFAddFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFSub (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFSubFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFMul (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFMulFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFDiv (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFDivFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFRem (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateFRemFMF (Value *L, Value *R, FMFSource FMFSource, const Twine &Name="", MDNode *FPMD=nullptr)
Value * CreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateBinOpFMF (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateNoWrapBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool IsNUW, bool IsNSW, const Twine &Name="")
Value * CreateExactBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, bool IsExact, const Twine &Name="")
Value * CreateLogicalAnd (Value *Cond1, Value *Cond2, const Twine &Name="", Instruction *MDFrom=nullptr)
Value * CreateLogicalOr (Value *Cond1, Value *Cond2, const Twine &Name="", Instruction *MDFrom=nullptr)
Value * CreateLogicalOp (Instruction::BinaryOps Opc, Value *Cond1, Value *Cond2, const Twine &Name="", Instruction *MDFrom=nullptr)
Value * CreateLogicalOr (ArrayRef< Value * > Ops)
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * 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)
LLVM_ABI CallInst * CreateConstrainedFPUnroundedBinOp (Intrinsic::ID ID, Value *L, Value *R, FMFSource FMFSource={}, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
Value * CreateNeg (Value *V, const Twine &Name="", bool HasNSW=false)
Value * CreateNSWNeg (Value *V, const Twine &Name="")
Value * CreateFNeg (Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFNegFMF (Value *V, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateNot (Value *V, const Twine &Name="")
Value * CreateUnOp (Instruction::UnaryOps Opc, Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateUnOpFMF (Instruction::UnaryOps Opc, Value *V, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
LLVM_ABI Value * CreateNAryOp (unsigned Opc, ArrayRef< Value * > Ops, const Twine &Name="", MDNode *FPMathTag=nullptr)
 Create either a UnaryOperator or BinaryOperator depending on Opc.
AllocaInst * CreateAlloca (Type *Ty, unsigned AddrSpace, Value *ArraySize=nullptr, const Twine &Name="")
AllocaInst * CreateAlloca (Type *Ty, Value *ArraySize=nullptr, const Twine &Name="")
CallInst * CreateStructuredAlloca (Type *BaseType, const Twine &Name="")
LoadInst * CreateLoad (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.
LoadInst * CreateLoad (Type *Ty, Value *Ptr, const Twine &Name="")
LoadInst * CreateLoad (Type *Ty, Value *Ptr, bool isVolatile, const Twine &Name="")
LoadInst * CreateLoad (Type *Ty, Value *Ptr, const LoadStoreInstProperties &Props, const Twine &Name="")
StoreInst * CreateStore (Value *Val, Value *Ptr, bool isVolatile=false)
StoreInst * CreateStore (Value *Val, Value *Ptr, const LoadStoreInstProperties &Props)
LoadInst * CreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, const char *Name)
LoadInst * CreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, const Twine &Name="")
LoadInst * CreateAlignedLoad (Type *Ty, Value *Ptr, MaybeAlign Align, bool isVolatile, const Twine &Name="")
StoreInst * CreateAlignedStore (Value *Val, Value *Ptr, MaybeAlign Align, bool isVolatile=false)
FenceInst * CreateFence (AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System, const Twine &Name="")
AtomicCmpXchgInst * CreateAtomicCmpXchg (Value *Ptr, Value *Cmp, Value *New, MaybeAlign Align, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SyncScope::ID SSID=SyncScope::System)
AtomicRMWInst * CreateAtomicRMW (AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val, MaybeAlign Align, AtomicOrdering Ordering, SyncScope::ID SSID=SyncScope::System, bool Elementwise=false)
Value * CreateStructuredGEP (Type *BaseType, Value *PtrBase, ArrayRef< Value * > Indices, const Twine &Name="")
LLVM_ABI Value * CreateGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
Value * CreateInBoundsGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
Value * CreateConstGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
Value * CreateConstInBoundsGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
Value * CreateConstGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="", GEPNoWrapFlags NWFlags=GEPNoWrapFlags::none())
Value * CreateConstInBoundsGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="")
Value * CreateConstGEP1_64 (Type *Ty, Value *Ptr, uint64_t Idx0, const Twine &Name="")
Value * CreateConstInBoundsGEP1_64 (Type *Ty, Value *Ptr, uint64_t Idx0, const Twine &Name="")
Value * CreateConstGEP2_64 (Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
Value * CreateConstInBoundsGEP2_64 (Type *Ty, Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
Value * CreateStructGEP (Type *Ty, Value *Ptr, unsigned Idx, const Twine &Name="")
Value * CreatePtrAdd (Value *Ptr, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
Value * CreateInBoundsPtrAdd (Value *Ptr, Value *Offset, const Twine &Name="")
Value * CreatePtrAddWithUnsignedOffset (Value *Ptr, uint64_t Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 Create a ptradd with an unsigned constant offset.
Value * CreatePtrAddWithSignedOffset (Value *Ptr, int64_t Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 Create a ptradd with a signed constant offset.
Value * CreatePtrAddWithSExtOrTrunc (Value *Ptr, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 Create a ptradd where the offset is sign-extended or truncated to the index type.
Value * CreatePtrAddWithZExtOrTrunc (Value *Ptr, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
 Create a ptradd where the offset is zero-extended or truncated to the index type.
Value * CreateScaledPtrAdd (Value *Ptr, uint64_t Scale, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
Value * CreateScaledPtrAdd (Value *Ptr, TypeSize Scale, Value *Offset, const Twine &Name="", GEPNoWrapFlags NW=GEPNoWrapFlags::none())
Value * CreateTrunc (Value *V, Type *DestTy, const Twine &Name="", bool IsNUW=false, bool IsNSW=false)
Value * CreateZExt (Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false)
Value * CreateSExt (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateZExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a ZExt or Trunc from the integer value V to DestTy.
Value * CreateSExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a SExt or Trunc from the integer value V to DestTy.
Value * CreateFPToUI (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateFPToSI (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateUIToFP (Value *V, Type *DestTy, const Twine &Name="", bool IsNonNeg=false, MDNode *FPMathTag=nullptr)
Value * CreateSIToFP (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFPTrunc (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFPTruncFMF (Value *V, Type *DestTy, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFPExt (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFPExtFMF (Value *V, Type *DestTy, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreatePtrToAddr (Value *V, const Twine &Name="")
Value * CreatePtrToInt (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateIntToPtr (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateBitCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="", bool IsNonNull=false)
Value * CreateZExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateSExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateTruncOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateCast (Instruction::CastOps Op, Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr, FMFSource FMFSource={})
Value * CreatePointerCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreatePointerBitCastOrAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateIntCast (Value *V, Type *DestTy, bool isSigned, const Twine &Name="")
Value * CreateBitOrPointerCast (Value *V, Type *DestTy, const Twine &Name="")
Value * CreateFPCast (Value *V, Type *DestTy, const Twine &Name="", MDNode *FPMathTag=nullptr)
LLVM_ABI CallInst * 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)
Value * CreateIntCast (Value *, Type *, const char *)=delete
LLVM_ABI Value * CreateAggregateCast (Value *V, Type *DestTy)
 Cast between aggregate types that must have identical structure but may differ in their leaf types.
LLVM_ABI Value * CreateBitPreservingCastChain (const DataLayout &DL, Value *V, Type *NewTy)
 Create a chain of casts to convert V to NewTy, preserving the bit pattern of V.
Value * CreateICmpEQ (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpNE (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpUGT (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpUGE (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpULT (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpULE (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpSGT (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpSGE (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpSLT (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateICmpSLE (Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateFCmpOEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpOGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpOGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpOLT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpOLE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpONE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpORD (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpUNO (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpUEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpUGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpUGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpULT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpULE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpUNE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateICmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="")
Value * CreateFCmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpFMF (CmpInst::Predicate P, Value *LHS, Value *RHS, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateCmp (CmpInst::Predicate Pred, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
Value * CreateFCmpS (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
LLVM_ABI CallInst * CreateConstrainedFPCmp (Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Value *R, const Twine &Name="", std::optional< fp::ExceptionBehavior > Except=std::nullopt)
PHINode * CreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="")
CallInst * CreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionCallee Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
CallInst * CreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, FMFSource FMFSource, const Twine &Name="", MDNode *FPMathTag=nullptr)
LLVM_ABI CallInst * CreateConstrainedFPCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt)
LLVM_ABI Value * CreateSelectWithUnknownProfile (Value *C, Value *True, Value *False, StringRef PassName, const Twine &Name="")
LLVM_ABI Value * CreateSelectFMFWithUnknownProfile (Value *C, Value *True, Value *False, FMFSource FMFSource, StringRef PassName, const Twine &Name="")
LLVM_ABI Value * CreateSelect (Value *C, Value *True, Value *False, const Twine &Name="", Instruction *MDFrom=nullptr)
LLVM_ABI Value * CreateSelectFMF (Value *C, Value *True, Value *False, FMFSource FMFSource, const Twine &Name="", Instruction *MDFrom=nullptr)
VAArgInst * CreateVAArg (Value *List, Type *Ty, const Twine &Name="")
Value * CreateExtractElement (Value *Vec, Value *Idx, const Twine &Name="")
Value * CreateExtractElement (Value *Vec, uint64_t Idx, const Twine &Name="")
Value * CreateInsertElement (Type *VecTy, Value *NewElt, Value *Idx, const Twine &Name="")
Value * CreateInsertElement (Type *VecTy, Value *NewElt, uint64_t Idx, const Twine &Name="")
Value * CreateInsertElement (Value *Vec, Value *NewElt, Value *Idx, const Twine &Name="")
Value * CreateInsertElement (Value *Vec, Value *NewElt, uint64_t Idx, const Twine &Name="")
Value * CreateShuffleVector (Value *V1, Value *V2, Value *Mask, const Twine &Name="")
Value * CreateShuffleVector (Value *V1, Value *V2, ArrayRef< int > Mask, const Twine &Name="")
 See class ShuffleVectorInst for a description of the mask representation.
Value * CreateShuffleVector (Value *V, ArrayRef< int > Mask, const Twine &Name="")
 Create a unary shuffle.
LLVM_ABI Value * CreateVectorInterleave (ArrayRef< Value * > Ops, const Twine &Name="")
Value * CreateExtractValue (Value *Agg, ArrayRef< unsigned > Idxs, const Twine &Name="")
Value * CreateInsertValue (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const Twine &Name="")
LandingPadInst * CreateLandingPad (Type *Ty, unsigned NumClauses, const Twine &Name="")
Value * CreateFreeze (Value *V, const Twine &Name="")
Value * CreateBitInsert (Value *Base, Value *Val, Value *Offset, const Twine &Name="")
Value * CreateBitExtract (Type *Ty, Value *Src, Value *Offset, const Twine &Name="")
Value * CreateIsNull (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg == 0.
Value * CreateIsNotNull (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg != 0.
Value * CreateIsNeg (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg < 0.
Value * CreateIsNotNeg (Value *Arg, const Twine &Name="")
 Return a boolean value testing if Arg > -1.
LLVM_ABI Value * CreatePtrDiff (Value *LHS, Value *RHS, const Twine &Name="", bool IsNUW=false)
 Return the difference between two pointer values.
LLVM_ABI Value * CreatePtrDiff (Type *ElemTy, Value *LHS, Value *RHS, const Twine &Name="")
 Return the difference between two pointer values, dividing out the size of the pointed-to objects.
LLVM_ABI Value * CreateLaunderInvariantGroup (Value *Ptr)
 Create a launder.invariant.group intrinsic call.
LLVM_ABI Value * CreateVectorReverse (Value *V, const Twine &Name="")
 Return a vector value that contains the vector V reversed.
LLVM_ABI Value * CreateVectorSpliceLeft (Value *V1, Value *V2, Value *Offset, const Twine &Name="")
 Create a vector.splice.left intrinsic call, or a shufflevector that produces the same result if the result type is a fixed-length vector and Offset is a constant.
Value * CreateVectorSpliceLeft (Value *V1, Value *V2, uint32_t Offset, const Twine &Name="")
LLVM_ABI Value * CreateVectorSpliceRight (Value *V1, Value *V2, Value *Offset, const Twine &Name="")
 Create a vector.splice.right intrinsic call, or a shufflevector that produces the same result if the result type is a fixed-length vector and Offset is a constant.
Value * CreateVectorSpliceRight (Value *V1, Value *V2, uint32_t Offset, const Twine &Name="")
LLVM_ABI Value * CreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="")
 Return a vector value that contains.
LLVM_ABI Value * CreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="")
 Return a vector value that contains.
LLVM_ABI Value * CreatePreserveArrayAccessIndex (Type *ElTy, Value *Base, unsigned Dimension, unsigned LastIndex, MDNode *DbgInfo)
LLVM_ABI Value * CreatePreserveUnionAccessIndex (Value *Base, unsigned FieldIndex, MDNode *DbgInfo)
LLVM_ABI Value * CreatePreserveStructAccessIndex (Type *ElTy, Value *Base, unsigned Index, unsigned FieldIndex, MDNode *DbgInfo)
LLVM_ABI Value * createIsFPClass (Value *FPNum, unsigned Test)
LLVM_ABI CallInst * CreateAlignmentAssumption (const DataLayout &DL, Value *PtrValue, uint64_t Alignment, Value *OffsetValue=nullptr)
 Create an assume intrinsic call that represents an alignment assumption on the provided pointer.
LLVM_ABI CallInst * 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.
LLVM_ABI CallInst * CreateDereferenceableAssumption (Value *PtrValue, Value *SizeValue)
 Create an assume intrinsic call that represents a dereferencable assumption on the provided pointer.
LLVM_ABI CallInst * CreateNonnullAssumption (Value *PtrValue)
 Create an assume intrinsic call that represents a nonnull assumption on the provided pointer.
LLVM_ABI CallInst * CreateRangeAssumption (Value *Int, ConstantRange Range)

Protected Types

using InsertFn

Protected Member Functions

 IRBuilderBase (LLVMContext &context, const IRBuilderFolder &Folder, InsertFn InsertCB)

Protected Attributes

BasicBlock::iterator InsertPt
LLVMContext & Context
const IRBuilderFolder & Folder
InsertFn InsertCB
MDNode * DefaultFPMathTag = nullptr
FastMathFlags FMF
bool CanonicalizeGEPs = false
bool IsFPConstrained = false
fp::ExceptionBehavior DefaultConstrainedExcept = fp::ebStrict
RoundingMode DefaultConstrainedRounding = RoundingMode::Dynamic
ArrayRef< OperandBundleDef > DefaultOperandBundles

Detailed Description

Common base class shared among various IRBuilders.

Definition at line 111 of file IRBuilder.h.

Member Typedef Documentation

◆ InsertFn

Initial value:
void (*)(const IRBuilderBase &, Instruction *, const Twine &,
InstListType::iterator iterator
Instruction iterators...
Definition BasicBlock.h:170
IRBuilderBase(LLVMContext &context, const IRBuilderFolder &Folder, InsertFn InsertCB)
Definition IRBuilder.h:135
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82

Definition at line 117 of file IRBuilder.h.

◆ InsertPoint

InsertPoint - A saved insertion point.

Definition at line 254 of file IRBuilder.h.

Constructor & Destructor Documentation

◆ IRBuilderBase() [1/2]

◆ IRBuilderBase() [2/2]

llvm::IRBuilderBase::IRBuilderBase ( const IRBuilderBase & )
delete

References IRBuilderBase().

Member Function Documentation

◆ clearFastMathFlags()

void llvm::IRBuilderBase::clearFastMathFlags ( )
inline

Clear the fast-math flags.

Definition at line 283 of file IRBuilder.h.

References FMF.

◆ ClearInsertionPoint()

void llvm::IRBuilderBase::ClearInsertionPoint ( )
inline

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

Definition at line 172 of file IRBuilder.h.

References InsertPt.

Referenced by IRBuilderBase(), restoreIP(), and saveAndClearIP().

◆ CreateAdd()

◆ CreateAddReduce()

Value * IRBuilderBase::CreateAddReduce ( Value * Src)

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

Definition at line 457 of file IRBuilder.cpp.

◆ CreateAddrSpaceCast()

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

Definition at line 2321 of file IRBuilder.h.

References llvm::cast(), Folded, Folder, I, Insert(), and V.

Referenced by lowerKernelByValParam(), and simplifyInvariantGroupIntrinsic().

◆ 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 75 of file IRBuilder.cpp.

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

Referenced by CreateAggregateCast().

◆ CreateAggregateRet()

ReturnInst * llvm::IRBuilderBase::CreateAggregateRet ( ArrayRef< Value * > RetVals)
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 1201 of file IRBuilder.h.

References Context, llvm::ReturnInst::Create(), CreateInsertValue(), llvm::PoisonValue::get(), getCurrentFunctionReturnType(), Insert(), N, llvm::ArrayRef< T >::size(), and V.

◆ CreateAlignedLoad() [1/3]

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

Definition at line 1947 of file IRBuilder.h.

References DL, getDataLayout(), and Insert().

◆ CreateAlignedLoad() [2/3]

◆ CreateAlignedLoad() [3/3]

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

Definition at line 1942 of file IRBuilder.h.

References CreateAlignedLoad().

◆ CreateAlignedStore()

◆ CreateAlignmentAssumption() [1/2]

CallInst * IRBuilderBase::CreateAlignmentAssumption ( const DataLayout & DL,
Value * PtrValue,
uint64_t 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 1401 of file IRBuilder.cpp.

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

◆ 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 1412 of file IRBuilder.cpp.

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

◆ CreateAlloca() [1/2]

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

Definition at line 1883 of file IRBuilder.h.

References DL, getDataLayout(), and Insert().

Referenced by doPromotion(), and simplifyAllocaArraySize().

◆ CreateAlloca() [2/2]

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

Definition at line 1890 of file IRBuilder.h.

References DL, getDataLayout(), and Insert().

◆ CreateAllocationSize()

Value * IRBuilderBase::CreateAllocationSize ( Type * DestTy,
AllocaInst * AI )

Get allocation size of an alloca as a runtime Value* (handles both static and dynamic allocas and vscale factor).

Definition at line 218 of file IRBuilder.cpp.

References CreateMul(), CreateTypeSize(), CreateZExtOrTrunc(), DL, llvm::AllocaInst::getAllocationBaseSize(), llvm::AllocaInst::getArraySize(), getDataLayout(), llvm::AllocaInst::isArrayAllocation(), and llvm::Size.

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

References CreateAnd(), LHS, and RHS.

◆ CreateAnd() [3/4]

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

Definition at line 1579 of file IRBuilder.h.

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

◆ CreateAnd() [4/4]

◆ CreateAndReduce()

Value * IRBuilderBase::CreateAndReduce ( Value * Src)

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

Definition at line 465 of file IRBuilder.cpp.

◆ CreateArithmeticFence()

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

Create a call to the arithmetic_fence intrinsic.

Definition at line 1104 of file IRBuilder.h.

References CreateIntrinsic().

◆ CreateAShr() [1/3]

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

Definition at line 1559 of file IRBuilder.h.

References CreateAShr(), LHS, and RHS.

◆ CreateAShr() [2/3]

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

Definition at line 1564 of file IRBuilder.h.

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

◆ CreateAShr() [3/3]

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

◆ CreateAssumption() [1/2]

CallInst * IRBuilderBase::CreateAssumption ( ArrayRef< OperandBundleDef > OpBundles)

Create an assume intrinsic call that allows the optimizer to assume that the provided operand bundles hold.

Definition at line 572 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding(), getContext(), and llvm::ConstantInt::getTrue().

◆ CreateAssumption() [2/2]

CallInst * IRBuilderBase::CreateAssumption ( Value * Cond)

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

Definition at line 564 of file IRBuilder.cpp.

References assert(), Cond, CreateIntrinsicWithoutFolding(), and getInt1Ty().

Referenced by CreateDereferenceableAssumption(), CreateNonnullAssumption(), and CreateRangeAssumption().

◆ CreateAtomicCmpXchg()

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

Definition at line 1971 of file IRBuilder.h.

References DL, getDataLayout(), Insert(), and llvm::SyncScope::System.

◆ CreateAtomicRMW()

AtomicRMWInst * llvm::IRBuilderBase::CreateAtomicRMW ( AtomicRMWInst::BinOp Op,
Value * Ptr,
Value * Val,
MaybeAlign Align,
AtomicOrdering Ordering,
SyncScope::ID SSID = SyncScope::System,
bool Elementwise = false )
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

◆ CreateBinOpFMF()

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

◆ CreateBitCast()

◆ CreateBitExtract()

Value * llvm::IRBuilderBase::CreateBitExtract ( Type * Ty,
Value * Src,
Value * Offset,
const Twine & Name = "" )
inline

Definition at line 2819 of file IRBuilder.h.

References llvm::BitExtractInst::Create(), Folder, Insert(), llvm::Offset, and V.

◆ CreateBitInsert()

Value * llvm::IRBuilderBase::CreateBitInsert ( Value * Base,
Value * Val,
Value * Offset,
const Twine & Name = "" )
inline

◆ CreateBitOrPointerCast()

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

◆ CreateBitPreservingCastChain()

Value * IRBuilderBase::CreateBitPreservingCastChain ( const DataLayout & DL,
Value * V,
Type * NewTy )

Create a chain of casts to convert V to NewTy, preserving the bit pattern of V.

This may involve multiple casts (e.g., ptr -> i64 -> <2 x i32>). The created cast instructions are inserted into the current basic block. If no casts are needed, V is returned.

Definition at line 109 of file IRBuilder.cpp.

References assert(), llvm::cast(), CreateBitCast(), CreateExtractVector(), CreateInsertVector(), CreateIntToPtr(), CreatePtrToInt(), DL, llvm::PoisonValue::get(), getInt64(), llvm::Type::getPointerAddressSpace(), llvm::VectorType::getWithSizeAndScalar(), llvm::isa(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntOrIntVectorTy(), and llvm::Type::isPtrOrPtrVectorTy().

◆ CreateBr()

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

Create an unconditional 'br label X' instruction.

Definition at line 1209 of file IRBuilder.h.

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

Referenced by llvm::createSanitizerCtorAndInitFunctions(), llvm::orc::IRSpeculationLayer::emit(), foldMemChr(), and insertLoopExpansion().

◆ CreateCall() [1/8]

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

Definition at line 2688 of file IRBuilder.h.

References CreateCall().

◆ CreateCall() [2/8]

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

Definition at line 2695 of file IRBuilder.h.

References CreateCall().

◆ CreateCall() [3/8]

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

Definition at line 2681 of file IRBuilder.h.

References CreateCall().

◆ CreateCall() [4/8]

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

Definition at line 2675 of file IRBuilder.h.

◆ CreateCall() [5/8]

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

◆ CreateCall() [6/8]

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

◆ CreateCall() [7/8]

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

Definition at line 2645 of file IRBuilder.h.

References CreateCall(), and DefaultOperandBundles.

◆ CreateCall() [8/8]

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

References CreateCallBr().

◆ CreateCallBr() [2/4]

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

Definition at line 1310 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 1299 of file IRBuilder.h.

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

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

Referenced by CreateCallBr().

◆ CreateCast()

◆ CreateCatchPad()

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

Definition at line 1342 of file IRBuilder.h.

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

◆ CreateCatchRet()

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

Definition at line 1353 of file IRBuilder.h.

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

◆ CreateCatchSwitch()

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

Definition at line 1335 of file IRBuilder.h.

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

◆ CreateCleanupPad()

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

Definition at line 1347 of file IRBuilder.h.

◆ CreateCleanupRet()

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

Definition at line 1330 of file IRBuilder.h.

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

◆ CreateCmp()

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

Definition at line 2589 of file IRBuilder.h.

References CreateFCmp(), CreateICmp(), llvm::CmpInst::isFPPredicate(), LHS, Pred, and RHS.

◆ CreateCondBr() [1/2]

CondBrInst * 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 1224 of file IRBuilder.h.

References Cond, llvm::Instruction::copyMetadata(), llvm::CondBrInst::Create(), llvm::False, Insert(), and llvm::True.

◆ CreateCondBr() [2/2]

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

◆ 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

Definition at line 2035 of file IRBuilder.h.

References Context, CreateGEP(), llvm::Type::getInt32Ty(), and llvm::GEPNoWrapFlags::none().

Referenced by CreateStructGEP().

◆ 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 1110 of file IRBuilder.cpp.

References C(), CreateIntrinsicWithoutFolding(), 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 1021 of file IRBuilder.cpp.

References C(), CreateIntrinsicWithoutFolding(), FMF, llvm::FMFSource::get(), 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 1076 of file IRBuilder.h.

References LHS, and RHS.

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

References CreateIntrinsic(), and getInt1().

◆ CreateDereferenceableAssumption()

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

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

Definition at line 1421 of file IRBuilder.cpp.

References assert(), CreateAssumption(), llvm::Value::getType(), and llvm::isa().

◆ CreateDisjointOr()

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

Definition at line 1617 of file IRBuilder.h.

References CreateOr(), LHS, and RHS.

◆ 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 204 of file IRBuilder.cpp.

References CreateVScaleMultiple().

Referenced by instCombineSMECntsd(), 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 324 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, assert(), llvm::cast(), CreateIntrinsicWithoutFolding(), getInt32(), and llvm::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 421 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), CreateIntrinsicWithoutFolding(), llvm::Value::getContext(), getInt32(), llvm::Attribute::getWithAlignment(), llvm::Instruction::setAAMetadata(), and llvm::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 620 of file IRBuilder.h.

References CreateElementUnorderedAtomicMemSet(), getInt64(), llvm::Size, and uint64_t.

Referenced by CreateElementUnorderedAtomicMemSet().

◆ CreateElementUnorderedAtomicMemSet() [2/2]

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

◆ CreateExactBinOp()

Value * llvm::IRBuilderBase::CreateExactBinOp ( Instruction::BinaryOps Opc,
Value * LHS,
Value * RHS,
bool IsExact,
const Twine & Name = "" )
inline

◆ CreateExactSDiv()

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

Definition at line 1494 of file IRBuilder.h.

References CreateSDiv(), LHS, and RHS.

Referenced by CreatePtrDiff().

◆ CreateExactUDiv()

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

Definition at line 1481 of file IRBuilder.h.

References CreateUDiv(), LHS, and RHS.

◆ CreateExtractElement() [1/2]

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

Definition at line 2737 of file IRBuilder.h.

References CreateExtractElement(), getInt64(), and uint64_t.

◆ CreateExtractElement() [2/2]

◆ CreateExtractValue()

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

◆ CreateExtractVector() [1/2]

Value * 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 1119 of file IRBuilder.h.

References CreateExtractVector(), getInt64(), and uint64_t.

◆ CreateExtractVector() [2/2]

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

Create a call to the vector.extract intrinsic.

Definition at line 1111 of file IRBuilder.h.

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

Referenced by CreateBitPreservingCastChain(), CreateExtractVector(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateFAbs()

Value * llvm::IRBuilderBase::CreateFAbs ( Value * V,
FMFSource FMFSource = {},
const Twine & Name = "" )
inline

Create call to the fabs intrinsic.

Definition at line 1024 of file IRBuilder.h.

References V.

◆ CreateFAdd()

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

Definition at line 1635 of file IRBuilder.h.

References CreateFAddFMF().

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

◆ CreateFAddFMF()

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

◆ CreateFAddReduce()

Value * 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 447 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, and CreateIntrinsic().

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

References LHS, P, and RHS.

◆ CreateFCmpOEQ()

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

Definition at line 2495 of file IRBuilder.h.

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

◆ CreateFCmpOGE()

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

Definition at line 2505 of file IRBuilder.h.

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

◆ CreateFCmpOGT()

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

Definition at line 2500 of file IRBuilder.h.

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

◆ CreateFCmpOLE()

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

Definition at line 2515 of file IRBuilder.h.

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

◆ CreateFCmpOLT()

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

Definition at line 2510 of file IRBuilder.h.

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

◆ CreateFCmpONE()

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

Definition at line 2520 of file IRBuilder.h.

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

◆ CreateFCmpORD()

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

Definition at line 2525 of file IRBuilder.h.

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

◆ CreateFCmpS()

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

Definition at line 2599 of file IRBuilder.h.

References LHS, P, and RHS.

◆ CreateFCmpUEQ()

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

Definition at line 2535 of file IRBuilder.h.

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

◆ CreateFCmpUGE()

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

Definition at line 2545 of file IRBuilder.h.

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

◆ CreateFCmpUGT()

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

Definition at line 2540 of file IRBuilder.h.

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

◆ CreateFCmpULE()

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

Definition at line 2555 of file IRBuilder.h.

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

◆ CreateFCmpULT()

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

Definition at line 2550 of file IRBuilder.h.

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

◆ CreateFCmpUNE()

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

Definition at line 2560 of file IRBuilder.h.

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

◆ CreateFCmpUNO()

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

Definition at line 2530 of file IRBuilder.h.

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

◆ CreateFDiv()

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

Definition at line 1692 of file IRBuilder.h.

References CreateFDivFMF().

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

◆ CreateFDivFMF()

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

Definition at line 1697 of file IRBuilder.h.

References CreateConstrainedFPBinOp(), FMF, Folder, llvm::FMFSource::get(), I, Insert(), IsFPConstrained, and V.

Referenced by CreateFDiv().

◆ CreateFence()

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

Definition at line 1964 of file IRBuilder.h.

References Context, Insert(), and llvm::SyncScope::System.

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

◆ CreateFMul()

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

Definition at line 1673 of file IRBuilder.h.

References CreateFMulFMF().

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

◆ CreateFMulFMF()

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

◆ CreateFMulReduce()

Value * 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 452 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, and CreateIntrinsic().

◆ CreateFNeg()

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

Definition at line 1838 of file IRBuilder.h.

References CreateFNegFMF(), and V.

◆ CreateFNegFMF()

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

Definition at line 1843 of file IRBuilder.h.

References FMF, Folder, llvm::FMFSource::get(), Insert(), and V.

Referenced by CreateFNeg().

◆ CreateFPCast()

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

Definition at line 2417 of file IRBuilder.h.

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

◆ CreateFPExt()

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

Definition at line 2289 of file IRBuilder.h.

References CreateFPExtFMF(), and V.

◆ CreateFPExtFMF()

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

Definition at line 2294 of file IRBuilder.h.

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

Referenced by CreateFPExt().

◆ CreateFPMaximumNumReduce()

Value * IRBuilderBase::CreateFPMaximumNumReduce ( Value * Src)

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

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

Definition at line 505 of file IRBuilder.cpp.

◆ CreateFPMaximumReduce()

Value * 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 497 of file IRBuilder.cpp.

◆ CreateFPMaxReduce()

Value * IRBuilderBase::CreateFPMaxReduce ( Value * Src)

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

Definition at line 489 of file IRBuilder.cpp.

◆ CreateFPMinimumNumReduce()

Value * IRBuilderBase::CreateFPMinimumNumReduce ( Value * Src)

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

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

Definition at line 509 of file IRBuilder.cpp.

◆ CreateFPMinimumReduce()

Value * 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 501 of file IRBuilder.cpp.

◆ CreateFPMinReduce()

Value * IRBuilderBase::CreateFPMinReduce ( Value * Src)

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

Definition at line 493 of file IRBuilder.cpp.

◆ CreateFPToSI()

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

Definition at line 2247 of file IRBuilder.h.

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

◆ CreateFPToUI()

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

Definition at line 2240 of file IRBuilder.h.

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

◆ CreateFPTrunc()

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

Definition at line 2274 of file IRBuilder.h.

References CreateFPTruncFMF(), and V.

◆ CreateFPTruncFMF()

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

Definition at line 2279 of file IRBuilder.h.

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

Referenced by CreateFPTrunc().

◆ 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 402 of file IRBuilder.cpp.

References assert(), CreateCall(), llvm::dyn_cast(), F, llvm::FunctionCallee::getCallee(), getModule(), llvm::PointerType::getUnqual(), and llvm::Type::getVoidTy().

◆ CreateFreeze()

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

Definition at line 2808 of file IRBuilder.h.

References Insert(), and V.

Referenced by llvm::addDiffRuntimeChecks(), and buildPartialUnswitchConditionalBranch().

◆ CreateFRem()

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

Definition at line 1711 of file IRBuilder.h.

References CreateFRemFMF().

◆ CreateFRemFMF()

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

Definition at line 1716 of file IRBuilder.h.

References CreateConstrainedFPBinOp(), FMF, Folder, llvm::FMFSource::get(), I, Insert(), IsFPConstrained, and V.

Referenced by CreateFRem().

◆ CreateFSub()

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

Definition at line 1654 of file IRBuilder.h.

References CreateFSubFMF().

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

◆ CreateFSubFMF()

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

Definition at line 1659 of file IRBuilder.h.

References CreateConstrainedFPBinOp(), FMF, Folder, llvm::FMFSource::get(), I, Insert(), IsFPConstrained, and V.

Referenced by CreateFSub().

◆ 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 918 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding(), and llvm::Value::getType().

◆ 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 925 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding(), and llvm::Value::getType().

◆ 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 908 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding(), and getInt32().

◆ 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 899 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding().

◆ 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 830 of file IRBuilder.cpp.

References CreateGCStatepointCallCommon(), 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 810 of file IRBuilder.cpp.

References CreateGCStatepointCallCommon(), and llvm::None.

◆ 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 819 of file IRBuilder.cpp.

References CreateGCStatepointCallCommon().

◆ 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 888 of file IRBuilder.cpp.

References CreateGCStatepointInvokeCommon(), 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 866 of file IRBuilder.cpp.

References CreateGCStatepointInvokeCommon(), and llvm::None.

◆ 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 877 of file IRBuilder.cpp.

References CreateGCStatepointInvokeCommon().

◆ CreateGEP()

◆ 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 46 of file IRBuilder.cpp.

References Context, getInt8Ty(), getModule(), llvm::ConstantDataArray::getString(), llvm::Value::getType(), llvm::GlobalValue::Global, llvm::GlobalValue::NotThreadLocal, and llvm::GlobalValue::PrivateLinkage.

◆ CreateICmp()

◆ CreateICmpEQ()

◆ 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

Definition at line 2483 of file IRBuilder.h.

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

Referenced by llvm::AMDGPU::createSlowPathCmp().

◆ CreateICmpSGT()

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

Definition at line 2479 of file IRBuilder.h.

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

Referenced by CreateIsNotNeg(), and llvm::X86TTIImpl::instCombineIntrinsic().

◆ CreateICmpSLE()

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

Definition at line 2491 of file IRBuilder.h.

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

◆ CreateICmpSLT()

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

Definition at line 2487 of file IRBuilder.h.

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

Referenced by llvm::addRuntimeChecks(), CreateIsNeg(), and getBoundsCheckCond().

◆ CreateICmpUGE()

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

Definition at line 2467 of file IRBuilder.h.

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

◆ CreateICmpUGT()

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

Definition at line 2463 of file IRBuilder.h.

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

◆ CreateICmpULE()

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

Definition at line 2475 of file IRBuilder.h.

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

◆ CreateICmpULT()

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

◆ CreateInBoundsGEP()

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

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

References CreateInsertElement(), llvm::PoisonValue::get(), and uint64_t.

◆ CreateInsertElement() [2/4]

◆ CreateInsertElement() [3/4]

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

Definition at line 2759 of file IRBuilder.h.

References CreateInsertElement(), getInt64(), and uint64_t.

◆ CreateInsertElement() [4/4]

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

Definition at line 2752 of file IRBuilder.h.

References llvm::InsertElementInst::Create(), Folder, Insert(), and V.

◆ CreateInsertValue()

◆ CreateInsertVector() [1/2]

Value * 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 1133 of file IRBuilder.h.

References CreateInsertVector(), getInt64(), and uint64_t.

◆ CreateInsertVector() [2/2]

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

Create a call to the vector.insert intrinsic.

Definition at line 1125 of file IRBuilder.h.

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

Referenced by CreateBitPreservingCastChain(), CreateInsertVector(), instCombineSVEDupqLane(), and instCombineSVEUzp1().

◆ CreateIntCast() [1/2]

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

References DL, LLVM_ABI, and V.

◆ CreateIntCast() [2/2]

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

◆ CreateIntMaxReduce()

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

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

Definition at line 477 of file IRBuilder.cpp.

◆ CreateIntMinReduce()

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

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

Definition at line 483 of file IRBuilder.cpp.

◆ CreateIntrinsic() [1/3]

Value * IRBuilderBase::CreateIntrinsic ( Intrinsic::ID ID,
ArrayRef< Type * > OverloadTypes,
ArrayRef< Value * > Args,
FMFSource FMFSource = {},
const Twine & Name = "",
ArrayRef< OperandBundleDef > OpBundles = {},
function_ref< void(CallInst *)> SetFn = [](CallInst *) {} )

Variant to create a possibly constant-folded intrinsic.

An optional SetFn is called if the intrinsic doesn't fold, and can be used to set things like attributes.

Definition at line 977 of file IRBuilder.cpp.

References Context, CreateIntrinsicWithoutFolding(), FMF, Folder, llvm::FMFSource::get(), GetInsertBlock(), getParent(), llvm::FunctionType::getReturnType(), and llvm::Intrinsic::getType().

Referenced by addBoundsChecking(), llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateArithmeticFence(), CreateCountTrailingZeroElems(), CreateExtractVector(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateInsertVector(), createIsFPClass(), createPopcntIntrinsic(), CreateStepVector(), CreateStructuredGEP(), CreateVectorInterleave(), CreateVectorSpliceLeft(), CreateVectorSpliceRight(), CreateVScale(), foldCtpop(), foldCttzCtlz(), llvm::AMDGPU::genAMDGPUReportBlock(), llvm::memtag::getDarwinSlotPtr(), llvm::memtag::getFP(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::RISCVTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVEAnd(), instCombineSVECmpNE(), instCombineSVECondLast(), instCombineSVELast(), instCombineSVEOrr(), instCombineSVEPairwiseAddLong(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESrshl(), instCombineSVEUMin(), instCombineSVEUxt(), instCombineSVEVectorFuseMulAddSub(), instCombineWhilelo(), instCombineXorSVECmpCC(), instCombineZExtSVECmpNE(), lowerPtrAnnotation(), llvm::memtag::readRegister(), simplifySVEIntrinsicBinOp(), and tryCombineFromSVBoolBinOp().

◆ CreateIntrinsic() [2/3]

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

Variant to create a possibly constant-folded intrinsic.

An optional SetFn is called if the intrinsic doesn't fold, and can be used to set things like attributes.

Definition at line 1016 of file IRBuilder.h.

◆ CreateIntrinsic() [3/3]

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

Variant to create a possibly constant-folded intrinsic.

An optional SetFn is called if the intrinsic doesn't fold, and can be used to set things like attributes.

Definition at line 993 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding(), FMF, Folder, llvm::FMFSource::get(), GetInsertBlock(), and getParent().

◆ CreateIntrinsicWithoutFolding() [1/3]

CallInst * IRBuilderBase::CreateIntrinsicWithoutFolding ( Intrinsic::ID ID,
ArrayRef< Type * > OverloadTypes,
ArrayRef< Value * > Args,
FMFSource FMFSource = {},
const Twine & Name = "",
ArrayRef< OperandBundleDef > OpBundles = {} )

◆ CreateIntrinsicWithoutFolding() [2/3]

CallInst * llvm::IRBuilderBase::CreateIntrinsicWithoutFolding ( 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. It is guranteed not to fold.

Definition at line 988 of file IRBuilder.h.

◆ CreateIntrinsicWithoutFolding() [3/3]

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

Create a call to intrinsic ID with RetTy and Args.

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

Definition at line 966 of file IRBuilder.cpp.

References getModule(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::Value::getType(), and llvm::map_to_vector().

◆ CreateIntToPtr()

◆ 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 527 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, assert(), CreateIntrinsicWithoutFolding(), getInt64(), getInt64Ty(), llvm::Value::getType(), llvm::isa(), and llvm::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 1275 of file IRBuilder.h.

References CreateInvoke().

◆ CreateInvoke() [2/4]

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

Definition at line 1283 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 1253 of file IRBuilder.h.

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

Referenced by CreateInvoke().

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

◆ createIsFPClass()

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

Definition at line 1384 of file IRBuilder.cpp.

References CreateIntrinsic(), getInt32(), llvm::Value::getType(), and llvm::Test.

◆ CreateIsNeg()

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

Return a boolean value testing if Arg < 0.

Definition at line 2841 of file IRBuilder.h.

References CreateICmpSLT(), llvm::Constant::getNullValue(), and llvm::Value::getType().

◆ CreateIsNotNeg()

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

Return a boolean value testing if Arg > -1.

Definition at line 2846 of file IRBuilder.h.

References CreateICmpSGT(), llvm::Constant::getAllOnesValue(), and llvm::Value::getType().

◆ CreateIsNotNull()

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

Return a boolean value testing if Arg != 0.

Definition at line 2836 of file IRBuilder.h.

References CreateICmpNE(), llvm::Constant::getNullValue(), and llvm::Value::getType().

Referenced by llvm::AMDGPU::genAMDGPUReportBlock(), and llvm::AMDGPU::instrumentAddressImpl().

◆ CreateIsNull()

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

Return a boolean value testing if Arg == 0.

Definition at line 2831 of file IRBuilder.h.

References CreateICmpEQ(), llvm::Constant::getNullValue(), and llvm::Value::getType().

◆ CreateLandingPad()

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

Definition at line 2803 of file IRBuilder.h.

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

◆ 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 1200 of file IRBuilder.cpp.

References assert(), CreateCall(), llvm::Function::getFunctionType(), getModule(), llvm::Intrinsic::getOrInsertDeclaration(), llvm::FunctionType::getParamType(), llvm::Function::getReturnType(), llvm::Value::getType(), and llvm::isa().

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

◆ CreateLifetimeEnd()

CallInst * IRBuilderBase::CreateLifetimeEnd ( Value * Ptr)

Create a lifetime.end intrinsic.

Definition at line 520 of file IRBuilder.cpp.

References assert(), CreateIntrinsicWithoutFolding(), llvm::Value::getType(), and llvm::isa().

◆ CreateLifetimeStart()

CallInst * IRBuilderBase::CreateLifetimeStart ( Value * Ptr)

Create a lifetime.start intrinsic.

Definition at line 513 of file IRBuilder.cpp.

References assert(), CreateIntrinsicWithoutFolding(), llvm::Value::getType(), and llvm::isa().

Referenced by llvm::InlineFunctionImpl().

◆ CreateLoad() [1/4]

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

Definition at line 1917 of file IRBuilder.h.

References CreateAlignedLoad().

◆ CreateLoad() [2/4]

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

References CreateAlignedLoad().

Referenced by llvm::lowertypetests::cleanUpTypeCheckedLoad(), llvm::orc::IRSpeculationLayer::emit(), instCombineSVELD1(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), and replaceSwitchResumeCoroFree().

◆ CreateLoad() [3/4]

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

Definition at line 1922 of file IRBuilder.h.

References Insert().

◆ CreateLoad() [4/4]

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

Definition at line 1913 of file IRBuilder.h.

References CreateAlignedLoad().

◆ CreateLogicalAnd()

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

◆ CreateLogicalOp()

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

Definition at line 1784 of file IRBuilder.h.

References CreateLogicalAnd(), CreateLogicalOr(), llvm_unreachable, and Opc.

◆ 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 = "",
Instruction * MDFrom = nullptr )
inline

◆ CreateLShr() [1/3]

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

Definition at line 1540 of file IRBuilder.h.

References CreateLShr(), LHS, and RHS.

◆ CreateLShr() [2/3]

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

Definition at line 1545 of file IRBuilder.h.

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

◆ CreateLShr() [3/3]

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

◆ CreateMalloc() [1/2]

◆ CreateMalloc() [2/2]

CallInst * IRBuilderBase::CreateMalloc ( Type * IntPtrTy,
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 AllocSize, possibly multiplied by the array size if the array size is not constant 1.
  2. Call malloc with that argument.

Definition at line 394 of file IRBuilder.cpp.

References CreateMalloc(), and llvm::IntPtrTy.

◆ 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 734 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), llvm::Value::getContext(), llvm::Value::getType(), llvm::Attribute::getWithAlignment(), and llvm::Type::isVectorTy().

◆ 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 710 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), llvm::PoisonValue::get(), llvm::Value::getContext(), llvm::Value::getType(), and llvm::Attribute::getWithAlignment().

◆ 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 648 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), llvm::cast(), llvm::PoisonValue::get(), getAllOnesMask(), llvm::Value::getContext(), llvm::Value::getType(), and llvm::Attribute::getWithAlignment().

◆ 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 593 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), llvm::cast(), llvm::PoisonValue::get(), llvm::Value::getContext(), llvm::Value::getType(), and llvm::Attribute::getWithAlignment().

Referenced by instCombineLD1GatherIndex(), instCombineSVELD1(), and simplifyX86MaskedLoad().

◆ 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 681 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), llvm::cast(), llvm::Data, getAllOnesMask(), llvm::Value::getContext(), llvm::Value::getType(), and llvm::Attribute::getWithAlignment().

◆ 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 615 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::CallBase::addParamAttr(), assert(), llvm::cast(), llvm::Value::getContext(), llvm::Value::getType(), llvm::Attribute::getWithAlignment(), and llvm::Type::isVectorTy().

Referenced by instCombineST1ScatterIndex(), instCombineSVEST1(), and simplifyX86MaskedStore().

◆ CreateMaximum()

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

Create call to the maximum intrinsic.

Definition at line 1059 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, and RHS.

◆ CreateMaximumNum()

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

Create call to the maximum intrinsic.

Definition at line 1070 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, 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 1042 of file IRBuilder.h.

References LHS, and RHS.

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

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

References CreateMemCpy(), getInt64(), llvm::Size, and uint64_t.

Referenced by CreateMemCpy().

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

References CreateMemTransferInst(), and llvm::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 676 of file IRBuilder.h.

References CreateMemTransferInst(), and llvm::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 696 of file IRBuilder.h.

References CreateMemMove(), getInt64(), llvm::Size, and uint64_t.

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

References CreateMemTransferInst(), and llvm::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 599 of file IRBuilder.h.

References CreateMemSet(), getInt64(), llvm::Size, and uint64_t.

Referenced by CreateMemSet(), and lowerIntrinsicToFunction().

◆ CreateMemSet() [2/2]

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

◆ CreateMemSetInline()

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

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

References CreateBinaryIntrinsic(), LHS, and RHS.

◆ CreateMinimumNum()

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

Create call to the minimumnum intrinsic.

Definition at line 1064 of file IRBuilder.h.

References CreateBinaryIntrinsic(), LHS, 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 1030 of file IRBuilder.h.

References LHS, and RHS.

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

◆ CreateMul()

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

Definition at line 1455 of file IRBuilder.h.

References Folder, LHS, RHS, and V.

Referenced by CreateAllocationSize(), CreateMalloc(), CreateNSWMul(), CreateNUWMul(), and CreateScaledPtrAdd().

◆ CreateMulReduce()

Value * IRBuilderBase::CreateMulReduce ( Value * Src)

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

Definition at line 461 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 1055 of file IRBuilder.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, assert(), CreateBinOp(), CreateUnOp(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isUnaryOp(), llvm_unreachable, and Opc.

◆ CreateNeg()

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

Definition at line 1829 of file IRBuilder.h.

References CreateSub(), llvm::Constant::getNullValue(), and V.

Referenced by CreateNSWNeg().

◆ 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 579 of file IRBuilder.cpp.

References CreateIntrinsicWithoutFolding().

Referenced by CreateNoAliasScopeDeclaration().

◆ CreateNonnullAssumption()

CallInst * IRBuilderBase::CreateNonnullAssumption ( Value * PtrValue)

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

Definition at line 1430 of file IRBuilder.cpp.

References assert(), CreateAssumption(), llvm::Value::getType(), and llvm::isa().

◆ CreateNot()

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

◆ CreateNoWrapBinOp()

Value * llvm::IRBuilderBase::CreateNoWrapBinOp ( Instruction::BinaryOps Opc,
Value * LHS,
Value * RHS,
bool IsNUW,
bool IsNSW,
const Twine & Name = "" )
inline

◆ CreateNSWAdd()

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

Definition at line 1430 of file IRBuilder.h.

References CreateAdd(), LHS, and RHS.

◆ CreateNSWMul()

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

Definition at line 1464 of file IRBuilder.h.

References CreateMul(), LHS, and RHS.

◆ CreateNSWNeg()

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

Definition at line 1834 of file IRBuilder.h.

References CreateNeg(), and V.

◆ CreateNSWSub()

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

Definition at line 1447 of file IRBuilder.h.

References CreateSub(), LHS, and RHS.

◆ CreateNUWAdd()

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

Definition at line 1434 of file IRBuilder.h.

References CreateAdd(), LHS, and RHS.

◆ CreateNUWMul()

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

Definition at line 1468 of file IRBuilder.h.

References CreateMul(), LHS, and RHS.

◆ CreateNUWSub()

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

Definition at line 1451 of file IRBuilder.h.

References CreateSub(), LHS, and RHS.

◆ CreateOr() [1/4]

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

Definition at line 1609 of file IRBuilder.h.

References AbstractManglingParser< Derived, Alloc >::Ops, assert(), and CreateOr().

◆ CreateOr() [2/4]

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

Definition at line 1601 of file IRBuilder.h.

References CreateOr(), LHS, and RHS.

◆ CreateOr() [3/4]

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

Definition at line 1605 of file IRBuilder.h.

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

◆ CreateOr() [4/4]

◆ CreateOrReduce()

Value * IRBuilderBase::CreateOrReduce ( Value * Src)

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

Definition at line 469 of file IRBuilder.cpp.

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

◆ CreatePreserveStructAccessIndex()

◆ CreatePreserveUnionAccessIndex()

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

◆ CreatePtrAdd()

◆ CreatePtrAddWithSExtOrTrunc()

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

Create a ptradd where the offset is sign-extended or truncated to the index type.

Offset must match the vector-ness of the base pointer.

Definition at line 2130 of file IRBuilder.h.

References CreatePtrAdd(), CreateSExtOrTrunc(), getDataLayout(), llvm::DataLayout::getIndexType(), llvm::Value::getType(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.

Referenced by llvm::lowertypetests::cleanUpTypeCheckedLoad().

◆ CreatePtrAddWithSignedOffset()

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

Create a ptradd with a signed constant offset.

The offset must fit into the signed index type.

Definition at line 2120 of file IRBuilder.h.

References CreatePtrAdd(), getDataLayout(), llvm::DataLayout::getIndexType(), llvm::ConstantInt::getSigned(), llvm::Value::getType(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.

Referenced by constructPointer(), and createByteGEP().

◆ CreatePtrAddWithUnsignedOffset()

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

Create a ptradd with an unsigned constant offset.

The offset must fit into the unsigned index type.

Definition at line 2110 of file IRBuilder.h.

References CreatePtrAdd(), getDataLayout(), llvm::DataLayout::getIndexType(), llvm::Value::getType(), llvm::GEPNoWrapFlags::none(), llvm::Offset, and uint64_t.

◆ CreatePtrAddWithZExtOrTrunc()

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

Create a ptradd where the offset is zero-extended or truncated to the index type.

Offset must match the vector-ness of the base pointer.

Definition at line 2139 of file IRBuilder.h.

References CreatePtrAdd(), CreateZExtOrTrunc(), getDataLayout(), llvm::DataLayout::getIndexType(), llvm::Value::getType(), llvm::GEPNoWrapFlags::none(), and llvm::Offset.

◆ CreatePtrDiff() [1/2]

Value * IRBuilderBase::CreatePtrDiff ( Type * ElemTy,
Value * LHS,
Value * RHS,
const Twine & Name = "" )

Return the difference between two pointer values, dividing out the size of the pointed-to objects.

The returned value type is the address type of the pointers.

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 1189 of file IRBuilder.cpp.

References CreateExactSDiv(), CreatePtrDiff(), CreateTypeSize(), DL, getDataLayout(), llvm::TypeSize::getFixed(), and llvm::Value::getType().

◆ CreatePtrDiff() [2/2]

Value * IRBuilderBase::CreatePtrDiff ( Value * LHS,
Value * RHS,
const Twine & Name = "",
bool IsNUW = false )

Return the difference between two pointer values.

The returned value type is the address type of the pointers.

Definition at line 1181 of file IRBuilder.cpp.

References assert(), CreatePtrToAddr(), and CreateSub().

Referenced by CreatePtrDiff().

◆ CreatePtrToAddr()

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

Definition at line 2302 of file IRBuilder.h.

References CreateCast(), getDataLayout(), and V.

Referenced by CreatePtrDiff().

◆ CreatePtrToInt()

◆ CreateRangeAssumption()

CallInst * IRBuilderBase::CreateRangeAssumption ( Value * Int,
ConstantRange Range )

◆ CreateResume()

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

Definition at line 1326 of file IRBuilder.h.

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

◆ CreateRet()

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

Create a 'ret <val>' instruction.

Definition at line 1191 of file IRBuilder.h.

References Context, llvm::ReturnInst::Create(), Insert(), and V.

Referenced by lowerFunnelShifts(), and lowerIntrinsicToFunction().

◆ CreateRetVoid()

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

Create a 'ret void' instruction.

Definition at line 1186 of file IRBuilder.h.

References Context, llvm::ReturnInst::Create(), and Insert().

Referenced by llvm::lowerGlobalIFuncUsersAsGlobalCtor(), and lowerIntrinsicToFunction().

◆ CreateScaledPtrAdd() [1/2]

◆ CreateScaledPtrAdd() [2/2]

◆ CreateSDiv()

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

Definition at line 1485 of file IRBuilder.h.

References Folder, Insert(), LHS, RHS, and V.

Referenced by CreateExactSDiv().

◆ CreateSelect()

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

◆ CreateSelectFMF()

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

◆ CreateSelectFMFWithUnknownProfile()

Value * IRBuilderBase::CreateSelectFMFWithUnknownProfile ( Value * C,
Value * True,
Value * False,
FMFSource FMFSource,
StringRef PassName,
const Twine & Name = "" )

◆ CreateSelectWithUnknownProfile()

Value * IRBuilderBase::CreateSelectWithUnknownProfile ( Value * C,
Value * True,
Value * False,
StringRef PassName,
const Twine & Name = "" )

◆ CreateSExt()

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

Definition at line 2206 of file IRBuilder.h.

References CreateCast(), and V.

Referenced by CreateSExtOrTrunc().

◆ CreateSExtOrBitCast()

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

Definition at line 2341 of file IRBuilder.h.

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

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

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

Referenced by CreateGEP(), and CreatePtrAddWithSExtOrTrunc().

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

References CreateShl(), LHS, 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 1525 of file IRBuilder.h.

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

◆ CreateShl() [3/3]

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

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

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

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

References Folder, Insert(), V, and llvm::V1.

◆ CreateShuffleVector() [3/3]

◆ CreateSIToFP()

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

Definition at line 2266 of file IRBuilder.h.

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

◆ CreateSRem()

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

Definition at line 1504 of file IRBuilder.h.

References Folder, Insert(), LHS, RHS, and V.

◆ CreateStackRestore()

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

Create a call to llvm.stackrestore.

Definition at line 1147 of file IRBuilder.h.

References CreateIntrinsicWithoutFolding(), and llvm::Value::getType().

◆ CreateStackSave()

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

Create a call to llvm.stacksave.

Definition at line 1139 of file IRBuilder.h.

References Context, CreateIntrinsicWithoutFolding(), DL, and getDataLayout().

◆ CreateStepVector()

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

◆ CreateStore() [1/2]

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

◆ CreateStore() [2/2]

StoreInst * llvm::IRBuilderBase::CreateStore ( Value * Val,
Value * Ptr,
const LoadStoreInstProperties & Props )
inline

Definition at line 1932 of file IRBuilder.h.

References Insert().

◆ CreateStructGEP()

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

◆ CreateStructuredAlloca()

CallInst * llvm::IRBuilderBase::CreateStructuredAlloca ( Type * BaseType,
const Twine & Name = "" )
inline

◆ CreateStructuredGEP()

Value * llvm::IRBuilderBase::CreateStructuredGEP ( Type * BaseType,
Value * PtrBase,
ArrayRef< Value * > Indices,
const Twine & Name = "" )
inline

◆ CreateSub()

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

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

Referenced by foldMemChr().

◆ 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

◆ 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 211 of file IRBuilder.cpp.

References CreateVScaleMultiple(), and llvm::Size.

Referenced by CreateAllocationSize(), CreatePtrDiff(), getBoundsCheckCond(), llvm::AMDGPU::instrumentAddress(), unpackLoadToAggregate(), and unpackStoreToAggregate().

◆ CreateUDiv()

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

Definition at line 1472 of file IRBuilder.h.

References Folder, Insert(), LHS, RHS, and V.

Referenced by CreateExactUDiv(), and getRowFromCol().

◆ CreateUIToFP()

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

Definition at line 2254 of file IRBuilder.h.

References CreateCast(), CreateConstrainedFPCast(), llvm::dyn_cast(), I, IsFPConstrained, and V.

◆ CreateUnaryIntrinsic()

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

Create a call to intrinsic ID with 1 operand which is mangled on its type.

Definition at line 933 of file IRBuilder.cpp.

References FMF, Folder, llvm::FMFSource::get(), GetInsertBlock(), getModule(), llvm::Intrinsic::getOrInsertDeclaration(), getParent(), and llvm::Function::getReturnType().

Referenced by foldCtpop(), and foldFCmpWithFloorAndCeil().

◆ CreateUnOp()

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

Definition at line 1857 of file IRBuilder.h.

References CreateUnOpFMF(), Opc, and V.

Referenced by CreateNAryOp().

◆ CreateUnOpFMF()

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

Definition at line 1863 of file IRBuilder.h.

References llvm::UnaryOperator::Create(), FMF, Folder, llvm::FMFSource::get(), Insert(), llvm::isa(), Opc, and V.

Referenced by CreateUnOp().

◆ CreateUnreachable()

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

Definition at line 1357 of file IRBuilder.h.

References Context, and Insert().

Referenced by createMemMoveLoopUnknownSize(), and expandToSwitch().

◆ CreateURem()

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

Definition at line 1498 of file IRBuilder.h.

References Folder, Insert(), LHS, RHS, and V.

Referenced by lowerFunnelShifts().

◆ CreateVAArg()

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

Definition at line 2726 of file IRBuilder.h.

References Insert(), and llvm::List.

◆ CreateVectorInterleave()

◆ 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 1281 of file IRBuilder.cpp.

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

◆ CreateVectorSplat() [2/2]

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

◆ CreateVectorSpliceLeft() [1/2]

Value * llvm::IRBuilderBase::CreateVectorSpliceLeft ( Value * V1,
Value * V2,
uint32_t Offset,
const Twine & Name = "" )
inline

Definition at line 2880 of file IRBuilder.h.

References CreateVectorSpliceLeft(), getInt32(), llvm::Offset, and llvm::V1.

◆ CreateVectorSpliceLeft() [2/2]

Value * IRBuilderBase::CreateVectorSpliceLeft ( Value * V1,
Value * V2,
Value * Offset,
const Twine & Name = "" )

Create a vector.splice.left intrinsic call, or a shufflevector that produces the same result if the result type is a fixed-length vector and Offset is a constant.

Definition at line 1240 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), CreateShuffleVector(), llvm::dyn_cast(), getSpliceMask(), llvm::Value::getType(), llvm::isa(), llvm::Offset, and llvm::V1.

Referenced by CreateVectorSpliceLeft().

◆ CreateVectorSpliceRight() [1/2]

Value * llvm::IRBuilderBase::CreateVectorSpliceRight ( Value * V1,
Value * V2,
uint32_t Offset,
const Twine & Name = "" )
inline

Definition at line 2891 of file IRBuilder.h.

References CreateVectorSpliceRight(), getInt32(), llvm::Offset, and llvm::V1.

◆ CreateVectorSpliceRight() [2/2]

Value * IRBuilderBase::CreateVectorSpliceRight ( Value * V1,
Value * V2,
Value * Offset,
const Twine & Name = "" )

Create a vector.splice.right intrinsic call, or a shufflevector that produces the same result if the result type is a fixed-length vector and Offset is a constant.

Definition at line 1257 of file IRBuilder.cpp.

References assert(), CreateIntrinsic(), CreateShuffleVector(), llvm::dyn_cast(), getSpliceMask(), llvm::Value::getType(), llvm::isa(), llvm::Offset, and llvm::V1.

Referenced by CreateVectorSpliceRight().

◆ CreateVScale()

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

Create a call to llvm.vscale.<Ty>().

Definition at line 935 of file IRBuilder.h.

References CreateIntrinsic().

Referenced by CreateScaledPtrAdd().

◆ CreateXor() [1/3]

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

Definition at line 1627 of file IRBuilder.h.

References CreateXor(), LHS, and RHS.

◆ CreateXor() [2/3]

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

Definition at line 1631 of file IRBuilder.h.

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

◆ CreateXor() [3/3]

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

Definition at line 1621 of file IRBuilder.h.

References Folder, Insert(), LHS, RHS, and V.

Referenced by CreateNot(), CreateXor(), CreateXor(), and llvm::memtag::incrementThreadLong().

◆ CreateXorReduce()

Value * IRBuilderBase::CreateXorReduce ( Value * Src)

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

Definition at line 473 of file IRBuilder.cpp.

◆ CreateZExt()

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

Definition at line 2194 of file IRBuilder.h.

References Folded, Folder, I, Insert(), and V.

Referenced by CreateZExtOrTrunc(), foldCttzCtlz(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ CreateZExtOrBitCast()

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

Definition at line 2333 of file IRBuilder.h.

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

◆ CreateZExtOrTrunc()

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

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

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

Definition at line 2212 of file IRBuilder.h.

References assert(), CreateTrunc(), CreateZExt(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntOrIntVectorTy(), and V.

Referenced by CreateAllocationSize(), CreatePtrAddWithZExtOrTrunc(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ enableGEPCanonicalization()

void llvm::IRBuilderBase::enableGEPCanonicalization ( )
inline

Definition at line 348 of file IRBuilder.h.

References CanonicalizeGEPs.

◆ getAllOnesMask()

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

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

Definition at line 839 of file IRBuilder.h.

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

Referenced by CreateMaskedGather(), and CreateMaskedScatter().

◆ getBFloatTy()

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

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

Definition at line 548 of file IRBuilder.h.

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

◆ getByte128Ty()

ByteType * llvm::IRBuilderBase::getByte128Ty ( )
inline

Fetch the type representing a 128-bit byte.

Definition at line 504 of file IRBuilder.h.

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

◆ getByte16Ty()

ByteType * llvm::IRBuilderBase::getByte16Ty ( )
inline

Fetch the type representing a 16-bit byte.

Definition at line 495 of file IRBuilder.h.

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

◆ getByte32Ty()

ByteType * llvm::IRBuilderBase::getByte32Ty ( )
inline

Fetch the type representing a 32-bit byte.

Definition at line 498 of file IRBuilder.h.

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

◆ getByte64Ty()

ByteType * llvm::IRBuilderBase::getByte64Ty ( )
inline

Fetch the type representing a 64-bit byte.

Definition at line 501 of file IRBuilder.h.

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

◆ getByte8Ty()

ByteType * llvm::IRBuilderBase::getByte8Ty ( )
inline

Fetch the type representing an 8-bit byte.

Definition at line 492 of file IRBuilder.h.

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

◆ getByteNTy()

ByteType * llvm::IRBuilderBase::getByteNTy ( unsigned N)
inline

Fetch the type representing an N-bit byte.

Definition at line 507 of file IRBuilder.h.

References Context, llvm::Type::getByteNTy(), and N.

◆ getBytePtrTy()

ByteType * llvm::IRBuilderBase::getBytePtrTy ( const DataLayout & DL,
unsigned AddrSpace = 0 )
inline

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

Definition at line 574 of file IRBuilder.h.

References Context, and DL.

◆ getContext()

◆ getCurrentDebugLocation()

DebugLoc IRBuilderBase::getCurrentDebugLocation ( ) const

Get location information used by debugging information.

Definition at line 67 of file IRBuilder.cpp.

Referenced by llvm::InstrumentationIRBuilder::ensureDebugInfo(), and llvm::IRBuilderBase::InsertPointGuard::InsertPointGuard().

◆ getCurrentFunctionReturnType()

Type * IRBuilderBase::getCurrentFunctionReturnType ( ) const

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

Definition at line 61 of file IRBuilder.cpp.

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

Referenced by CreateAggregateRet().

◆ getDataLayout()

◆ getDefaultConstrainedExcept()

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

Get the exception handling used with constrained floating point.

Definition at line 321 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 326 of file IRBuilder.h.

References DefaultConstrainedRounding.

◆ getDefaultFPMathTag()

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

Get the floating point math metadata being used.

Definition at line 275 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 558 of file IRBuilder.h.

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

Referenced by instCombineSVECondLast().

◆ getFalse()

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

Get the constant value for i1 false.

Definition at line 453 of file IRBuilder.h.

References Context, and llvm::ConstantInt::getFalse().

Referenced by foldCtpop(), and foldCttzCtlz().

◆ getFastMathFlags() [1/2]

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

Definition at line 280 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 278 of file IRBuilder.h.

References FMF.

◆ getFloatTy()

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

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

Definition at line 553 of file IRBuilder.h.

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

Referenced by instCombineSVECondLast().

◆ getHalfTy()

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

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

Definition at line 543 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 586 of file IRBuilder.h.

References Context, and DL.

◆ GetInsertBlock()

◆ GetInsertPoint()

◆ getInt()

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

Get a constant integer value.

Definition at line 483 of file IRBuilder.h.

References Context.

Referenced by canonicalizeGEPOfConstGEPI8(), combineConstantOffsets(), CreateRangeAssumption(), lowerFunnelShifts(), and transformToIndexedCompare().

◆ getInt1()

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

Get a constant value representing either true or false.

Definition at line 443 of file IRBuilder.h.

References getInt1Ty(), and V.

Referenced by CreateCountTrailingZeroElems(), createFFSIntrinsic(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), and llvm::GCNTTIImpl::instCombineIntrinsic().

◆ getInt128Ty()

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

Fetch the type representing a 128-bit integer.

Definition at line 535 of file IRBuilder.h.

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

◆ getInt16()

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

Get a constant 16-bit value.

Definition at line 463 of file IRBuilder.h.

References C(), and getInt16Ty().

Referenced by getRowFromCol().

◆ getInt16Ty()

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

Fetch the type representing a 16-bit integer.

Definition at line 520 of file IRBuilder.h.

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

Referenced by getInt16().

◆ getInt1Ty()

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

Fetch the type representing a single bit.

Definition at line 510 of file IRBuilder.h.

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

Referenced by addBoundsChecking(), CreateAssumption(), getInt1(), and llvm::X86TTIImpl::instCombineIntrinsic().

◆ getInt32()

◆ getInt32Ty()

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

Fetch the type representing a 32-bit integer.

Definition at line 525 of file IRBuilder.h.

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

Referenced by appendToGlobalArray(), getInt32(), instCombineSVEDupqLane(), and instCombineSVESDIV().

◆ getInt64()

◆ getInt64Ty()

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

Fetch the type representing a 64-bit integer.

Definition at line 530 of file IRBuilder.h.

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

Referenced by CreateAlignmentAssumption(), CreateInvariantStart(), llvm::AMDGPU::genAMDGPUReportBlock(), and getInt64().

◆ getInt8()

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

Get a constant 8-bit value.

Definition at line 458 of file IRBuilder.h.

References C(), and getInt8Ty().

◆ getInt8Ty()

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

◆ getIntN()

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

Get a constant N-bit value, zero extended from a 64-bit value.

Definition at line 478 of file IRBuilder.h.

References C(), getIntNTy(), N, and uint64_t.

Referenced by getAddrSizeInt().

◆ getIntNTy()

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

Fetch the type representing an N-bit integer.

Definition at line 538 of file IRBuilder.h.

References Context, llvm::Type::getIntNTy(), and N.

Referenced by getAddrIntType(), getIntN(), llvm::GCNTTIImpl::instCombineIntrinsic(), and instCombineSVEDupqLane().

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

References Context, and DL.

Referenced by 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 298 of file IRBuilder.h.

References IsFPConstrained.

◆ getModule()

◆ getPtrTy()

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

◆ getTrue()

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

Get the constant value for i1 true.

Definition at line 448 of file IRBuilder.h.

References Context, and llvm::ConstantInt::getTrue().

Referenced by foldCttzCtlz(), and llvm::ARMTTIImpl::instCombineIntrinsic().

◆ getVoidTy()

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

Fetch the type representing void.

Definition at line 563 of file IRBuilder.h.

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

Referenced by llvm::createSanitizerCtorAndInitFunctions(), and llvm::AMDGPU::generateCrashCode().

◆ Insert() [1/3]

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

No-op overload to handle constants.

Definition at line 155 of file IRBuilder.h.

References C().

◆ Insert() [2/3]

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

◆ Insert() [3/3]

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

Definition at line 159 of file IRBuilder.h.

References assert(), llvm::dyn_cast(), I, Insert(), llvm::isa(), and V.

◆ restoreIP()

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

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

Definition at line 267 of file IRBuilder.h.

References ClearInsertionPoint(), and SetInsertPoint().

Referenced by emitTargetCall().

◆ saveAndClearIP()

InsertPoint llvm::IRBuilderBase::saveAndClearIP ( )
inline

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

Definition at line 260 of file IRBuilder.h.

References ClearInsertionPoint(), and GetInsertPoint().

◆ saveIP()

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

Returns the current insert point.

Definition at line 257 of file IRBuilder.h.

References GetInsertPoint().

Referenced by emitTargetCall().

◆ setConstrainedFPCallAttr()

◆ setConstrainedFPFunctionAttr()

void llvm::IRBuilderBase::setConstrainedFPFunctionAttr ( )
inline

Definition at line 330 of file IRBuilder.h.

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

◆ SetCurrentDebugLocation() [1/2]

◆ SetCurrentDebugLocation() [2/2]

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

Set location information used by debugging information.

Definition at line 236 of file IRBuilder.h.

◆ setDefaultConstrainedExcept()

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

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

Definition at line 301 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 311 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 286 of file IRBuilder.h.

References DefaultFPMathTag.

◆ setDefaultOperandBundles()

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

Definition at line 344 of file IRBuilder.h.

References DefaultOperandBundles.

◆ setFastMathFlags()

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

Set the fast-math flags to be used with generated fp-math operators.

Definition at line 289 of file IRBuilder.h.

References FMF.

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

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

Referenced by createMemMoveLoopKnownSize(), llvm::createSanitizerCtorAndInitFunctions(), llvm::orc::IRSpeculationLayer::emit(), foldMemChr(), freelyInvert(), llvm::AMDGPU::genAMDGPUReportBlock(), llvm::AMDGPU::generateCrashCode(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEPairwiseAddLong(), instCombineXorSVECmpCC(), instCombineZExtSVECmpNE(), llvm::AMDGPU::instrumentAddress(), llvm::AMDGPU::instrumentAddressImpl(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), llvm::IRBuilder< TargetFolder, IRBuilderCallbackInserter >::IRBuilder(), lowerPtrAnnotation(), mergeConditionalStoreToAddress(), performBranchToCommonDestFolding(), processPhiNode(), processUGT_ADDCST_ADD(), processUZExtIdiom(), restoreIP(), SetInsertPoint(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifyShiftSelectingPackedElement(), simplifyUsingControlFlow(), simplifyValueKnownNonZero(), llvm::SplitBlockAndInsertForEachLane(), and llvm::SplitBlockAndInsertForEachLane().

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

References SetInsertPoint().

◆ SetInsertPoint() [3/4]

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

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

Definition at line 215 of file IRBuilder.h.

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

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

References F, 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 68 of file IRBuilder.cpp.

References I.

Referenced by Insert().

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

References IsFPConstrained.

Member Data Documentation

◆ CanonicalizeGEPs

bool llvm::IRBuilderBase::CanonicalizeGEPs = false
protected

Definition at line 128 of file IRBuilder.h.

Referenced by CreateGEP(), and enableGEPCanonicalization().

◆ Context

◆ DefaultConstrainedExcept

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

Definition at line 130 of file IRBuilder.h.

Referenced by getDefaultConstrainedExcept(), and setDefaultConstrainedExcept().

◆ DefaultConstrainedRounding

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

Definition at line 131 of file IRBuilder.h.

Referenced by getDefaultConstrainedRounding(), and setDefaultConstrainedRounding().

◆ DefaultFPMathTag

MDNode* llvm::IRBuilderBase::DefaultFPMathTag = nullptr
protected

◆ DefaultOperandBundles

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

Definition at line 133 of file IRBuilder.h.

Referenced by CreateCall(), and setDefaultOperandBundles().

◆ FMF

◆ Folder

◆ InsertCB

InsertFn llvm::IRBuilderBase::InsertCB
protected

Definition at line 123 of file IRBuilder.h.

Referenced by Insert(), and IRBuilderBase().

◆ InsertPt

◆ IsFPConstrained


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