LLVM
15.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. More... | |
Constant * | Insert (Constant *C, const Twine &="") const |
No-op overload to handle constants. More... | |
Value * | Insert (Value *V, const Twine &Name="") const |
void | ClearInsertionPoint () |
Clear the insertion point: created instructions will not be inserted into a block. More... | |
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. More... | |
void | SetInsertPoint (Instruction *I) |
This specifies that created instructions should be inserted before the specified instruction. More... | |
void | SetInsertPoint (BasicBlock *TheBB, BasicBlock::iterator IP) |
This specifies that created instructions should be inserted at the specified point. More... | |
void | SetCurrentDebugLocation (DebugLoc L) |
Set location information used by debugging information. More... | |
void | CollectMetadataToCopy (Instruction *Src, ArrayRef< unsigned > MetadataKinds) |
Collect metadata with IDs MetadataKinds from Src which should be added to all created instructions. More... | |
DebugLoc | getCurrentDebugLocation () const |
Get location information used by debugging information. More... | |
void | SetInstDebugLocation (Instruction *I) const |
If this builder has a current debug location, set it on the specified instruction. More... | |
void | AddMetadataToInst (Instruction *I) const |
Add all entries in MetadataToCopy to I . More... | |
Type * | getCurrentFunctionReturnType () const |
Get the return type of the current function that we're emitting into. More... | |
InsertPoint | saveIP () const |
Returns the current insert point. More... | |
InsertPoint | saveAndClearIP () |
Returns the current insert point, clearing it in the process. More... | |
void | restoreIP (InsertPoint IP) |
Sets the current insert point to a previously-saved location. More... | |
MDNode * | getDefaultFPMathTag () const |
Get the floating point math metadata being used. More... | |
FastMathFlags | getFastMathFlags () const |
Get the flags to be applied to created floating point ops. More... | |
FastMathFlags & | getFastMathFlags () |
void | clearFastMathFlags () |
Clear the fast-math flags. More... | |
void | setDefaultFPMathTag (MDNode *FPMathTag) |
Set the floating point math metadata to be used. More... | |
void | setFastMathFlags (FastMathFlags NewFMF) |
Set the fast-math flags to be used with generated fp-math operators. More... | |
void | setIsFPConstrained (bool IsCon) |
Enable/Disable use of constrained floating point math. More... | |
bool | getIsFPConstrained () |
Query for the use of constrained floating point math. More... | |
void | setDefaultConstrainedExcept (fp::ExceptionBehavior NewExcept) |
Set the exception handling to be used with constrained floating point. More... | |
void | setDefaultConstrainedRounding (RoundingMode NewRounding) |
Set the rounding mode handling to be used with constrained floating point. More... | |
fp::ExceptionBehavior | getDefaultConstrainedExcept () |
Get the exception handling used with constrained floating point. More... | |
RoundingMode | getDefaultConstrainedRounding () |
Get the rounding mode handling used with constrained floating point. More... | |
void | setConstrainedFPFunctionAttr () |
void | setConstrainedFPCallAttr (CallBase *I) |
void | setDefaultOperandBundles (ArrayRef< OperandBundleDef > OpBundles) |
GlobalVariable * | CreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0, Module *M=nullptr) |
Make a new global variable with initializer type i8*. More... | |
ConstantInt * | getInt1 (bool V) |
Get a constant value representing either true or false. More... | |
ConstantInt * | getTrue () |
Get the constant value for i1 true. More... | |
ConstantInt * | getFalse () |
Get the constant value for i1 false. More... | |
ConstantInt * | getInt8 (uint8_t C) |
Get a constant 8-bit value. More... | |
ConstantInt * | getInt16 (uint16_t C) |
Get a constant 16-bit value. More... | |
ConstantInt * | getInt32 (uint32_t C) |
Get a constant 32-bit value. More... | |
ConstantInt * | getInt64 (uint64_t C) |
Get a constant 64-bit value. More... | |
ConstantInt * | getIntN (unsigned N, uint64_t C) |
Get a constant N-bit value, zero extended or truncated from a 64-bit value. More... | |
ConstantInt * | getInt (const APInt &AI) |
Get a constant integer value. More... | |
IntegerType * | getInt1Ty () |
Fetch the type representing a single bit. More... | |
IntegerType * | getInt8Ty () |
Fetch the type representing an 8-bit integer. More... | |
IntegerType * | getInt16Ty () |
Fetch the type representing a 16-bit integer. More... | |
IntegerType * | getInt32Ty () |
Fetch the type representing a 32-bit integer. More... | |
IntegerType * | getInt64Ty () |
Fetch the type representing a 64-bit integer. More... | |
IntegerType * | getInt128Ty () |
Fetch the type representing a 128-bit integer. More... | |
IntegerType * | getIntNTy (unsigned N) |
Fetch the type representing an N-bit integer. More... | |
Type * | getHalfTy () |
Fetch the type representing a 16-bit floating point value. More... | |
Type * | getBFloatTy () |
Fetch the type representing a 16-bit brain floating point value. More... | |
Type * | getFloatTy () |
Fetch the type representing a 32-bit floating point value. More... | |
Type * | getDoubleTy () |
Fetch the type representing a 64-bit floating point value. More... | |
Type * | getVoidTy () |
Fetch the type representing void. More... | |
PointerType * | getPtrTy (unsigned AddrSpace=0) |
Fetch the type representing a pointer. More... | |
PointerType * | getInt8PtrTy (unsigned AddrSpace=0) |
Fetch the type representing a pointer to an 8-bit integer value. More... | |
IntegerType * | getIntPtrTy (const DataLayout &DL, unsigned AddrSpace=0) |
Fetch the type representing a pointer to an integer value. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
CallInst * | CreateFAddReduce (Value *Acc, Value *Src) |
Create a sequential vector fadd reduction intrinsic of the source vector. More... | |
CallInst * | CreateFMulReduce (Value *Acc, Value *Src) |
Create a sequential vector fmul reduction intrinsic of the source vector. More... | |
CallInst * | CreateAddReduce (Value *Src) |
Create a vector int add reduction intrinsic of the source vector. More... | |
CallInst * | CreateMulReduce (Value *Src) |
Create a vector int mul reduction intrinsic of the source vector. More... | |
CallInst * | CreateAndReduce (Value *Src) |
Create a vector int AND reduction intrinsic of the source vector. More... | |
CallInst * | CreateOrReduce (Value *Src) |
Create a vector int OR reduction intrinsic of the source vector. More... | |
CallInst * | CreateXorReduce (Value *Src) |
Create a vector int XOR reduction intrinsic of the source vector. More... | |
CallInst * | CreateIntMaxReduce (Value *Src, bool IsSigned=false) |
Create a vector integer max reduction intrinsic of the source vector. More... | |
CallInst * | CreateIntMinReduce (Value *Src, bool IsSigned=false) |
Create a vector integer min reduction intrinsic of the source vector. More... | |
CallInst * | CreateFPMaxReduce (Value *Src) |
Create a vector float max reduction intrinsic of the source vector. More... | |
CallInst * | CreateFPMinReduce (Value *Src) |
Create a vector float min reduction intrinsic of the source vector. More... | |
CallInst * | CreateLifetimeStart (Value *Ptr, ConstantInt *Size=nullptr) |
Create a lifetime.start intrinsic. More... | |
CallInst * | CreateLifetimeEnd (Value *Ptr, ConstantInt *Size=nullptr) |
Create a lifetime.end intrinsic. More... | |
CallInst * | CreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr) |
Create a call to invariant.start intrinsic. More... | |
CallInst * | CreateMaskedLoad (Type *Ty, Value *Ptr, Align Alignment, Value *Mask, Value *PassThru=nullptr, const Twine &Name="") |
Create a call to Masked Load intrinsic. More... | |
CallInst * | CreateMaskedStore (Value *Val, Value *Ptr, Align Alignment, Value *Mask) |
Create a call to Masked Store intrinsic. More... | |
CallInst * | CreateMaskedGather (Type *Ty, Value *Ptrs, Align Alignment, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="") |
Create a call to Masked Gather intrinsic. More... | |
CallInst * | CreateMaskedScatter (Value *Val, Value *Ptrs, Align Alignment, Value *Mask=nullptr) |
Create a call to Masked Scatter intrinsic. More... | |
CallInst * | CreateAssumption (Value *Cond, ArrayRef< OperandBundleDef > OpBundles=llvm::None) |
Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true. More... | |
Instruction * | CreateNoAliasScopeDeclaration (Value *Scope) |
Create a llvm.experimental.noalias.scope.decl intrinsic call. More... | |
Instruction * | CreateNoAliasScopeDeclaration (MDNode *ScopeTag) |
CallInst * | CreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, ArrayRef< Value * > CallArgs, Optional< ArrayRef< Value * >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More... | |
CallInst * | CreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, uint32_t Flags, ArrayRef< Value * > CallArgs, Optional< ArrayRef< Use >> TransitionArgs, Optional< ArrayRef< Use >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More... | |
CallInst * | CreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, ArrayRef< Use > CallArgs, Optional< ArrayRef< Value * >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
Conveninence function for the common case when CallArgs are filled in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer. More... | |
InvokeInst * | CreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > InvokeArgs, Optional< ArrayRef< Value * >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More... | |
InvokeInst * | CreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef< Value * > InvokeArgs, Optional< ArrayRef< Use >> TransitionArgs, Optional< ArrayRef< Use >> DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More... | |
InvokeInst * | CreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Use > InvokeArgs, 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. More... | |
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. More... | |
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. More... | |
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. More... | |
Value * | CreateVScale (Constant *Scaling, const Twine &Name="") |
Create a call to llvm.vscale, multiplied by Scaling . More... | |
Value * | CreateStepVector (Type *DstType, const Twine &Name="") |
Creates a vector of type DstType with the linear sequence <0, 1, ...> More... | |
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. More... | |
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. More... | |
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 . More... | |
CallInst * | CreateMinNum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the minnum intrinsic. More... | |
CallInst * | CreateMaxNum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the maxnum intrinsic. More... | |
CallInst * | CreateMinimum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the minimum intrinsic. More... | |
CallInst * | CreateMaximum (Value *LHS, Value *RHS, const Twine &Name="") |
Create call to the maximum intrinsic. More... | |
CallInst * | CreateArithmeticFence (Value *Val, Type *DstType, const Twine &Name="") |
Create a call to the arithmetic_fence intrinsic. More... | |
CallInst * | CreateExtractVector (Type *DstType, Value *SrcVec, Value *Idx, const Twine &Name="") |
Create a call to the vector.extract intrinsic. More... | |
CallInst * | CreateInsertVector (Type *DstType, Value *SrcVec, Value *SubVec, Value *Idx, const Twine &Name="") |
Create a call to the vector.insert intrinsic. More... | |
ReturnInst * | CreateRetVoid () |
Create a 'ret void' instruction. More... | |
ReturnInst * | CreateRet (Value *V) |
Create a 'ret <val>' instruction. More... | |
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. More... | |
BranchInst * | CreateBr (BasicBlock *Dest) |
Create an unconditional 'br label X' instruction. More... | |
BranchInst * | CreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr) |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More... | |
BranchInst * | CreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, Instruction *MDSrc) |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More... | |
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). More... | |
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). More... | |
InvokeInst * | CreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="") |
Create an invoke instruction. More... | |
InvokeInst * | CreateInvoke (FunctionType *Ty, Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args=None, 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=None, const Twine &Name="") |
CallBrInst * | CreateCallBr (FunctionType *Ty, Value *Callee, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args=None, const Twine &Name="") |
Create a callbr instruction. More... | |
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=None, 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=None, 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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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 * | CreateLogicalOr (ArrayRef< Value * > Ops) |
CallInst * | CreateConstrainedFPBinOp (Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource=nullptr, const Twine &Name="", MDNode *FPMathTag=nullptr, Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None) |
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. More... | |
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 . More... | |
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. More... | |
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. More... | |
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. More... | |
Value * | CreateSExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="") |
Create a SExt or Trunc from the integer value V to DestTy. More... | |
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, Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None) |
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="", Optional< fp::ExceptionBehavior > Except=None) |
PHINode * | CreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="") |
CallInst * | CreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args=None, 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=None, 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="", Optional< RoundingMode > Rounding=None, Optional< fp::ExceptionBehavior > Except=None) |
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. More... | |
Value * | CreateShuffleVector (Value *V, ArrayRef< int > Mask, const Twine &Name="") |
Create a unary shuffle. More... | |
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. More... | |
Value * | CreateIsNotNull (Value *Arg, const Twine &Name="") |
Return a boolean value testing if Arg != 0. More... | |
Value * | CreateIsNeg (Value *Arg, const Twine &Name="") |
Return a boolean value testing if Arg < 0. More... | |
Value * | CreateIsNotNeg (Value *Arg, const Twine &Name="") |
Return a boolean value testing if Arg > -1. More... | |
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. More... | |
Value * | CreateLaunderInvariantGroup (Value *Ptr) |
Create a launder.invariant.group intrinsic call. More... | |
Value * | CreateStripInvariantGroup (Value *Ptr) |
Create a strip.invariant.group intrinsic call. More... | |
Value * | CreateVectorReverse (Value *V, const Twine &Name="") |
Return a vector value that contains the vector V reversed. More... | |
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. More... | |
Value * | CreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="") |
Return a vector value that contains. More... | |
Value * | CreateVectorSplat (ElementCount EC, Value *V, const Twine &Name="") |
Return a vector value that contains. More... | |
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. More... | |
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. More... | |
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. More... | |
Common base class shared among various IRBuilders.
Definition at line 93 of file IRBuilder.h.
|
inline |
Definition at line 134 of file IRBuilder.h.
References ClearInsertionPoint().
|
inline |
Add all entries in MetadataToCopy to I
.
Definition at line 224 of file IRBuilder.h.
References I.
Referenced by Insert().
|
inline |
Clear the fast-math flags.
Definition at line 282 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 168 of file IRBuilder.h.
Referenced by 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 210 of file IRBuilder.h.
|
inline |
Definition at line 1200 of file IRBuilder.h.
References llvm::MCID::Add, Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, and RHS.
Referenced by buildScalarSteps(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateNSWAdd(), CreateNUWAdd(), evaluateGEPOffsetExpression(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), getStepVector(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::UnrollRuntimeLoopRemainder(), and llvm::ObjectSizeOffsetEvaluator::visitGEPOperator().
Create a vector int add reduction intrinsic of the source vector.
Definition at line 439 of file IRBuilder.cpp.
References getReductionIntrinsic().
|
inline |
Definition at line 1957 of file IRBuilder.h.
References CreateCast().
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 976 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), CreateInsertValue(), llvm::UndefValue::get(), getCurrentFunctionReturnType(), i, Insert(), and N.
|
inline |
Definition at line 1676 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and Insert().
|
inline |
Definition at line 1666 of file IRBuilder.h.
Referenced by CreateAlignedLoad(), CreateLoad(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), doPromotion(), llvm::VPWidenMemoryInstructionRecipe::execute(), unpackLoadToAggregate(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 1671 of file IRBuilder.h.
References CreateAlignedLoad().
|
inline |
Definition at line 1685 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), llvm::Value::getType(), and Insert().
Referenced by combineStoreToNewValue(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), CreateStore(), doPromotion(), llvm::VPWidenMemoryInstructionRecipe::execute(), 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 1279 of file IRBuilder.cpp.
References assert(), DL, llvm::ConstantInt::get(), getIntPtrTy(), and llvm::Value::getType().
Referenced by AddAlignmentAssumptions().
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 1292 of file IRBuilder.cpp.
References assert(), DL, and llvm::Value::getType().
|
inline |
Definition at line 1632 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and Insert().
Referenced by doPromotion(), and simplifyAllocaArraySize().
|
inline |
Definition at line 1639 of file IRBuilder.h.
References BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and Insert().
Definition at line 1362 of file IRBuilder.h.
References assert(), CreateAnd(), llvm::ArrayRef< T >::empty(), i, and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1354 of file IRBuilder.h.
References CreateAnd(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1358 of file IRBuilder.h.
References CreateAnd(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1348 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Referenced by llvm::addRuntimeChecks(), buildPartialUnswitchConditionalBranch(), CreateAnd(), and llvm::X86TTIImpl::instCombineIntrinsic().
Create a vector int AND reduction intrinsic of the source vector.
Definition at line 447 of file IRBuilder.cpp.
References getReductionIntrinsic().
|
inline |
Create a call to the arithmetic_fence intrinsic.
Definition at line 911 of file IRBuilder.h.
References CreateIntrinsic().
|
inline |
Definition at line 1338 of file IRBuilder.h.
References CreateAShr(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1343 of file IRBuilder.h.
References CreateAShr(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1329 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, and RHS.
Referenced by CreateAShr(), and llvm::GCNTTIImpl::instCombineIntrinsic().
CallInst * IRBuilderBase::CreateAssumption | ( | Value * | Cond, |
ArrayRef< OperandBundleDef > | OpBundles = llvm::None |
||
) |
Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.
The optional argument OpBundles
specifies operand bundles that are added to the call instruction.
Definition at line 532 of file IRBuilder.cpp.
References assert(), BB, Cond, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and M.
|
inline |
Definition at line 1700 of file IRBuilder.h.
References Align, BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), and Insert().
|
inline |
Definition at line 1713 of file IRBuilder.h.
References Align, BB, DL, llvm::Module::getDataLayout(), llvm::BasicBlock::getModule(), llvm::Value::getType(), and Insert().
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 877 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Value::getType(), LHS, M, and RHS.
Referenced by CreateMaximum(), CreateMaxNum(), CreateMinimum(), CreateMinNum(), and foldCttzCtlz().
|
inline |
Definition at line 1538 of file IRBuilder.h.
References llvm::BinaryOperator::Create(), FMF, llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Referenced by buildScalarSteps(), CreateNAryOp(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InnerLoopVectorizer::fixReduction(), getStepVector(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 1952 of file IRBuilder.h.
References CreateCast().
Referenced by llvm::addRuntimeChecks(), canonicalizeBitCastExtElt(), llvm::VNCoercion::coerceAvailableValueToLoadType(), combineStoreToNewValue(), constructPointer(), CreateBitOrPointerCast(), createByteGEP(), CreateLaunderInvariantGroup(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), CreateStripInvariantGroup(), llvm::VPWidenMemoryInstructionRecipe::execute(), foldVecTruncToExtElt(), inlineGetBaseAndOffset(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), optimizeVectorResizeWithIntegerBitCasts(), simplifyInvariantGroupIntrinsic(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 2030 of file IRBuilder.h.
References CreateBitCast(), CreateIntToPtr(), CreatePtrToInt(), llvm::Value::getType(), llvm::Type::isIntOrIntVectorTy(), and llvm::Type::isPtrOrPtrVectorTy().
Referenced by llvm::InnerLoopVectorizer::createBitOrPointerCast().
|
inline |
Create an unconditional 'br label X' instruction.
Definition at line 984 of file IRBuilder.h.
References llvm::BranchInst::Create(), and Insert().
Referenced by llvm::orc::IRSpeculationLayer::emit().
|
inline |
Definition at line 2257 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateCall().
|
inline |
Definition at line 2251 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateCall().
|
inline |
Definition at line 2240 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::CallInst::Create(), FMF, Insert(), IsFPConstrained, and setConstrainedFPCallAttr().
|
inline |
Definition at line 2229 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::CallInst::Create(), DefaultOperandBundles, FMF, Insert(), IsFPConstrained, and setConstrainedFPCallAttr().
Referenced by CreateCall(), CreateConstrainedFPCall(), createFFSIntrinsic(), CreateLaunderInvariantGroup(), createPopcntIntrinsic(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), llvm::createSanitizerCtorAndInitFunctions(), CreateStripInvariantGroup(), llvm::VectorBuilder::createVectorInstruction(), llvm::orc::IRSpeculationLayer::emit(), foldCtpop(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), llvm::InlineFunction(), llvm::GCNTTIImpl::instCombineIntrinsic(), modifyIntrinsicCall(), replaceWithTLIFunction(), simplifyAMDGCNMemoryIntrinsicDemanded(), UseTlsOffset(), and llvm::InnerLoopVectorizer::widenCallInstruction().
|
inline |
Definition at line 1093 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateCallBr().
|
inline |
Definition at line 1086 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateCallBr().
|
inline |
Definition at line 1075 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::CallBrInst::Create(), and Insert().
|
inline |
Create a callbr instruction.
Definition at line 1067 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::CallBrInst::Create(), and Insert().
Referenced by CreateCallBr().
|
inline |
Definition at line 1989 of file IRBuilder.h.
References llvm::CastInst::Create(), llvm::IRBuilderFolder::CreateCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
Referenced by CreateAddrSpaceCast(), CreateBitCast(), CreateFPExt(), CreateFPToSI(), CreateFPToUI(), CreateFPTrunc(), CreateIntToPtr(), CreatePtrToInt(), CreateSExt(), CreateSIToFP(), CreateTrunc(), CreateUIToFP(), CreateZExt(), llvm::VPWidenRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), and llvm::VPScalarIVStepsRecipe::execute().
|
inline |
Definition at line 1118 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::CatchPadInst::Create(), and Insert().
|
inline |
Definition at line 1129 of file IRBuilder.h.
References BB, llvm::CatchReturnInst::Create(), and Insert().
|
inline |
Definition at line 1111 of file IRBuilder.h.
References llvm::CatchSwitchInst::Create(), and Insert().
|
inline |
Definition at line 1123 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::CleanupPadInst::Create(), and Insert().
|
inline |
Definition at line 1106 of file IRBuilder.h.
References llvm::CleanupReturnInst::Create(), and Insert().
|
inline |
Definition at line 2191 of file IRBuilder.h.
References CreateFCmp(), CreateICmp(), llvm::CmpInst::isFPPredicate(), LHS, and RHS.
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Copy branch meta data if available.
Definition at line 999 of file IRBuilder.h.
References Cond, llvm::Instruction::copyMetadata(), llvm::BranchInst::Create(), Insert(), and llvm::makeArrayRef().
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Definition at line 990 of file IRBuilder.h.
References Cond, llvm::BranchInst::Create(), and Insert().
Referenced by buildPartialInvariantUnswitchConditionalBranch(), buildPartialUnswitchConditionalBranch(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), and llvm::orc::IRSpeculationLayer::emit().
|
inline |
Definition at line 1740 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and Insert().
Referenced by UseTlsOffset().
|
inline |
Definition at line 1786 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), and Insert().
|
inline |
Definition at line 1760 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and Insert().
|
inline |
Definition at line 1806 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::Create(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), and Insert().
|
inline |
Definition at line 1750 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and Insert().
|
inline |
Definition at line 1796 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), and Insert().
|
inline |
Definition at line 1773 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt32Ty(), and Insert().
Referenced by CreateStructGEP().
|
inline |
Definition at line 1819 of file IRBuilder.h.
References Context, llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), llvm::ConstantInt::get(), llvm::Type::getInt64Ty(), and Insert().
CallInst * IRBuilderBase::CreateConstrainedFPBinOp | ( | Intrinsic::ID | ID, |
Value * | L, | ||
Value * | R, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" , |
||
MDNode * | FPMathTag = nullptr , |
||
Optional< RoundingMode > | Rounding = None , |
||
Optional< fp::ExceptionBehavior > | Except = None |
||
) |
Definition at line 896 of file IRBuilder.cpp.
References CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), llvm::Value::getType(), 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 = "" , |
||
Optional< RoundingMode > | Rounding = None , |
||
Optional< fp::ExceptionBehavior > | Except = None |
||
) |
Definition at line 994 of file IRBuilder.cpp.
References llvm::append_range(), llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, CreateCall(), and setConstrainedFPCallAttr().
CallInst * IRBuilderBase::CreateConstrainedFPCast | ( | Intrinsic::ID | ID, |
Value * | V, | ||
Type * | DestTy, | ||
Instruction * | FMFSource = nullptr , |
||
const Twine & | Name = "" , |
||
MDNode * | FPMathTag = nullptr , |
||
Optional< RoundingMode > | Rounding = None , |
||
Optional< fp::ExceptionBehavior > | Except = None |
||
) |
Definition at line 930 of file IRBuilder.cpp.
References CreateIntrinsic(), FMF, llvm::Instruction::getFastMathFlags(), llvm::Value::getType(), 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 = "" , |
||
Optional< fp::ExceptionBehavior > | Except = None |
||
) |
Definition at line 982 of file IRBuilder.cpp.
References CreateIntrinsic(), llvm::Value::getType(), P, and setConstrainedFPCallAttr().
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 299 of file IRBuilder.cpp.
References assert(), BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, and llvm::Instruction::setMetadata().
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 374 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), BB, createCallHelper(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Attribute::getWithAlignment(), M, and llvm::Instruction::setMetadata().
|
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 593 of file IRBuilder.h.
References Align, and getInt64().
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 196 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), M, and llvm::Instruction::setMetadata().
|
inline |
Definition at line 1273 of file IRBuilder.h.
References CreateSDiv(), LHS, and RHS.
Referenced by CreatePtrDiff().
|
inline |
Definition at line 1260 of file IRBuilder.h.
References CreateUDiv(), LHS, and RHS.
|
inline |
Definition at line 2283 of file IRBuilder.h.
References CreateExtractElement(), and getInt64().
|
inline |
Definition at line 2276 of file IRBuilder.h.
References llvm::ExtractElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractElement(), and Insert().
Referenced by CreateExtractElement(), llvm::VPBranchOnMaskRecipe::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::VPTransformState::get(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), and instrumentMaskedLoadOrStore().
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 1165 of file IRBuilder.cpp.
References assert(), CreateLShr(), CreateTrunc(), DL, From, and llvm::IntegerType::getBitWidth().
|
inline |
Definition at line 2332 of file IRBuilder.h.
References llvm::ExtractValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldExtractValue(), and Insert().
Referenced by unpackStoreToAggregate().
|
inline |
Create a call to the vector.extract intrinsic.
Definition at line 918 of file IRBuilder.h.
References CreateIntrinsic(), and llvm::Value::getType().
|
inline |
Definition at line 1406 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
Referenced by getStepVector(), and llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1420 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), and IsFPConstrained.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
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 423 of file IRBuilder.cpp.
References createCallHelper(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and M.
|
inline |
Definition at line 2186 of file IRBuilder.h.
Referenced by CreateCmp(), CreateFCmpOEQ(), CreateFCmpOGE(), CreateFCmpOGT(), CreateFCmpOLE(), CreateFCmpOLT(), CreateFCmpONE(), CreateFCmpORD(), CreateFCmpUEQ(), CreateFCmpUGE(), CreateFCmpUGT(), CreateFCmpULE(), CreateFCmpULT(), CreateFCmpUNE(), CreateFCmpUNO(), and llvm::VPWidenRecipe::execute().
|
inline |
Definition at line 2106 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OEQ, LHS, and RHS.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 2116 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGE, LHS, and RHS.
|
inline |
Definition at line 2111 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OGT, LHS, and RHS.
|
inline |
Definition at line 2126 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLE, LHS, and RHS.
|
inline |
Definition at line 2121 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_OLT, LHS, and RHS.
|
inline |
Definition at line 2131 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ONE, LHS, and RHS.
|
inline |
Definition at line 2136 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ORD, LHS, and RHS.
|
inline |
Definition at line 2201 of file IRBuilder.h.
|
inline |
Definition at line 2146 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UEQ, LHS, and RHS.
|
inline |
Definition at line 2156 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGE, LHS, and RHS.
|
inline |
Definition at line 2151 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UGT, LHS, and RHS.
|
inline |
Definition at line 2166 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULE, LHS, and RHS.
|
inline |
Definition at line 2161 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_ULT, LHS, and RHS.
|
inline |
Definition at line 2171 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNE, LHS, and RHS.
|
inline |
Definition at line 2141 of file IRBuilder.h.
References CreateFCmp(), llvm::CmpInst::FCMP_UNO, LHS, and RHS.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1487 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1501 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
|
inline |
Definition at line 1693 of file IRBuilder.h.
|
inline |
Definition at line 1460 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
Referenced by llvm::VPScalarIVStepsRecipe::execute(), getStepVector(), and llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1474 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), and IsFPConstrained.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
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 431 of file IRBuilder.cpp.
References createCallHelper(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and M.
|
inline |
Definition at line 1589 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateFNeg(), FMF, Folder, Insert(), and llvm::AArch64CC::VC.
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1599 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateFNeg(), Folder, llvm::Instruction::getFastMathFlags(), Insert(), and llvm::AArch64CC::VC.
|
inline |
Definition at line 2042 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateFPCast(), llvm::CastInst::CreateFPCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
|
inline |
Definition at line 1935 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
Create a vector float max reduction intrinsic of the source vector.
Definition at line 471 of file IRBuilder.cpp.
References getReductionIntrinsic().
Create a vector float min reduction intrinsic of the source vector.
Definition at line 475 of file IRBuilder.cpp.
References getReductionIntrinsic().
|
inline |
Definition at line 1905 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
|
inline |
Definition at line 1898 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
|
inline |
Definition at line 1926 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
Definition at line 2351 of file IRBuilder.h.
References Insert().
Referenced by buildPartialUnswitchConditionalBranch(), and llvm::VPWidenRecipe::execute().
|
inline |
Definition at line 1513 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1526 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), and IsFPConstrained.
|
inline |
Definition at line 1433 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, I, Insert(), and IsFPConstrained.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Copy fast-math-flags from an instruction rather than using the builder's default FMF.
Definition at line 1447 of file IRBuilder.h.
References CreateConstrainedFPBinOp(), FMF, llvm::IRBuilderFolder::FoldBinOpFMF(), Folder, llvm::Instruction::getFastMathFlags(), I, Insert(), and IsFPConstrained.
Create a call to the experimental.gc.pointer.base intrinsic to get the base pointer for the specified derived pointer.
Definition at line 851 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and M.
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 860 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and M.
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 839 of file IRBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and M.
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 828 of file IRBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and M.
CallInst * IRBuilderBase::CreateGCStatepointCall | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualCallee, | ||
ArrayRef< Use > | CallArgs, | ||
Optional< ArrayRef< Value * >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Conveninence function for the common case when CallArgs are filled in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer.
Definition at line 760 of file IRBuilder.cpp.
References llvm::None.
CallInst * IRBuilderBase::CreateGCStatepointCall | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualCallee, | ||
ArrayRef< Value * > | CallArgs, | ||
Optional< ArrayRef< Value * >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
Definition at line 741 of file IRBuilder.cpp.
References llvm::None.
CallInst * IRBuilderBase::CreateGCStatepointCall | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualCallee, | ||
uint32_t | Flags, | ||
ArrayRef< Value * > | CallArgs, | ||
Optional< ArrayRef< Use >> | TransitionArgs, | ||
Optional< ArrayRef< Use >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Create a call to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
Definition at line 750 of file IRBuilder.cpp.
InvokeInst * IRBuilderBase::CreateGCStatepointInvoke | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualInvokee, | ||
BasicBlock * | NormalDest, | ||
BasicBlock * | UnwindDest, | ||
ArrayRef< Use > | InvokeArgs, | ||
Optional< ArrayRef< Value * >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Definition at line 817 of file IRBuilder.cpp.
References llvm::None.
InvokeInst * IRBuilderBase::CreateGCStatepointInvoke | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualInvokee, | ||
BasicBlock * | NormalDest, | ||
BasicBlock * | UnwindDest, | ||
ArrayRef< Value * > | InvokeArgs, | ||
Optional< ArrayRef< Value * >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
Definition at line 795 of file IRBuilder.cpp.
References llvm::None.
InvokeInst * IRBuilderBase::CreateGCStatepointInvoke | ( | uint64_t | ID, |
uint32_t | NumPatchBytes, | ||
FunctionCallee | ActualInvokee, | ||
BasicBlock * | NormalDest, | ||
BasicBlock * | UnwindDest, | ||
uint32_t | Flags, | ||
ArrayRef< Value * > | InvokeArgs, | ||
Optional< ArrayRef< Use >> | TransitionArgs, | ||
Optional< ArrayRef< Use >> | DeoptArgs, | ||
ArrayRef< Value * > | GCArgs, | ||
const Twine & | Name = "" |
||
) |
Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.
Definition at line 806 of file IRBuilder.cpp.
|
inline |
Definition at line 1725 of file IRBuilder.h.
References llvm::GetElementPtrInst::Create(), llvm::GetElementPtrInst::CreateInBounds(), Folder, llvm::IRBuilderFolder::FoldGEP(), and Insert().
Referenced by constructPointer(), createByteGEP(), CreateInBoundsGEP(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPWidenMemoryInstructionRecipe::execute(), instrumentMaskedLoadOrStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
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 Align, BB, Context, llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::ConstantDataArray::getString(), llvm::Value::getType(), llvm::GlobalValue::Global, M, 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 1842 of file IRBuilder.h.
References Context, CreateGlobalString(), llvm::ConstantInt::get(), llvm::ConstantExpr::getInBoundsGetElementPtr(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getValueType(), and M.
|
inline |
Definition at line 2176 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldICmp(), Insert(), LHS, P, and RHS.
Referenced by CreateCmp(), CreateICmpEQ(), CreateICmpNE(), CreateICmpSGE(), CreateICmpSGT(), CreateICmpSLE(), CreateICmpSLT(), CreateICmpUGE(), CreateICmpUGT(), CreateICmpULE(), CreateICmpULT(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPWidenRecipe::execute(), and llvm::UnrollRuntimeLoopRemainder().
|
inline |
Definition at line 2066 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_EQ, LHS, and RHS.
Referenced by CreateIsNull(), createMemMoveLoop(), llvm::orc::IRSpeculationLayer::emit(), and llvm::InnerLoopVectorizer::getOrCreateVectorTripCount().
|
inline |
Definition at line 2070 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_NE, LHS, and RHS.
Referenced by CreateIsNotNull().
|
inline |
Definition at line 2094 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGE, LHS, and RHS.
|
inline |
Definition at line 2090 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SGT, LHS, and RHS.
Referenced by CreateIsNotNeg().
|
inline |
Definition at line 2102 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLE, LHS, and RHS.
|
inline |
Definition at line 2098 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_SLT, LHS, and RHS.
Referenced by CreateIsNeg(), and getBoundsCheckCond().
|
inline |
Definition at line 2078 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGE, LHS, and RHS.
|
inline |
Definition at line 2074 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_UGT, LHS, and RHS.
|
inline |
Definition at line 2086 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_ULE, LHS, and RHS.
|
inline |
Definition at line 2082 of file IRBuilder.h.
References CreateICmp(), llvm::CmpInst::ICMP_ULT, LHS, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), llvm::createMemCpyLoopKnownSize(), createMemSetLoop(), and getBoundsCheckCond().
|
inline |
Definition at line 1735 of file IRBuilder.h.
References CreateGEP().
Referenced by llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), unpackLoadToAggregate(), and unpackStoreToAggregate().
|
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 1023 of file IRBuilder.h.
References Addr, llvm::IndirectBrInst::Create(), and Insert().
|
inline |
Definition at line 2293 of file IRBuilder.h.
References CreateInsertElement(), and llvm::PoisonValue::get().
|
inline |
Definition at line 2288 of file IRBuilder.h.
References llvm::PoisonValue::get().
Referenced by CreateInsertElement(), CreateVectorSplat(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), optimizeIntegerToVectorInsertions(), llvm::InnerLoopVectorizer::packScalarIntoVectorValue(), and simplifyAMDGCNMemoryIntrinsicDemanded().
|
inline |
Definition at line 2305 of file IRBuilder.h.
References CreateInsertElement(), and getInt64().
|
inline |
Definition at line 2298 of file IRBuilder.h.
References llvm::InsertElementInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertElement(), and Insert().
|
inline |
Definition at line 2339 of file IRBuilder.h.
References llvm::InsertValueInst::Create(), Folder, llvm::IRBuilderFolder::FoldInsertValue(), and Insert().
Referenced by CreateAggregateRet(), expandFromPrimitiveShadowRecursive(), and unpackLoadToAggregate().
|
inline |
Create a call to the vector.insert intrinsic.
Definition at line 926 of file IRBuilder.h.
References CreateIntrinsic(), and llvm::Value::getType().
|
inline |
Definition at line 2021 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
Referenced by evaluateGEPOffsetExpression(), and simplifyAllocaArraySize().
Create a vector integer max reduction intrinsic of the source vector.
Definition at line 459 of file IRBuilder.cpp.
References getReductionIntrinsic().
Create a vector integer min reduction intrinsic of the source vector.
Definition at line 465 of file IRBuilder.cpp.
References getReductionIntrinsic().
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 886 of file IRBuilder.cpp.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and M.
Referenced by CreateArithmeticFence(), CreateConstrainedFPBinOp(), CreateConstrainedFPCast(), CreateConstrainedFPCmp(), CreateExtractVector(), CreateInsertVector(), CreateStepVector(), and llvm::ARMTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1947 of file IRBuilder.h.
References CreateCast().
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), 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 511 of file IRBuilder.cpp.
References assert(), BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and M.
|
inline |
Definition at line 1050 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateInvoke().
|
inline |
Definition at line 1058 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, and CreateInvoke().
|
inline |
Create an invoke instruction.
Definition at line 1028 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::InvokeInst::Create(), Insert(), IsFPConstrained, and setConstrainedFPCallAttr().
Referenced by CreateInvoke().
|
inline |
Definition at line 1039 of file IRBuilder.h.
References llvm::AMDGPU::HSAMD::Kernel::Key::Args, Callee, llvm::InvokeInst::Create(), Insert(), IsFPConstrained, and setConstrainedFPCallAttr().
Return a boolean value testing if Arg
< 0.
Definition at line 2370 of file IRBuilder.h.
References Arg, CreateICmpSLT(), and llvm::Constant::getNullValue().
Return a boolean value testing if Arg
> -1.
Definition at line 2375 of file IRBuilder.h.
References Arg, CreateICmpSGT(), and llvm::Constant::getAllOnesValue().
Return a boolean value testing if Arg
!= 0.
Definition at line 2365 of file IRBuilder.h.
References Arg, CreateICmpNE(), and llvm::Constant::getNullValue().
Return a boolean value testing if Arg
== 0.
Definition at line 2360 of file IRBuilder.h.
References Arg, CreateICmpEQ(), and llvm::Constant::getNullValue().
|
inline |
Definition at line 2346 of file IRBuilder.h.
References llvm::LandingPadInst::Create(), and Insert().
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 1050 of file IRBuilder.cpp.
References assert(), BB, CreateBitCast(), CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), getInt8PtrTy(), llvm::FunctionType::getParamType(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Function::getReturnType(), llvm::Value::getType(), and M.
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 495 of file IRBuilder.cpp.
References assert(), BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and M.
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 479 of file IRBuilder.cpp.
References assert(), BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt64(), getInt64Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and M.
|
inline |
Definition at line 1657 of file IRBuilder.h.
References CreateAlignedLoad().
Provided to resolve 'CreateLoad(Ty, Ptr, "...")' correctly, instead of converting the string to 'bool' for the isVolatile parameter.
Definition at line 1649 of file IRBuilder.h.
References CreateAlignedLoad().
Referenced by llvm::orc::IRSpeculationLayer::emit().
|
inline |
Definition at line 1653 of file IRBuilder.h.
References CreateAlignedLoad().
|
inline |
Definition at line 1548 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getNullValue(), llvm::Value::getType(), and llvm::Type::isIntOrIntVectorTy().
Definition at line 1561 of file IRBuilder.h.
References assert(), CreateLogicalOr(), llvm::ArrayRef< T >::empty(), i, and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1554 of file IRBuilder.h.
References assert(), CreateSelect(), llvm::Constant::getAllOnesValue(), llvm::Value::getType(), and llvm::Type::isIntOrIntVectorTy().
Referenced by CreateLogicalOr().
|
inline |
Definition at line 1319 of file IRBuilder.h.
References CreateLShr(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1324 of file IRBuilder.h.
References CreateLShr(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1310 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, and RHS.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateExtractInteger(), CreateLShr(), getShiftedValue(), llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::GCNTTIImpl::instCombineIntrinsic().
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 613 of file IRBuilder.cpp.
References assert(), Context, llvm::VectorType::get(), llvm::UndefValue::get(), llvm::Constant::getAllOnesValue(), llvm::Type::getInt1Ty(), getInt32(), llvm::Value::getType(), and llvm::BitmaskEnumDetail::Mask().
Referenced by llvm::VPWidenMemoryInstructionRecipe::execute().
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 559 of file IRBuilder.cpp.
References assert(), llvm::UndefValue::get(), getInt32(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::BitmaskEnumDetail::Mask().
Referenced by llvm::VPWidenMemoryInstructionRecipe::execute(), 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 649 of file IRBuilder.cpp.
References assert(), Context, llvm::Data, llvm::VectorType::get(), llvm::Constant::getAllOnesValue(), llvm::Type::getInt1Ty(), getInt32(), llvm::Value::getType(), and llvm::BitmaskEnumDetail::Mask().
Referenced by llvm::VPWidenMemoryInstructionRecipe::execute().
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 580 of file IRBuilder.cpp.
References assert(), getInt32(), llvm::Value::getType(), llvm::Type::isVectorTy(), and llvm::BitmaskEnumDetail::Mask().
Referenced by llvm::VPWidenMemoryInstructionRecipe::execute(), simplifyX86MaskedStore(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Create call to the maximum intrinsic.
Definition at line 906 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, maximum, and RHS.
|
inline |
Create call to the maxnum intrinsic.
Definition at line 896 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, llvm::maxnum(), 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 616 of file IRBuilder.h.
References getInt64().
|
inline |
Definition at line 633 of file IRBuilder.h.
References CreateMemTransferInst(), and memcpy().
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 261 of file IRBuilder.cpp.
References BB, createCallHelper(), F, llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile, and M.
|
inline |
Definition at line 664 of file IRBuilder.h.
References getInt64().
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 340 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, and llvm::Instruction::setMetadata().
|
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 568 of file IRBuilder.h.
References getInt64().
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 139 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), M, and llvm::Instruction::setMetadata().
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 167 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile, M, and llvm::Instruction::setMetadata().
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 224 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, and llvm::Instruction::setMetadata().
Referenced by CreateMemCpy().
|
inline |
Create call to the minimum intrinsic.
Definition at line 901 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, minimum, and RHS.
|
inline |
Create call to the minnum intrinsic.
Definition at line 891 of file IRBuilder.h.
References CreateBinaryIntrinsic(), LHS, llvm::minnum(), and RHS.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1234 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, Mul, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), CreateNSWMul(), CreateNUWMul(), CreateVScale(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPWidenMemoryInstructionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), getStepVector(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitCallBase().
Create a vector int mul reduction intrinsic of the source vector.
Definition at line 443 of file IRBuilder.cpp.
References getReductionIntrinsic().
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 915 of file IRBuilder.cpp.
References assert(), CreateBinOp(), CreateUnOp(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isUnaryOp(), llvm_unreachable, and llvm::ArrayRef< T >::size().
Referenced by llvm::VPWidenRecipe::execute().
|
inline |
Definition at line 1575 of file IRBuilder.h.
References CreateSub(), llvm::Constant::getNullValue(), and llvm::Value::getType().
Referenced by CreateNSWNeg(), and CreateNUWNeg().
|
inline |
Definition at line 779 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 543 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), and M.
Referenced by AddAliasScopeMetadata(), and CreateNoAliasScopeDeclaration().
Definition at line 1608 of file IRBuilder.h.
References CreateXor(), llvm::Constant::getAllOnesValue(), and llvm::Value::getType().
Referenced by mergeConditionalStoreToAddress(), and simplifyUsingControlFlow().
|
inline |
Definition at line 1209 of file IRBuilder.h.
References CreateAdd(), LHS, and RHS.
|
inline |
Definition at line 1243 of file IRBuilder.h.
References CreateMul(), LHS, and RHS.
Definition at line 1581 of file IRBuilder.h.
References CreateNeg().
|
inline |
Definition at line 1226 of file IRBuilder.h.
References CreateSub(), LHS, and RHS.
|
inline |
Definition at line 1213 of file IRBuilder.h.
References CreateAdd(), LHS, and RHS.
|
inline |
Definition at line 1247 of file IRBuilder.h.
References CreateMul(), LHS, and RHS.
Definition at line 1585 of file IRBuilder.h.
References CreateNeg().
|
inline |
Definition at line 1230 of file IRBuilder.h.
References CreateSub(), LHS, and RHS.
Definition at line 1384 of file IRBuilder.h.
References assert(), CreateOr(), llvm::ArrayRef< T >::empty(), i, and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 1376 of file IRBuilder.h.
References CreateOr(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1380 of file IRBuilder.h.
References CreateOr(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1370 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), llvm::addRuntimeChecks(), buildPartialUnswitchConditionalBranch(), CreateOr(), getBoundsCheckCond(), and mergeConditionalStoreToAddress().
Create a vector int OR reduction intrinsic of the source vector.
Definition at line 451 of file IRBuilder.cpp.
References getReductionIntrinsic().
|
inline |
Definition at line 2221 of file IRBuilder.h.
References llvm::PHINode::Create(), FMF, and Insert().
Referenced by llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::VPWidenPHIRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
|
inline |
Definition at line 2007 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
Referenced by constructPointer().
|
inline |
Definition at line 1998 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreatePointerCast(), llvm::CastInst::CreatePointerCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
Referenced by UseTlsOffset().
Value * IRBuilderBase::CreatePreserveArrayAccessIndex | ( | Type * | ElTy, |
Value * | Base, | ||
unsigned | Dimension, | ||
unsigned | LastIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1188 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::ConstantInt::get(), llvm::Attribute::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GetElementPtrInst::getGEPReturnType(), getInt32(), llvm::Type::getInt32Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, and llvm::Instruction::setMetadata().
Value * IRBuilderBase::CreatePreserveStructAccessIndex | ( | Type * | ElTy, |
Value * | Base, | ||
unsigned | Index, | ||
unsigned | FieldIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1239 of file IRBuilder.cpp.
References llvm::CallBase::addParamAttr(), assert(), llvm::sampleprof::Base, BB, Context, CreateCall(), llvm::ConstantInt::get(), llvm::Attribute::get(), llvm::Value::getContext(), llvm::Intrinsic::getDeclaration(), llvm::GetElementPtrInst::getGEPReturnType(), getInt32(), llvm::Type::getInt32Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, and llvm::Instruction::setMetadata().
Value * IRBuilderBase::CreatePreserveUnionAccessIndex | ( | Value * | Base, |
unsigned | FieldIndex, | ||
MDNode * | DbgInfo | ||
) |
Definition at line 1220 of file IRBuilder.cpp.
References assert(), llvm::sampleprof::Base, BB, CreateCall(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), M, 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 1036 of file IRBuilder.cpp.
References assert(), Context, CreateExactSDiv(), CreatePtrToInt(), CreateSub(), llvm::Type::getInt64Ty(), llvm::ConstantExpr::getSizeOf(), llvm::Value::getType(), LHS, and RHS.
|
inline |
Definition at line 1942 of file IRBuilder.h.
References CreateCast().
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), CreateBitOrPointerCast(), CreatePtrDiff(), and llvm::orc::IRSpeculationLayer::emit().
|
inline |
Definition at line 1102 of file IRBuilder.h.
References llvm::ResumeInst::Create(), and Insert().
|
inline |
Create a 'ret <val>' instruction.
Definition at line 965 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
|
inline |
Create a 'ret void' instruction.
Definition at line 960 of file IRBuilder.h.
References Context, llvm::ReturnInst::Create(), and Insert().
|
inline |
Definition at line 1264 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, and RHS.
Referenced by CreateExactSDiv().
Value * IRBuilderBase::CreateSelect | ( | Value * | C, |
Value * | True, | ||
Value * | False, | ||
const Twine & | Name = "" , |
||
Instruction * | MDFrom = nullptr |
||
) |
Definition at line 1020 of file IRBuilder.cpp.
References llvm::SelectInst::Create(), FMF, Folder, llvm::IRBuilderFolder::FoldSelect(), llvm::Instruction::getMetadata(), and Insert().
Referenced by CreateLogicalAnd(), CreateLogicalOr(), llvm::VPWidenSelectRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::X86TTIImpl::instCombineIntrinsic(), and llvm::ObjectSizeOffsetEvaluator::visitSelectInst().
Definition at line 1864 of file IRBuilder.h.
References CreateCast().
Referenced by CreateSExtOrTrunc(), llvm::InnerLoopVectorizer::fixReduction(), and llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1971 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateSExtOrBitCast(), llvm::CastInst::CreateSExtOrBitCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
|
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 1885 of file IRBuilder.h.
References assert(), CreateSExt(), CreateTrunc(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), and llvm::Type::isIntOrIntVectorTy().
Referenced by llvm::VPWidenPointerInductionRecipe::execute(), and llvm::VPScalarIVStepsRecipe::execute().
|
inline |
Definition at line 1298 of file IRBuilder.h.
References CreateShl(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1304 of file IRBuilder.h.
References CreateShl(), llvm::ConstantInt::get(), LHS, and RHS.
|
inline |
Definition at line 1289 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, and RHS.
Referenced by CreateShl(), getShiftedValue(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), and simplifyValueKnownNonZero().
|
inline |
Create a unary shuffle.
The second vector operand of the IR instruction is poison.
Definition at line 2327 of file IRBuilder.h.
References CreateShuffleVector(), llvm::PoisonValue::get(), llvm::Value::getType(), and llvm::BitmaskEnumDetail::Mask().
|
inline |
See class ShuffleVectorInst for a description of the mask representation.
Definition at line 2318 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldShuffleVector(), Insert(), llvm::BitmaskEnumDetail::Mask(), and llvm::NVPTX::PTXLdStInstCode::V2.
|
inline |
Definition at line 2310 of file IRBuilder.h.
References llvm::ShuffleVectorInst::getShuffleMask(), llvm::BitmaskEnumDetail::Mask(), and llvm::NVPTX::PTXLdStInstCode::V2.
Referenced by CreateShuffleVector(), CreateVectorReverse(), CreateVectorSplat(), CreateVectorSplice(), simplifyAMDGCNMemoryIntrinsicDemanded(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Definition at line 1919 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
Referenced by buildScalarSteps().
Definition at line 1283 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Creates a vector of type DstType
with the linear sequence <0, 1, ...>
Definition at line 111 of file IRBuilder.cpp.
References CreateIntrinsic(), CreateTrunc(), llvm::ConstantInt::get(), llvm::VectorType::get(), llvm::ConstantVector::get(), getInt8Ty(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), and i.
Referenced by buildScalarSteps(), llvm::VPWidenPointerInductionRecipe::execute(), and getStepVector().
|
inline |
Definition at line 1662 of file IRBuilder.h.
References CreateAlignedStore().
Referenced by llvm::orc::IRSpeculationLayer::emit(), llvm::InnerLoopVectorizer::fixReduction(), and mergeConditionalStoreToAddress().
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 1074 of file IRBuilder.cpp.
References assert(), BB, CreateBitCast(), CreateCall(), llvm::Intrinsic::getDeclaration(), llvm::Function::getFunctionType(), getInt8PtrTy(), llvm::FunctionType::getParamType(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Function::getReturnType(), llvm::Value::getType(), and M.
Referenced by simplifyInvariantGroupIntrinsic().
|
inline |
Definition at line 1832 of file IRBuilder.h.
References CreateConstInBoundsGEP2_32().
|
inline |
Definition at line 1217 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldNoWrapBinOp(), LHS, and RHS.
Referenced by llvm::addDiffRuntimeChecks(), createMemMoveLoop(), CreateNeg(), CreateNSWSub(), CreateNUWSub(), CreatePtrDiff(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPWidenMemoryInstructionRecipe::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), foldCtpop(), getBoundsCheckCond(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::VPlan::prepareToExecute(), simplifyValueKnownNonZero(), and llvm::UnrollRuntimeLoopRemainder().
|
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 1013 of file IRBuilder.h.
References llvm::SwitchInst::Create(), and Insert().
|
inline |
Definition at line 1856 of file IRBuilder.h.
References CreateCast().
Referenced by CreateExtractInteger(), CreateSExtOrTrunc(), CreateStepVector(), CreateZExtOrTrunc(), evaluateGEPOffsetExpression(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), and llvm::InnerLoopVectorizer::fixReduction().
|
inline |
Definition at line 1980 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateTruncOrBitCast(), llvm::CastInst::CreateTruncOrBitCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType().
|
inline |
Definition at line 1251 of file IRBuilder.h.
References Folder, llvm::IRBuilderFolder::FoldExactBinOp(), Insert(), LHS, and RHS.
Referenced by CreateExactUDiv(), and getShape().
|
inline |
Definition at line 1912 of file IRBuilder.h.
References CreateCast(), CreateConstrainedFPCast(), and IsFPConstrained.
Referenced by getStepVector().
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 869 of file IRBuilder.cpp.
References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Value::getType(), and M.
Referenced by foldCtpop().
|
inline |
Definition at line 1612 of file IRBuilder.h.
References llvm::UnaryOperator::Create(), llvm::IRBuilderFolder::CreateUnOp(), FMF, Folder, Insert(), and llvm::AArch64CC::VC.
Referenced by CreateNAryOp().
|
inline |
Definition at line 1133 of file IRBuilder.h.
References Context, and Insert().
Referenced by llvm::VPBasicBlock::execute().
Definition at line 1277 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Referenced by llvm::InnerLoopVectorizer::getOrCreateVectorTripCount().
|
inline |
Definition at line 2272 of file IRBuilder.h.
Return a vector value that contains the vector V reversed.
Definition at line 1099 of file IRBuilder.cpp.
References BB, llvm::CallInst::Create(), CreateShuffleVector(), F, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), i, Insert(), and M.
Referenced by llvm::VPWidenMemoryInstructionRecipe::execute(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
Value * IRBuilderBase::CreateVectorSplat | ( | ElementCount | EC, |
Value * | V, | ||
const Twine & | Name = "" |
||
) |
Return a vector value that contains.
EC
elements. Definition at line 1149 of file IRBuilder.cpp.
References assert(), CreateInsertElement(), CreateShuffleVector(), llvm::ConstantInt::get(), llvm::VectorType::get(), llvm::PoisonValue::get(), getInt32Ty(), llvm::Value::getType(), and llvm::SmallVectorImpl< T >::resize().
Return a vector value that contains.
NumElts
elements. Definition at line 1143 of file IRBuilder.cpp.
References llvm::LinearPolySize< ElementCount >::getFixed().
Referenced by buildScalarSteps(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::InnerLoopVectorizer::getBroadcastInstrs(), getStepVector(), llvm::ARMTTIImpl::instCombineIntrinsic(), and llvm::VPlan::prepareToExecute().
Value * IRBuilderBase::CreateVectorSplice | ( | Value * | V1, |
Value * | V2, | ||
int64_t | Imm, | ||
const Twine & | Name = "" |
||
) |
Return a vector splice intrinsic if using scalable vectors, otherwise return a shufflevector.
If the immediate is positive, a vector is extracted from concat(V1, V2), starting at Imm. If the immediate is negative, we extract -Imm elements from V1 and the remaining elements from V2. Imm is a signed integer in the range -VL <= Imm < VL (where VL is the runtime vector length of the source/result vector)
Definition at line 1115 of file IRBuilder.cpp.
References assert(), BB, llvm::CallInst::Create(), CreateShuffleVector(), F, llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), I, llvm::RISCVMatInt::Imm, Insert(), M, llvm::BitmaskEnumDetail::Mask(), and llvm::NVPTX::PTXLdStInstCode::V2.
Create a call to llvm.vscale, multiplied by Scaling
.
The type of VScale will be the same type as that of Scaling
.
Definition at line 98 of file IRBuilder.cpp.
References assert(), createCallHelper(), CreateMul(), llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), isZero(), and M.
|
inline |
Definition at line 1398 of file IRBuilder.h.
References CreateXor(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1402 of file IRBuilder.h.
References CreateXor(), llvm::ConstantInt::get(), LHS, and RHS.
Definition at line 1392 of file IRBuilder.h.
References llvm::IRBuilderFolder::FoldBinOp(), Folder, Insert(), LHS, and RHS.
Referenced by CreateNot(), and CreateXor().
Create a vector int XOR reduction intrinsic of the source vector.
Definition at line 455 of file IRBuilder.cpp.
References getReductionIntrinsic().
Definition at line 1860 of file IRBuilder.h.
References CreateCast().
Referenced by CreateZExtOrTrunc(), llvm::InnerLoopVectorizer::fixReduction(), foldCttzCtlz(), and llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Definition at line 1962 of file IRBuilder.h.
References llvm::IRBuilderFolder::CreateZExtOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), Folder, llvm::Value::getType(), Insert(), and llvm::AArch64CC::VC.
|
inline |
Create a ZExt or Trunc from the integer value V to DestTy.
Return the value untouched if the type of V is already DestTy.
Definition at line 1870 of file IRBuilder.h.
References assert(), CreateTrunc(), CreateZExt(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), and llvm::Type::isIntOrIntVectorTy().
Referenced by llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitCallBase().
|
inline |
Fetch the type representing a 16-bit brain floating point value.
Definition at line 524 of file IRBuilder.h.
References Context, and llvm::Type::getBFloatTy().
|
inline |
Definition at line 175 of file IRBuilder.h.
References Context.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), and SegmentOffset().
DebugLoc IRBuilderBase::getCurrentDebugLocation | ( | ) | const |
Get location information used by debugging information.
Definition at line 72 of file IRBuilder.cpp.
Referenced by llvm::InstrumentationIRBuilder::ensureDebugInfo().
Type * IRBuilderBase::getCurrentFunctionReturnType | ( | ) | const |
Get the return type of the current function that we're emitting into.
Definition at line 58 of file IRBuilder.cpp.
References assert(), BB, llvm::BasicBlock::getParent(), and llvm::Function::getReturnType().
Referenced by CreateAggregateRet().
|
inline |
Get the exception handling used with constrained floating point.
Definition at line 318 of file IRBuilder.h.
References DefaultConstrainedExcept.
|
inline |
Get the rounding mode handling used with constrained floating point.
Definition at line 323 of file IRBuilder.h.
References DefaultConstrainedRounding.
|
inline |
Get the floating point math metadata being used.
Definition at line 274 of file IRBuilder.h.
References DefaultFPMathTag.
|
inline |
Fetch the type representing a 64-bit floating point value.
Definition at line 534 of file IRBuilder.h.
References Context, and llvm::Type::getDoubleTy().
|
inline |
Get the constant value for i1 false.
Definition at line 446 of file IRBuilder.h.
References Context, and llvm::ConstantInt::getFalse().
Referenced by llvm::InnerLoopVectorizer::emitIterationCountCheck(), and foldCtpop().
|
inline |
Definition at line 279 of file IRBuilder.h.
References FMF.
|
inline |
Get the flags to be applied to created floating point ops.
Definition at line 277 of file IRBuilder.h.
References FMF.
|
inline |
Fetch the type representing a 32-bit floating point value.
Definition at line 529 of file IRBuilder.h.
References Context, and llvm::Type::getFloatTy().
|
inline |
Fetch the type representing a 16-bit floating point value.
Definition at line 519 of file IRBuilder.h.
References Context, and llvm::Type::getHalfTy().
|
inline |
Definition at line 173 of file IRBuilder.h.
References BB.
Referenced by CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), createPopcntIntrinsic(), CreateVScale(), llvm::orc::IRSpeculationLayer::emit(), llvm::VPLiveOut::fixPhi(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), llvm::X86TargetLowering::getIRStackGuard(), llvm::TargetLoweringBase::getIRStackGuard(), llvm::VectorBuilder::getModule(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), saveAndClearIP(), saveIP(), and UseTlsOffset().
|
inline |
Definition at line 174 of file IRBuilder.h.
References InsertPt.
Referenced by llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPExpandSCEVRecipe::execute(), insertBoundsCheck(), mergeConditionalStoreToAddress(), saveAndClearIP(), and saveIP().
|
inline |
Get a constant integer value.
Definition at line 477 of file IRBuilder.h.
References Context, and llvm::ConstantInt::get().
Referenced by constructPointer(), and createByteGEP().
|
inline |
Get a constant value representing either true or false.
Definition at line 436 of file IRBuilder.h.
References llvm::ConstantInt::get(), and getInt1Ty().
Referenced by createFFSIntrinsic(), CreateMemCpyInline(), CreateMemMove(), CreateMemSet(), CreateMemSetInline(), and CreateMemTransferInst().
|
inline |
Fetch the type representing a 128-bit integer.
Definition at line 511 of file IRBuilder.h.
References Context, and llvm::Type::getInt128Ty().
|
inline |
Get a constant 16-bit value.
Definition at line 456 of file IRBuilder.h.
References llvm::ConstantInt::get(), and getInt16Ty().
Referenced by getShape().
|
inline |
Fetch the type representing a 16-bit integer.
Definition at line 496 of file IRBuilder.h.
References Context, and llvm::Type::getInt16Ty().
Referenced by getInt16().
|
inline |
Fetch the type representing a single bit.
Definition at line 486 of file IRBuilder.h.
References Context, and llvm::Type::getInt1Ty().
Referenced by CreateAssumption(), llvm::VectorBuilder::getAllTrueMask(), getInt1(), and llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
Get a constant 32-bit value.
Definition at line 461 of file IRBuilder.h.
References llvm::ConstantInt::get(), and getInt32Ty().
Referenced by appendToGlobalArray(), CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateGCRelocate(), CreateMaskedGather(), CreateMaskedLoad(), CreateMaskedScatter(), CreateMaskedStore(), createOrdering(), CreatePreserveArrayAccessIndex(), CreatePreserveStructAccessIndex(), CreatePreserveUnionAccessIndex(), CreateVectorSplice(), llvm::VPBranchOnMaskRecipe::execute(), llvm::VPWidenMemoryInstructionRecipe::execute(), foldVecTruncToExtElt(), llvm::PPCTTIImpl::instCombineIntrinsic(), nullifySetjmp(), optimizeIntegerToVectorInsertions(), simplifyAllocaArraySize(), and llvm::InnerLoopVectorizer::vectorizeInterleaveGroup().
|
inline |
Fetch the type representing a 32-bit integer.
Definition at line 501 of file IRBuilder.h.
References Context, and llvm::Type::getInt32Ty().
Referenced by appendToGlobalArray(), CreateVectorSplat(), llvm::VPWidenMemoryInstructionRecipe::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), and getInt32().
|
inline |
Get a constant 64-bit value.
Definition at line 466 of file IRBuilder.h.
References llvm::ConstantInt::get(), and getInt64Ty().
Referenced by CreateElementUnorderedAtomicMemSet(), CreateExtractElement(), CreateInsertElement(), CreateInvariantStart(), CreateLifetimeEnd(), CreateLifetimeStart(), CreateMemCpy(), CreateMemMove(), and CreateMemSet().
|
inline |
Fetch the type representing a 64-bit integer.
Definition at line 506 of file IRBuilder.h.
References Context, and llvm::Type::getInt64Ty().
Referenced by CreateInvariantStart(), CreateLifetimeEnd(), CreateLifetimeStart(), and getInt64().
|
inline |
Get a constant 8-bit value.
Definition at line 451 of file IRBuilder.h.
References llvm::ConstantInt::get(), and getInt8Ty().
Referenced by llvm::HexagonTargetLowering::LowerConstantPool().
|
inline |
Fetch the type representing a pointer to an 8-bit integer value.
Definition at line 549 of file IRBuilder.h.
References Context, and llvm::Type::getInt8PtrTy().
Referenced by appendToGlobalArray(), constructPointer(), createByteGEP(), CreateLaunderInvariantGroup(), createMemMoveLoop(), CreateStripInvariantGroup(), llvm::UpgradeGlobalVariable(), and UseTlsOffset().
|
inline |
Fetch the type representing an 8-bit integer.
Definition at line 491 of file IRBuilder.h.
References Context, and llvm::Type::getInt8Ty().
Referenced by constructPointer(), createByteGEP(), createMemMoveLoop(), CreateStepVector(), getInt8(), and UseTlsOffset().
|
inline |
Get a constant N-bit value, zero extended or truncated from a 64-bit value.
Definition at line 472 of file IRBuilder.h.
References llvm::ConstantInt::get(), getIntNTy(), and N.
Referenced by getAddrSizeInt().
|
inline |
Fetch the type representing an N-bit integer.
Definition at line 514 of file IRBuilder.h.
References Context, llvm::Type::getIntNTy(), and N.
Referenced by getAddrIntType(), getIntN(), and llvm::GCNTTIImpl::instCombineIntrinsic().
|
inline |
Fetch the type representing a pointer to an integer value.
Definition at line 554 of file IRBuilder.h.
Referenced by CreateAlignmentAssumption().
|
inline |
Query for the use of constrained floating point math.
Definition at line 297 of file IRBuilder.h.
References IsFPConstrained.
|
inline |
Fetch the type representing a pointer.
Definition at line 544 of file IRBuilder.h.
References Context, and llvm::PointerType::get().
|
inline |
Get the constant value for i1 true.
Definition at line 441 of file IRBuilder.h.
References Context, and llvm::ConstantInt::getTrue().
Referenced by llvm::InnerLoopVectorizer::createVectorLoopSkeleton(), llvm::VPBranchOnMaskRecipe::execute(), foldCttzCtlz(), llvm::ARMTTIImpl::instCombineIntrinsic(), and llvm::VPlan::prepareToExecute().
|
inline |
Fetch the type representing void.
Definition at line 539 of file IRBuilder.h.
References Context, and llvm::Type::getVoidTy().
Referenced by appendToGlobalArray(), and llvm::createSanitizerCtorAndInitFunctions().
No-op overload to handle constants.
Definition at line 151 of file IRBuilder.h.
|
inline |
Insert and return the specified instruction.
Definition at line 144 of file IRBuilder.h.
References AddMetadataToInst(), BB, I, Inserter, llvm::IRBuilderDefaultInserter::InsertHelper(), and InsertPt.
Referenced by CreateAggregateRet(), CreateAlignedLoad(), CreateAlignedStore(), CreateAlloca(), CreateAnd(), CreateAShr(), CreateAtomicCmpXchg(), CreateAtomicRMW(), CreateBinOp(), CreateBr(), CreateCall(), CreateCallBr(), CreateCast(), CreateCatchPad(), CreateCatchRet(), CreateCatchSwitch(), CreateCleanupPad(), CreateCleanupRet(), CreateCondBr(), CreateConstGEP1_32(), CreateConstGEP1_64(), CreateConstGEP2_32(), CreateConstGEP2_64(), CreateConstInBoundsGEP1_32(), CreateConstInBoundsGEP1_64(), CreateConstInBoundsGEP2_32(), CreateConstInBoundsGEP2_64(), CreateExtractElement(), CreateExtractValue(), CreateFAdd(), CreateFAddFMF(), CreateFDiv(), CreateFDivFMF(), CreateFence(), CreateFMul(), CreateFMulFMF(), CreateFNeg(), CreateFNegFMF(), CreateFPCast(), CreateFreeze(), CreateFRem(), CreateFRemFMF(), CreateFSub(), CreateFSubFMF(), CreateGEP(), CreateICmp(), CreateIndirectBr(), CreateInsertEl