LLVM 17.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 | SetInsertPointPastAllocas (Function *F) |
This specifies that created instructions should inserted at the beginning end of the specified function, but after already existing static alloca instructions that are at the start. | |
void | SetCurrentDebugLocation (DebugLoc L) |
Set location information used by debugging information. | |
void | CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds) |
Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions. | |
DebugLoc | getCurrentDebugLocation () const |
Get location information used by debugging information. | |
void | SetInstDebugLocation (Instruction *I) const |
If this builder has a current debug location, set it on the specified instruction. | |
void | AddMetadataToInst (Instruction *I) const |
Add all entries in MetadataToCopy to I . | |
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) |
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. | |
PointerType * | getInt8PtrTy (unsigned AddrSpace=0) |
Fetch the type representing a pointer to an 8-bit integer value. | |
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 * | 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 * | 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. | |
CallInst * | 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 . | |
CallInst * | CreateMinNum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the minnum intrinsic. | |
CallInst * | CreateMaxNum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the maxnum intrinsic. | |
CallInst * | CreateMinimum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the minimum intrinsic. | |
CallInst * | CreateMaximum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the maximum intrinsic. | |
CallInst * | 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. | |
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) |
Value * | CreateNeg (Value *V, const Twine &Name="", bool HasNUW=false, bool HasNSW=false) |
Value * | CreateNSWNeg (Value *V, const Twine &Name="") |
Value * | CreateNUWNeg (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="", bool IsInBounds=false) |
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="") |
Constant * | CreateGlobalStringPtr (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr) |
Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8. | |
Value * | CreateTrunc (Value *V, Type *DestTy, const Twine &Name="") |
Value * | CreateZExt (Value *V, Type *DestTy, const Twine &Name="") |
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="") |
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 * | CreateExtractInteger (const DataLayout &DL, Value *From, IntegerType *ExtractedTy, uint64_t Offset, const Twine &Name) |
Return a value that has been extracted from a larger integer type. | |
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) |
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 94 of file IRBuilder.h.
|
inline |
Definition at line 135 of file IRBuilder.h.
References ClearInsertionPoint().
|
inline |
Add all entries in MetadataToCopy to I
.
Definition at line 233 of file IRBuilder.h.
References I.
Referenced by Insert().
|
inline |
Clear the fast-math flags.
Definition at line 291 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 169 of file IRBuilder.h.
Referenced by llvm::SCEVExpander::clearInsertPoint(), 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 219 of file IRBuilder.h.
Referenced by llvm::InstCombinerImpl::run().
|
inline |
Definition at line 1262 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::commonIDivTransforms(), llvm::OpenMPIRBuilder::createCanonicalLoop(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateNSWAdd(), CreateNUWAdd(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::SCEVExpander::generateOverflowCheck(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::OpenMPIRBuilder::tileLoops(), llvm::UnrollRuntimeLoopRemainder(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitFMul(), 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 445 of file IRBuilder.cpp.
Referenced by llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 2033 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by 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 1041 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), CreateInsertValue(), llvm::PoisonValue::get(), getCurrentFunctionReturnType(), Insert(), and N.
|
inline |
Definition at line 1752 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), Insert(), Name, and Ptr.
|
inline |
Definition at line 1742 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
Referenced by llvm::InstCombinerImpl::combineLoadToNewType(), CreateAlignedLoad(), CreateLoad(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), doPromotion(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), unpackLoadToAggregate(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 1747 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
|
inline |
Definition at line 1761 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), llvm::Value::getType(), Insert(), and Ptr.
Referenced by combineStoreToNewValue(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateStore(), doPromotion(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), unpackStoreToAggregate(), 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 1389 of file IRBuilder.cpp.
References assert(), DL, llvm::ConstantInt::get(), 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 1402 of file IRBuilder.cpp.
References assert(), DL, and llvm::Value::getType().
|
inline |
Definition at line 1708 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createMapperAllocas(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTask(), doPromotion(), llvm::OpenMPIRBuilder::emitTargetKernel(), and simplifyAllocaArraySize().
|
inline |
Definition at line 1715 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), Insert(), and Name.
Definition at line 1424 of file IRBuilder.h.
References assert(), CreateAnd(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1416 of file IRBuilder.h.
References CreateAnd(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1420 of file IRBuilder.h.
References CreateAnd(), llvm::ConstantInt::get(), LHS, Name, and RHS.
Definition at line 1410 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::addRuntimeChecks(), buildPartialUnswitchConditionalBranch(), llvm::InstCombinerImpl::commonShiftTransforms(), CreateAnd(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::SCEVExpander::generateOverflowCheck(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
Create a vector int AND reduction intrinsic of the source vector.
Definition at line 453 of file IRBuilder.cpp.
Referenced by llvm::InstCombinerImpl::visitCallInst().
|
inline |
Create a call to the arithmetic_fence intrinsic.
Definition at line 976 of file IRBuilder.h.
References CreateIntrinsic(), and Name.
|
inline |
Definition at line 1400 of file IRBuilder.h.
References CreateAShr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1405 of file IRBuilder.h.
References CreateAShr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1391 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by CreateAShr(), llvm::GCNTTIImpl::instCombineIntrinsic(), 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 569 of file IRBuilder.cpp.
References assert(), BB, Cond, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1Ty(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
|
inline |
Definition at line 1776 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), Insert(), and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare().
|
inline |
Definition at line 1789 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), llvm::Value::getType(), Insert(), and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare().
CallInst * 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 962 of file IRBuilder.cpp.
References BB, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Value::getType(), LHS, Name, and RHS.
Referenced by CreateCopySign(), CreateMaximum(), CreateMaxNum(), CreateMinimum(), CreateMinNum(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), foldCttzCtlz(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 1601 of file IRBuilder.h.
References llvm::BinaryOperator::Create(), FMF, llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::commonShiftTransforms(), CreateNAryOp(), llvm::VPReductionRecipe::execute(), llvm::InnerLoopVectorizer::fixReduction(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVectorBinop(), instCombineSVEVectorBinOp(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitShl().
|
inline |
Definition at line 2028 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::addRuntimeChecks(), canonicalizeBitCastExtElt(), llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::InstCombinerImpl::combineLoadToNewType(), combineStoreToNewValue(), constructPointer(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), CreateBitOrPointerCast(), createByteGEP(), CreateLaunderInvariantGroup(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), CreateStripInvariantGroup(), llvm::OpenMPIRBuilder::createTask(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpWithCastOp(), foldVecTruncToExtElt(), inlineGetBaseAndOffset(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), instCombineSVECondLast(), instCombineSVELD1(), instCombineSVEST1(), optimizeVectorResizeWithIntegerBitCasts(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), simplifyInvariantGroupIntrinsic(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitShuffleVectorInst(), and llvm::InstCombinerImpl::visitTrunc().
|
inline |
Definition at line 2106 of file IRBuilder.h.
References CreateBitCast(), CreateIntToPtr(), CreatePtrToInt(), llvm::Type::isIntOrIntVectorTy(), llvm::Type::isPtrOrPtrVectorTy(), and Name.
Referenced by llvm::InnerLoopVectorizer::createBitOrPointerCast(), instCombineSVEDupqLane(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), and llvm::InstCombinerImpl::visitLoadInst().
|
inline |
Create an unconditional 'br label X' instruction.
Definition at line 1049 of file IRBuilder.h.
References llvm::BranchInst::Create(), and Insert().
Referenced by 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(), and llvm::orc::IRSpeculationLayer::emit().
|
inline |
Definition at line 2342 of file IRBuilder.h.
References Callee, CreateCall(), and Name.
|
inline |
Definition at line 2335 of file IRBuilder.h.
References Callee, CreateCall(), and Name.
|
inline |
Definition at line 2324 of file IRBuilder.h.
References Callee, llvm::CallInst::Create(), FMF, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
|
inline |
Definition at line 2313 of file IRBuilder.h.
References Callee, llvm::CallInst::Create(), DefaultOperandBundles, FMF, Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Referenced by CreateAssumption(), llvm::OpenMPIRBuilder::createCachedThreadPrivate(), CreateCall(), llvm::OpenMPIRBuilder::createCancel(), CreateConstrainedFPCall(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createCritical(), llvm::dxil::DXILOpBuilder::createDXILOpCall(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateGCGetPointerBase(), CreateGCGetPointerOffset(), CreateGCRelocate(), CreateGCResult(), CreateInvariantStart(), CreateLaunderInvariantGroup(), CreateLifetimeEnd(), CreateLifetimeStart(), llvm::OpenMPIRBuilder::createMasked(), llvm::OpenMPIRBuilder::createMaster(), CreateMemCpyInline(), CreateMemMove(), CreateMemSet(), CreateMemSetInline(), CreateMemTransferInst(), 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::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createSingle(), CreateStripInvariantGroup(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::createTaskgroup(), llvm::VectorBuilder::createVectorInstruction(), CreateVScale(), llvm::orc::IRSpeculationLayer::emit(), llvm::OpenMPIRBuilder::emitBarrierImpl(), llvm::OpenMPIRBuilder::emitFlush(), llvm::OpenMPIRBuilder::emitMapperCall(), llvm::OpenMPIRBuilder::emitTargetKernel(), llvm::OpenMPIRBuilder::emitTaskwaitImpl(), llvm::OpenMPIRBuilder::emitTaskyieldImpl(), llvm::VPWidenCallRecipe::execute(), foldCtpop(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::SCEVExpander::generateOverflowCheck(), llvm::OpenMPIRBuilder::getOrCreateThreadID(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), llvm::InlineFunction(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), modifyIntrinsicCall(), replaceWithTLIFunction(), simplifyAMDGCNMemoryIntrinsicDemanded(), UseTlsOffset(), useTpOffset(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 1158 of file IRBuilder.h.
References Callee, CreateCallBr(), and Name.
|
inline |
Definition at line 1151 of file IRBuilder.h.
References Callee, CreateCallBr(), and Name.
|
inline |
Definition at line 1140 of file IRBuilder.h.
References Callee, llvm::CallBrInst::Create(), Insert(), and Name.
|
inline |
Create a callbr instruction.
Definition at line 1132 of file IRBuilder.h.
References Callee, llvm::CallBrInst::Create(), Insert(), and Name.
Referenced by CreateCallBr().
|
inline |
Definition at line 2065 of file IRBuilder.h.
References llvm::CastInst::Create(), llvm::IRBuilderFolder::CreateCast(), Folder, Insert(), and Name.
Referenced by llvm::InstCombinerImpl::commonCastTransforms(), CreateAddrSpaceCast(), CreateBitCast(), CreateFPExt(), CreateFPToSI(), CreateFPToUI(), CreateFPTrunc(), CreateIntToPtr(), CreatePtrToInt(), CreateSExt(), CreateSIToFP(), CreateTrunc(), CreateUIToFP(), CreateZExt(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 1183 of file IRBuilder.h.
References llvm::CatchPadInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1194 of file IRBuilder.h.
References BB, llvm::CatchReturnInst::Create(), and Insert().
|
inline |
Definition at line 1176 of file IRBuilder.h.
References llvm::CatchSwitchInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1188 of file IRBuilder.h.
References llvm::CleanupPadInst::Create(), Insert(), and Name.
|
inline |
Definition at line 1171 of file IRBuilder.h.
References llvm::CleanupReturnInst::Create(), and Insert().
|
inline |
Definition at line 2267 of file IRBuilder.h.
References CreateFCmp(), CreateICmp(), llvm::CmpInst::isFPPredicate(), LHS, Name, and RHS.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare().
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Copy branch meta data if available.
Definition at line 1064 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 1055 of file IRBuilder.h.
References Cond, llvm::BranchInst::Create(), and Insert().
Referenced by buildPartialInvariantUnswitchConditionalBranch(), buildPartialUnswitchConditionalBranch(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::orc::IRSpeculationLayer::emit(), and llvm::OpenMPIRBuilder::emitCancelationCheckImpl().
|
inline |
Definition at line 1816 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), Idx, Insert(), Name, and Ptr.
Referenced by UseTlsOffset(), and useTpOffset().
|
inline |
Definition at line 1862 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), Idx, Insert(), Name, and Ptr.
|
inline |
Definition at line 1836 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), Insert(), Name, and Ptr.
|
inline |
Definition at line 1882 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), Insert(), Name, and Ptr.
|
inline |
Definition at line 1826 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), Idx, Insert(), Name, and Ptr.
|
inline |
Definition at line 1872 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), Idx, Insert(), Name, and Ptr.
|
inline |
Definition at line 1849 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), Insert(), Name, and Ptr.
Referenced by CreateStructGEP(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(), and llvm::lowerGlobalIFuncUsersAsGlobalCtor().
|
inline |
Definition at line 1895 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), Insert(), Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createReductions(), and llvm::OpenMPIRBuilder::createTask().
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 1008 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 1106 of file IRBuilder.cpp.
References llvm::append_range(), llvm::CallingConv::C, Callee, CreateCall(), 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 1042 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), 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 1094 of file IRBuilder.cpp.
References llvm::CallingConv::C, CreateIntrinsic(), Name, P, and setConstrainedFPCallAttr().
|
inline |
Create call to the copysign intrinsic.
Definition at line 968 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 108 of file IRBuilder.cpp.
References CreateVScale(), and llvm::ConstantInt::get().
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 306 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 381 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 611 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 203 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 1335 of file IRBuilder.h.
References CreateSDiv(), LHS, Name, and RHS.
Referenced by CreatePtrDiff().
|
inline |
Definition at line 1322 of file IRBuilder.h.
References CreateUDiv(), LHS, Name, and RHS.
|
inline |
Definition at line 2368 of file IRBuilder.h.
References CreateExtractElement(), getInt64(), Idx, and Name.
|
inline |
Definition at line 2361 of file IRBuilder.h.
References llvm::ExtractElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractElement(), Idx, Insert(), and Name.
Referenced by CreateExtractElement(), llvm::VPBranchOnMaskRecipe::execute(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::VPTransformState::get(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVETBL(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitExtractElementInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
Value * IRBuilderBase::CreateExtractInteger | ( | const DataLayout & | DL, |
Value * | From, | ||
IntegerType * | ExtractedTy, | ||
uint64_t | Offset, | ||
const Twine & | Name | ||
) |
Return a value that has been extracted from a larger integer type.
Definition at line 1275 of file IRBuilder.cpp.
References assert(), CreateLShr(), CreateTrunc(), DL, From, llvm::IntegerType::getBitWidth(), Name, and llvm::Offset.
|
inline |
Definition at line 2417 of file IRBuilder.h.
References llvm::ExtractValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractValue(), Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::SCEVExpander::generateOverflowCheck(), unpackStoreToAggregate(), and llvm::InstCombinerImpl::visitExtractValueInst().
|
inline |
Create a call to the vector.extract intrinsic.
Definition at line 983 of file IRBuilder.h.
References CreateIntrinsic(), llvm::Value::getType(), Idx, and Name.
|
inline |
Definition at line 1468 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1482 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), 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 429 of file IRBuilder.cpp.
References CreateCall(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
|
inline |
Definition at line 2262 of file IRBuilder.h.
References LHS, Name, P, and RHS.
Referenced by CreateCmp(), CreateFCmpOEQ(), CreateFCmpOGE(), CreateFCmpOGT(), CreateFCmpOLE(), CreateFCmpOLT(), CreateFCmpONE(), CreateFCmpORD(), CreateFCmpUEQ(), CreateFCmpUGE(), CreateFCmpUGT(), CreateFCmpULE(), CreateFCmpULT(), CreateFCmpUNE(), and CreateFCmpUNO().
|
inline |
Definition at line 2182 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OEQ, LHS, Name, and RHS.
|
inline |
Definition at line 2192 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGE, LHS, Name, and RHS.
|
inline |
Definition at line 2187 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGT, LHS, Name, and RHS.
|
inline |
Definition at line 2202 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLE, LHS, Name, and RHS.
|
inline |
Definition at line 2197 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLT, LHS, Name, and RHS.
|
inline |
Definition at line 2207 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ONE, LHS, Name, and RHS.
|
inline |
Definition at line 2212 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ORD, LHS, Name, and RHS.
|
inline |
Definition at line 2222 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UEQ, LHS, Name, and RHS.
|
inline |
Definition at line 2232 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGE, LHS, Name, and RHS.
|
inline |
Definition at line 2227 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGT, LHS, Name, and RHS.
|
inline |
Definition at line 2242 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULE, LHS, Name, and RHS.
|
inline |
Definition at line 2237 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULT, LHS, Name, and RHS.
|
inline |
Definition at line 2247 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNE, LHS, Name, and RHS.
|
inline |
Definition at line 2217 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNO, LHS, Name, and RHS.
|
inline |
Definition at line 1549 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1563 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::InstCombinerImpl::visitFAdd(), and llvm::InstCombinerImpl::visitFSub().
|
inline |
Definition at line 1769 of file IRBuilder.h.
|
inline |
Definition at line 1522 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1536 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by 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 437 of file IRBuilder.cpp.
References CreateCall(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::GlobalValue::getParent(), and llvm::BasicBlock::getParent().
|
inline |
Definition at line 1665 of file IRBuilder.h.
References FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), Insert(), and Name.
Referenced by llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFNeg().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1675 of file IRBuilder.h.
References FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), llvm::Instruction::getFastMathFlags(), Insert(), and Name.
Referenced by llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitFNeg().
|
inline |
Definition at line 2118 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateFPCast(), llvm::CastInst::CreateFPCast(), Folder, Insert(), and Name.
|
inline |
Definition at line 2011 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by llvm::InstCombinerImpl::visitFSub().
Create a vector float max reduction intrinsic of the source vector.
Definition at line 477 of file IRBuilder.cpp.
Create a vector float min reduction intrinsic of the source vector.
Definition at line 481 of file IRBuilder.cpp.
|
inline |
Definition at line 1981 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
|
inline |
Definition at line 1974 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
|
inline |
Definition at line 2002 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
Referenced by llvm::InstCombinerImpl::visitFPTrunc(), and llvm::InstCombinerImpl::visitFSub().
Definition at line 2436 of file IRBuilder.h.
References Insert(), and Name.
Referenced by buildPartialUnswitchConditionalBranch(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitURem(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 1576 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 1589 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 1495 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), IsFPConstrained, and Name.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1509 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), IsFPConstrained, and Name.
Referenced by 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 936 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 945 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 924 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 913 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), and Name.
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 844 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 824 of file IRBuilder.cpp.
References Name, and llvm::None.
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 833 of file IRBuilder.cpp.
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 902 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 880 of file IRBuilder.cpp.
References Name, and llvm::None.
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 891 of file IRBuilder.cpp.
|
inline |
Definition at line 1801 of file IRBuilder.h.
References llvm::GetElementPtrInst::Create(), llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), Insert(), Name, and Ptr.
Referenced by constructPointer(), createByteGEP(), CreateInBoundsGEP(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::SCEVExpander::generateOverflowCheck(), llvm::OpenMPIRBuilder::getSizeInBytes(), instCombineLD1GatherIndex(), instCombineST1ScatterIndex(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InstCombinerImpl::visitGEPOfGEP().
GlobalVariable * IRBuilderBase::CreateGlobalString | ( | StringRef | Str, |
const Twine & | Name = "" , |
||
unsigned | AddressSpace = 0 , |
||
Module * | M = nullptr |
||
) |
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 1918 of file IRBuilder.h.
References Context, CreateGlobalString(), llvm::ConstantInt::get(), llvm::ConstantExpr::getInBoundsGetElementPtr(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getValueType(), and Name.
Referenced by llvm::OpenMPIRBuilder::getOrCreateSrcLocStr().
|
inline |
Definition at line 2252 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldICmp(), Insert(), LHS, Name, P, and RHS.
Referenced by llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateCmp(), CreateICmpEQ(), CreateICmpNE(), CreateICmpSGE(), CreateICmpSGT(), CreateICmpSLE(), CreateICmpSLT(), CreateICmpUGE(), CreateICmpUGT(), CreateICmpULE(), CreateICmpULT(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::SCEVExpander::expandComparePredicate(), foldCtpop(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::SCEVExpander::generateOverflowCheck(), llvm::InstCombinerImpl::insertRangeTest(), ReduceLoopStrength(), llvm::InstCombinerImpl::simplifyRangeCheck(), llvm::UnrollRuntimeLoopRemainder(), and llvm::InstCombinerImpl::visitICmpInst().
|
inline |
Definition at line 2142 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_EQ, LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::commonIDivTransforms(), CreateIsNull(), createMemMoveLoop(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::orc::IRSpeculationLayer::emit(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 2146 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_NE, LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), CreateIsNotNull(), llvm::createSanitizerCtorAndInitFunctions(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 2170 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGE, LHS, Name, and RHS.
|
inline |
Definition at line 2166 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGT, LHS, Name, and RHS.
Referenced by CreateIsNotNeg(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 2178 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLE, LHS, Name, and RHS.
|
inline |
Definition at line 2174 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLT, LHS, Name, and RHS.
Referenced by llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateIsNeg(), getBoundsCheckCond(), llvm::InstCombinerImpl::visitAShr(), and llvm::InstCombinerImpl::visitLShr().
|
inline |
Definition at line 2154 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGE, LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::visitUDiv().
|
inline |
Definition at line 2150 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGT, LHS, Name, and RHS.
|
inline |
Definition at line 2162 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_ULE, LHS, Name, and RHS.
|
inline |
Definition at line 2158 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(), getBoundsCheckCond(), and llvm::InstCombinerImpl::visitURem().
|
inline |
Definition at line 1811 of file IRBuilder.h.
References CreateGEP(), Name, and Ptr.
Referenced by llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::emitMapperCall(), unpackLoadToAggregate(), unpackStoreToAggregate(), and llvm::InstCombinerImpl::visitExtractValueInst().
|
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 1088 of file IRBuilder.h.
References Addr, llvm::IndirectBrInst::Create(), and Insert().
|
inline |
Definition at line 2378 of file IRBuilder.h.
References CreateInsertElement(), llvm::PoisonValue::get(), Idx, and Name.
|
inline |
Definition at line 2373 of file IRBuilder.h.
References CreateInsertElement(), llvm::PoisonValue::get(), Idx, and Name.
Referenced by CreateInsertElement(), CreateVectorSplat(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEDupqLane(), optimizeIntegerToVectorInsertions(), llvm::InnerLoopVectorizer::packScalarIntoVectorValue(), simplifyAMDGCNMemoryIntrinsicDemanded(), and llvm::InstCombinerImpl::visitInsertElementInst().
|
inline |
Definition at line 2390 of file IRBuilder.h.
References CreateInsertElement(), getInt64(), Idx, and Name.
|
inline |
Definition at line 2383 of file IRBuilder.h.
References llvm::InsertElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertElement(), Idx, Insert(), and Name.
|
inline |
Definition at line 2424 of file IRBuilder.h.
References llvm::InsertValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertValue(), Insert(), and Name.
Referenced by buildUMulWithOverflowFunc(), CreateAggregateRet(), expandFromPrimitiveShadowRecursive(), and unpackLoadToAggregate().
|
inline |
Create a call to the vector.insert intrinsic.
Definition at line 991 of file IRBuilder.h.
References CreateIntrinsic(), llvm::Value::getType(), Idx, and Name.
Referenced by instCombineSVEDupqLane().
|
inline |
Definition at line 2097 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), Folder, Insert(), isSigned(), and Name.
Referenced by llvm::OpenMPIRBuilder::createParallel(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), instCombineSVEUnpack(), llvm::InstCombinerImpl::OptimizePointerDifference(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::InstCombinerImpl::visitPtrToInt().
Create a vector integer max reduction intrinsic of the source vector.
Definition at line 465 of file IRBuilder.cpp.
Create a vector integer min reduction intrinsic of the source vector.
Definition at line 471 of file IRBuilder.cpp.
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 971 of file IRBuilder.cpp.
References BB, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and Name.
Referenced by CreateArithmeticFence(), CreateConstrainedFPBinOp(), CreateConstrainedFPCast(), CreateConstrainedFPCmp(), CreateExtractVector(), CreateInsertVector(), CreateStepVector(), CreateThreadLocalAddress(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECondLast(), instCombineSVELast(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESrshl(), instCombineSVEVectorFuseMulAddSub(), lowerIntrinsicToFunction(), tryCombineFromSVBoolBinOp(), 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 981 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 2023 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::OpenMPIRBuilder::createAtomicRead(), and CreateBitOrPointerCast().
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 517 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 1115 of file IRBuilder.h.
References Callee, CreateInvoke(), and Name.
|
inline |
Definition at line 1123 of file IRBuilder.h.
References Callee, CreateInvoke(), and Name.
|
inline |
Create an invoke instruction.
Definition at line 1093 of file IRBuilder.h.
References Callee, llvm::InvokeInst::Create(), Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Referenced by CreateInvoke().
|
inline |
Definition at line 1104 of file IRBuilder.h.
References Callee, llvm::InvokeInst::Create(), Insert(), IsFPConstrained, Name, and setConstrainedFPCallAttr().
Return a boolean value testing if Arg
< 0.
Definition at line 2455 of file IRBuilder.h.
References Arg, CreateICmpSLT(), llvm::Constant::getNullValue(), and Name.
Referenced by llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
Return a boolean value testing if Arg
> -1.
Definition at line 2460 of file IRBuilder.h.
References Arg, CreateICmpSGT(), llvm::Constant::getAllOnesValue(), and Name.
Referenced by llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), and llvm::InstCombinerImpl::visitXor().
Return a boolean value testing if Arg
!= 0.
Definition at line 2450 of file IRBuilder.h.
References Arg, CreateICmpNE(), llvm::Constant::getNullValue(), and Name.
Referenced by 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 2445 of file IRBuilder.h.
References Arg, CreateICmpEQ(), llvm::Constant::getNullValue(), and Name.
Referenced by llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), and llvm::InstCombinerImpl::visitAnd().
|
inline |
Definition at line 2431 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 1162 of file IRBuilder.cpp.
References assert(), BB, CreateBitCast(), CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), getInt8PtrTy(), 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 501 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 485 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 1733 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 1725 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createCopyPrivate(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::orc::IRSpeculationLayer::emit(), instCombineSVELD1(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::visitExtractValueInst(), and llvm::InstCombinerImpl::visitLoadInst().
|
inline |
Definition at line 1729 of file IRBuilder.h.
References CreateAlignedLoad(), Name, and Ptr.
|
inline |
Definition at line 1611 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by CreateLogicalOp(), and llvm::InstCombinerImpl::visitAnd().
|
inline |
Definition at line 1623 of file IRBuilder.h.
References CreateLogicalAnd(), CreateLogicalOr(), llvm_unreachable, and Name.
Referenced by llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().
Definition at line 1637 of file IRBuilder.h.
References assert(), CreateLogicalOr(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1617 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by CreateLogicalOp(), CreateLogicalOr(), llvm::InstCombinerImpl::visitBranchInst(), and llvm::InstCombinerImpl::visitOr().
|
inline |
Definition at line 1381 of file IRBuilder.h.
References CreateLShr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1386 of file IRBuilder.h.
References CreateLShr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1372 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateExtractInteger(), CreateLShr(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAndShift(), getShiftedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), lowerFunnelShifts(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitUDiv(), and llvm::InstCombinerImpl::visitXor().
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 740 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 717 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 650 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 596 of file IRBuilder.cpp.
References assert(), llvm::PoisonValue::get(), getInt32(), llvm::Type::isVectorTy(), Name, Ptr, and llvm::Align::value().
Referenced by instCombineLD1GatherIndex(), instCombineSVELD1(), simplifyX86MaskedLoad(), 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 685 of file IRBuilder.cpp.
References assert(), 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 617 of file IRBuilder.cpp.
References assert(), getInt32(), llvm::Value::getType(), llvm::Type::isVectorTy(), Ptr, and llvm::Align::value().
Referenced by instCombineST1ScatterIndex(), instCombineSVEST1(), simplifyX86MaskedStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Create call to the maximum intrinsic.
Definition at line 963 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
|
inline |
Create call to the maxnum intrinsic.
Definition at line 953 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
Referenced by 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 634 of file IRBuilder.h.
References CreateMemCpy(), getInt64(), and Size.
Referenced by CreateMemCpy(), and llvm::OpenMPIRBuilder::createTask().
|
inline |
Definition at line 651 of file IRBuilder.h.
References CreateMemTransferInst(), and Size.
CallInst * IRBuilderBase::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 |
||
) |
Definition at line 268 of file IRBuilder.cpp.
References BB, CreateCall(), F, llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), and Size.
|
inline |
Definition at line 682 of file IRBuilder.h.
References CreateMemMove(), getInt64(), and Size.
Referenced by CreateMemMove().
CallInst * IRBuilderBase::CreateMemMove | ( | Value * | Dst, |
MaybeAlign | DstAlign, | ||
Value * | Src, | ||
MaybeAlign | SrcAlign, | ||
Value * | Size, | ||
bool | isVolatile = false , |
||
MDNode * | TBAATag = nullptr , |
||
MDNode * | ScopeTag = nullptr , |
||
MDNode * | NoAliasTag = nullptr |
||
) |
Definition at line 347 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::setMetadata(), 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 586 of file IRBuilder.h.
References CreateMemSet(), getInt64(), Ptr, and Size.
Referenced by CreateMemSet(), and lowerIntrinsicToFunction().
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 146 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 174 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 231 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Instruction::setMetadata(), and Size.
Referenced by CreateMemCpy().
|
inline |
Create call to the minimum intrinsic.
Definition at line 958 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
|
inline |
Create call to the minnum intrinsic.
Definition at line 948 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, Name, and RHS.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1296 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateNSWMul(), CreateNUWMul(), CreateVScale(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::visitAdd(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitCallBase(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitSub().
Create a vector int mul reduction intrinsic of the source vector.
Definition at line 449 of file IRBuilder.cpp.
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 1027 of file IRBuilder.cpp.
References assert(), CreateBinOp(), CreateUnOp(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isUnaryOp(), llvm_unreachable, Name, and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1651 of file IRBuilder.h.
References CreateSub(), llvm::Constant::getNullValue(), and Name.
Referenced by llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateNSWNeg(), CreateNUWNeg(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::SCEVExpander::generateOverflowCheck(), llvm::InstCombinerImpl::OptimizePointerDifference(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitShl(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 820 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 580 of file IRBuilder.cpp.
References BB, CreateCall(), llvm::Intrinsic::getDeclaration(), and llvm::BasicBlock::getModule().
Referenced by AddAliasScopeMetadata(), and CreateNoAliasScopeDeclaration().
Definition at line 1684 of file IRBuilder.h.
References CreateXor(), llvm::Constant::getAllOnesValue(), and Name.
Referenced by llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyUsingControlFlow(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 1271 of file IRBuilder.h.
References CreateAdd(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::visitFAdd().
|
inline |
Definition at line 1305 of file IRBuilder.h.
References CreateMul(), LHS, Name, and RHS.
Definition at line 1657 of file IRBuilder.h.
References CreateNeg(), and Name.
|
inline |
Definition at line 1288 of file IRBuilder.h.
References CreateSub(), LHS, Name, and RHS.
|
inline |
Definition at line 1275 of file IRBuilder.h.
References CreateAdd(), LHS, Name, and RHS.
|
inline |
Definition at line 1309 of file IRBuilder.h.
References CreateMul(), LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc().
Definition at line 1661 of file IRBuilder.h.
References CreateNeg(), and Name.
|
inline |
Definition at line 1292 of file IRBuilder.h.
References CreateSub(), LHS, Name, and RHS.
Definition at line 1446 of file IRBuilder.h.
References assert(), CreateOr(), llvm::ArrayRef< T >::empty(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1438 of file IRBuilder.h.
References CreateOr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
Definition at line 1442 of file IRBuilder.h.
References CreateOr(), llvm::ConstantInt::get(), LHS, Name, and RHS.
Definition at line 1432 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), buildPartialUnswitchConditionalBranch(), CreateOr(), llvm::OpenMPIRBuilder::createTask(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::SCEVExpander::generateOverflowCheck(), getBoundsCheckCond(), lowerFunnelShifts(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
Create a vector int OR reduction intrinsic of the source vector.
Definition at line 457 of file IRBuilder.cpp.
Referenced by llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 2298 of file IRBuilder.h.
References llvm::PHINode::Create(), FMF, Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::VPWidenPHIRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InstCombinerImpl::foldICmpWithConstant(), processPhiNode(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
|
inline |
Definition at line 2083 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), Folder, Insert(), and Name.
Referenced by constructPointer().
|
inline |
Definition at line 2074 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerCast(), llvm::CastInst::CreatePointerCast(), Folder, Insert(), and Name.
Referenced by llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), UseTlsOffset(), and useTpOffset().
Value * IRBuilderBase::CreatePreserveArrayAccessIndex | ( | Type * | ElTy, |
Value * | Base, | ||
unsigned | Dimension, | ||
unsigned | LastIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1298 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::Attribute::get(), llvm::ConstantInt::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 1349 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::Attribute::get(), llvm::ConstantInt::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 1330 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().
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 1148 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 2018 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateBitOrPointerCast(), llvm::OpenMPIRBuilder::createCopyinClauseBlocks(), CreatePtrDiff(), llvm::OpenMPIRBuilder::createTask(), llvm::orc::IRSpeculationLayer::emit(), llvm::OpenMPIRBuilder::getSizeInBytes(), and llvm::InstCombinerImpl::visitPtrToInt().
|
inline |
Definition at line 1167 of file IRBuilder.h.
References llvm::ResumeInst::Create(), and Insert().
|
inline |
Create a 'ret <val>' instruction.
Definition at line 1030 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
Referenced by buildUMulWithOverflowFunc(), llvm::OpenMPIRBuilder::createTask(), lowerFunnelShifts(), and lowerIntrinsicToFunction().
|
inline |
Create a 'ret void' instruction.
Definition at line 1025 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
Referenced by llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetInit(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), and lowerIntrinsicToFunction().
|
inline |
Definition at line 1326 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by CreateExactSDiv(), and llvm::InstCombinerImpl::visitSDiv().
Value * IRBuilderBase::CreateSelect | ( | Value * | C, |
Value * | True, | ||
Value * | False, | ||
const Twine & | Name = "" , |
||
Instruction * | MDFrom = nullptr |
||
) |
Definition at line 1132 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::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateLogicalAnd(), CreateLogicalOr(), llvm::OpenMPIRBuilder::createTask(), llvm::VPWidenSelectRecipe::execute(), llvm::VPBlendRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::SCEVExpander::generateOverflowCheck(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVESel(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::OpenMPIRBuilder::tileLoops(), llvm::InstCombinerImpl::visitFPTrunc(), and llvm::ObjectSizeOffsetEvaluator::visitSelectInst().
|
inline |
Definition at line 1940 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), CreateSExtOrTrunc(), llvm::InnerLoopVectorizer::fixReduction(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), and llvm::InstCombinerImpl::visitAnd().
|
inline |
Definition at line 2047 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateSExtOrBitCast(), llvm::CastInst::CreateSExtOrBitCast(), Folder, Insert(), 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 1961 of file IRBuilder.h.
References assert(), CreateSExt(), CreateTrunc(), llvm::Type::getScalarSizeInBits(), llvm::Type::isIntOrIntVectorTy(), and Name.
Referenced by llvm::OpenMPIRBuilder::createParallel(), and llvm::VPWidenPointerInductionRecipe::execute().
|
inline |
Definition at line 1360 of file IRBuilder.h.
References CreateShl(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1366 of file IRBuilder.h.
References CreateShl(), llvm::ConstantInt::get(), LHS, Name, and RHS.
|
inline |
Definition at line 1351 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::commonIDivTransforms(), CreateShl(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), getShiftedValue(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), lowerFunnelShifts(), simplifyValueKnownNonZero(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitSExt(), and llvm::InstCombinerImpl::visitShl().
|
inline |
Create a unary shuffle.
The second vector operand of the IR instruction is poison.
Definition at line 2412 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 2403 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldShuffleVector(), Insert(), and Name.
|
inline |
Definition at line 2395 of file IRBuilder.h.
References CreateShuffleVector(), llvm::ShuffleVectorInst::getShuffleMask(), and Name.
Referenced by CreateShuffleVector(), CreateVectorReverse(), CreateVectorSplat(), CreateVectorSplice(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::foldVectorBinop(), instCombineSVEDupqLane(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
|
inline |
Definition at line 1995 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
|
inline |
Definition at line 1345 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::InstCombinerImpl::SimplifyAddWithRemainder(), and llvm::InstCombinerImpl::visitSRem().
Creates a vector of type DstType
with the linear sequence <0, 1, ...>
Definition at line 118 of file IRBuilder.cpp.
References CreateIntrinsic(), CreateTrunc(), llvm::ConstantVector::get(), llvm::VectorType::get(), llvm::ConstantInt::get(), getInt8Ty(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::VPWidenPointerInductionRecipe::execute().
|
inline |
Definition at line 1738 of file IRBuilder.h.
References CreateAlignedStore(), and Ptr.
Referenced by llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createSingle(), llvm::OpenMPIRBuilder::createTask(), llvm::orc::IRSpeculationLayer::emit(), llvm::InnerLoopVectorizer::fixReduction(), instCombineSVEST1(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), and llvm::InstCombinerImpl::visitLoadInst().
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 1186 of file IRBuilder.cpp.
References assert(), BB, CreateBitCast(), CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), getInt8PtrTy(), llvm::FunctionType::getParamType(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::Function::getReturnType(), and Ptr.
Referenced by simplifyInvariantGroupIntrinsic().
|
inline |
Definition at line 1908 of file IRBuilder.h.
References CreateConstInBoundsGEP2_32(), Idx, Name, and Ptr.
Referenced by llvm::OpenMPIRBuilder::createTask(), and llvm::OpenMPIRBuilder::emitTargetKernel().
|
inline |
Definition at line 1279 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Name, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createMemMoveLoop(), CreateNeg(), CreateNSWSub(), CreateNUWSub(), CreatePtrDiff(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), foldCtpop(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::SCEVExpander::generateOverflowCheck(), getBoundsCheckCond(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::InstCombinerImpl::insertRangeTest(), lowerFunnelShifts(), llvm::InstCombinerImpl::OptimizePointerDifference(), llvm::VPlan::prepareToExecute(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifyValueKnownNonZero(), llvm::UnrollRuntimeLoopRemainder(), 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 1078 of file IRBuilder.h.
References llvm::SwitchInst::Create(), and Insert().
Referenced by llvm::OpenMPIRBuilder::createReductions(), and llvm::OpenMPIRBuilder::createSections().
Create a call to llvm.threadlocal.address intrinsic.
Definition at line 545 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 1932 of file IRBuilder.h.
References CreateCast(), and Name.
Referenced by buildScalarSteps(), CreateExtractInteger(), CreateSExtOrTrunc(), CreateStepVector(), CreateZExtOrTrunc(), llvm::VPDerivedIVRecipe::execute(), llvm::InnerLoopVectorizer::fixReduction(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), 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 2056 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateTruncOrBitCast(), llvm::CastInst::CreateTruncOrBitCast(), Folder, Insert(), and Name.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType().
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 113 of file IRBuilder.cpp.
References CreateVScale(), llvm::ConstantInt::get(), and Size.
Referenced by getBoundsCheckCond().
|
inline |
Definition at line 1313 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, Name, and RHS.
Referenced by buildUMulWithOverflowFunc(), llvm::OpenMPIRBuilder::collapseLoops(), llvm::OpenMPIRBuilder::createCanonicalLoop(), CreateExactUDiv(), getShape(), and llvm::OpenMPIRBuilder::tileLoops().
|
inline |
Definition at line 1988 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), IsFPConstrained, and Name.
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 954 of file IRBuilder.cpp.
References BB, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and Name.
Referenced by foldCtpop(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFMul(), and llvm::InstCombinerImpl::visitLShr().
|
inline |
Definition at line 1688 of file IRBuilder.h.
References llvm::UnaryOperator::Create(), FMF, Folder, llvm::IRBuilderFolder::FoldUnOpFMF(), Insert(), and Name.
Referenced by CreateNAryOp().
|
inline |
Definition at line 1198 of file IRBuilder.h.
References Context, and Insert().
Referenced by llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createCancel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createTargetData(), llvm::OpenMPIRBuilder::createTargetInit(), and llvm::VPBasicBlock::execute().
|
inline |
Definition at line 1339 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, Name, and RHS.
Referenced by llvm::OpenMPIRBuilder::collapseLoops(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), lowerFunnelShifts(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), and llvm::OpenMPIRBuilder::tileLoops().