LLVM  4.0.0
Public Member Functions | List of all members
llvm::IRBuilder< T, Inserter > Class Template Reference

This provides a uniform API for creating instructions and inserting them into a basic block: either at the end of a BasicBlock, or at a specific iterator location in a block. More...

#include <IRBuilder.h>

Inheritance diagram for llvm::IRBuilder< T, Inserter >:
[legend]
Collaboration diagram for llvm::IRBuilder< T, Inserter >:
[legend]

Public Member Functions

 IRBuilder (LLVMContext &C, const T &F, Inserter I=Inserter(), MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (LLVMContext &C, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, const T &F, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (Instruction *IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, const T &F, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
 IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
const TgetFolder ()
 Get the constant folder being used. More...
 
template<typename InstTy >
InstTy * Insert (InstTy *I, const Twine &Name="") const
 Insert and return the specified instruction. More...
 
ConstantInsert (Constant *C, const Twine &="") const
 No-op overload to handle constants. More...
 
ReturnInstCreateRetVoid ()
 Create a 'ret void' instruction. More...
 
ReturnInstCreateRet (Value *V)
 Create a 'ret <val>' instruction. More...
 
ReturnInstCreateAggregateRet (Value *const *retVals, unsigned N)
 Create a sequence of N insertvalue instructions, with one Value from the retVals array each, that build a aggregate return value one value at a time, and a ret instruction to return the resulting aggregate value. More...
 
BranchInstCreateBr (BasicBlock *Dest)
 Create an unconditional 'br label X' instruction. More...
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More...
 
BranchInstCreateCondBr (Value *Cond, BasicBlock *True, BasicBlock *False, Instruction *MDSrc)
 Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More...
 
SwitchInstCreateSwitch (Value *V, BasicBlock *Dest, unsigned NumCases=10, MDNode *BranchWeights=nullptr, MDNode *Unpredictable=nullptr)
 Create a switch instruction with the specified value, default dest, and with a hint for the number of cases that will be added (for efficient allocation). More...
 
IndirectBrInstCreateIndirectBr (Value *Addr, unsigned NumDests=10)
 Create an indirect branch instruction with the specified address operand, with an optional hint for the number of destinations that will be added (for efficient allocation). More...
 
InvokeInstCreateInvoke (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args=None, const Twine &Name="")
 Create an invoke instruction. More...
 
InvokeInstCreateInvoke (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="")
 
ResumeInstCreateResume (Value *Exn)
 
CleanupReturnInstCreateCleanupRet (CleanupPadInst *CleanupPad, BasicBlock *UnwindBB=nullptr)
 
CatchSwitchInstCreateCatchSwitch (Value *ParentPad, BasicBlock *UnwindBB, unsigned NumHandlers, const Twine &Name="")
 
CatchPadInstCreateCatchPad (Value *ParentPad, ArrayRef< Value * > Args, const Twine &Name="")
 
CleanupPadInstCreateCleanupPad (Value *ParentPad, ArrayRef< Value * > Args=None, const Twine &Name="")
 
CatchReturnInstCreateCatchRet (CatchPadInst *CatchPad, BasicBlock *BB)
 
UnreachableInstCreateUnreachable ()
 
ValueCreateAdd (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWAdd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWAdd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFAdd (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateSub (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWSub (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWSub (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFSub (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateMul (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWMul (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateNUWMul (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFMul (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateUDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateExactUDiv (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateSDiv (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateExactSDiv (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFDiv (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateURem (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateSRem (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFRem (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateShl (Value *LHS, Value *RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateShl (Value *LHS, const APInt &RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateShl (Value *LHS, uint64_t RHS, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateLShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateLShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateLShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, Value *RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, const APInt &RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAShr (Value *LHS, uint64_t RHS, const Twine &Name="", bool isExact=false)
 
ValueCreateAnd (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateAnd (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateAnd (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateOr (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateOr (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateOr (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateXor (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateXor (Value *LHS, const APInt &RHS, const Twine &Name="")
 
ValueCreateXor (Value *LHS, uint64_t RHS, const Twine &Name="")
 
ValueCreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateNeg (Value *V, const Twine &Name="", bool HasNUW=false, bool HasNSW=false)
 
ValueCreateNSWNeg (Value *V, const Twine &Name="")
 
ValueCreateNUWNeg (Value *V, const Twine &Name="")
 
ValueCreateFNeg (Value *V, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateNot (Value *V, const Twine &Name="")
 
AllocaInstCreateAlloca (Type *Ty, Value *ArraySize=nullptr, const Twine &Name="")
 
LoadInstCreateLoad (Value *Ptr, const char *Name)
 
LoadInstCreateLoad (Value *Ptr, const Twine &Name="")
 
LoadInstCreateLoad (Type *Ty, Value *Ptr, const Twine &Name="")
 
LoadInstCreateLoad (Value *Ptr, bool isVolatile, const Twine &Name="")
 
StoreInstCreateStore (Value *Val, Value *Ptr, bool isVolatile=false)
 
LoadInstCreateAlignedLoad (Value *Ptr, unsigned Align, const char *Name)
 
LoadInstCreateAlignedLoad (Value *Ptr, unsigned Align, const Twine &Name="")
 
LoadInstCreateAlignedLoad (Value *Ptr, unsigned Align, bool isVolatile, const Twine &Name="")
 
StoreInstCreateAlignedStore (Value *Val, Value *Ptr, unsigned Align, bool isVolatile=false)
 
FenceInstCreateFence (AtomicOrdering Ordering, SynchronizationScope SynchScope=CrossThread, const Twine &Name="")
 
AtomicCmpXchgInstCreateAtomicCmpXchg (Value *Ptr, Value *Cmp, Value *New, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SynchronizationScope SynchScope=CrossThread)
 
AtomicRMWInstCreateAtomicRMW (AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope=CrossThread)
 
ValueCreateGEP (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateInBoundsGEP (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateInBoundsGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="")
 
ValueCreateGEP (Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateInBoundsGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="")
 
ValueCreateConstGEP1_32 (Value *Ptr, unsigned Idx0, const Twine &Name="")
 
ValueCreateConstGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_32 (Type *Ty, Value *Ptr, unsigned Idx0, const Twine &Name="")
 
ValueCreateConstGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="")
 
ValueCreateConstInBoundsGEP2_32 (Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, const Twine &Name="")
 
ValueCreateConstGEP1_64 (Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstInBoundsGEP1_64 (Value *Ptr, uint64_t Idx0, const Twine &Name="")
 
ValueCreateConstGEP2_64 (Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateConstInBoundsGEP2_64 (Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="")
 
ValueCreateStructGEP (Type *Ty, Value *Ptr, unsigned Idx, const Twine &Name="")
 
ValueCreateGlobalStringPtr (StringRef Str, const Twine &Name="", unsigned AddressSpace=0)
 Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8. More...
 
ValueCreateTrunc (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateSExt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a ZExt or Trunc from the integer value V to DestTy. More...
 
ValueCreateSExtOrTrunc (Value *V, Type *DestTy, const Twine &Name="")
 Create a SExt or Trunc from the integer value V to DestTy. More...
 
ValueCreateFPToUI (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPToSI (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateUIToFP (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateSIToFP (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPTrunc (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPExt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreatePtrToInt (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateIntToPtr (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateZExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateSExtOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateTruncOrBitCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateCast (Instruction::CastOps Op, Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreatePointerCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreatePointerBitCastOrAddrSpaceCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateIntCast (Value *V, Type *DestTy, bool isSigned, const Twine &Name="")
 
ValueCreateBitOrPointerCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateFPCast (Value *V, Type *DestTy, const Twine &Name="")
 
ValueCreateIntCast (Value *, Type *, const char *)=delete
 
ValueCreateICmpEQ (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpNE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpUGT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpUGE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpULT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpULE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSGT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSGE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSLT (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateICmpSLE (Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFCmpOEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOLT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpOLE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpONE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpORD (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUNO (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUEQ (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUGT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUGE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpULT (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpULE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateFCmpUNE (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateICmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="")
 
ValueCreateFCmp (CmpInst::Predicate P, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
PHINodeCreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="")
 
CallInstCreateCall (Value *Callee, ArrayRef< Value * > Args=None, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (Value *Callee, ArrayRef< Value * > Args, ArrayRef< OperandBundleDef > OpBundles, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
CallInstCreateCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="", MDNode *FPMathTag=nullptr)
 
ValueCreateSelect (Value *C, Value *True, Value *False, const Twine &Name="", Instruction *MDFrom=nullptr)
 
VAArgInstCreateVAArg (Value *List, Type *Ty, const Twine &Name="")
 
ValueCreateExtractElement (Value *Vec, Value *Idx, const Twine &Name="")
 
ValueCreateExtractElement (Value *Vec, uint64_t Idx, const Twine &Name="")
 
ValueCreateInsertElement (Value *Vec, Value *NewElt, Value *Idx, const Twine &Name="")
 
ValueCreateInsertElement (Value *Vec, Value *NewElt, uint64_t Idx, const Twine &Name="")
 
ValueCreateShuffleVector (Value *V1, Value *V2, Value *Mask, const Twine &Name="")
 
ValueCreateShuffleVector (Value *V1, Value *V2, ArrayRef< uint32_t > IntMask, const Twine &Name="")
 
ValueCreateExtractValue (Value *Agg, ArrayRef< unsigned > Idxs, const Twine &Name="")
 
ValueCreateInsertValue (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const Twine &Name="")
 
LandingPadInstCreateLandingPad (Type *Ty, unsigned NumClauses, const Twine &Name="")
 
ValueCreateIsNull (Value *Arg, const Twine &Name="")
 Return an i1 value testing if Arg is null. More...
 
ValueCreateIsNotNull (Value *Arg, const Twine &Name="")
 Return an i1 value testing if Arg is not null. More...
 
ValueCreatePtrDiff (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...
 
ValueCreateInvariantGroupBarrier (Value *Ptr)
 Create an invariant.group.barrier intrinsic call, that stops optimizer to propagate equality using invariant.group metadata. More...
 
ValueCreateVectorSplat (unsigned NumElts, Value *V, const Twine &Name="")
 Return a vector value that contains. More...
 
ValueCreateExtractInteger (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...
 
CallInstCreateAlignmentAssumption (const DataLayout &DL, Value *PtrValue, unsigned Alignment, Value *OffsetValue=nullptr)
 Create an assume intrinsic call that represents an alignment assumption on the provided pointer. More...
 
- Public Member Functions inherited from llvm::IRBuilderBase
 IRBuilderBase (LLVMContext &context, MDNode *FPMathTag=nullptr, ArrayRef< OperandBundleDef > OpBundles=None)
 
void ClearInsertionPoint ()
 Clear the insertion point: created instructions will not be inserted into a block. More...
 
BasicBlockGetInsertBlock () const
 
BasicBlock::iterator GetInsertPoint () const
 
LLVMContextgetContext () const
 
void SetInsertPoint (BasicBlock *TheBB)
 This specifies that created instructions should be appended to the end of the specified block. 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...
 
const DebugLocgetCurrentDebugLocation () 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...
 
TypegetCurrentFunctionReturnType () 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...
 
MDNodegetDefaultFPMathTag () 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...
 
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...
 
GlobalVariableCreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0)
 Make a new global variable with initializer type i8*. More...
 
ConstantIntgetInt1 (bool V)
 Get a constant value representing either true or false. More...
 
ConstantIntgetTrue ()
 Get the constant value for i1 true. More...
 
ConstantIntgetFalse ()
 Get the constant value for i1 false. More...
 
ConstantIntgetInt8 (uint8_t C)
 Get a constant 8-bit value. More...
 
ConstantIntgetInt16 (uint16_t C)
 Get a constant 16-bit value. More...
 
ConstantIntgetInt32 (uint32_t C)
 Get a constant 32-bit value. More...
 
ConstantIntgetInt64 (uint64_t C)
 Get a constant 64-bit value. More...
 
ConstantIntgetIntN (unsigned N, uint64_t C)
 Get a constant N-bit value, zero extended or truncated from a 64-bit value. More...
 
ConstantIntgetInt (const APInt &AI)
 Get a constant integer value. More...
 
IntegerTypegetInt1Ty ()
 Fetch the type representing a single bit. More...
 
IntegerTypegetInt8Ty ()
 Fetch the type representing an 8-bit integer. More...
 
IntegerTypegetInt16Ty ()
 Fetch the type representing a 16-bit integer. More...
 
IntegerTypegetInt32Ty ()
 Fetch the type representing a 32-bit integer. More...
 
IntegerTypegetInt64Ty ()
 Fetch the type representing a 64-bit integer. More...
 
IntegerTypegetInt128Ty ()
 Fetch the type representing a 128-bit integer. More...
 
IntegerTypegetIntNTy (unsigned N)
 Fetch the type representing an N-bit integer. More...
 
TypegetHalfTy ()
 Fetch the type representing a 16-bit floating point value. More...
 
TypegetFloatTy ()
 Fetch the type representing a 32-bit floating point value. More...
 
TypegetDoubleTy ()
 Fetch the type representing a 64-bit floating point value. More...
 
TypegetVoidTy ()
 Fetch the type representing void. More...
 
PointerTypegetInt8PtrTy (unsigned AddrSpace=0)
 Fetch the type representing a pointer to an 8-bit integer value. More...
 
IntegerTypegetIntPtrTy (const DataLayout &DL, unsigned AddrSpace=0)
 Fetch the type representing a pointer to an integer value. More...
 
CallInstCreateMemSet (Value *Ptr, Value *Val, uint64_t Size, unsigned 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...
 
CallInstCreateMemSet (Value *Ptr, Value *Val, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemCpy (Value *Dst, Value *Src, uint64_t Size, unsigned Align, 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...
 
CallInstCreateMemCpy (Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemMove (Value *Dst, Value *Src, uint64_t Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert a memmove between the specified pointers. More...
 
CallInstCreateMemMove (Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateLifetimeStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.start intrinsic. More...
 
CallInstCreateLifetimeEnd (Value *Ptr, ConstantInt *Size=nullptr)
 Create a lifetime.end intrinsic. More...
 
CallInstCreateInvariantStart (Value *Ptr, ConstantInt *Size=nullptr)
 Create a call to invariant.start intrinsic. More...
 
CallInstCreateMaskedLoad (Value *Ptr, unsigned Align, Value *Mask, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Load intrinsic. More...
 
CallInstCreateMaskedStore (Value *Val, Value *Ptr, unsigned Align, Value *Mask)
 Create a call to Masked Store intrinsic. More...
 
CallInstCreateMaskedGather (Value *Ptrs, unsigned Align, Value *Mask=nullptr, Value *PassThru=nullptr, const Twine &Name="")
 Create a call to Masked Gather intrinsic. More...
 
CallInstCreateMaskedScatter (Value *Val, Value *Ptrs, unsigned Align, Value *Mask=nullptr)
 Create a call to Masked Scatter intrinsic. More...
 
CallInstCreateAssumption (Value *Cond)
 Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true. More...
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef< Value * > CallArgs, 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...
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, uint32_t Flags, ArrayRef< Use > CallArgs, ArrayRef< Use > TransitionArgs, 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...
 
CallInstCreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef< Use > CallArgs, ArrayRef< Value * > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > InvokeArgs, ArrayRef< Value * > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 brief Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More...
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef< Use > InvokeArgs, ArrayRef< Use > TransitionArgs, ArrayRef< Use > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 brief Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence. More...
 
InvokeInstCreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Use > InvokeArgs, ArrayRef< Value * > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="")
 
CallInstCreateGCResult (Instruction *Statepoint, Type *ResultType, const Twine &Name="")
 Create a call to the experimental.gc.result intrinsic to extract the result from a call wrapped in a statepoint. More...
 
CallInstCreateGCRelocate (Instruction *Statepoint, int BaseOffset, int DerivedOffset, Type *ResultType, const Twine &Name="")
 Create a call to the experimental.gc.relocate intrinsics to project the relocated value of one pointer from the statepoint. More...
 

Additional Inherited Members

- Protected Attributes inherited from llvm::IRBuilderBase
BasicBlockBB
 
BasicBlock::iterator InsertPt
 
LLVMContextContext
 
MDNodeDefaultFPMathTag
 
FastMathFlags FMF
 
ArrayRef< OperandBundleDefDefaultOperandBundles
 

Detailed Description

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
class llvm::IRBuilder< T, Inserter >

This provides a uniform API for creating instructions and inserting them into a basic block: either at the end of a BasicBlock, or at a specific iterator location in a block.

Note that the builder does not expose the full generality of LLVM instructions. For access to extra instruction properties, use the mutators (e.g. setVolatile) on the instructions after they have been created. Convenience state exists to specify fast-math flags and fp-math tags.

The first template argument specifies a class to use for creating constants. This defaults to creating minimally folded constants. The second template argument allows clients to specify custom insertion hooks that are called on every newly created insertion.

Definition at line 588 of file IRBuilder.h.

Constructor & Destructor Documentation

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( LLVMContext C,
const T F,
Inserter  I = Inserter(),
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inline

Definition at line 592 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( LLVMContext C,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inlineexplicit

Definition at line 598 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( BasicBlock TheBB,
const T F,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inlineexplicit

Definition at line 602 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( BasicBlock TheBB,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inlineexplicit

Definition at line 608 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( Instruction IP,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inlineexplicit

Definition at line 614 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( BasicBlock TheBB,
BasicBlock::iterator  IP,
const T F,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inline

Definition at line 620 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
llvm::IRBuilder< T, Inserter >::IRBuilder ( BasicBlock TheBB,
BasicBlock::iterator  IP,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inline

Definition at line 627 of file IRBuilder.h.

Member Function Documentation

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAdd ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAddrSpaceCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1366 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
ReturnInst* llvm::IRBuilder< T, Inserter >::CreateAggregateRet ( Value *const retVals,
unsigned  N 
)
inline

Create a sequence of N insertvalue instructions, with one Value from the retVals array each, that build a aggregate return value one value at a time, and a ret instruction to return the resulting aggregate value.

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

Definition at line 685 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateAlignedLoad ( Value Ptr,
unsigned  Align,
const char *  Name 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateAlignedLoad ( Value Ptr,
unsigned  Align,
const Twine Name = "" 
)
inline

Definition at line 1105 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateAlignedLoad ( Value Ptr,
unsigned  Align,
bool  isVolatile,
const Twine Name = "" 
)
inline

Definition at line 1111 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
StoreInst* llvm::IRBuilder< T, Inserter >::CreateAlignedStore ( Value Val,
Value Ptr,
unsigned  Align,
bool  isVolatile = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CallInst* llvm::IRBuilder< T, Inserter >::CreateAlignmentAssumption ( const DataLayout DL,
Value PtrValue,
unsigned  Alignment,
Value OffsetValue = nullptr 
)
inline

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

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
AllocaInst* llvm::IRBuilder< T, Inserter >::CreateAlloca ( Type Ty,
Value ArraySize = nullptr,
const Twine Name = "" 
)
inline

Definition at line 1076 of file IRBuilder.h.

Referenced by handleNoSuspendCoroutine(), and simplifyAllocaArraySize().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAnd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAnd ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 996 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAnd ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 999 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAShr ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAShr ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 978 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateAShr ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 982 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
AtomicCmpXchgInst* llvm::IRBuilder< T, Inserter >::CreateAtomicCmpXchg ( Value Ptr,
Value Cmp,
Value New,
AtomicOrdering  SuccessOrdering,
AtomicOrdering  FailureOrdering,
SynchronizationScope  SynchScope = CrossThread 
)
inline

Definition at line 1129 of file IRBuilder.h.

Referenced by createCmpXchgInstFun().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
AtomicRMWInst* llvm::IRBuilder< T, Inserter >::CreateAtomicRMW ( AtomicRMWInst::BinOp  Op,
Value Ptr,
Value Val,
AtomicOrdering  Ordering,
SynchronizationScope  SynchScope = CrossThread 
)
inline

Definition at line 1136 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateBinOp ( Instruction::BinaryOps  Opc,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateBitOrPointerCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1434 of file IRBuilder.h.

Referenced by llvm::InstCombiner::visitLoadInst().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
BranchInst* llvm::IRBuilder< T, Inserter >::CreateBr ( BasicBlock Dest)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CallInst* llvm::IRBuilder< T, Inserter >::CreateCall ( Value Callee,
ArrayRef< Value * >  Args = None,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1579 of file IRBuilder.h.

Referenced by callIntrinsic(), llvm::SanitizerStatReport::create(), llvm::IRBuilder< TargetFolder >::CreateCall(), CreateGCRelocates(), llvm::IRBuilder< TargetFolder >::CreateInvariantGroupBarrier(), createPopcntIntrinsic(), llvm::AArch64TargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::emitBinaryFloatFnCall(), emitCalloc(), llvm::emitFPutC(), llvm::emitFPutS(), llvm::emitFWrite(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::emitStrChr(), llvm::emitStrCpy(), llvm::emitStrLen(), llvm::emitStrNCmp(), llvm::emitStrNCpy(), llvm::emitUnaryFloatFnCall(), generateUnsignedDivisionCode(), llvm::AArch64TargetLowering::getIRStackGuard(), llvm::AArch64TargetLowering::getSafeStackPointerLocation(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getStackGuard(), insertSinCosCall(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::makeDMB(), MakeGuardControlFlowExplicit(), optimizeUnaryDoubleFP(), processUMulZExtIdiom(), simplifyX86extrq(), simplifyX86insertq(), llvm::UpgradeIntrinsicCall(), and UpgradeX86MaskedShift().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CallInst* llvm::IRBuilder< T, Inserter >::CreateCall ( FunctionType FTy,
Value Callee,
ArrayRef< Value * >  Args,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1586 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CallInst* llvm::IRBuilder< T, Inserter >::CreateCall ( Value Callee,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1595 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CallInst* llvm::IRBuilder< T, Inserter >::CreateCall ( Function Callee,
ArrayRef< Value * >  Args,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1604 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateCast ( Instruction::CastOps  Op,
Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CatchPadInst* llvm::IRBuilder< T, Inserter >::CreateCatchPad ( Value ParentPad,
ArrayRef< Value * >  Args,
const Twine Name = "" 
)
inline

Definition at line 768 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CatchReturnInst* llvm::IRBuilder< T, Inserter >::CreateCatchRet ( CatchPadInst CatchPad,
BasicBlock BB 
)
inline

Definition at line 779 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CatchSwitchInst* llvm::IRBuilder< T, Inserter >::CreateCatchSwitch ( Value ParentPad,
BasicBlock UnwindBB,
unsigned  NumHandlers,
const Twine Name = "" 
)
inline

Definition at line 761 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CleanupPadInst* llvm::IRBuilder< T, Inserter >::CreateCleanupPad ( Value ParentPad,
ArrayRef< Value * >  Args = None,
const Twine Name = "" 
)
inline

Definition at line 773 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
CleanupReturnInst* llvm::IRBuilder< T, Inserter >::CreateCleanupRet ( CleanupPadInst CleanupPad,
BasicBlock UnwindBB = nullptr 
)
inline

Definition at line 756 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
BranchInst* llvm::IRBuilder< T, Inserter >::CreateCondBr ( Value Cond,
BasicBlock True,
BasicBlock False,
MDNode BranchWeights = nullptr,
MDNode Unpredictable = nullptr 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
BranchInst* llvm::IRBuilder< T, Inserter >::CreateCondBr ( Value Cond,
BasicBlock True,
BasicBlock False,
Instruction MDSrc 
)
inline

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

Copy branch meta data if available.

Definition at line 708 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstGEP1_32 ( Value Ptr,
unsigned  Idx0,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstGEP1_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
const Twine Name = "" 
)
inline

Definition at line 1195 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstGEP1_64 ( Value Ptr,
uint64_t  Idx0,
const Twine Name = "" 
)
inline

Definition at line 1237 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstGEP2_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
unsigned  Idx1,
const Twine Name = "" 
)
inline

Definition at line 1213 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstGEP2_64 ( Value Ptr,
uint64_t  Idx0,
uint64_t  Idx1,
const Twine Name = "" 
)
inline

Definition at line 1254 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstInBoundsGEP1_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
const Twine Name = "" 
)
inline

Definition at line 1204 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstInBoundsGEP1_64 ( Value Ptr,
uint64_t  Idx0,
const Twine Name = "" 
)
inline

Definition at line 1245 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstInBoundsGEP2_32 ( Type Ty,
Value Ptr,
unsigned  Idx0,
unsigned  Idx1,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateConstInBoundsGEP2_64 ( Value Ptr,
uint64_t  Idx0,
uint64_t  Idx1,
const Twine Name = "" 
)
inline

Definition at line 1266 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExactSDiv ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 900 of file IRBuilder.h.

Referenced by llvm::IRBuilder< TargetFolder >::CreatePtrDiff().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExactUDiv ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 888 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExtractElement ( Value Vec,
Value Idx,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExtractElement ( Value Vec,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Definition at line 1637 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExtractInteger ( const DataLayout DL,
Value From,
IntegerType ExtractedTy,
uint64_t  Offset,
const Twine Name 
)
inline

Return a value that has been extracted from a larger integer type.

Definition at line 1770 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateExtractValue ( Value Agg,
ArrayRef< unsigned Idxs,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFAdd ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 827 of file IRBuilder.h.

Referenced by llvm::UpgradeIntrinsicCall().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmp ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpOEQ ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1497 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpOGE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1505 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpOGT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1501 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpOLE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1513 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpOLT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1509 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpONE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1517 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpORD ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1521 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpUEQ ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1529 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpUGE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1537 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpUGT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1533 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpULE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1545 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpULT ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1541 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpUNE ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1549 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFCmpUNO ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1525 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFDiv ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 903 of file IRBuilder.h.

Referenced by llvm::UpgradeIntrinsicCall().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
FenceInst* llvm::IRBuilder< T, Inserter >::CreateFence ( AtomicOrdering  Ordering,
SynchronizationScope  SynchScope = CrossThread,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFMul ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFNeg ( Value V,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 1059 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFPCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1449 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFPExt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFPToSI ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1338 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFPToUI ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1335 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFPTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1347 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFRem ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 923 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateFSub ( Value LHS,
Value RHS,
const Twine Name = "",
MDNode FPMathTag = nullptr 
)
inline

Definition at line 849 of file IRBuilder.h.

Referenced by llvm::UpgradeIntrinsicCall().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateGEP ( Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateGEP ( Type Ty,
Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "" 
)
inline

Definition at line 1145 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateGEP ( Value Ptr,
Value Idx,
const Twine Name = "" 
)
inline

Definition at line 1176 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateGEP ( Type Ty,
Value Ptr,
Value Idx,
const Twine Name = "" 
)
inline

Definition at line 1179 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateGlobalStringPtr ( StringRef  Str,
const Twine Name = "",
unsigned  AddressSpace = 0 
)
inline

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

Definition at line 1286 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmp ( CmpInst::Predicate  P,
Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpEQ ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpNE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpSGE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1487 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpSGT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1484 of file IRBuilder.h.

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

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpSLE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1493 of file IRBuilder.h.

Referenced by performAtomicOp().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpSLT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1490 of file IRBuilder.h.

Referenced by LowerAtomicRMWInst().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpUGE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1475 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpUGT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1472 of file IRBuilder.h.

Referenced by generateUnsignedDivisionCode(), and performAtomicOp().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpULE ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 1481 of file IRBuilder.h.

Referenced by performAtomicOp().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateICmpULT ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInBoundsGEP ( Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInBoundsGEP ( Type Ty,
Value Ptr,
ArrayRef< Value * >  IdxList,
const Twine Name = "" 
)
inline

Definition at line 1162 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInBoundsGEP ( Type Ty,
Value Ptr,
Value Idx,
const Twine Name = "" 
)
inline

Definition at line 1185 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
IndirectBrInst* llvm::IRBuilder< T, Inserter >::CreateIndirectBr ( Value Addr,
unsigned  NumDests = 10 
)
inline

Create an indirect branch instruction with the specified address operand, with an optional hint for the number of destinations that will be added (for efficient allocation).

Definition at line 732 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInsertElement ( Value Vec,
Value NewElt,
Value Idx,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInsertElement ( Value Vec,
Value NewElt,
uint64_t  Idx,
const Twine Name = "" 
)
inline

Definition at line 1651 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInsertValue ( Value Agg,
Value Val,
ArrayRef< unsigned Idxs,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateIntCast ( Value V,
Type DestTy,
bool  isSigned,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateIntCast ( Value ,
Type ,
const char *   
)
delete
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateIntToPtr ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateInvariantGroupBarrier ( Value Ptr)
inline

Create an invariant.group.barrier intrinsic call, that stops optimizer to propagate equality using invariant.group metadata.

If Ptr type is different from i8*, it's casted to i8* before call and casted back to Ptr type after call.

Definition at line 1731 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
InvokeInst* llvm::IRBuilder< T, Inserter >::CreateInvoke ( Value Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args = None,
const Twine Name = "" 
)
inline

Create an invoke instruction.

Definition at line 737 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
InvokeInst* llvm::IRBuilder< T, Inserter >::CreateInvoke ( Value Callee,
BasicBlock NormalDest,
BasicBlock UnwindDest,
ArrayRef< Value * >  Args,
ArrayRef< OperandBundleDef OpBundles,
const Twine Name = "" 
)
inline

Definition at line 744 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateIsNotNull ( Value Arg,
const Twine Name = "" 
)
inline

Return an i1 value testing if Arg is not null.

Definition at line 1704 of file IRBuilder.h.

Referenced by ConnectEpilog(), llvm::UnrollRuntimeLoopRemainder(), and upgradeMaskedMove().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateIsNull ( Value Arg,
const Twine Name = "" 
)
inline

Return an i1 value testing if Arg is null.

Definition at line 1698 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LandingPadInst* llvm::IRBuilder< T, Inserter >::CreateLandingPad ( Type Ty,
unsigned  NumClauses,
const Twine Name = "" 
)
inline

Definition at line 1688 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateLoad ( Value Ptr,
const char *  Name 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateLoad ( Value Ptr,
const Twine Name = "" 
)
inline

Definition at line 1085 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateLoad ( Type Ty,
Value Ptr,
const Twine Name = "" 
)
inline

Definition at line 1088 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
LoadInst* llvm::IRBuilder< T, Inserter >::CreateLoad ( Value Ptr,
bool  isVolatile,
const Twine Name = "" 
)
inline

Definition at line 1091 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateLShr ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateLShr ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 960 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateLShr ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  isExact = false 
)
inline

Definition at line 964 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateMul ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNeg ( Value V,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNot ( Value V,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNSWAdd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 821 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNSWMul ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 865 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNSWNeg ( Value V,
const Twine Name = "" 
)
inline

Definition at line 1053 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNSWSub ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 843 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNUWAdd ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 824 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNUWMul ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 868 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNUWNeg ( Value V,
const Twine Name = "" 
)
inline

Definition at line 1056 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateNUWSub ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Definition at line 846 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateOr ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateOr ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 1012 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateOr ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 1015 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
PHINode* llvm::IRBuilder< T, Inserter >::CreatePHI ( Type Ty,
unsigned  NumReservedValues,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreatePointerBitCastOrAddrSpaceCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1411 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreatePointerCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreatePtrDiff ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

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

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreatePtrToInt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
ResumeInst* llvm::IRBuilder< T, Inserter >::CreateResume ( Value Exn)
inline

Definition at line 752 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
ReturnInst* llvm::IRBuilder< T, Inserter >::CreateRet ( Value V)
inline

Create a 'ret <val>' instruction.

Definition at line 674 of file IRBuilder.h.

Referenced by llvm::InlineFunction(), MakeGuardControlFlowExplicit(), SimplifyCondBranchToTwoReturns(), and SwitchToLookupTable().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
ReturnInst* llvm::IRBuilder< T, Inserter >::CreateRetVoid ( )
inline

Create a 'ret void' instruction.

Definition at line 669 of file IRBuilder.h.

Referenced by MakeGuardControlFlowExplicit(), and SimplifyCondBranchToTwoReturns().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSDiv ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSelect ( Value C,
Value True,
Value False,
const Twine Name = "",
Instruction MDFrom = nullptr 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSExt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSExtOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1378 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSExtOrTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

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

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

Definition at line 1323 of file IRBuilder.h.

Referenced by simplifyX86vpcom().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateShl ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateShl ( Value LHS,
const APInt RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 940 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateShl ( Value LHS,
uint64_t  RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline

Definition at line 945 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateShuffleVector ( Value V1,
Value V2,
Value Mask,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateShuffleVector ( Value V1,
Value V2,
ArrayRef< uint32_t IntMask,
const Twine Name = "" 
)
inline

Definition at line 1665 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSIToFP ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1344 of file IRBuilder.h.

Referenced by llvm::UpgradeIntrinsicCall().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSRem ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
StoreInst* llvm::IRBuilder< T, Inserter >::CreateStore ( Value Val,
Value Ptr,
bool  isVolatile = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateStructGEP ( Type Ty,
Value Ptr,
unsigned  Idx,
const Twine Name = "" 
)
inline

Definition at line 1279 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateSub ( Value LHS,
Value RHS,
const Twine Name = "",
bool  HasNUW = false,
bool  HasNSW = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
SwitchInst* llvm::IRBuilder< T, Inserter >::CreateSwitch ( Value V,
BasicBlock Dest,
unsigned  NumCases = 10,
MDNode BranchWeights = nullptr,
MDNode Unpredictable = nullptr 
)
inline

Create a switch instruction with the specified value, default dest, and with a hint for the number of cases that will be added (for efficient allocation).

Definition at line 722 of file IRBuilder.h.

Referenced by createResumeEntryBlock(), and SimplifyBranchOnICmpChain().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateTruncOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateUDiv ( Value LHS,
Value RHS,
const Twine Name = "",
bool  isExact = false 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateUIToFP ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

Definition at line 1341 of file IRBuilder.h.

Referenced by llvm::UpgradeIntrinsicCall().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
UnreachableInst* llvm::IRBuilder< T, Inserter >::CreateUnreachable ( )
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateURem ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
VAArgInst* llvm::IRBuilder< T, Inserter >::CreateVAArg ( Value List,
Type Ty,
const Twine Name = "" 
)
inline

Definition at line 1625 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateVectorSplat ( unsigned  NumElts,
Value V,
const Twine Name = "" 
)
inline

Return a vector value that contains.

  • V broadcasted to NumElts elements.

Definition at line 1755 of file IRBuilder.h.

Referenced by simplifyX86immShift().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateXor ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateXor ( Value LHS,
const APInt RHS,
const Twine Name = "" 
)
inline

Definition at line 1025 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateXor ( Value LHS,
uint64_t  RHS,
const Twine Name = "" 
)
inline

Definition at line 1028 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateZExt ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateZExtOrBitCast ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline
template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Value* llvm::IRBuilder< T, Inserter >::CreateZExtOrTrunc ( Value V,
Type DestTy,
const Twine Name = "" 
)
inline

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

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

Definition at line 1309 of file IRBuilder.h.

Referenced by createMaskedBitTest(), foldSelectICmpAndOr(), and SwitchToLookupTable().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
const T& llvm::IRBuilder< T, Inserter >::getFolder ( )
inline

Get the constant folder being used.

Definition at line 635 of file IRBuilder.h.

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
template<typename InstTy >
InstTy* llvm::IRBuilder< T, Inserter >::Insert ( InstTy *  I,
const Twine Name = "" 
) const
inline

Insert and return the specified instruction.

Definition at line 639 of file IRBuilder.h.

Referenced by llvm::LoopAccessInfo::addRuntimeChecks(), llvm::IRBuilder< TargetFolder >::CreateAdd(), llvm::IRBuilder< TargetFolder >::CreateAggregateRet(), llvm::IRBuilder< TargetFolder >::CreateAlloca(), llvm::IRBuilder< TargetFolder >::CreateAnd(), llvm::IRBuilder< TargetFolder >::CreateAShr(), llvm::IRBuilder< TargetFolder >::CreateAtomicCmpXchg(), llvm::IRBuilder< TargetFolder >::CreateAtomicRMW(), llvm::IRBuilder< TargetFolder >::CreateBinOp(), llvm::IRBuilder< TargetFolder >::CreateBr(), llvm::IRBuilder< TargetFolder >::CreateCall(), llvm::IRBuilder< TargetFolder >::CreateCast(), llvm::IRBuilder< TargetFolder >::CreateCatchPad(), llvm::IRBuilder< TargetFolder >::CreateCatchRet(), llvm::IRBuilder< TargetFolder >::CreateCatchSwitch(), llvm::IRBuilder< TargetFolder >::CreateCleanupPad(), llvm::IRBuilder< TargetFolder >::CreateCleanupRet(), llvm::IRBuilder< TargetFolder >::CreateCondBr(), llvm::IRBuilder< TargetFolder >::CreateConstGEP1_32(), llvm::IRBuilder< TargetFolder >::CreateConstGEP1_64(), llvm::IRBuilder< TargetFolder >::CreateConstGEP2_32(), llvm::IRBuilder< TargetFolder >::CreateConstGEP2_64(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP1_32(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP1_64(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP2_32(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP2_64(), llvm::IRBuilder< TargetFolder >::CreateExtractElement(), llvm::IRBuilder< TargetFolder >::CreateExtractValue(), llvm::IRBuilder< TargetFolder >::CreateFAdd(), llvm::IRBuilder< TargetFolder >::CreateFCmp(), llvm::IRBuilder< TargetFolder >::CreateFDiv(), llvm::IRBuilder< TargetFolder >::CreateFence(), llvm::IRBuilder< TargetFolder >::CreateFMul(), llvm::IRBuilder< TargetFolder >::CreateFNeg(), llvm::IRBuilder< TargetFolder >::CreateFPCast(), llvm::IRBuilder< TargetFolder >::CreateFRem(), llvm::IRBuilder< TargetFolder >::CreateFSub(), llvm::IRBuilder< TargetFolder >::CreateGEP(), llvm::IRBuilder< TargetFolder >::CreateICmp(), llvm::IRBuilder< TargetFolder >::CreateInBoundsGEP(), llvm::IRBuilder< TargetFolder >::CreateIndirectBr(), llvm::IRBuilder< TargetFolder >::CreateInsertElement(), llvm::IRBuilder< TargetFolder >::CreateInsertValue(), llvm::IRBuilder< TargetFolder >::CreateIntCast(), llvm::IRBuilder< TargetFolder >::CreateInvoke(), llvm::IRBuilder< TargetFolder >::CreateLandingPad(), llvm::IRBuilder< TargetFolder >::CreateLoad(), llvm::IRBuilder< TargetFolder >::CreateLShr(), llvm::IRBuilder< TargetFolder >::CreateMul(), llvm::IRBuilder< TargetFolder >::CreateNeg(), llvm::IRBuilder< TargetFolder >::CreateNot(), llvm::IRBuilder< TargetFolder >::CreateOr(), llvm::IRBuilder< TargetFolder >::CreatePHI(), llvm::IRBuilder< TargetFolder >::CreatePointerBitCastOrAddrSpaceCast(), llvm::IRBuilder< TargetFolder >::CreatePointerCast(), llvm::IRBuilder< TargetFolder >::CreateResume(), llvm::IRBuilder< TargetFolder >::CreateRet(), llvm::IRBuilder< TargetFolder >::CreateRetVoid(), llvm::IRBuilder< TargetFolder >::CreateSDiv(), llvm::IRBuilder< TargetFolder >::CreateSelect(), llvm::IRBuilder< TargetFolder >::CreateSExtOrBitCast(), llvm::IRBuilder< TargetFolder >::CreateShl(), llvm::IRBuilder< TargetFolder >::CreateShuffleVector(), llvm::IRBuilder< TargetFolder >::CreateSRem(), llvm::IRBuilder< TargetFolder >::CreateStore(), llvm::IRBuilder< TargetFolder >::CreateSub(), llvm::IRBuilder< TargetFolder >::CreateSwitch(), llvm::IRBuilder< TargetFolder >::CreateTruncOrBitCast(), llvm::IRBuilder< TargetFolder >::CreateUDiv(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), llvm::IRBuilder< TargetFolder >::CreateURem(), llvm::IRBuilder< TargetFolder >::CreateVAArg(), llvm::IRBuilder< TargetFolder >::CreateXor(), and llvm::IRBuilder< TargetFolder >::CreateZExtOrBitCast().

template<typename T = ConstantFolder, typename Inserter = IRBuilderDefaultInserter>
Constant* llvm::IRBuilder< T, Inserter >::Insert ( Constant C,
const Twine = "" 
) const
inline

No-op overload to handle constants.

Definition at line 646 of file IRBuilder.h.


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