LLVM 19.0.0git
|
Common base class shared among various IRBuilders. More...
#include "llvm/IR/IRBuilder.h"
Classes | |
class | FastMathFlagGuard |
class | InsertPoint |
InsertPoint - A saved insertion point. More... | |
class | InsertPointGuard |
class | OperandBundlesGuard |
Public Member Functions | |
IRBuilderBase (LLVMContext &context, const IRBuilderFolder &Folder, const IRBuilderDefaultInserter &Inserter, MDNode *FPMathTag, ArrayRef< OperandBundleDef > OpBundles) | |
template<typename InstTy > | |
InstTy * | Insert (InstTy *I, const Twine &Name="") const |
Insert and return the specified instruction. | |
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 |
void | SetInsertPoint (BasicBlock *TheBB) |
This specifies that created instructions should be appended to the end of the specified block. | |
void | SetInsertPoint (Instruction *I) |
This specifies that created instructions should be inserted before the specified instruction. | |
void | SetInsertPoint (BasicBlock *TheBB, BasicBlock::iterator IP) |
This specifies that created instructions should be inserted at the specified point. | |
void | SetInsertPoint (BasicBlock::iterator IP) |
This specifies that created instructions should be inserted at the specified point, but also requires that IP is dereferencable. | |
void | SetInsertPointPastAllocas (Function *F) |
This specifies that created instructions should inserted at the beginning end of the specified function, but after already existing static alloca instructions that are at the start. | |
void | SetCurrentDebugLocation (DebugLoc L) |
Set location information used by debugging information. | |
void | SetNoSanitizeMetadata () |
Set nosanitize metadata. | |
void | CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds) |
Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions. | |
DebugLoc | getCurrentDebugLocation () const |
Get location information used by debugging information. | |
void | SetInstDebugLocation (Instruction *I) const |
If this builder has a current debug location, set it on the specified instruction. | |
void | AddMetadataToInst (Instruction *I) const |
Add all entries in MetadataToCopy to I . | |
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) |
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 or truncated from a 64-bit value. | |
ConstantInt * | getInt (const APInt &AI) |
Get a constant integer value. | |
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. | |
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, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
Create and insert a memset to the specified pointer and the specified value. | |
CallInst * | CreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val, Value *Size, bool IsVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, uint64_t Size, Align Alignment, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value. | |
CallInst * | CreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, ArrayRef< OperandBundleDef > OpB, Function *MallocF=nullptr, const Twine &Name="") |
CallInst * | CreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize, Value *ArraySize, Function *MallocF=nullptr, const Twine &Name="") |
CreateMalloc - Generate the IR for a call to malloc: | |
CallInst * | CreateFree (Value *Source, ArrayRef< OperandBundleDef > Bundles=std::nullopt) |
Generate the IR for a call to the builtin free function. | |
CallInst * | CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size, Align Alignment, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
Create and insert a memcpy between the specified pointers. | |
CallInst * | CreateMemTransferInst (Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateElementUnorderedAtomicMemCpy (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
Create and insert an element unordered-atomic memcpy between the specified pointers. | |
CallInst * | CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, uint64_t Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src, MaybeAlign SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
CallInst * | CreateElementUnorderedAtomicMemMove (Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
Create and insert an element unordered-atomic memmove between the specified pointers. | |
CallInst * | CreateFAddReduce (Value *Acc, Value *Src) |
Create a sequential vector fadd reduction intrinsic of the source vector. | |
CallInst * | CreateFMulReduce (Value *Acc, Value *Src) |
Create a sequential vector fmul reduction intrinsic of the source vector. | |
CallInst * | CreateAddReduce (Value *Src) |
Create a vector int add reduction intrinsic of the source vector. | |
CallInst * | CreateMulReduce (Value *Src) |
Create a vector int mul reduction intrinsic of the source vector. | |
CallInst * | CreateAndReduce (Value *Src) |
Create a vector int AND reduction intrinsic of the source vector. | |
CallInst * | CreateOrReduce (Value *Src) |
Create a vector int OR reduction intrinsic of the source vector. | |
CallInst * | CreateXorReduce (Value *Src) |
Create a vector int XOR reduction intrinsic of the source vector. | |
CallInst * | CreateIntMaxReduce (Value *Src, bool IsSigned=false) |
Create a vector integer max reduction intrinsic of the source vector. | |
CallInst * | CreateIntMinReduce (Value *Src, bool IsSigned=false) |
Create a vector integer min reduction intrinsic of the source vector. | |
CallInst * | CreateFPMaxReduce (Value *Src) |
Create a vector float max reduction intrinsic of the source vector. | |
CallInst * | CreateFPMinReduce (Value *Src) |
Create a vector float min reduction intrinsic of the source vector. | |
CallInst * | CreateFPMaximumReduce (Value *Src) |
Create a vector float maximum reduction intrinsic of the source vector. | |
CallInst * | CreateFPMinimumReduce (Value *Src) |
Create a vector float minimum reduction intrinsic of the source vector. | |
CallInst * | CreateLifetimeStart (Value *Ptr, ConstantInt *Size=nullptr) |
Create a lifetime.start intrinsic. | |
CallInst * | CreateLifetimeEnd (Value *Ptr, ConstantInt *Size=nullptr) |
Create a lifetime.end intrinsic. | |
CallInst * | CreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr) |
Create a call to invariant.start intrinsic. | |
CallInst * | CreateThreadLocalAddress (Value *Ptr) |
Create a call to llvm.threadlocal.address intrinsic. | |
CallInst * | CreateMaskedLoad (Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="") |
Create a call to Masked Load intrinsic. | |
CallInst * | CreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask) |
Create a call to Masked Store intrinsic. | |
CallInst * | CreateMaskedGather (Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="") |
Create a call to Masked Gather intrinsic. | |
CallInst * | CreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr) |
Create a call to Masked Scatter intrinsic. | |
CallInst * | CreateMaskedExpandLoad (Type *Ty, Value *Ptr, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="") |
Create a call to Masked Expand Load intrinsic. | |
CallInst * | CreateMaskedCompressStore (Value *Val, Value *Ptr, 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. | |
CallInst * | CreateAssumption (Value *Cond, ArrayRef< OperandBundleDef > OpBundles=std::nullopt) |
Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true. | |
Instruction * | CreateNoAliasScopeDeclaration (Value *Scope) |
Create a llvm.experimental.noalias.scope.decl intrinsic call. | |
Instruction * | CreateNoAliasScopeDeclaration (MDNode *ScopeTag) |
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. | |
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. | |
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. | |
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. | |
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. | |
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="") |
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. | |
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. | |
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. | |
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 (Constant *Scaling, const Twine &Name="") |
Create a call to llvm.vscale, multiplied by Scaling . | |
Value * | CreateElementCount (Type *DstType, ElementCount EC) |
Create an expression which evaluates to the number of elements in EC at runtime. | |
Value * | CreateTypeSize (Type *DstType, TypeSize Size) |
Create an expression which evaluates to the number of units in Size at runtime. | |
Value * | CreateStepVector (Type *DstType, const Twine &Name="") |
Creates a vector of type DstType with the linear sequence <0, 1, ...> | |
CallInst * | CreateUnaryIntrinsic (Intrinsic::ID ID, Value *V, Instruction *FMFSource=nullptr, const Twine &Name="") |
Create a call to intrinsic ID with 1 operand which is mangled on its type. | |
Value * | CreateBinaryIntrinsic (Intrinsic::ID ID, Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="") |
Create a call to intrinsic ID with 2 operands which is mangled on the first type. | |
CallInst * | CreateIntrinsic (Intrinsic::ID ID, ArrayRef< Type * > Types, ArrayRef< Value * > Args, Instruction *FMFSource=nullptr, const Twine &Name="") |
Create a call to intrinsic ID with Args , mangled using Types . | |
CallInst * | CreateIntrinsic (Type *RetTy, Intrinsic::ID ID, ArrayRef< Value * > Args, Instruction *FMFSource=nullptr, const Twine &Name="") |
Create a call to intrinsic ID with RetTy and Args . | |
Value * | CreateMinNum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the minnum intrinsic. | |
Value * | CreateMaxNum (Value *LHS, Value *RHS, 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 * | CreateCopySign (Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="") |
Create call to the copysign intrinsic. | |
CallInst * | CreateArithmeticFence (Value *Val, Type *DstType, const Twine &Name="") |
Create a call to the arithmetic_fence intrinsic. | |
CallInst * | CreateExtractVector (Type *DstType, Value *SrcVec, Value *Idx, const Twine &Name="") |
Create a call to the vector.extract intrinsic. | |
CallInst * | CreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="") |
Create a call to the vector.insert 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. | |
ReturnInst * | CreateRetVoid () |
Create a 'ret void' instruction. | |
ReturnInst * | CreateRet (Value *V) |
Create a 'ret <val>' instruction. | |
ReturnInst * | CreateAggregateRet (Value *const *retVals, unsigned N) |
Create a sequence of N insertvalue instructions, with one Value from the retVals array each, that build a aggregate return value one value at a time, and a ret instruction to return the resulting aggregate value. | |
BranchInst * | CreateBr (BasicBlock *Dest) |
Create an unconditional 'br label X' instruction. | |
BranchInst * | CreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr) |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction. | |
BranchInst * | 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=std::nullopt, 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=std::nullopt, const Twine &Name="") |
CallBrInst * | CreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args=std::nullopt, 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=std::nullopt, 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=std::nullopt, 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="") |
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 * | 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, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateFSub (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr) |
Value * | CreateFSubFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateFMul (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr) |
Value * | CreateFMulFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateFDiv (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr) |
Value * | CreateFDivFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateFRem (Value *L, Value *R, const Twine &Name="", MDNode *FPMD=nullptr) |
Value * | CreateFRemFMF (Value *L, Value *R, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
Value * | CreateLogicalAnd (Value *Cond1, Value *Cond2, const Twine &Name="") |
Value * | CreateLogicalOr (Value *Cond1, Value *Cond2, const Twine &Name="") |
Value * | CreateLogicalOp (Instruction::BinaryOps Opc, Value *Cond1, Value *Cond2, const Twine &Name="") |
Value * | CreateLogicalOr (ArrayRef< Value * > Ops) |
CallInst * | CreateConstrainedFPBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt) |
CallInst * | CreateConstrainedFPUnroundedBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, 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, Instruction *FMFSource, const Twine &Name="") |
Copy fast-math-flags from an instruction rather than using the builder's default FMF. | |
Value * | CreateNot (Value *V, const Twine &Name="") |
Value * | CreateUnOp (Instruction::UnaryOps Opc, Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr) |
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="") |
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="") |
StoreInst * | CreateStore (Value *Val, Value *Ptr, bool isVolatile=false) |
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) |
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="") |
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="") |
Constant * | CreateGlobalStringPtr (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr, bool AddNull=true) |
Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8. | |
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) |
Value * | CreateSIToFP (Value *V, Type *DestTy, const Twine &Name="") |
Value * | CreateFPTrunc (Value *V, Type *DestTy, const Twine &Name="") |
Value * | CreateFPExt (Value *V, Type *DestTy, 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="") |
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="") |
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="") |
CallInst * | CreateConstrainedFPCast (Intrinsic::ID ID, Value *V, Type *DestTy, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt) |
Value * | CreateIntCast (Value *, Type *, const char *)=delete |
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 * | 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) |
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=std::nullopt, 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 (FunctionCallee Callee, ArrayRef< Value * > Args=std::nullopt, const Twine &Name="", MDNode *FPMathTag=nullptr) |
CallInst * | CreateCall (FunctionCallee Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr) |
CallInst * | CreateConstrainedFPCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", std::optional< RoundingMode > Rounding=std::nullopt, std::optional< fp::ExceptionBehavior > Except=std::nullopt) |
Value * | CreateSelect (Value *C, Value *True, Value *False, 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. | |
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 * | 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. | |
Value * | CreatePtrDiff (Type *ElemTy, Value *LHS, Value *RHS, const Twine &Name="") |
Return the i64 difference between two pointer values, dividing out the size of the pointed-to objects. | |
Value * | CreateLaunderInvariantGroup (Value *Ptr) |
Create a launder.invariant.group intrinsic call. | |
Value * | CreateStripInvariantGroup (Value *Ptr) |
Create a strip.invariant.group intrinsic call. | |
Value * | CreateVectorReverse (Value *V, const Twine &Name="") |
Return a vector value that contains the vector V reversed. | |
Value * | CreateVectorSplice (Value *V1, Value *V2, int64_t Imm, const Twine &Name="") |
Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector. | |
Value * | CreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="") |
Return a vector value that contains. | |
Value * | CreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="") |
Return a vector value that contains. | |
Value * | CreatePreserveArrayAccessIndex (Type *ElTy, Value *Base, unsigned Dimension, unsigned LastIndex, MDNode *DbgInfo) |
Value * | CreatePreserveUnionAccessIndex (Value *Base, unsigned FieldIndex, MDNode *DbgInfo) |
Value * | CreatePreserveStructAccessIndex (Type *ElTy, Value *Base, unsigned Index, unsigned FieldIndex, MDNode *DbgInfo) |
Value * | createIsFPClass (Value *FPNum, unsigned Test) |
CallInst * | CreateAlignmentAssumption (const DataLayout &DL, Value *PtrValue, unsigned Alignment, Value *OffsetValue=nullptr) |
Create an assume intrinsic call that represents an alignment assumption on the provided pointer. | |
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. | |
Common base class shared among various IRBuilders.
Definition at line 92 of file IRBuilder.h.
|
inline |
Definition at line 133 of file IRBuilder.h.
References ClearInsertionPoint().
|
inline |
Add all entries in MetadataToCopy to I
.
Definition at line 245 of file IRBuilder.h.
References I.
Referenced by Insert().
|
inline |
Clear the fast-math flags.
Definition at line 303 of file IRBuilder.h.
References llvm::FastMathFlags::clear(), and FMF.
|
inline |
Clear the insertion point: created instructions will not be inserted into a block.
Definition at line 167 of file IRBuilder.h.
Referenced by llvm::SCEVExpander::clearInsertPoint(), llvm::OpenMPIRBuilder::emitBranch(), IRBuilderBase(), llvm::Negator::Negate(), restoreIP(), and saveAndClearIP().
|
inline |
Collect metadata with IDs MetadataKinds
from Src
which should be added to all created instructions.
Entries present in MedataDataToCopy but not on Src
will be dropped from MetadataToCopy.
Definition at line 231 of file IRBuilder.h.
Referenced by performBranchToCommonDestFolding(), and llvm::InstCombinerImpl::run().
|
inline |
Definition at line 1325 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), callBufferedPrintfStart(), CheckAndCreateOffsetAdd(), CloneLoopBlocks(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createFakeIntVal(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateNSWAdd(), CreateNUWAdd(), llvm::emitGEPOffset(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandFPToI(), expandIToFP(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpSubConstant(), foldICmpUSubSatOrUAddSatWithConstant(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldMulShl1(), foldNoWrapAdd(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldSquareSumInt(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), getStepVector(), getStrlenWithNull(), hoistSub(), insertSpills(), LowerCTPOP(), matchStridedStart(), promoteAllocaUserToVector(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyX86pmadd(), llvm::SplitBlockAndInsertSimpleForLoop(), takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), llvm::UpgradeIntrinsicCall(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::ObjectSizeOffsetEvaluator::visitGEPOperator(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitURem().
Create a vector int add reduction intrinsic of the source vector.
Definition at line 433 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 2130 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::expandMemMoveAsLoop(), insertSpills(), lowerKernelArguments(), and simplifyInvariantGroupIntrinsic().
|
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 1104 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), CreateInsertValue(), llvm::PoisonValue::get(), getCurrentFunctionReturnType(), Insert(), and N.
|
inline |
Definition at line 1815 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), Name, and Ptr.
|
inline |
Definition at line 1805 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
Referenced by llvm::InstCombinerImpl::combineLoadToNewType(), CreateAlignedLoad(), CreateLoad(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), doPromotion(), foldConsecutiveLoads(), insertSpills(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), lowerKernelArguments(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::needToDelay(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), simplifyNeonVld1(), unpackLoadToAggregate(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 1810 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
|
inline |
Definition at line 1824 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), llvm::Value::getType(), Insert(), and Ptr.
Referenced by combineStoreToNewValue(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateStore(), doPromotion(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitTargetKernel(), insertSpills(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), scalarizeMaskedCompressStore(), scalarizeMaskedScatter(), scalarizeMaskedStore(), splitMergedValStore(), unpackStoreToAggregate(), llvm::UpgradeIntrinsicCall(), upgradeMaskedStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
CallInst * IRBuilderBase::CreateAlignmentAssumption | ( | const DataLayout & | DL, |
Value * | PtrValue, | ||
unsigned | Alignment, | ||
Value * | OffsetValue = nullptr |
||
) |
Create an assume intrinsic call that represents an alignment assumption on the provided pointer.
An optional offset can be provided, and if it is provided, the offset must be subtracted from the provided pointer to get the pointer with the specified alignment.
Definition at line 1306 of file IRBuilder.cpp.
References assert(), DL, getIntPtrTy(), and llvm::Value::getType().
Referenced by AddAlignmentAssumptions(), and llvm::OpenMPIRBuilder::applySimd().
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 1319 of file IRBuilder.cpp.
References assert(), DL, and llvm::Value::getType().
|
inline |
Definition at line 1771 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), and Name.
Referenced by createFakeIntVal(), llvm::OpenMPIRBuilder::createMapperAllocas(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTask(), doPromotion(), eliminateSwiftErrorArgument(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitTargetKernel(), handleNoSuspendCoroutine(), lowerLocalAllocas(), RemovePreallocated(), replaceSwiftErrorOps(), salvageDebugInfoImpl(), simplifyAllocaArraySize(), and targetParallelCallback().
|
inline |
Definition at line 1778 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), and Name.
Definition at line 1487 of file IRBuilder.h.
References assert(), CreateAnd(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1479 of file IRBuilder.h.
References CreateAnd(), LHS, Name, and RHS.
|
inline |
Definition at line 1483 of file IRBuilder.h.
References CreateAnd(), LHS, Name, and RHS.
Definition at line 1473 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::addRuntimeChecks(), applyX86MaskOn1BitsVec(), llvm::buildAtomicRMWValue(), buildPartialUnswitchConditionalBranch(), callBufferedPrintfStart(), checkForNegativeOperand(), llvm::InstCombinerImpl::commonShiftTransforms(), CreateAnd(), createLogicFromTable(), createMaskInstrs(), expandFPToI(), expandIToFP(), foldAnyOrAllBitsSet(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldComplexAndOrPatterns(), foldCtpopPow2Test(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpXNegX(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldOrToXor(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldSwitchToSelect(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), insertMaskedValue(), insertSpills(), llvm::X86TTIImpl::instCombineIntrinsic(), LowerBSWAP(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), performMaskedAtomicOp(), processUMulZExtIdiom(), llvm::KCFIPass::run(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), llvm::UpgradeIntrinsicCall(), upgradeMaskedMove(), upgradePMULDQ(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), visitMaskedMerge(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
Create a vector int AND reduction intrinsic of the source vector.
Definition at line 441 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Create a call to the arithmetic_fence intrinsic.
Definition at line 1028 of file IRBuilder.h.
References CreateIntrinsic(), and Name.
|
inline |
Definition at line 1463 of file IRBuilder.h.
References CreateAShr(), LHS, Name, and RHS.
|
inline |
Definition at line 1468 of file IRBuilder.h.
References CreateAShr(), LHS, Name, and RHS.
|
inline |
Definition at line 1454 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by CreateAShr(), expandIToFP(), foldSelectICmpLshrAshr(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), llvm::InstCombiner::getFreelyInvertedImpl(), getSign32(), llvm::GCNTTIImpl::instCombineIntrinsic(), simplifyX86immShift(), simplifyX86varShift(), upgradePMULDQ(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), and llvm::InstCombinerImpl::visitTrunc().
CallInst * IRBuilderBase::CreateAssumption | ( | Value * | Cond, |
ArrayRef< OperandBundleDef > | OpBundles = std::nullopt |
||
) |
Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.
The optional argument OpBundles
specifies operand bundles that are added to the call instruction.
Definition at line 551 of file IRBuilder.cpp.
References assert(), BB, Cond, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1Ty(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
Referenced by generateReproducer(), llvm::lowerObjectSizeCall(), and removeUndefIntroducingPredecessor().
|
inline |
Definition at line 1839 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), Insert(), and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), and createCmpXchgInstFun().
|
inline |
Definition at line 1852 of file IRBuilder.h.
References BB, DL, llvm::BasicBlock::getDataLayout(), llvm::Value::getType(), Insert(), and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), upgradeAMDGCNIntrinsicCall(), and llvm::UpgradeIntrinsicCall().
Value * IRBuilderBase::CreateBinaryIntrinsic | ( | Intrinsic::ID | ID, |
Value * | LHS, | ||
Value * | RHS, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" |
||
) |
Create a call to intrinsic ID
with 2 operands which is mangled on the first type.
Definition at line 921 of file IRBuilder.cpp.
References BB, llvm::IRBuilderFolder::FoldBinaryIntrinsic(), Folder, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Function::getReturnType(), llvm::Value::getType(), LHS, Name, and RHS.
Referenced by canonicalizeSaturatedAdd(), canonicalizeSaturatedSubtract(), CreateCopySign(), CreateMaximum(), CreateMaxNum(), CreateMinimum(), CreateMinNum(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), foldAbsDiff(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombiner::getFreelyInvertedImpl(), hoistMinMax(), moveAddAfterMinMax(), reassociateMinMaxWithConstantInOperand(), takeLog2(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 1664 of file IRBuilder.h.
References llvm::BinaryOperator::Create(), FMF, llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by buildNew(), canonicalizeLogicFirst(), llvm::InstCombinerImpl::commonShiftTransforms(), createLogicalOp(), CreateNAryOp(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), factorizeMathWithShlOps(), foldAndOrOfICmpsWithConstEq(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldBitCastBitwiseLogic(), foldBitwiseLogicWithIntrinsics(), foldComplexAndOrPatterns(), foldDependentIVs(), foldICmpOrXorSubChain(), foldLogicCastConstant(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVectorBinop(), generateNewInstTree(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::getOrderedReduction(), llvm::getShuffleReduction(), getStepVector(), instCombineSVEVectorBinOp(), matchDeMorgansLaws(), narrowUDivURem(), reassociateForUses(), scalarize(), simplifyAndOrWithOpReplaced(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), tryFactorization(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitShl().
|
inline |
Definition at line 2125 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by applyX86MaskOn1BitsVec(), canonicalizeBitCastExtElt(), llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), CreateBitOrPointerCast(), createCast(), createCmpXchgInstFun(), llvm::OpenMPIRBuilder::createReductions(), createTargetLoopWorkshareCall(), createTblForTrunc(), createTblShuffleForZExt(), llvm::coro::Shape::emitDealloc(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), emitX86ScalarSelect(), expandFPToI(), expandIToFP(), extractMaskedValue(), fitArgInto64Bits(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::InstCombinerImpl::foldICmpBitCast(), foldReductionIdiom(), foldTruncInsEltPair(), foldVecTruncToExtElt(), getAllocaPos(), llvm::VNCoercion::getStoreValueForLoadHelper(), getX86MaskVec(), hostParallelCallback(), llvm::InlineFunction(), insertMaskedValue(), llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVECondLast(), lowerKernelArguments(), optimizeVectorResizeWithIntegerBitCasts(), promoteAllocaUserToVector(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), simplifyNeonVld1(), simplifyRelocatesOffABase(), simplifyX86extrq(), simplifyX86insertq(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), simplifyX86movmsk(), splitMergedValStore(), splitRetconCoroutine(), targetParallelCallback(), upgradeAMDGCNIntrinsicCall(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), upgradeMaskedStore(), upgradePMULDQ(), upgradeX86PSLLDQIntrinsics(), upgradeX86PSRLDQIntrinsics(), upgradeX86VPERMT2Intrinsics(), llvm::versionCallSite(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitShuffleVectorInst(), and llvm::InstCombinerImpl::visitTrunc().
|
inline |
Definition at line 2203 of file IRBuilder.h.
References CreateBitCast(), CreateIntToPtr(), CreatePtrToInt(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isPtrOrPtrVectorTy(), and Name.
Referenced by coerceArguments(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), instCombineSVEDupqLane(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), promoteAllocaUserToVector(), replaceAsyncResumeFunction(), splitAsyncCoroutine(), and llvm::InstCombinerImpl::visitLoadInst().
|
inline |
Create an unconditional 'br label X' instruction.
Definition at line 1112 of file IRBuilder.h.
References llvm::BranchInst::Create(), and Insert().
Referenced by llvm::breakLoopBackedge(), llvm::ConstantFoldTerminator(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSection(), llvm::OpenMPIRBuilder::createSections(), llvm::deleteDeadLoop(), llvm::orc::IRSpeculationLayer::emit(), llvm::OpenMPIRBuilder::emitBranch(), llvm::SITargetLowering::emitExpandAtomicRMW(), expandFPToI(), expandIToFP(), FoldTwoEntryPHINode(), generateUnsignedDivisionCode(), removeSwitchAfterSelectFold(), removeUndefIntroducingPredecessor(), rewritePHIsForCleanupPad(), SwitchToLookupTable(), versionCallSiteWithCond(), and workshareLoopTargetCallback().
|
inline |
Definition at line 2439 of file IRBuilder.h.
References CreateCall(), and Name.
|
inline |
Definition at line 2432 of file IRBuilder.h.
References CreateCall(), and Name.
|
inline |
Definition at line 2421 of file IRBuilder.h.
References llvm::CallInst::Create(), FMF, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
|
inline |
Definition at line 2410 of file IRBuilder.h.
References llvm::CallInst::Create(), DefaultOperandBundles, FMF, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Referenced by callAppendArgs(), callAppendStringN(), callBufferedPrintfStart(), callIntrinsic(), callPrintfBegin(), convertToRelLookupTable(), CreateAssumption(), llvm::OpenMPIRBuilder::createBarrier(), llvm::OpenMPIRBuilder::createCachedThreadPrivate(), CreateCall(), llvm::OpenMPIRBuilder::createCancel(), CreateConstrainedFPCall(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createCritical(), llvm::dxil::DXILOpBuilder::createDXILOpCall(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateFree(), CreateGCGetPointerBase(), CreateGCGetPointerOffset(), CreateGCRelocate(), CreateGCRelocates(), CreateGCResult(), CreateGCStatepointCallCommon(), CreateInvariantStart(), createIsFPClass(), CreateLaunderInvariantGroup(), CreateLifetimeEnd(), CreateLifetimeStart(), CreateMalloc(), llvm::OpenMPIRBuilder::createMasked(), llvm::OpenMPIRBuilder::createMaster(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), llvm::coro::createMustTailCall(), CreateNoAliasScopeDeclaration(), llvm::OpenMPIRBuilder::createOMPAlloc(), llvm::OpenMPIRBuilder::createOMPFree(), llvm::OpenMPIRBuilder::createOMPInteropDestroy(), llvm::OpenMPIRBuilder::createOMPInteropInit(), llvm::OpenMPIRBuilder::createOMPInteropUse(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createOrderedThreadsSimd(), llvm::OpenMPIRBuilder::createParallel(), createPopcntIntrinsic(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSingle(), CreateStripInvariantGroup(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), createTargetLoopWorkshareCall(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), createTblForTrunc(), llvm::OpenMPIRBuilder::createTeams(), llvm::VectorBuilder::createVectorInstruction(), CreateVScale(), llvm::orc::IRSpeculationLayer::emit(), llvm::coro::Shape::emitAlloc(), llvm::AArch64TargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::coro::Shape::emitDealloc(), llvm::OpenMPIRBuilder::emitFlush(), emitGetSwiftErrorValue(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::OpenMPIRBuilder::emitMapperCall(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), emitSetSwiftErrorValue(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::OpenMPIRBuilder::emitTaskwaitImpl(), llvm::OpenMPIRBuilder::emitTaskyieldImpl(), emitTPIDR2Save(), llvm::PPCTargetLowering::emitTrailingFence(), llvm::VPWidenCallRecipe::execute(), expandIToFP(), FlattenLoopPair(), foldCtpop(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldSqrt(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), llvm::memtag::getAndroidSlotPtr(), llvm::memtag::getFP(), llvm::OpenMPIRBuilder::getOrCreateThreadID(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), hostParallelCallback(), llvm::InlineFunction(), inlineRetainOrClaimRVCalls(), llvm::GCNTTIImpl::instCombineIntrinsic(), instrumentOneFunc(), llvm::SampleProfileProber::instrumentOneFunc(), lowerAwaitSuspend(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleavedStore(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), lowerObjCCall(), llvm::ARMTargetLowering::makeDMB(), llvm::orc::makeStub(), matchOrConcat(), modifyIntrinsicCall(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::memtag::readRegister(), ReplaceCallWith(), replaceWithTLIFunction(), llvm::KCFIPass::run(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyX86extrq(), simplifyX86insertq(), targetParallelCallback(), tryToFPToSat(), tryToRecognizePopCount(), upgradeAbs(), llvm::UpgradeARCRuntime(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), llvm::UpgradeIntrinsicCall(), upgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86MaskedShift(), upgradeX86Rotate(), upgradeX86VPERMT2Intrinsics(), UseTlsOffset(), useTpOffset(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 1221 of file IRBuilder.h.
References CreateCallBr(), and Name.
|
inline |
Definition at line 1214 of file IRBuilder.h.
References CreateCallBr(), and Name.
|
inline |
Definition at line 1203 of file IRBuilder.h.
References llvm::CallBrInst::Create(), Insert(), and Name.
|
inline |
Create a callbr instruction.
Definition at line 1195 of file IRBuilder.h.
References llvm::CallBrInst::Create(), Insert(), and Name.
Referenced by CreateCallBr().
|
inline |
Definition at line 2159 of file IRBuilder.h.
References llvm::CastInst::Create(), llvm::IRBuilderFolder::FoldCast(), Folder, Insert(), and Name.
Referenced by buildNew(), llvm::InstCombinerImpl::commonCastTransforms(), CreateAddrSpaceCast(), CreateBitCast(), CreateFPCast(), CreateFPExt(), CreateFPToSI(), CreateFPToUI(), CreateFPTrunc(), CreateIntCast(), CreateIntToPtr(), CreatePtrToInt(), CreateSExt(), CreateSExtOrBitCast(), CreateSIToFP(), CreateTruncOrBitCast(), CreateZExtOrBitCast(), llvm::VPWidenCastRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), generateNewInstTree(), scalarize(), shrinkInsertElt(), simplifyX86pmadd(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 1246 of file IRBuilder.h.
References llvm::CatchPadInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1257 of file IRBuilder.h.
References BB, llvm::CatchReturnInst::Create(), and Insert().
|
inline |
Definition at line 1239 of file IRBuilder.h.
References llvm::CatchSwitchInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1251 of file IRBuilder.h.
References llvm::CleanupPadInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1234 of file IRBuilder.h.
References llvm::CleanupReturnInst::Create(), and Insert().
Referenced by replaceUnwindCoroEnd().
|
inline |
Definition at line 2364 of file IRBuilder.h.
References CreateFCmp(), CreateICmp(), llvm::CmpInst::isFPPredicate(), LHS, Name, and RHS.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::createMinMaxOp(), foldVectorCmp(), generateNewInstTree(), llvm::InstCombiner::getFreelyInvertedImpl(), and optimizeBranch().
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Copy branch meta data if available.
Definition at line 1127 of file IRBuilder.h.
References Cond, llvm::Instruction::copyMetadata(), llvm::BranchInst::Create(), and Insert().
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Definition at line 1118 of file IRBuilder.h.
References Cond, llvm::BranchInst::Create(), and Insert().
Referenced by buildPartialInvariantUnswitchConditionalBranch(), buildPartialUnswitchConditionalBranch(), CloneLoopBlocks(), llvm::ConstantFoldTerminator(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::deleteDeadLoop(), despeculateCountZeros(), llvm::orc::IRSpeculationLayer::emit(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), expandFPToI(), expandIToFP(), generateUnsignedDivisionCode(), getStrlenWithNull(), injectPendingInvariantConditions(), llvm::SplitBlockAndInsertSimpleForLoop(), llvm::splitLoopBound(), SwitchToLookupTable(), and llvm::LoopVersioning::versionLoop().
|
inline |
Definition at line 1877 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt32Ty(), Idx, Insert(), Name, llvm::GEPNoWrapFlags::none(), and Ptr.
Referenced by llvm::memtag::getAndroidSlotPtr(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), UseTlsOffset(), and useTpOffset().
|
inline |
Definition at line 1923 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt64Ty(), Idx, Insert(), Name, llvm::GEPNoWrapFlags::none(), and Ptr.
|
inline |
Definition at line 1897 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt32Ty(), Insert(), Name, llvm::GEPNoWrapFlags::none(), and Ptr.
|
inline |
Definition at line 1943 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt64Ty(), Insert(), Name, llvm::GEPNoWrapFlags::none(), and Ptr.
|
inline |
Definition at line 1887 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt32Ty(), Idx, llvm::GEPNoWrapFlags::inBounds(), Insert(), Name, and Ptr.
Referenced by callBufferedPrintfArgPush(), llvm::emitAMDGPUPrintfCall(), llvm::KCFIPass::run(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedLoad(), scalarizeMaskedStore(), and splitAsyncCoroutine().
|
inline |
Definition at line 1933 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt64Ty(), Idx, llvm::GEPNoWrapFlags::inBounds(), Insert(), Name, and Ptr.
Referenced by lowerKernelArguments().
|
inline |
Definition at line 1910 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt32Ty(), llvm::GEPNoWrapFlags::inBounds(), Insert(), Name, and Ptr.
Referenced by CreateStructGEP(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(), insertSpills(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), and lowerSubFn().
|
inline |
Definition at line 1956 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::Type::getInt64Ty(), llvm::GEPNoWrapFlags::inBounds(), Insert(), Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTask(), and targetParallelCallback().
CallInst * IRBuilderBase::CreateConstrainedFPBinOp | ( | Intrinsic::ID | ID, |
Value * | L, | ||
Value * | R, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" , |
||
MDNode * | FPMathTag = nullptr , |
||
std::optional< RoundingMode > | Rounding = std::nullopt , |
||
std::optional< fp::ExceptionBehavior > | Except = std::nullopt |
||
) |
Definition at line 969 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), Name, and setConstrainedFPCallAttr().
Referenced by CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFMul(), CreateFMulFMF(), CreateFRem(), CreateFRemFMF(), CreateFSub(), and CreateFSubFMF().
CallInst * IRBuilderBase::CreateConstrainedFPCall | ( | Function * | Callee, |
ArrayRef< Value * > | Args, | ||
const Twine & | Name = "" , |
||
std::optional< RoundingMode > | Rounding = std::nullopt , |
||
std::optional< fp::ExceptionBehavior > | Except = std::nullopt |
||
) |
Definition at line 1073 of file IRBuilder.cpp.
References llvm::append_range(), llvm::CallingConv::C, CreateCall(), llvm::Intrinsic::hasConstrainedFPRoundingModeOperand(), Name, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and setConstrainedFPCallAttr().
CallInst * IRBuilderBase::CreateConstrainedFPCast | ( | Intrinsic::ID | ID, |
Value * | V, | ||
Type * | DestTy, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" , |
||
MDNode * | FPMathTag = nullptr , |
||
std::optional< RoundingMode > | Rounding = std::nullopt , |
||
std::optional< fp::ExceptionBehavior > | Except = std::nullopt |
||
) |
Definition at line 1020 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), llvm::Intrinsic::hasConstrainedFPRoundingModeOperand(), Name, and setConstrainedFPCallAttr().
Referenced by CreateFPExt(), CreateFPToSI(), CreateFPToUI(), CreateFPTrunc(), CreateSIToFP(), and CreateUIToFP().
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 1061 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), Name, P, and setConstrainedFPCallAttr().
CallInst * IRBuilderBase::CreateConstrainedFPUnroundedBinOp | ( | Intrinsic::ID | ID, |
Value * | L, | ||
Value * | R, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" , |
||
MDNode * | FPMathTag = nullptr , |
||
std::optional< fp::ExceptionBehavior > | Except = std::nullopt |
||
) |
Definition at line 988 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), Name, and setConstrainedFPCallAttr().
Referenced by CreateMaxNum(), and CreateMinNum().
|
inline |
Create call to the copysign intrinsic.
Definition at line 1020 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::visitFNeg().
Value * IRBuilderBase::CreateElementCount | ( | Type * | DstType, |
ElementCount | EC | ||
) |
Create an expression which evaluates to the number of elements in EC
at runtime.
Definition at line 99 of file IRBuilder.cpp.
References CreateVScale().
Referenced by llvm::SplitBlockAndInsertForEachLane().
CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemCpy | ( | Value * | Dst, |
Align | DstAlign, | ||
Value * | Src, | ||
Align | SrcAlign, | ||
Value * | Size, | ||
uint32_t | ElementSize, | ||
MDNode * | TBAATag = nullptr , |
||
MDNode * | TBAAStructTag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Create and insert an element unordered-atomic memcpy between the specified pointers.
DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.
If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.
Definition at line 256 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::setMetadata(), and Size.
CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemMove | ( | Value * | Dst, |
Align | DstAlign, | ||
Value * | Src, | ||
Align | SrcAlign, | ||
Value * | Size, | ||
uint32_t | ElementSize, | ||
MDNode * | TBAATag = nullptr , |
||
MDNode * | TBAAStructTag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Create and insert an element unordered-atomic memmove between the specified pointers.
DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.
If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.
Definition at line 372 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), BB, CreateCall(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Attribute::getWithAlignment(), llvm::Instruction::setMetadata(), and Size.
|
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 a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.
Definition at line 618 of file IRBuilder.h.
References CreateElementUnorderedAtomicMemSet(), getInt64(), Ptr, and Size.
Referenced by CreateElementUnorderedAtomicMemSet().
CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemSet | ( | Value * | Ptr, |
Value * | Val, | ||
Value * | Size, | ||
Align | Alignment, | ||
uint32_t | ElementSize, | ||
MDNode * | TBAATag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Definition at line 192 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Ptr, llvm::Instruction::setMetadata(), and Size.
|
inline |
Definition at line 1398 of file IRBuilder.h.
References CreateSDiv(), LHS, Name, and RHS.
Referenced by CreatePtrDiff().
|
inline |
Definition at line 1385 of file IRBuilder.h.
References CreateUDiv(), LHS, Name, and RHS.
|
inline |
Definition at line 2465 of file IRBuilder.h.
References CreateExtractElement(), getInt64(), Idx, and Name.
|
inline |
Definition at line 2458 of file IRBuilder.h.
References llvm::ExtractElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractElement(), Idx, Insert(), and Name.
Referenced by CreateExtractElement(), emitX86ScalarSelect(), llvm::VPBranchOnMaskRecipe::execute(), expandAnyIntrinsic(), expandIntegerDot(), extractValues(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::VPTransformState::get(), llvm::getOrderedReduction(), llvm::getShuffleReduction(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVETBL(), populateOperands(), promoteAllocaUserToVector(), scalarize(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), simplifyAMDGCNMemoryIntrinsicDemanded(), translateExtract(), llvm::UpgradeIntrinsicCall(), upgradeMaskedMove(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitExtractElementInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
|
inline |
Definition at line 2514 of file IRBuilder.h.
References llvm::ExtractValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractValue(), Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), createCast(), createCmpXchgInstFun(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), FlattenLoopPair(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::SCEVExpander::generateOverflowCheck(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), simplifyX86addcarry(), unpackStoreToAggregate(), llvm::UpgradeIntrinsicCall(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InstCombinerImpl::visitExtractValueInst().
|
inline |
Create a call to the vector.extract intrinsic.
Definition at line 1035 of file IRBuilder.h.
References CreateIntrinsic(), llvm::Value::getType(), Idx, and Name.
Referenced by llvm::AArch64TargetLowering::lowerInterleavedLoad(), and llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore().
|
inline |
Definition at line 1531 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::buildAtomicRMWValue(), llvm::SITargetLowering::emitExpandAtomicRMW(), expandLerpIntrinsic(), getStepVector(), llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::UpgradeIntrinsicCall().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1545 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by factorizeFAddFSub(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldSquareSumFP(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::visitFDiv(), and llvm::InstCombinerImpl::visitFSub().
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 417 of file IRBuilder.cpp.
References CreateCall(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
Referenced by llvm::createSimpleTargetReduction().
|
inline |
Definition at line 2359 of file IRBuilder.h.
References LHS, Name, P, and RHS.
Referenced by buildNew(), CreateCmp(), CreateFCmpOEQ(), CreateFCmpOGE(), CreateFCmpOGT(), CreateFCmpOLE(), CreateFCmpOLT(), CreateFCmpONE(), CreateFCmpORD(), CreateFCmpUEQ(), CreateFCmpUGE(), CreateFCmpUGT(), CreateFCmpULE(), CreateFCmpULT(), CreateFCmpUNE(), CreateFCmpUNO(), llvm::VPWidenRecipe::execute(), getFCmpValue(), matchIsFiniteTest(), and reassociateFCmps().
|
inline |
Definition at line 2279 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OEQ, LHS, Name, and RHS.
|
inline |
Definition at line 2289 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGE, LHS, Name, and RHS.
Referenced by optimizeSQRT().
|
inline |
Definition at line 2284 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGT, LHS, Name, and RHS.
|
inline |
Definition at line 2299 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLE, LHS, Name, and RHS.
|
inline |
Definition at line 2294 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLT, LHS, Name, and RHS.
Referenced by emitRsqIEEE1ULP().
|
inline |
Definition at line 2304 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ONE, LHS, Name, and RHS.
|
inline |
Definition at line 2309 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ORD, LHS, Name, and RHS.
Referenced by optimizeSQRT().
|
inline |
Definition at line 2319 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UEQ, LHS, Name, and RHS.
|
inline |
Definition at line 2329 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGE, LHS, Name, and RHS.
|
inline |
Definition at line 2324 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGT, LHS, Name, and RHS.
|
inline |
Definition at line 2339 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULE, LHS, Name, and RHS.
|
inline |
Definition at line 2334 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULT, LHS, Name, and RHS.
|
inline |
Definition at line 2344 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNE, LHS, Name, and RHS.
Referenced by expandAnyIntrinsic().
|
inline |
Definition at line 2314 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNO, LHS, Name, and RHS.
|
inline |
Definition at line 1612 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::UpgradeIntrinsicCall().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1626 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by foldFDivSqrtDivisor(), llvm::InstCombinerImpl::visitFAdd(), and llvm::InstCombinerImpl::visitFSub().
|
inline |
Definition at line 1832 of file IRBuilder.h.
References Context, Insert(), and Name.
Referenced by llvm::TargetLoweringBase::emitLeadingFence(), llvm::RISCVTargetLowering::emitLeadingFence(), llvm::VETargetLowering::emitLeadingFence(), llvm::TargetLoweringBase::emitTrailingFence(), llvm::RISCVTargetLowering::emitTrailingFence(), and llvm::VETargetLowering::emitTrailingFence().
|
inline |
Definition at line 1585 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by buildMultiplyTree(), emitRsqIEEE1ULP(), expandExpIntrinsic(), expandLerpIntrinsic(), expandLogIntrinsic(), expandPowIntrinsic(), llvm::InstCombinerImpl::foldFMulReassoc(), getStepVector(), llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::UpgradeIntrinsicCall().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1599 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by factorizeLerp(), llvm::InstCombinerImpl::foldFMulReassoc(), hoistMulAddAssociation(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), and llvm::InstCombinerImpl::visitFSub().
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 425 of file IRBuilder.cpp.
References CreateCall(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
Referenced by llvm::createSimpleTargetReduction().
|
inline |
Definition at line 1728 of file IRBuilder.h.
References FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), Insert(), and Name.
Referenced by foldMulSelectToNegate(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1738 of file IRBuilder.h.
References FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), llvm::Instruction::getFastMathFlags(), Insert(), and Name.
Referenced by foldFDivPowDivisor(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), and llvm::InstCombinerImpl::visitFNeg().
|
inline |
Definition at line 2215 of file IRBuilder.h.
References CreateCast(), llvm::Type::getScalarSizeInBits(), and Name.
Referenced by convertTo16Bit().
|
inline |
Definition at line 2108 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by expandFPToI(), processNonStringArg(), tryInterleave(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombinerImpl::visitFSub().
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 473 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
Create a vector float max reduction intrinsic of the source vector.
Definition at line 465 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
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 477 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
Create a vector float min reduction intrinsic of the source vector.
Definition at line 469 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
|
inline |
Definition at line 2072 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by expandFPToI().
|
inline |
Definition at line 2065 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by expandFPToI(), and llvm::AArch64TargetLowering::optimizeExtendOrTruncateConversion().
|
inline |
Definition at line 2099 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by expandIToFP(), llvm::InstCombinerImpl::visitFPTrunc(), and llvm::InstCombinerImpl::visitFSub().
CallInst * IRBuilderBase::CreateFree | ( | Value * | Source, |
ArrayRef< OperandBundleDef > | Bundles = std::nullopt |
||
) |
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 353 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), F, llvm::FunctionCallee::getCallee(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::PointerType::getUnqual(), and llvm::Type::getVoidTy().
Definition at line 2533 of file IRBuilder.h.
References Insert(), and Name.
Referenced by llvm::addDiffRuntimeChecks(), buildPartialUnswitchConditionalBranch(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::createAnyOfTargetReduction(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::createFreeze(), despeculateCountZeros(), llvm::VPWidenRecipe::execute(), expandBounds(), foldAndOrOfICmpEqConstantAndICmp(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), foldGuardedFunnelShift(), foldMulShl1(), llvm::InstCombinerImpl::foldSelectOpOp(), generatedUnsignedRemainderCode(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), hoistMinMax(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitURem(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 1639 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1652 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::InstCombinerImpl::visitFPTrunc().
|
inline |
Definition at line 1558 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::buildAtomicRMWValue(), expandLerpIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::UpgradeIntrinsicCall().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1572 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by factorizeFAddFSub(), factorizeLerp(), and llvm::InstCombinerImpl::visitFSub().
Create a call to the experimental.gc.pointer.base intrinsic to get the base pointer for the specified derived pointer.
Definition at line 895 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), and 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 904 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), and Name.
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 883 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), and Name.
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 872 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), and Name.
Referenced by makeStatepointExplicitImpl().
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 803 of file IRBuilder.cpp.
References Name, and llvm::None.
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 783 of file IRBuilder.cpp.
References Name, and llvm::None.
Referenced by makeStatepointExplicitImpl().
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 792 of file IRBuilder.cpp.
References Name.
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 861 of file IRBuilder.cpp.
References Name, and llvm::None.
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 839 of file IRBuilder.cpp.
References Name, and llvm::None.
Referenced by makeStatepointExplicitImpl().
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 850 of file IRBuilder.cpp.
References Name.
|
inline |
Definition at line 1864 of file IRBuilder.h.
References llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), Insert(), Name, and Ptr.
Referenced by buildNew(), CreateInBoundsGEP(), CreateInBoundsPtrAdd(), CreatePtrAdd(), DoFlattenLoopPair(), llvm::VPWidenGEPRecipe::execute(), llvm::VPVectorPointerRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), foldDependentIVs(), foldSelectGEP(), llvm::OpenMPIRBuilder::getSizeInBytes(), getStrlenWithNull(), hoistGEP(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyRelocatesOffABase(), splitMergedValStore(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitGEPOfGEP(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
GlobalVariable * IRBuilderBase::CreateGlobalString | ( | StringRef | Str, |
const Twine & | Name = "" , |
||
unsigned | AddressSpace = 0 , |
||
Module * | M = nullptr , |
||
bool | AddNull = true |
||
) |
Make a new global variable with initializer type i8*.
CreateGlobalString - Make a new global variable with an initializer that has array of i8 type filled in with the nul terminated string value specified.
Make a new global variable with an initializer that has array of i8 type filled in with the null terminated string value specified. The new global variable will be marked mergable with any others of the same contents. If Name is specified, it is the name of the global variable created.
If no module is given via M
, it is take from the insertion point basic block.
If Name is specified, it is the name of the global variable created.
Definition at line 43 of file IRBuilder.cpp.
References BB, Context, llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::ConstantDataArray::getString(), llvm::Value::getType(), llvm::GlobalValue::Global, Name, llvm::GlobalValue::NotThreadLocal, and llvm::GlobalValue::PrivateLinkage.
Referenced by CreateGlobalStringPtr().
|
inline |
Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8.
If no module is given via M
, it is take from the insertion point basic block.
Definition at line 1990 of file IRBuilder.h.
References Context, CreateGlobalString(), llvm::ConstantExpr::getInBoundsGetElementPtr(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getValueType(), and Name.
Referenced by llvm::OpenMPIRBuilder::getOrCreateSrcLocStr().
|
inline |
Definition at line 2349 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldCmp(), Folder, Insert(), LHS, Name, P, and RHS.
Referenced by buildNew(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateCmp(), CreateICmpEQ(), CreateICmpNE(), CreateICmpSGE(), CreateICmpSGT(), CreateICmpSLE(), CreateICmpSLT(), CreateICmpUGE(), CreateICmpUGT(), CreateICmpULE(), CreateICmpULT(), createInvariantCond(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPWidenRecipe::execute(), llvm::SCEVExpander::expandComparePredicate(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldClampRangeOfTwo(), foldCtpop(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXorSubChain(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldICmpWithLowBitMaskedVal(), foldICmpWithTruncSignExtendedVal(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), foldNegativePower2AndShiftedMask(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::SCEVExpander::generateOverflowCheck(), generateReproducer(), getNewICmpValue(), hoistMinMax(), llvm::InstCombinerImpl::insertRangeTest(), reassociateMinMaxWithConstants(), ReduceLoopStrength(), llvm::InstCombinerImpl::simplifyRangeCheck(), sinkMinMaxInBB(), llvm::splitLoopBound(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), llvm::UpgradeIntrinsicCall(), upgradeMaskedCompare(), upgradeX86vpcom(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 2239 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_EQ, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::ConstantFoldTerminator(), CreateIsNull(), createMemMoveLoop(), createMemSetLoop(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTargetInit(), despeculateCountZeros(), llvm::orc::IRSpeculationLayer::emit(), llvm::HexagonTargetLowering::emitStoreConditional(), expandIToFP(), foldAnyOrAllBitsSet(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldIsPowerOf2(), foldSwitchToSelect(), generateUnsignedDivisionCode(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), getStrlenWithNull(), llvm::lowerAtomicCmpXchgInst(), llvm::promoteCallWithVTableCmp(), llvm::SplitBlockAndInsertSimpleForLoop(), llvm::OpenMPIRBuilder::tileLoops(), llvm::UpgradeIntrinsicCall(), llvm::versionCallSite(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 2243 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_NE, LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc(), CloneLoopBlocks(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), CreateIsNotNull(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTeams(), llvm::emitAMDGPUPrintfCall(), expandAnyIntrinsic(), expandIToFP(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldIsPowerOf2(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::lowerObjectSizeCall(), llvm::LoopVectorizePass::processLoop(), llvm::KCFIPass::run(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 2267 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGE, LHS, Name, and RHS.
Referenced by llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 2263 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGT, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), CreateIsNotNeg(), expandFPToI(), expandIToFP(), llvm::InstCombinerImpl::foldICmpCommutative(), simplifyX86pack(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 2275 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLE, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 2271 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLT, LHS, Name, and RHS.
Referenced by llvm::addRuntimeChecks(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateIsNeg(), llvm::InstCombinerImpl::foldICmpCommutative(), getBoundsCheckCond(), simplifyX86pack(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitLShr().
|
inline |
Definition at line 2251 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGE, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), foldUnsignedUnderflowCheck(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombinerImpl::visitUDiv().
|
inline |
Definition at line 2247 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGT, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), llvm::InstCombinerImpl::foldICmpCommutative(), foldIsPowerOf2OrZero(), and generateUnsignedDivisionCode().
|
inline |
Definition at line 2259 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_ULE, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 2255 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_ULT, LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemSetLoop(), expandFPToI(), llvm::InstCombinerImpl::foldICmpCommutative(), foldIsPowerOf2OrZero(), foldSignedTruncationCheck(), foldUnsignedUnderflowCheck(), getBoundsCheckCond(), llvm::lowerObjectSizeCall(), SwitchToLookupTable(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 1872 of file IRBuilder.h.
References CreateGEP(), llvm::GEPNoWrapFlags::inBounds(), Name, and Ptr.
Referenced by callBufferedPrintfArgPush(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::emitMapperCall(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), insertSpills(), rewriteGEPAsOffset(), unpackLoadToAggregate(), unpackStoreToAggregate(), and llvm::InstCombinerImpl::visitExtractValueInst().
|
inline |
Definition at line 1979 of file IRBuilder.h.
References CreateGEP(), getInt8Ty(), llvm::GEPNoWrapFlags::inBounds(), Name, llvm::Offset, and Ptr.
|
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 1151 of file IRBuilder.h.
References Addr, llvm::IndirectBrInst::Create(), and Insert().
|
inline |
Definition at line 2475 of file IRBuilder.h.
References CreateInsertElement(), llvm::PoisonValue::get(), Idx, and Name.
|
inline |
Definition at line 2470 of file IRBuilder.h.
References CreateInsertElement(), llvm::PoisonValue::get(), Idx, and Name.
Referenced by canonicalizeInsertSplat(), CreateInsertElement(), createTblShuffleForZExt(), CreateVectorSplat(), evaluateInDifferentElementOrder(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), foldTruncInsEltPair(), hoistInsEltConst(), insertValues(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEDupqLane(), narrowInsElt(), optimizeIntegerToVectorInsertions(), llvm::VPTransformState::packScalarIntoVectorValue(), promoteAllocaUserToVector(), scalarize(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::UpgradeIntrinsicCall(), upgradeMaskedMove(), and llvm::InstCombinerImpl::visitInsertElementInst().
|
inline |
Definition at line 2487 of file IRBuilder.h.
References CreateInsertElement(), getInt64(), Idx, and Name.
|
inline |
Definition at line 2480 of file IRBuilder.h.
References llvm::InsertElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertElement(), Idx, Insert(), and Name.
|
inline |
Definition at line 2521 of file IRBuilder.h.
References llvm::InsertValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertValue(), Insert(), and Name.
Referenced by buildUMulWithOverflowFunc(), CreateAggregateRet(), createCast(), expandFromPrimitiveShadowRecursive(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), llvm::lowerAtomicCmpXchgInst(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), replaceFallthroughCoroEnd(), simplifyX86addcarry(), splitRetconCoroutine(), unpackLoadToAggregate(), and llvm::UpgradeIntrinsicCall().
|
inline |
Create a call to the vector.insert intrinsic.
Definition at line 1043 of file IRBuilder.h.
References CreateIntrinsic(), llvm::Value::getType(), Idx, and Name.
Referenced by instCombineSVEDupqLane(), instCombineSVEUzp1(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 2194 of file IRBuilder.h.
References CreateCast(), llvm::Type::getScalarSizeInBits(), isSigned(), and Name.
Referenced by convertTo16Bit(), CreateMalloc(), llvm::OpenMPIRBuilder::createParallel(), llvm::coro::Shape::emitAlloc(), llvm::emitGEPOffset(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), instCombineSVEUnpack(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::InstCombinerImpl::OptimizePointerDifference(), simplifyAllocaArraySize(), llvm::UpgradeIntrinsicCall(), upgradeX86ConcatShift(), upgradeX86Rotate(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::InstCombinerImpl::visitPtrToInt().
Create a vector integer max reduction intrinsic of the source vector.
Definition at line 453 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
Create a vector integer min reduction intrinsic of the source vector.
Definition at line 459 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
CallInst * IRBuilderBase::CreateIntrinsic | ( | Intrinsic::ID | ID, |
ArrayRef< Type * > | Types, | ||
ArrayRef< Value * > | Args, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" |
||
) |
Create a call to intrinsic ID
with Args
, mangled using Types
.
If FMFSource
is provided, copy fast-math-flags from that instruction to the intrinsic.
Definition at line 932 of file IRBuilder.cpp.
References BB, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and Name.
Referenced by CreateArithmeticFence(), CreateConstrainedFPBinOp(), CreateConstrainedFPCast(), CreateConstrainedFPCmp(), CreateConstrainedFPUnroundedBinOp(), CreateExtractVector(), CreateInsertVector(), createMaskInstrs(), llvm::createMinMaxOp(), createReverseEVL(), CreateStackRestore(), CreateStackSave(), CreateStepVector(), CreateThreadLocalAddress(), createTileStore(), llvm::SITargetLowering::emitExpandAtomicRMW(), expandAbs(), expandClampIntrinsic(), expandExpIntrinsic(), expandIntegerDot(), expandLogIntrinsic(), expandPowIntrinsic(), foldFDivPowDivisor(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpIntrinsicWithIntrinsic(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldSelectOpOp(), foldShuffledIntrinsicOperands(), foldSubOfMinMax(), generateNewInstTree(), InsertIntrinsicCalls(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECondLast(), instCombineSVELast(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESrshl(), instCombineSVEVectorFuseMulAddSub(), interleaveVectors(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), lowerIntrinsicToFunction(), lowerKernelArguments(), lowerPtrAnnotation(), reassociateMinMaxWithConstants(), ReduceSwitchRange(), replaceWithTileLoad(), simplifySwitchOfPowersOfTwo(), simplifyX86addcarry(), simplifyX86pmadd(), tryCombineFromSVBoolBinOp(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().
CallInst * IRBuilderBase::CreateIntrinsic | ( | Type * | RetTy, |
Intrinsic::ID | ID, | ||
ArrayRef< Value * > | Args, | ||
Instruction * | FMFSource = nullptr , |
||
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.
Definition at line 942 of file IRBuilder.cpp.
References assert(), BB, llvm::ArrayRef< T >::empty(), llvm::FunctionType::get(), llvm::Intrinsic::getDeclaration(), llvm::Intrinsic::getIntrinsicInfoTableEntries(), llvm::BasicBlock::getModule(), I, llvm::Intrinsic::MatchIntrinsicTypes_Match, Name, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and RetTy.
|
inline |
Definition at line 2120 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::OpenMPIRBuilder::createAtomicRead(), CreateBitOrPointerCast(), createCast(), insertSpills(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), promoteAllocaUserToVector(), and llvm::KCFIPass::run().
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 511 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Ptr, and Size.
|
inline |
Definition at line 1178 of file IRBuilder.h.
References CreateInvoke(), and Name.
|
inline |
Definition at line 1186 of file IRBuilder.h.
References CreateInvoke(), and Name.
|
inline |
Create an invoke instruction.
Definition at line 1156 of file IRBuilder.h.
References llvm::InvokeInst::Create(), II, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Referenced by CreateGCStatepointInvokeCommon(), CreateInvoke(), and lowerAwaitSuspend().
|
inline |
Definition at line 1167 of file IRBuilder.h.
References llvm::InvokeInst::Create(), II, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Definition at line 1287 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), and llvm::Test.
Referenced by foldFCmpToFPClassTest(), llvm::InstCombinerImpl::foldICmpAndConstConst(), and llvm::InstCombinerImpl::foldICmpBitCast().
Return a boolean value testing if Arg
< 0.
Definition at line 2552 of file IRBuilder.h.
References CreateICmpSLT(), llvm::Constant::getNullValue(), llvm::Value::getType(), and Name.
Referenced by canonicalizeAbs(), simplifyX86movmsk(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
Return a boolean value testing if Arg
> -1.
Definition at line 2557 of file IRBuilder.h.
References CreateICmpSGT(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and Name.
Referenced by llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), and llvm::InstCombinerImpl::visitXor().
Return a boolean value testing if Arg
!= 0.
Definition at line 2547 of file IRBuilder.h.
References CreateICmpNE(), llvm::Constant::getNullValue(), llvm::Value::getType(), and Name.
Referenced by llvm::OpenMPIRBuilder::emitKernelLaunch(), foldAnyOrAllBitsSet(), foldSelectICmpAndAnd(), upgradeMaskedMove(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), and llvm::InstCombinerImpl::visitOr().
Return a boolean value testing if Arg
== 0.
Definition at line 2542 of file IRBuilder.h.
References CreateICmpEQ(), llvm::Constant::getNullValue(), llvm::Value::getType(), and Name.
Referenced by llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), and llvm::InstCombinerImpl::visitAnd().
|
inline |
Definition at line 2528 of file IRBuilder.h.
References llvm::LandingPadInst::Create(), Insert(), and Name.
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 1117 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getReturnType(), and Ptr.
Referenced by simplifyInvariantGroupIntrinsic().
CallInst * IRBuilderBase::CreateLifetimeEnd | ( | Value * | Ptr, |
ConstantInt * | Size = nullptr |
||
) |
Create a lifetime.end intrinsic.
If the pointer isn't i8* it will be converted.
Definition at line 496 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Ptr, and Size.
Referenced by llvm::InlineFunction().
CallInst * IRBuilderBase::CreateLifetimeStart | ( | Value * | Ptr, |
ConstantInt * | Size = nullptr |
||
) |
Create a lifetime.start intrinsic.
If the pointer isn't i8* it will be converted.
Definition at line 481 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Ptr, and Size.
Referenced by llvm::InlineFunction().
|
inline |
Definition at line 1796 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool' for the isVolatile parameter.
Definition at line 1788 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createCopyPrivate(), createFakeIntVal(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), llvm::SITargetLowering::emitExpandAtomicRMW(), emitSetAndGetSwiftErrorValueAround(), getStrlenWithNull(), hostParallelCallback(), insertSpills(), instCombineSVELD1(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), lowerSubFn(), llvm::orc::makeStub(), promoteAllocaUserToVector(), replaceSwiftErrorOps(), llvm::KCFIPass::run(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), targetParallelCallback(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitExtractValueInst(), and llvm::InstCombinerImpl::visitLoadInst().
|
inline |
Definition at line 1792 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
|
inline |
Definition at line 1674 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by CreateLogicalOp(), createLogicalOp(), foldAndOrOfICmpsWithConstEq(), sinkMinMaxInBB(), and llvm::InstCombinerImpl::visitAnd().
|
inline |
Definition at line 1686 of file IRBuilder.h.
References CreateLogicalAnd(), CreateLogicalOr(), llvm_unreachable, and Name.
Referenced by llvm::InstCombiner::getFreelyInvertedImpl(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().
Definition at line 1700 of file IRBuilder.h.
References assert(), CreateLogicalOr(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1680 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by CreateLogicalOp(), createLogicalOp(), CreateLogicalOr(), foldAndOrOfICmpsWithConstEq(), generateUnsignedDivisionCode(), sinkMinMaxInBB(), llvm::InstCombinerImpl::visitBranchInst(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 1444 of file IRBuilder.h.
References CreateLShr(), LHS, Name, and RHS.
|
inline |
Definition at line 1449 of file IRBuilder.h.
References CreateLShr(), LHS, Name, and RHS.
|
inline |
Definition at line 1435 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateLShr(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), expandFPToI(), expandIToFP(), extractIntPart(), extractMaskedValue(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpWithHighBitMask(), foldIDivShl(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generateUnsignedDivisionCode(), getMul64(), getShiftedValue(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), lowerFunnelShifts(), lowerKernelArguments(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyX86immShift(), simplifyX86varShift(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), SwitchToLookupTable(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitXor().
CallInst * IRBuilderBase::CreateMalloc | ( | Type * | IntPtrTy, |
Type * | AllocTy, | ||
Value * | AllocSize, | ||
Value * | ArraySize, | ||
ArrayRef< OperandBundleDef > | OpB, | ||
Function * | MallocF = nullptr , |
||
const Twine & | Name = "" |
||
) |
Definition at line 301 of file IRBuilder.cpp.
References assert(), BB, Context, CreateCall(), CreateIntCast(), CreateMul(), F, llvm::FunctionCallee::getCallee(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), llvm::PointerType::getUnqual(), isConstantOne(), llvm::Type::isVoidTy(), Name, llvm::CallBase::setCallingConv(), and llvm::CallInst::setTailCall().
Referenced by CreateMalloc().
CallInst * IRBuilderBase::CreateMalloc | ( | Type * | IntPtrTy, |
Type * | AllocTy, | ||
Value * | AllocSize, | ||
Value * | ArraySize, | ||
Function * | MallocF = nullptr , |
||
const Twine & | Name = "" |
||
) |
CreateMalloc - Generate the IR for a call to malloc:
Definition at line 344 of file IRBuilder.cpp.
References CreateMalloc(), and Name.
CallInst * IRBuilderBase::CreateMaskedCompressStore | ( | Value * | Val, |
Value * | Ptr, | ||
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 Mask
- vector of booleans which indicates what vector lanes should be accessed in memory.
Definition at line 704 of file IRBuilder.cpp.
References assert(), llvm::Value::getType(), llvm::Type::isVectorTy(), and Ptr.
CallInst * IRBuilderBase::CreateMaskedExpandLoad | ( | Type * | Ty, |
Value * | Ptr, | ||
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 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 686 of file IRBuilder.cpp.
References assert(), llvm::PoisonValue::get(), llvm::Type::isVectorTy(), Name, and Ptr.
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 630 of file IRBuilder.cpp.
References assert(), llvm::PoisonValue::get(), getAllOnesMask(), getInt32(), llvm::Value::getType(), Name, and llvm::Align::value().
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 578 of file IRBuilder.cpp.
References assert(), llvm::PoisonValue::get(), getInt32(), llvm::Type::isVectorTy(), Name, Ptr, and llvm::Align::value().
Referenced by instCombineLD1GatherIndex(), instCombineSVELD1(), simplifyX86MaskedLoad(), upgradeMaskedLoad(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
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 661 of file IRBuilder.cpp.
References llvm::Data, getAllOnesMask(), getInt32(), llvm::Value::getType(), and llvm::Align::value().
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 598 of file IRBuilder.cpp.
References assert(), getInt32(), llvm::Value::getType(), llvm::Type::isVectorTy(), Ptr, and llvm::Align::value().
Referenced by instCombineST1ScatterIndex(), instCombineSVEST1(), simplifyX86MaskedStore(), upgradeMaskedStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Create call to the maximum intrinsic.
Definition at line 1015 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
|
inline |
Create call to the maxnum intrinsic.
Definition at line 1000 of file IRBuilder.h.
References CreateBinaryIntrinsic(), CreateConstrainedFPUnroundedBinOp(), IsFPConstrained, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), and llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Create and insert a memcpy between the specified pointers.
If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.
Definition at line 657 of file IRBuilder.h.
References CreateMemCpy(), getInt64(), and Size.
Referenced by callBufferedPrintfArgPush(), CreateMemCpy(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), and HandleByValArgumentInit().
|
inline |
Definition at line 674 of file IRBuilder.h.
References CreateMemTransferInst(), and Size.
|
inline |
Definition at line 686 of file IRBuilder.h.
References CreateMemTransferInst(), and Size.
|
inline |
Definition at line 709 of file IRBuilder.h.
References CreateMemMove(), getInt64(), and Size.
Referenced by CreateMemMove().
|
inline |
Definition at line 718 of file IRBuilder.h.
References CreateMemTransferInst(), and Size.
|
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 a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.
Definition at line 593 of file IRBuilder.h.
References CreateMemSet(), getInt64(), Ptr, and Size.
Referenced by CreateMemSet(), lowerIntrinsicToFunction(), and OptimizeGlobalAddressOfAllocation().
CallInst * IRBuilderBase::CreateMemSet | ( | Value * | Ptr, |
Value * | Val, | ||
Value * | Size, | ||
MaybeAlign | Align, | ||
bool | isVolatile = false , |
||
MDNode * | TBAATag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Definition at line 137 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Ptr, llvm::Instruction::setMetadata(), and Size.
CallInst * IRBuilderBase::CreateMemSetInline | ( | Value * | Dst, |
MaybeAlign | DstAlign, | ||
Value * | Val, | ||
Value * | Size, | ||
bool | IsVolatile = false , |
||
MDNode * | TBAATag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Definition at line 164 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::setMetadata(), and Size.
CallInst * IRBuilderBase::CreateMemTransferInst | ( | Intrinsic::ID | IntrID, |
Value * | Dst, | ||
MaybeAlign | DstAlign, | ||
Value * | Src, | ||
MaybeAlign | SrcAlign, | ||
Value * | Size, | ||
bool | isVolatile = false , |
||
MDNode * | TBAATag = nullptr , |
||
MDNode * | TBAAStructTag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Definition at line 219 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::setMetadata(), and Size.
Referenced by CreateMemCpy(), CreateMemCpyInline(), and CreateMemMove().
|
inline |
Create call to the minimum intrinsic.
Definition at line 1010 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
|
inline |
Create call to the minnum intrinsic.
Definition at line 990 of file IRBuilder.h.
References CreateBinaryIntrinsic(), CreateConstrainedFPUnroundedBinOp(), IsFPConstrained, LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), and llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1359 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), buildMultiplyTree(), CheckAndCreateOffsetAdd(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateMalloc(), CreateNSWMul(), CreateNUWMul(), CreateVScale(), llvm::emitGEPOffset(), llvm::VPVectorPointerRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), expandFPToI(), expandIntegerDot(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), generatedUnsignedRemainderCode(), getMul64(), getStepVector(), hoistMulAddAssociation(), matchStridedStart(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), simplifyX86pmadd(), llvm::OpenMPIRBuilder::tileLoops(), llvm::UpgradeIntrinsicCall(), upgradePMULDQ(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAdd(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitCallBase(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
Create a vector int mul reduction intrinsic of the source vector.
Definition at line 437 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
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 1005 of file IRBuilder.cpp.
References assert(), CreateBinOp(), CreateUnOp(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isUnaryOp(), llvm_unreachable, Name, and llvm::ArrayRef< T >::size().
Referenced by llvm::VPWidenRecipe::execute().
|
inline |
Definition at line 1719 of file IRBuilder.h.
References CreateSub(), llvm::Constant::getNullValue(), and Name.
Referenced by canonicalizeAbs(), canonicalizeSaturatedSubtract(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateNSWNeg(), foldFDivPowDivisor(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), foldMulSelectToNegate(), foldUnsignedUnderflowCheck(), llvm::SCEVExpander::generateOverflowCheck(), llvm::InstCombinerImpl::OptimizePointerDifference(), llvm::UpgradeIntrinsicCall(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitShl(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 862 of file IRBuilder.h.
References Context, CreateNoAliasScopeDeclaration(), and llvm::MetadataAsValue::get().
Instruction * IRBuilderBase::CreateNoAliasScopeDeclaration | ( | Value * | Scope | ) |
Create a llvm.experimental.noalias.scope.decl intrinsic call.
Definition at line 562 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), and llvm::BasicBlock::getModule().
Referenced by AddAliasScopeMetadata(), and CreateNoAliasScopeDeclaration().
Definition at line 1747 of file IRBuilder.h.
References CreateXor(), llvm::Constant::getAllOnesValue(), and Name.
Referenced by llvm::buildAtomicRMWValue(), canonicalizeICmpBool(), createLogicFromTable(), createMaskInstrs(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), foldComplexAndOrPatterns(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), foldNotXor(), freelyInvert(), insertSpills(), llvm::InvertBranch(), LowerCTLZ(), llvm::IntrinsicLowering::LowerIntrinsicCall(), matchDeMorgansLaws(), mergeConditionalStoreToAddress(), removeUndefIntroducingPredecessor(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), simplifyUsingControlFlow(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), visitMaskedMerge(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 1334 of file IRBuilder.h.
References CreateAdd(), LHS, Name, and RHS.
Referenced by rewriteGEPAsOffset().
|
inline |
Definition at line 1368 of file IRBuilder.h.
References CreateMul(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitMul().
Definition at line 1724 of file IRBuilder.h.
References CreateNeg(), and Name.
|
inline |
Definition at line 1351 of file IRBuilder.h.
References CreateSub(), LHS, Name, and RHS.
|
inline |
Definition at line 1338 of file IRBuilder.h.
References CreateAdd(), LHS, Name, and RHS.
Referenced by foldNoWrapAdd().
|
inline |
Definition at line 1372 of file IRBuilder.h.
References CreateMul(), LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc().
|
inline |
Definition at line 1355 of file IRBuilder.h.
References CreateSub(), LHS, Name, and RHS.
Definition at line 1509 of file IRBuilder.h.
References assert(), CreateOr(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1501 of file IRBuilder.h.
References CreateOr(), LHS, Name, and RHS.
Definition at line 1505 of file IRBuilder.h.
References CreateOr(), LHS, Name, and RHS.
Definition at line 1495 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::buildAtomicRMWValue(), buildPartialUnswitchConditionalBranch(), checkForNegativeOperand(), createLogicFromTable(), CreateOr(), llvm::OpenMPIRBuilder::createTask(), llvm::emitAMDGPUPrintfCall(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), expandAnyIntrinsic(), expandFPToI(), expandIToFP(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), foldComplexAndOrPatterns(), llvm::InstCombinerImpl::foldICmpAndConstConst(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldLogOpOfMaskedICmps(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSwitchToSelect(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), getBoundsCheckCond(), llvm::VNCoercion::getMemInstValueForLoad(), insertMaskedValue(), LowerBSWAP(), LowerCTLZ(), lowerFunnelShifts(), matchOrConcat(), mergeConditionalStoreToAddress(), performMaskedAtomicOp(), llvm::promoteCallWithVTableCmp(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), llvm::UpgradeIntrinsicCall(), llvm::LoopVersioning::versionLoop(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitXor().
Create a vector int OR reduction intrinsic of the source vector.
Definition at line 445 of file IRBuilder.cpp.
Referenced by llvm::createAnyOfTargetReduction(), llvm::createSimpleTargetReduction(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 2395 of file IRBuilder.h.
References llvm::PHINode::Create(), FMF, Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), createRetPHINode(), despeculateCountZeros(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::VPWidenPHIRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPEVLBasedIVPHIRecipe::execute(), expandFPToI(), expandIToFP(), expandToSwitch(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InstCombinerImpl::foldICmpWithConstant(), generateUnsignedDivisionCode(), llvm::InstCombiner::getFreelyInvertedImpl(), getStrlenWithNull(), optimizeSQRT(), processPhiNode(), rewritePHIsForCleanupPad(), llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), llvm::SplitBlockAndInsertSimpleForLoop(), llvm::splitLoopBound(), splitRetconCoroutine(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
|
inline |
Definition at line 2180 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), Folder, Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU(), and llvm::OpenMPIRBuilder::emitNonContiguousDescriptor().
|
inline |
Definition at line 2168 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerCast(), llvm::CastInst::CreatePointerCast(), Folder, Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), targetParallelCallback(), llvm::UpgradeIntrinsicCall(), and UseTlsOffset().
Value * IRBuilderBase::CreatePreserveArrayAccessIndex | ( | Type * | ElTy, |
Value * | Base, | ||
unsigned | Dimension, | ||
unsigned | LastIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1212 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::Attribute::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GetElementPtrInst::getGEPReturnType(), getInt32(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::Instruction::setMetadata().
Value * IRBuilderBase::CreatePreserveStructAccessIndex | ( | Type * | ElTy, |
Value * | Base, | ||
unsigned | Index, | ||
unsigned | FieldIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1260 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::Attribute::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GetElementPtrInst::getGEPReturnType(), getInt32(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), and llvm::Instruction::setMetadata().
Value * IRBuilderBase::CreatePreserveUnionAccessIndex | ( | Value * | Base, |
unsigned | FieldIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1241 of file IRBuilder.cpp.
References assert(), llvm::sampleprof::Base, BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), and llvm::Instruction::setMetadata().
|
inline |
Definition at line 1974 of file IRBuilder.h.
References CreateGEP(), getInt8Ty(), Name, llvm::Offset, and Ptr.
Referenced by canonicalizeGEPOfConstGEPI8(), constructPointer(), createByteGEP(), foldConsecutiveLoads(), llvm::SCEVExpander::generateOverflowCheck(), insertSpills(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
Value * IRBuilderBase::CreatePtrDiff | ( | Type * | ElemTy, |
Value * | LHS, | ||
Value * | RHS, | ||
const Twine & | Name = "" |
||
) |
Return the i64 difference between two pointer values, dividing out the size of the pointed-to objects.
This is intended to implement C-style pointer subtraction. As such, the pointers must be appropriately aligned for their element types and pointing into the same object.
Definition at line 1106 of file IRBuilder.cpp.
References assert(), Context, CreateExactSDiv(), CreatePtrToInt(), CreateSub(), llvm::Type::getInt64Ty(), llvm::ConstantExpr::getSizeOf(), llvm::Value::getType(), LHS, Name, and RHS.
|
inline |
Definition at line 2115 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateBitOrPointerCast(), createCast(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), createMaskInstrs(), CreatePtrDiff(), llvm::OpenMPIRBuilder::createTask(), llvm::orc::IRSpeculationLayer::emit(), fitArgInto64Bits(), llvm::memtag::getFP(), llvm::memtag::getPC(), llvm::OpenMPIRBuilder::getSizeInBytes(), llvm::VNCoercion::getStoreValueForLoadHelper(), getStrlenWithNull(), inlineGetBaseAndOffset(), insertSpills(), instrumentOneFunc(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), makeStatepointExplicitImpl(), llvm::KCFIPass::run(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitPtrToInt().
|
inline |
Definition at line 1230 of file IRBuilder.h.
References llvm::ResumeInst::Create(), and Insert().
|
inline |
Create a 'ret <val>' instruction.
Definition at line 1093 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
Referenced by buildUMulWithOverflowFunc(), generateReproducer(), llvm::InlineFunction(), lowerFunnelShifts(), lowerIntrinsicToFunction(), llvm::orc::makeStub(), replaceFallthroughCoroEnd(), and splitRetconCoroutine().
|
inline |
Create a 'ret void' instruction.
Definition at line 1088 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
Referenced by createFrameHelperMachineFunction(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::InlineFunction(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), lowerIntrinsicToFunction(), llvm::orc::makeStub(), replaceCoroEndAsync(), replaceFallthroughCoroEnd(), and splitAsyncCoroutine().
|
inline |
Definition at line 1389 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by CreateExactSDiv(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), foldIDivShl(), and llvm::InstCombinerImpl::visitSDiv().
Value * IRBuilderBase::CreateSelect | ( | Value * | C, |
Value * | True, | ||
Value * | False, | ||
const Twine & | Name = "" , |
||
Instruction * | MDFrom = nullptr |
||
) |
Definition at line 1090 of file IRBuilder.cpp.
References llvm::CallingConv::C, llvm::SelectInst::Create(), FMF, Folder, llvm::IRBuilderFolder::FoldSelect(), llvm::Instruction::getMetadata(), Insert(), and Name.
Referenced by llvm::buildAtomicRMWValue(), llvm::createAnyOfTargetReduction(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::SPIRVMergeRegionExitTargets::createExitVariable(), CreateLogicalAnd(), CreateLogicalOr(), llvm::createMinMaxOp(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTeams(), emitRsqIEEE1ULP(), emitX86ScalarSelect(), emitX86Select(), llvm::VPWidenSelectRecipe::execute(), llvm::VPBlendRecipe::execute(), llvm::VPReductionRecipe::execute(), expandFPToI(), foldMulSelectToNegate(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSetClearBits(), foldSwitchToSelect(), FoldTwoEntryPHINode(), generateNewInstTree(), llvm::SCEVExpander::generateOverflowCheck(), generateUnsignedDivisionCode(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVESel(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerObjectSizeCall(), reassociateMinMaxWithConstants(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifyX86pack(), takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), llvm::UpgradeIntrinsicCall(), upgradeMaskedMove(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFPTrunc(), and llvm::ObjectSizeOffsetEvaluator::visitSelectInst().
|
inline |
Definition at line 2031 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), CreateSExtOrTrunc(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), foldNoWrapAdd(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), sinkMinMaxInBB(), tryInterleave(), tryToFPToSat(), llvm::UpgradeIntrinsicCall(), upgradeMaskToInt(), upgradeX86vpcom(), llvm::InstCombinerImpl::visitAnd(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
inline |
Definition at line 2143 of file IRBuilder.h.
References CreateCast(), llvm::Type::getScalarSizeInBits(), and 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 2052 of file IRBuilder.h.
References assert(), CreateSExt(), CreateTrunc(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by hostParallelCallback(), and targetParallelCallback().
|
inline |
Definition at line 1423 of file IRBuilder.h.
References CreateShl(), LHS, Name, and RHS.
|
inline |
Definition at line 1429 of file IRBuilder.h.
References CreateShl(), LHS, Name, and RHS.
|
inline |
Definition at line 1414 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by canonicalizeLowbitMask(), combineAddSubWithShlAddSub(), llvm::InstCombinerImpl::commonIDivTransforms(), convertToRelLookupTable(), createMaskInstrs(), CreateShl(), llvm::emitAMDGPUPrintfCall(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), expandFPToI(), expandIToFP(), llvm::InstCombinerImpl::foldAddWithConstant(), foldConsecutiveLoads(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldIDivShl(), foldMulShl1(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpAndBinOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generateUnsignedDivisionCode(), llvm::VNCoercion::getMemInstValueForLoad(), getShiftedValue(), insertMaskedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), LowerBSWAP(), lowerFunnelShifts(), matchOrConcat(), matchStridedStart(), simplifyValueKnownNonZero(), simplifyX86immShift(), simplifyX86varShift(), upgradePMULDQ(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), and llvm::InstCombinerImpl::visitTrunc().
|
inline |
Create a unary shuffle.
The second vector operand of the IR instruction is poison.
Definition at line 2509 of file IRBuilder.h.
References CreateShuffleVector(), llvm::PoisonValue::get(), and Name.
|
inline |
See class ShuffleVectorInst for a description of the mask representation.
Definition at line 2500 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldShuffleVector(), Insert(), and Name.
|
inline |
Definition at line 2492 of file IRBuilder.h.
References CreateShuffleVector(), llvm::ShuffleVectorInst::getShuffleMask(), and Name.
Referenced by applyX86MaskOn1BitsVec(), concatenateTwoVectors(), concatSubVector(), createShiftShuffle(), CreateShuffleVector(), createTblForTrunc(), createTblShuffleForZExt(), CreateVectorReverse(), CreateVectorSplat(), CreateVectorSplice(), foldCastShuffle(), llvm::InstCombinerImpl::foldSelectShuffle(), foldShuffleOfUnaryOps(), llvm::InstCombinerImpl::foldVectorBinop(), generateNewInstTree(), llvm::getShuffleReduction(), getX86MaskVec(), instCombineSVEDupqLane(), interleaveVectors(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleavedStore(), lowerKernelArguments(), narrowVectorSelect(), promoteAllocaUserToVector(), reorderSubVector(), scalarizeMaskedExpandLoad(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyNeonTbl1(), simplifyX86extrq(), simplifyX86immShift(), simplifyX86insertps(), simplifyX86insertq(), simplifyX86pack(), simplifyX86pmadd(), simplifyX86pshufb(), simplifyX86vpermilvar(), simplifyX86vpermv(), tryInterleave(), llvm::UpgradeIntrinsicCall(), upgradeX86ALIGNIntrinsics(), upgradeX86PSLLDQIntrinsics(), upgradeX86PSRLDQIntrinsics(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
|
inline |
Definition at line 2092 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by llvm::VPScalarIVStepsRecipe::execute(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1408 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), and llvm::InstCombinerImpl::visitSRem().
Create a call to llvm.stackrestore.
Definition at line 1058 of file IRBuilder.h.
References CreateIntrinsic(), Name, and Ptr.
Referenced by llvm::InlineFunction(), lowerLocalAllocas(), and RemovePreallocated().
Create a call to llvm.stacksave.
Definition at line 1051 of file IRBuilder.h.
References BB, Context, CreateIntrinsic(), DL, llvm::BasicBlock::getDataLayout(), and Name.
Referenced by llvm::InlineFunction(), lowerLocalAllocas(), and RemovePreallocated().
Creates a vector of type DstType
with the linear sequence <0, 1, ...>
Definition at line 109 of file IRBuilder.cpp.
References CreateIntrinsic(), CreateTrunc(), llvm::ConstantVector::get(), llvm::VectorType::get(), getInt8Ty(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), and getStepVector().
|
inline |
Definition at line 1801 of file IRBuilder.h.
References CreateAlignedStore(), and Ptr.
Referenced by callBufferedPrintfArgPush(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::SITargetLowering::emitExpandAtomicRMW(), emitSetAndGetSwiftErrorValueAround(), hostParallelCallback(), insertSpills(), instCombineSVEST1(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), markCoroutineAsDone(), mergeConditionalStoreToAddress(), replaceSwiftErrorOps(), salvageDebugInfoImpl(), scalarizeMaskedVectorHistogram(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), splitRetconCoroutine(), and targetParallelCallback().
Create a strip.invariant.group intrinsic call.
If Ptr type is different from pointer to i8, it's casted to pointer to i8 in the same address space before call and casted back to Ptr type after call.
Definition at line 1133 of file IRBuilder.cpp.
References assert(), BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getReturnType(), and Ptr.
Referenced by simplifyInvariantGroupIntrinsic().
|
inline |
Definition at line 1969 of file IRBuilder.h.
References CreateConstInBoundsGEP2_32(), Idx, Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitTargetKernel(), and markCoroutineAsDone().
|
inline |
Definition at line 1342 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), checkForNegativeOperand(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createMemMoveLoop(), CreateNeg(), CreateNSWSub(), CreateNUWSub(), CreatePtrDiff(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPVectorPointerRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), expandAbs(), expandFPToI(), expandIToFP(), foldAndOrOfICmpEqConstantAndICmp(), foldCtpop(), llvm::InstCombinerImpl::foldICmpBinOp(), foldICmpIntrinsicWithIntrinsic(), foldMulShl1(), foldSwitchToSelect(), generatedUnsignedRemainderCode(), llvm::SCEVExpander::generateOverflowCheck(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), llvm::VPLane::getAsRuntimeExpr(), getBoundsCheckCond(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), getStrlenWithNull(), hoistAdd(), hoistSub(), inlineGetBaseAndOffset(), llvm::InstCombinerImpl::insertRangeTest(), lowerFunnelShifts(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::lowerObjectSizeCall(), makeStatepointExplicitImpl(), llvm::InstCombinerImpl::OptimizePointerDifference(), llvm::VPlan::prepareToExecute(), ReduceSwitchRange(), replaceSubOverflowUses(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifyValueKnownNonZero(), SwitchToLookupTable(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::UnrollRuntimeLoopRemainder(), llvm::UpgradeIntrinsicCall(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitURem().
|
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 1141 of file IRBuilder.h.
References llvm::SwitchInst::Create(), and Insert().
Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createSections(), expandIToFP(), expandToSwitch(), rewritePHIsForCleanupPad(), and llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse().
Create a call to llvm.threadlocal.address intrinsic.
Definition at line 538 of file IRBuilder.cpp.
References A, llvm::CallBase::addParamAttr(), llvm::CallBase::addRetAttr(), assert(), CreateIntrinsic(), llvm::getAlign(), llvm::Value::getContext(), llvm::Attribute::getWithAlignment(), and Ptr.
|
inline |
Definition at line 2005 of file IRBuilder.h.
References llvm::CastInst::Create(), llvm::IRBuilderFolder::FoldCast(), Folder, I, Insert(), and Name.
Referenced by callBufferedPrintfStart(), createMaskInstrs(), CreateSExtOrTrunc(), CreateStepVector(), CreateZExtOrTrunc(), DoFlattenLoopPair(), dropRedundantMaskingOfLeftShiftInput(), llvm::emitAMDGPUPrintfCall(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandIToFP(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), extractIntPart(), extractMaskedValue(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombiner::getFreelyInvertedImpl(), getMul64(), lowerKernelArguments(), llvm::AArch64TargetLowering::optimizeExtendOrTruncateConversion(), processUGT_ADDCST_ADD(), shrinkSplatShuffle(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyX86pack(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), SwitchToLookupTable(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().
|
inline |
Definition at line 2151 of file IRBuilder.h.
References CreateCast(), llvm::Type::getScalarSizeInBits(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::VNCoercion::getStoreValueForLoadHelper(), and llvm::SCEVExpander::replaceCongruentIVs().
Create an expression which evaluates to the number of units in Size
at runtime.
This works for both units of bits and bytes.
Definition at line 104 of file IRBuilder.cpp.
References CreateVScale(), and Size.
Referenced by llvm::emitGEPOffset(), getBoundsCheckCond(), and llvm::ObjectSizeOffsetEvaluator::visitAllocaInst().
|
inline |
Definition at line 1376 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateExactUDiv(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), foldIDivShl(), generatedUnsignedRemainderCode(), generateSignedDivisionCode(), getShape(), and llvm::OpenMPIRBuilder::tileLoops().
|
inline |
Definition at line 2079 of file IRBuilder.h.
References CreateConstrainedFPCast(), llvm::IRBuilderFolder::FoldCast(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by getStepVector(), llvm::AArch64TargetLowering::optimizeExtendOrTruncateConversion(), and llvm::UpgradeIntrinsicCall().
CallInst * IRBuilderBase::CreateUnaryIntrinsic | ( | Intrinsic::ID | ID, |
Value * | V, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" |
||
) |
Create a call to intrinsic ID
with 1 operand which is mangled on its type.
Definition at line 913 of file IRBuilder.cpp.
References BB, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and Name.
Referenced by emitRsqIEEE1ULP(), foldBitOrderCrossLogicOp(), foldCtpop(), foldFDivSqrtDivisor(), llvm::InstCombinerImpl::foldFMulReassoc(), foldICmpPow2Test(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitLShr(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 1751 of file IRBuilder.h.
References llvm::UnaryOperator::Create(), FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), Insert(), and Name.
Referenced by CreateNAryOp(), and generateNewInstTree().
|
inline |
Definition at line 1261 of file IRBuilder.h.
References Context, and Insert().
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::deleteDeadLoop(), llvm::VPBasicBlock::execute(), expandToSwitch(), removeUndefIntroducingPredecessor(), rewritePHIsForCleanupPad(), and TryToMergeLandingPad().
|
inline |
Definition at line 1402 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::OpenMPIRBuilder::collapseLoops(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), generateSignedRemainderCode(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), lowerFunnelShifts(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), and llvm::OpenMPIRBuilder::tileLoops().
|
inline |
Definition at line 2454 of file IRBuilder.h.
References Insert(), llvm::List, and Name.
Return a vector value that contains the vector V reversed.
Definition at line 1150 of file IRBuilder.cpp.
References BB, llvm::CallInst::Create(), CreateShuffleVector(), F, llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), Insert(), Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
Value * IRBuilderBase::CreateVectorSplat | ( | ElementCount | EC, |
Value * | V, | ||
const Twine & | Name = "" |
||
) |
Return a vector value that contains.
EC
elements. Definition at line 1198 of file IRBuilder.cpp.
References assert(), CreateInsertElement(), CreateShuffleVector(), llvm::VectorType::get(), llvm::PoisonValue::get(), getInt64(), Name, and llvm::SmallVectorImpl< T >::resize().
Return a vector value that contains.
NumElts
elements. Definition at line 1192 of file IRBuilder.cpp.
References CreateVectorSplat(), llvm::ElementCount::getFixed(), and Name.
Referenced by CheckAndCreateOffsetAdd(), createReverseEVL(), CreateVectorSplat(), llvm::emitGEPOffset(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::VPTransformState::get(), getStepVector(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineSVEDupX(), instCombineSVETBL(), instCombineSVEUnpack(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), lowerFunnelShifts(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), promoteAllocaUserToVector(), simplifyX86immShift(), llvm::UpgradeIntrinsicCall(), upgradeX86ConcatShift(), and upgradeX86Rotate().
Value * IRBuilderBase::CreateVectorSplice | ( | Value * | V1, |
Value * | V2, | ||
int64_t | Imm, | ||
const Twine & | Name = "" |
||
) |
Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector.
If the immediate is positive, a vector is extracted from concat(V1, V2), starting at Imm. If the immediate is negative, we extract -Imm elements from V1 and the remaining elements from V2. Imm is a signed integer in the range -VL <= Imm < VL (where VL is the runtime vector length of the source/result vector)
Definition at line 1165 of file IRBuilder.cpp.
References assert(), BB, llvm::CallInst::Create(), CreateShuffleVector(), F, llvm::Intrinsic::getDeclaration(), getInt32(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), I, Idx, Insert(), and Name.
Create a call to llvm.vscale, multiplied by Scaling
.
The type of VScale will be the same type as that of Scaling
.
Definition at line 88 of file IRBuilder.cpp.
References assert(), CreateCall(), CreateMul(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Value::getType(), isZero(), and Name.
Referenced by CreateElementCount(), CreateTypeSize(), instCombineSVECntElts(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().
|
inline |
Definition at line 1523 of file IRBuilder.h.
References CreateXor(), LHS, Name, and RHS.
|
inline |
Definition at line 1527 of file IRBuilder.h.
References CreateXor(), LHS, Name, and RHS.
Definition at line 1517 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::buildAtomicRMWValue(), canonicalizeICmpBool(), createLogicFromTable(), createMaskInstrs(), CreateNot(), CreateXor(), expandFPToI(), expandIToFP(), foldAndToXor(), foldComplexAndOrPatterns(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldOrOfInversions(), foldOrToXor(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), foldXorToXor(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::InstCombiner::getFreelyInvertedImpl(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyTernarylogic(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().
Create a vector int XOR reduction intrinsic of the source vector.
Definition at line 449 of file IRBuilder.cpp.
Referenced by llvm::createSimpleTargetReduction().
|
inline |
Definition at line 2019 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldCast(), Folder, I, Insert(), and Name.
Referenced by bitTrackingDCE(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::OpenMPIRBuilder::createAtomicCompare(), createTblShuffleForZExt(), CreateZExtOrTrunc(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), expandIToFP(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), fitArgInto64Bits(), foldAnyOrAllBitsSet(), foldConsecutiveLoads(), foldCttzCtlz(), foldNoWrapAdd(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), getMul64(), injectPendingInvariantConditions(), insertMaskedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), matchOrConcat(), processNonStringArg(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), simplifyX86addcarry(), sinkMinMaxInBB(), takeLog2(), llvm::OpenMPIRBuilder::tileLoops(), tryInterleave(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitZExt().
|
inline |
Definition at line 2135 of file IRBuilder.h.
References CreateCast(), llvm::Type::getScalarSizeInBits(), and Name.
Referenced by llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::VNCoercion::getMemInstValueForLoad(), and splitMergedValStore().
|
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 2037 of file IRBuilder.h.
References assert(), CreateTrunc(), CreateZExt(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by createTargetLoopWorkshareCall(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), llvm::SCEVExpander::generateOverflowCheck(), instrumentOneFunc(), llvm::lowerObjectSizeCall(), simplifyX86immShift(), simplifyX86movmsk(), SwitchToLookupTable(), llvm::InstCombinerImpl::visitAdd(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitCallBase(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitIntToPtr().
|
inline |
Return an all true boolean vector (mask) with NumElts
lanes.
Definition at line 846 of file IRBuilder.h.
References Context, llvm::VectorType::get(), llvm::Constant::getAllOnesValue(), and llvm::Type::getInt1Ty().
Referenced by CreateMaskedGather(), CreateMaskedScatter(), and llvm::VectorBuilder::getAllTrueMask().
|
inline |
Fetch the type representing a 16-bit brain floating point value.
Definition at line 547 of file IRBuilder.h.
References Context, and llvm::Type::getBFloatTy().
Referenced by llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 174 of file IRBuilder.h.
References Context.
Referenced by llvm::OpenMPIRBuilder::applySimd(), callBufferedPrintfStart(), CloneLoopBlocks(), createAllocaInstAtEntry(), CreateGCStatepointCallCommon(), CreateGCStatepointInvokeCommon(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createSingle(), llvm::emitAMDGPUPrintfCall(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::AArch64TargetLowering::emitStoreConditional(), expandFPToI(), expandIToFP(), generateUnsignedDivisionCode(), llvm::VectorBuilder::getContext(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::OpenMPIRBuilder::getSizeInBytes(), llvm::GCNTTIImpl::instCombineIntrinsic(), lowerAwaitSuspend(), processConstantStringArg(), SegmentOffset(), SetNoSanitizeMetadata(), llvm::OpenMPIRBuilder::unrollLoopFull(), and llvm::OpenMPIRBuilder::unrollLoopHeuristic().
DebugLoc IRBuilderBase::getCurrentDebugLocation | ( | ) | const |
Get location information used by debugging information.
Definition at line 63 of file IRBuilder.cpp.
Referenced by llvm::InstrumentationIRBuilder::ensureDebugInfo(), llvm::SCEVExpander::getCurrentDebugLocation(), llvm::spliceBB(), and llvm::splitBB().
Type * IRBuilderBase::getCurrentFunctionReturnType | ( | ) | const |
Get the return type of the current function that we're emitting into.
Definition at line 58 of file IRBuilder.cpp.
References assert(), BB, llvm::BasicBlock::getParent(), and llvm::Function::getReturnType().
Referenced by CreateAggregateRet().
|
inline |
Get the exception handling used with constrained floating point.
Definition at line 341 of file IRBuilder.h.
References DefaultConstrainedExcept.
|
inline |
Get the rounding mode handling used with constrained floating point.
Definition at line 346 of file IRBuilder.h.
References DefaultConstrainedRounding.
|
inline |
Get the floating point math metadata being used.
Definition at line 295 of file IRBuilder.h.
References DefaultFPMathTag.
|
inline |
Fetch the type representing a 64-bit floating point value.
Definition at line 557 of file IRBuilder.h.
References Context, and llvm::Type::getDoubleTy().
Referenced by instCombineSVECondLast(), and processNonStringArg().
|
inline |
Get the constant value for i1 false.
Definition at line 469 of file IRBuilder.h.
References Context, and llvm::ConstantInt::getFalse().
Referenced by createLogicFromTable(), llvm::deleteDeadLoop(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), handleNoSuspendCoroutine(), replaceSubOverflowUses(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAdd(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 300 of file IRBuilder.h.
References FMF.
|
inline |
Get the flags to be applied to created floating point ops.
Definition at line 298 of file IRBuilder.h.
References FMF.
|
inline |
Fetch the type representing a 32-bit floating point value.
Definition at line 552 of file IRBuilder.h.
References Context, and llvm::Type::getFloatTy().
Referenced by instCombineSVECondLast().
|
inline |
Fetch the type representing a 16-bit floating point value.
Definition at line 542 of file IRBuilder.h.
References Context, and llvm::Type::getHalfTy().
Referenced by instCombineSVECondLast().
|
inline |
Fetch the type of an integer that should be used to index GEP operations within AddressSpace.
Definition at line 579 of file IRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU().
|
inline |
Definition at line 172 of file IRBuilder.h.
References BB.
Referenced by callAppendArgs(), callAppendStringN(), callBufferedPrintfArgPush(), callBufferedPrintfStart(), callIntrinsic(), callPrintfBegin(), llvm::OpenMPIRBuilder::createAtomicCompare(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateGCStatepointCallCommon(), CreateGCStatepointInvokeCommon(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), createPopcntIntrinsic(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::OpenMPIRBuilder::createTeams(), CreateVScale(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::AArch64TargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::OpenMPIRBuilder::emitBlock(), llvm::OpenMPIRBuilder::emitBranch(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitTrailingFence(), llvm::VPWidenCallRecipe::execute(), llvm::VPVectorPointerRecipe::execute(), expandFPToI(), expandIToFP(), generateUnsignedDivisionCode(), llvm::memtag::getAndroidSlotPtr(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), llvm::memtag::getFP(), llvm::TargetLoweringBase::getIRStackGuard(), llvm::X86TargetLowering::getIRStackGuard(), llvm::VectorBuilder::getModule(), llvm::memtag::getPC(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getStrlenWithNull(), hostParallelCallback(), llvm::ARMTargetLowering::makeDMB(), processNonStringArg(), llvm::memtag::readRegister(), saveAndClearIP(), saveIP(), llvm::VPTransformState::setDebugLocFrom(), llvm::spliceBB(), llvm::splitBB(), llvm::splitBBWithSuffix(), targetParallelCallback(), UseTlsOffset(), useTpOffset(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 173 of file IRBuilder.h.
References InsertPt.
Referenced by llvm::OpenMPIRBuilder::createTask(), DoFlattenLoopPair(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPExpandSCEVRecipe::execute(), llvm::expandDivision(), expandFPToI(), expandIToFP(), llvm::expandRemainder(), generateReproducer(), generateUnsignedDivisionCode(), getStrlenWithNull(), insertBoundsCheck(), insertSpills(), instrumentOneFunc(), llvm::SampleProfileProber::instrumentOneFunc(), lowerAwaitSuspend(), mergeConditionalStoreToAddress(), saveAndClearIP(), saveIP(), and llvm::slpvectorizer::BoUpSLP::vectorizeTree().
|
inline |
Get a constant integer value.
Definition at line 500 of file IRBuilder.h.
References Context.
Referenced by canonicalizeGEPOfConstGEPI8(), createByteGEP(), despeculateCountZeros(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), lowerFunnelShifts(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), transformToIndexedCompare(), llvm::InstCombinerImpl::visitGEPOfGEP(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
inline |
Get a constant value representing either true or false.
Definition at line 459 of file IRBuilder.h.
References getInt1Ty().
Referenced by llvm::createBitMaskForGaps(), createFFSIntrinsic(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), and upgradeAbs().
|
inline |
Fetch the type representing a 128-bit integer.
Definition at line 534 of file IRBuilder.h.
References Context, and llvm::Type::getInt128Ty().
|
inline |
Get a constant 16-bit value.
Definition at line 479 of file IRBuilder.h.
References llvm::CallingConv::C, and getInt16Ty().
Referenced by getShape().
|
inline |
Fetch the type representing a 16-bit integer.
Definition at line 519 of file IRBuilder.h.
References Context, and llvm::Type::getInt16Ty().
Referenced by getInt16(), and llvm::UpgradeIntrinsicCall().
|
inline |
Fetch the type representing a single bit.
Definition at line 509 of file IRBuilder.h.
References Context, and llvm::Type::getInt1Ty().
Referenced by CreateAssumption(), emitX86ScalarSelect(), getInt1(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), getX86MaskVec(), llvm::X86TTIImpl::instCombineIntrinsic(), upgradeARMIntrinsicCall(), upgradeMaskedCompare(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Get a constant 32-bit value.
Definition at line 484 of file IRBuilder.h.
References llvm::CallingConv::C, and getInt32Ty().
Referenced by appendToGlobalArray(), callAppendArgs(), callAppendStringN(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), createFakeIntVal(), CreateGCRelocate(), CreateGCRelocates(), createIsFPClass(), CreateMaskedGather(), CreateMaskedLoad(), CreateMaskedScatter(), CreateMaskedStore(), createOrdering(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTeams(), CreateVectorSplice(), llvm::emitAMDGPUPrintfCall(), llvm::OpenMPIRBuilder::emitMapperCall(), llvm::HexagonTargetLowering::emitStoreConditional(), emitTargetCall(), llvm::VPReductionPHIRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), foldConsecutiveLoads(), llvm::InstCombinerImpl::foldICmpBitCast(), foldVecTruncToExtElt(), llvm::VPLane::getAsRuntimeExpr(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::getOrderedReduction(), llvm::getShuffleReduction(), getSign32(), llvm::OpenMPIRBuilder::getSizeInBytes(), hostParallelCallback(), llvm::PPCTTIImpl::instCombineIntrinsic(), instrumentOneFunc(), llvm::SampleProfileProber::instrumentOneFunc(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::makeDMB(), nullifySetjmp(), optimizeIntegerToVectorInsertions(), llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse(), simplifyAllocaArraySize(), targetParallelCallback(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitExtractValueInst(), and llvm::InstCombinerImpl::visitTrunc().
|
inline |
Fetch the type representing a 32-bit integer.
Definition at line 524 of file IRBuilder.h.
References Context, and llvm::Type::getInt32Ty().
Referenced by appendToGlobalArray(), callAppendArgs(), callAppendStringN(), callBufferedPrintfStart(), llvm::OpenMPIRBuilder::createCopyPrivate(), createFakeIntVal(), llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(), llvm::OpenMPIRBuilder::createTask(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::VPVectorPointerRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::expandDivisionUpTo32Bits(), expandFPToI(), expandIToFP(), llvm::expandRemainderUpTo32Bits(), getAllocaPos(), llvm::VPLane::getAsRuntimeExpr(), getInt32(), getMul64(), instCombineSVEDupqLane(), instCombineSVESDIV(), lowerKernelArguments(), processConstantStringArg(), llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse(), llvm::UpgradeIntrinsicCall(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Get a constant 64-bit value.
Definition at line 489 of file IRBuilder.h.
References llvm::CallingConv::C, and getInt64Ty().
Referenced by appendArg(), constructPointer(), CreateElementUnorderedAtomicMemSet(), CreateExtractElement(), CreateInsertElement(), CreateInvariantStart(), CreateLifetimeEnd(), CreateLifetimeStart(), CreateMemCpy(), CreateMemMove(), CreateMemSet(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTask(), createTileStore(), CreateVectorSplat(), llvm::emitAMDGPUPrintfCall(), llvm::OpenMPIRBuilder::emitMapperCall(), emitTargetCall(), emitTPIDR2Save(), llvm::OpenMPIRBuilder::getKernelArgsVector(), getMul64(), getStrlenWithNull(), HandleByValArgumentInit(), instCombineSVEDupqLane(), instCombineSVEUzp1(), instrumentOneFunc(), llvm::SampleProfileProber::instrumentOneFunc(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), replaceWithTileLoad(), llvm::setProbeDistributionFactor(), splitRetconCoroutine(), targetParallelCallback(), and llvm::InstCombinerImpl::visitInsertElementInst().
|
inline |
Fetch the type representing a 64-bit integer.
Definition at line 529 of file IRBuilder.h.
References Context, and llvm::Type::getInt64Ty().
Referenced by callAppendArgs(), callAppendStringN(), callBufferedPrintfStart(), callPrintfBegin(), CreateInvariantStart(), CreateLifetimeEnd(), CreateLifetimeStart(), llvm::OpenMPIRBuilder::createTask(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::expandDivisionUpTo64Bits(), expandIToFP(), llvm::expandRemainderUpTo64Bits(), fitArgInto64Bits(), getInt64(), getMul64(), getStrlenWithNull(), instCombineSVEDupqLane(), instrumentOneFunc(), lowerKernelArguments(), and processNonStringArg().
|
inline |
Get a constant 8-bit value.
Definition at line 474 of file IRBuilder.h.
References llvm::CallingConv::C, and getInt8Ty().
Referenced by createTblForTrunc(), createTblShuffleForZExt(), getStrlenWithNull(), llvm::HexagonTargetLowering::LowerConstantPool(), and llvm::UpgradeIntrinsicCall().
|
inline |
Fetch the type representing an 8-bit integer.
Definition at line 514 of file IRBuilder.h.
References Context, and llvm::Type::getInt8Ty().
Referenced by callBufferedPrintfArgPush(), CreateInBoundsPtrAdd(), CreatePtrAdd(), CreateStepVector(), llvm::OpenMPIRBuilder::createTask(), createTblForTrunc(), llvm::emitAMDGPUPrintfCall(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::memtag::getAndroidSlotPtr(), getInt8(), getStrlenWithNull(), lowerKernelArguments(), lowerLocalAllocas(), rewriteGEPAsOffset(), rewritePHIsForCleanupPad(), simplifyX86addcarry(), upgradeX86PSLLDQIntrinsics(), upgradeX86PSRLDQIntrinsics(), UseTlsOffset(), useTpOffset(), llvm::InstCombinerImpl::visitGEPOfGEP(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
inline |
Get a constant N-bit value, zero extended or truncated from a 64-bit value.
Definition at line 495 of file IRBuilder.h.
References llvm::CallingConv::C, getIntNTy(), and N.
Referenced by CheckAndCreateOffsetAdd(), llvm::emitAMDGPUPrintfCall(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), expandFPToI(), expandIToFP(), generateSignedDivisionCode(), generateSignedRemainderCode(), getAddrSizeInt(), promoteAllocaUserToVector(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), and scalarizeMaskedStore().
|
inline |
Fetch the type representing an N-bit integer.
Definition at line 537 of file IRBuilder.h.
References Context, llvm::Type::getIntNTy(), and N.
Referenced by applyX86MaskOn1BitsVec(), createCmpXchgInstFun(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), expandFPToI(), expandIToFP(), llvm::InstCombinerImpl::foldICmpBitCast(), foldReductionIdiom(), getAddrIntType(), getIntN(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineSVEDupqLane(), lowerKernelArguments(), promoteAllocaUserToVector(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), simplifyX86movmsk(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFCmpInst().
|
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 573 of file IRBuilder.h.
Referenced by CreateAlignmentAssumption(), llvm::memtag::getFP(), llvm::memtag::getPC(), and llvm::memtag::readRegister().
|
inline |
Query for the use of constrained floating point math.
Definition at line 318 of file IRBuilder.h.
References IsFPConstrained.
|
inline |
Fetch the type representing a pointer.
Definition at line 567 of file IRBuilder.h.
References Context, and llvm::PointerType::get().
Referenced by appendToGlobalArray(), callAppendStringN(), callBufferedPrintfStart(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetData(), emitGetSwiftErrorValue(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), emitSetSwiftErrorValue(), getAllocaPos(), llvm::memtag::getFP(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedStore(), promoteAllocaUserToVector(), SegmentOffset(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), UseTlsOffset(), llvm::InstCombinerImpl::visitCallInst(), and workshareLoopTargetCallback().
|
inline |
Get the constant value for i1 true.
Definition at line 464 of file IRBuilder.h.
References Context, and llvm::ConstantInt::getTrue().
Referenced by createLogicFromTable(), createReverseEVL(), llvm::InnerLoopVectorizer::createVectorLoopSkeleton(), despeculateCountZeros(), llvm::VPBranchOnMaskRecipe::execute(), expandIToFP(), foldAbsDiff(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), generateReproducer(), generateUnsignedDivisionCode(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), optimizeSQRT(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Fetch the type representing void.
Definition at line 562 of file IRBuilder.h.
References Context, and llvm::Type::getVoidTy().
Referenced by appendToGlobalArray(), createOutlinedFunction(), llvm::createSanitizerCtorAndInitFunctions(), and emitTPIDR2Save().
No-op overload to handle constants.
Definition at line 150 of file IRBuilder.h.
References llvm::CallingConv::C.
|
inline |
Insert and return the specified instruction.
Definition at line 143 of file IRBuilder.h.
References AddMetadataToInst(), I, Inserter, llvm::IRBuilderDefaultInserter::InsertHelper(), InsertPt, and Name.
Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), CreateAggregateRet(), CreateAlignedLoad(), CreateAlignedStore(), CreateAlloca(), CreateAnd(), CreateAShr(), CreateAtomicCmpXchg(), CreateAtomicRMW(), CreateBinOp(), CreateBr(), CreateCall(), CreateCallBr(), CreateCast(), CreateCatchPad(), CreateCatchRet(), CreateCatchSwitch(), CreateCleanupPad(), CreateCleanupRet(), CreateCondBr(), CreateConstGEP1_32(), CreateConstGEP1_64(), CreateConstGEP2_32(), CreateConstGEP2_64(), CreateConstInBoundsGEP1_32(), CreateConstInBoundsGEP1_64(), CreateConstInBoundsGEP2_32(), CreateConstInBoundsGEP2_64(), CreateExtractElement(), CreateExtractValue(), CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFence(), CreateFMul(), CreateFMulFMF(), CreateFNeg(), CreateFNegFMF(), CreateFreeze(), CreateFRem(), CreateFRemFMF(), CreateFSub(), CreateFSubFMF(), CreateGEP(), CreateICmp(), CreateIndirectBr(), CreateInsertElement(), CreateInsertValue(), CreateInvoke(), CreateLandingPad(), CreateLShr(), CreateOr(), CreatePHI(), CreatePointerBitCastOrAddrSpaceCast(), CreatePointerCast(), CreateResume(), CreateRet(), CreateRetVoid(), CreateSDiv(), CreateSelect(), CreateShuffleVector(), CreateSRem(), CreateSwitch(), CreateTrunc(), CreateUDiv(), CreateUIToFP(), CreateUnOp(), CreateUnreachable(), CreateURem(), CreateVAArg(), CreateVectorReverse(), CreateVectorSplice(), CreateXor(), CreateZExt(), dropRedundantMaskingOfLeftShiftInput(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), Insert(), llvm::Negator::Negate(), optimizeSQRT(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InnerLoopVectorizer::scalarizeInstruction(), and llvm::InstCombinerImpl::visitShl().
|
inline |
Sets the current insert point to a previously-saved location.
Definition at line 287 of file IRBuilder.h.
References ClearInsertionPoint(), llvm::IRBuilderBase::InsertPoint::getBlock(), llvm::IRBuilderBase::InsertPoint::getPoint(), llvm::IRBuilderBase::InsertPoint::isSet(), and SetInsertPoint().
Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createFakeIntVal(), llvm::OpenMPIRBuilder::createMapperAllocas(), llvm::OpenMPIRBuilder::createOrderedDepend(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSection(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createTarget(), llvm::OpenMPIRBuilder::createTargetData(), createTargetLoopWorkshareCall(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPTransformState::get(), targetParallelCallback(), llvm::OpenMPIRBuilder::tileLoops(), llvm::OpenMPIRBuilder::updateToLocation(), workshareLoopTargetCallback(), and llvm::IRBuilderBase::InsertPointGuard::~InsertPointGuard().
|
inline |
Returns the current insert point, clearing it in the process.
Definition at line 280 of file IRBuilder.h.
References ClearInsertionPoint(), GetInsertBlock(), and GetInsertPoint().
|
inline |
Returns the current insert point.
Definition at line 275 of file IRBuilder.h.
References GetInsertBlock(), and GetInsertPoint().
Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createBarrier(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createOrderedDepend(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTarget(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::OpenMPIRBuilder::createTeams(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::OpenMPIRBuilder::emitIfClause(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), emitTargetCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPTransformState::get(), llvm::OpenMPIRBuilder::getInsertionPoint(), llvm::spliceBB(), llvm::splitBB(), and targetParallelCallback().
|
inline |
Definition at line 359 of file IRBuilder.h.
References I.
Referenced by CreateCall(), CreateConstrainedFPBinOp(), CreateConstrainedFPCall(), CreateConstrainedFPCast(), CreateConstrainedFPCmp(), CreateConstrainedFPUnroundedBinOp(), and CreateInvoke().
|
inline |
Definition at line 350 of file IRBuilder.h.
References assert(), BB, F, and llvm::BasicBlock::getParent().
|
inline |
Set location information used by debugging information.
Definition at line 218 of file IRBuilder.h.
Referenced by llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createLoopSkeleton(), despeculateCountZeros(), llvm::InstrumentationIRBuilder::ensureDebugInfo(), initIRBuilder(), makeStatepointExplicitImpl(), matchStridedStart(), mergeConditionalStoreToAddress(), llvm::Negator::Negate(), llvm::SCEVExpander::replaceCongruentIVs(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), llvm::SCEVExpander::SetCurrentDebugLocation(), llvm::VPTransformState::setDebugLocFrom(), SetInsertPoint(), simplifyRelocatesOffABase(), llvm::spliceBB(), llvm::splitBB(), llvm::OpenMPIRBuilder::tileLoops(), llvm::OpenMPIRBuilder::updateToLocation(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), and llvm::IRBuilderBase::InsertPointGuard::~InsertPointGuard().
|
inline |
Set the exception handling to be used with constrained floating point.
Definition at line 321 of file IRBuilder.h.
References assert(), llvm::convertExceptionBehaviorToStr(), and DefaultConstrainedExcept.
|
inline |
Set the rounding mode handling to be used with constrained floating point.
Definition at line 331 of file IRBuilder.h.
References assert(), llvm::convertRoundingModeToStr(), and DefaultConstrainedRounding.
|
inline |
Set the floating point math metadata to be used.
Definition at line 306 of file IRBuilder.h.
References DefaultFPMathTag.
|
inline |
Definition at line 363 of file IRBuilder.h.
References DefaultOperandBundles.
Referenced by llvm::FortifiedLibCallSimplifier::optimizeCall(), and llvm::LibCallSimplifier::optimizeCall().
|
inline |
Set the fast-math flags to be used with generated fp-math operators.
Definition at line 309 of file IRBuilder.h.
References FMF.
Referenced by llvm::VPInstruction::execute(), llvm::VPWidenRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPDerivedIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InstCombinerImpl::foldFMulReassoc(), foldMulSelectToNegate(), foldSqrt(), FoldTwoEntryPHINode(), instCombineSVEVectorBinOp(), matchIsFiniteTest(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::visitFNeg(), and llvm::InstCombinerImpl::visitFPTrunc().
|
inline |
This specifies that created instructions should be appended to the end of the specified block.
Definition at line 178 of file IRBuilder.h.
References BB, llvm::BasicBlock::end(), and InsertPt.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::OpenMPIRBuilder::applySimd(), buildNew(), convertToRelLookupTable(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::SPIRVMergeRegionExitTargets::createExitVariable(), llvm::OpenMPIRBuilder::createLoopSkeleton(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), createRetPHINode(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::OpenMPIRBuilder::createTeams(), llvm::deleteDeadLoop(), despeculateCountZeros(), DoFlattenLoopPair(), eliminateSwiftErrorArgument(), llvm::orc::IRSpeculationLayer::emit(), llvm::emitAMDGPUPrintfCall(), llvm::OpenMPIRBuilder::emitBlock(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SITargetLowering::emitExpandAtomicRMW(), emitSetAndGetSwiftErrorValueAround(), evaluateInDifferentElementOrder(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPlan::execute(), llvm::VPBasicBlock::execute(), llvm::VPIRBasicBlock::execute(), llvm::LoopVectorizationPlanner::executePlan(), expandAbs(), expandAnyIntrinsic(), expandClampIntrinsic(), llvm::SCEVExpander::expandComparePredicate(), expandExpIntrinsic(), expandFPToI(), expandIntegerDot(), expandIToFP(), expandLerpIntrinsic(), expandLogIntrinsic(), expandPowIntrinsic(), llvm::SCEVExpander::expandUnionPredicate(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InnerLoopVectorizer::fixNonInductionPHIs(), llvm::InnerLoopVectorizer::fixVectorizedLoop(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldConsecutiveLoads(), foldDependentIVs(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), freelyInvert(), generatedUnsignedRemainderCode(), llvm::SCEVExpander::generateOverflowCheck(), generateReproducer(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), llvm::VPTransformState::get(), getAllocaPos(), llvm::InstCombiner::getFreelyInvertedImpl(), getShape(), getStrlenWithNull(), hoistGEP(), hoistMinMax(), hostParallelCallback(), initIRBuilder(), injectPendingInvariantConditions(), inlineRetainOrClaimRVCalls(), InsertIntrinsicCalls(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::IRBuilder< FolderTy, InserterTy >::IRBuilder(), LLVMPositionBuilderImpl(), lowerAwaitSuspend(), lowerLocalAllocas(), lowerNonLocalAlloca(), llvm::lowerObjectSizeCall(), lowerPtrAnnotation(), lowerSubFn(), makeStatepointExplicitImpl(), matchStridedStart(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::EscapeEnumerator::Next(), optimizeSQRT(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), promoteAllocaUserToVector(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), ReduceSwitchRange(), RemovePreallocated(), removeUndefIntroducingPredecessor(), replaceCoroEndAsync(), restoreIP(), rewritePHIsForCleanupPad(), llvm::InstCombinerImpl::run(), llvm::KCFIPass::run(), salvageDebugInfoImpl(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), setInsertionPoint(), llvm::SCEVExpander::setInsertPoint(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifySwitchOfPowersOfTwo(), simplifyUsingControlFlow(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::spliceBB(), llvm::splitBB(), llvm::SplitBlockAndInsertForEachLane(), llvm::splitLoopBound(), splitMergedValStore(), SwitchToLookupTable(), targetParallelCallback(), llvm::OpenMPIRBuilder::tileLoops(), tryInterleave(), trySwitchToSelect(), llvm::UnrollRuntimeLoopRemainder(), llvm::UpgradeIntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), versionCallSiteWithCond(), llvm::LoopVersioning::versionLoop(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and llvm::InstCombinerImpl::visitSwitchInst().
|
inline |
This specifies that created instructions should be inserted at the specified point.
Definition at line 194 of file IRBuilder.h.
References BB, llvm::BasicBlock::end(), InsertPt, and SetCurrentDebugLocation().
|
inline |
This specifies that created instructions should be inserted at the specified point, but also requires that IP
is dereferencable.
Definition at line 203 of file IRBuilder.h.
References BB, llvm::BasicBlock::getParent(), InsertPt, and SetCurrentDebugLocation().
|
inline |
This specifies that created instructions should be inserted before the specified instruction.
Definition at line 185 of file IRBuilder.h.
References assert(), BB, llvm::BasicBlock::end(), I, InsertPt, and SetCurrentDebugLocation().
|
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 212 of file IRBuilder.h.
References BB, F, llvm::BasicBlock::getFirstNonPHIOrDbgOrAlloca(), and InsertPt.
void IRBuilderBase::SetInstDebugLocation | ( | Instruction * | I | ) | const |
If this builder has a current debug location, set it on the specified instruction.
Definition at line 70 of file IRBuilder.cpp.
References I.
|
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 315 of file IRBuilder.h.
References IsFPConstrained.
Referenced by llvm::lowerAtomicRMWInst().
|
inline |
Set nosanitize metadata.
Definition at line 223 of file IRBuilder.h.
References llvm::MDNode::get(), and getContext().
|
protected |
Definition at line 117 of file IRBuilder.h.
Referenced by ClearInsertionPoint(), CreateAlignedLoad(), CreateAlignedStore(), CreateAlloca(), CreateAssumption(), CreateAtomicCmpXchg(), CreateAtomicRMW(), CreateBinaryIntrinsic(), CreateCatchRet(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateFree(), CreateGCGetPointerBase(), CreateGCGetPointerOffset(), CreateGCRelocate(), CreateGCResult(), CreateGlobalString(), CreateIntrinsic(), CreateInvariantStart(), createIsFPClass(), CreateLaunderInvariantGroup(), CreateLifetimeEnd(), CreateLifetimeStart(), CreateMalloc(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), CreateNoAliasScopeDeclaration(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), CreateStackSave(), CreateStripInvariantGroup(), CreateUnaryIntrinsic(), CreateVectorReverse(), CreateVectorSplice(), getCurrentFunctionReturnType(), GetInsertBlock(), setConstrainedFPFunctionAttr(), SetInsertPoint(), and SetInsertPointPastAllocas().
|
protected |
Definition at line 119 of file IRBuilder.h.
Referenced by CreateAggregateRet(), CreateConstGEP1_32(), CreateConstGEP1_64(), CreateConstGEP2_32(), CreateConstGEP2_64(), CreateConstInBoundsGEP1_32(), CreateConstInBoundsGEP1_64(), CreateConstInBoundsGEP2_32(), CreateConstInBoundsGEP2_64(), CreateFence(), CreateGlobalString(), CreateGlobalStringPtr(), CreateMalloc(), CreateNoAliasScopeDeclaration(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePtrDiff(), CreateRet(), CreateRetVoid(), CreateStackSave(), CreateUnreachable(), getAllOnesMask(), getBFloatTy(), getContext(), getDoubleTy(), getFalse(), getFloatTy(), getHalfTy(), getIndexTy(), getInt(), getInt128Ty(), getInt16Ty(), getInt1Ty(), getInt32Ty(), getInt64Ty(), getInt8Ty(), getIntNTy(), getIntPtrTy(), getPtrTy(), getTrue(), and getVoidTy().
|
protected |
Definition at line 127 of file IRBuilder.h.
Referenced by getDefaultConstrainedExcept(), setDefaultConstrainedExcept(), and llvm::IRBuilderBase::FastMathFlagGuard::~FastMathFlagGuard().
|
protected |
Definition at line 128 of file IRBuilder.h.
Referenced by getDefaultConstrainedRounding(), setDefaultConstrainedRounding(), and llvm::IRBuilderBase::FastMathFlagGuard::~FastMathFlagGuard().
|
protected |
Definition at line 123 of file IRBuilder.h.
Referenced by getDefaultFPMathTag(), setDefaultFPMathTag(), and llvm::IRBuilderBase::FastMathFlagGuard::~FastMathFlagGuard().
|
protected |
Definition at line 130 of file IRBuilder.h.
Referenced by CreateCall(), setDefaultOperandBundles(), and llvm::IRBuilderBase::OperandBundlesGuard::~OperandBundlesGuard().
|
protected |
Definition at line 124 of file IRBuilder.h.
Referenced by clearFastMathFlags(), CreateBinOp(), CreateCall(), CreateConstrainedFPBinOp(), CreateConstrainedFPCast(), CreateConstrainedFPUnroundedBinOp(), CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFMul(), CreateFMulFMF(), CreateFNeg(), CreateFNegFMF(), CreateFRem(), CreateFRemFMF(), CreateFSub(), CreateFSubFMF(), CreatePHI(), CreateSelect(), CreateUnOp(), getFastMathFlags(), setFastMathFlags(), and llvm::IRBuilderBase::FastMathFlagGuard::~FastMathFlagGuard().
|
protected |
Definition at line 120 of file IRBuilder.h.
Referenced by CreateAdd(), CreateAnd(), CreateAShr(), CreateBinaryIntrinsic(), CreateBinOp(), CreateCast(), CreateConstGEP1_32(), CreateConstGEP1_64(), CreateConstGEP2_32(), CreateConstGEP2_64(), CreateConstInBoundsGEP1_32(), CreateConstInBoundsGEP1_64(), CreateConstInBoundsGEP2_32(), CreateConstInBoundsGEP2_64(), CreateExtractElement(), CreateExtractValue(), CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFMul(), CreateFMulFMF(), CreateFNeg(), CreateFNegFMF(), CreateFRem(), CreateFRemFMF(), CreateFSub(), CreateFSubFMF(), CreateGEP(), CreateICmp(), CreateInsertElement(), CreateInsertValue(), CreateLShr(), CreateMul(), CreateOr(), CreatePointerBitCastOrAddrSpaceCast(), CreatePointerCast(), CreateSDiv(), CreateSelect(), CreateShl(), CreateShuffleVector(), CreateSRem(), CreateSub(), CreateTrunc(), CreateUDiv(), CreateUIToFP(), CreateUnOp(), CreateURem(), CreateXor(), and CreateZExt().
|
protected |
Definition at line 121 of file IRBuilder.h.
Referenced by Insert().
|
protected |
Definition at line 118 of file IRBuilder.h.
Referenced by ClearInsertionPoint(), GetInsertPoint(), Insert(), SetInsertPoint(), and SetInsertPointPastAllocas().
|
protected |
Definition at line 126 of file IRBuilder.h.
Referenced by CreateCall(), CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFMul(), CreateFMulFMF(), CreateFPExt(), CreateFPToSI(), CreateFPToUI(), CreateFPTrunc(), CreateFRem(), CreateFRemFMF(), CreateFSub(), CreateFSubFMF(), CreateInvoke(), CreateMaxNum(), CreateMinNum(), CreateSIToFP(), CreateUIToFP(), getIsFPConstrained(), setIsFPConstrained(), and llvm::IRBuilderBase::FastMathFlagGuard::~FastMathFlagGuard().