|
LLVM
3.7.0
|
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>
Public Member Functions | |
| IRBuilder (LLVMContext &C, const T &F, const Inserter &I=Inserter(), MDNode *FPMathTag=nullptr) | |
| IRBuilder (LLVMContext &C, MDNode *FPMathTag=nullptr) | |
| IRBuilder (BasicBlock *TheBB, const T &F, MDNode *FPMathTag=nullptr) | |
| IRBuilder (BasicBlock *TheBB, MDNode *FPMathTag=nullptr) | |
| IRBuilder (Instruction *IP, MDNode *FPMathTag=nullptr) | |
| IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, const T &F, MDNode *FPMathTag=nullptr) | |
| IRBuilder (BasicBlock *TheBB, BasicBlock::iterator IP, MDNode *FPMathTag=nullptr) | |
| const T & | getFolder () |
| Get the constant folder being used. More... | |
| bool | isNamePreserving () const |
| Return true if this builder is configured to actually add the requested names to IR created through it. More... | |
| 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... | |
| 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) |
| Create a conditional 'br Cond, TrueDest, FalseDest' instruction. More... | |
| SwitchInst * | CreateSwitch (Value *V, BasicBlock *Dest, unsigned NumCases=10, MDNode *BranchWeights=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 (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, const Twine &Name="") |
| InvokeInst * | CreateInvoke (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, Value *Arg1, const Twine &Name="") |
| InvokeInst * | CreateInvoke3 (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, Value *Arg1, Value *Arg2, Value *Arg3, const Twine &Name="") |
| InvokeInst * | CreateInvoke (Value *Callee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Value * > Args, const Twine &Name="") |
| Create an invoke instruction. More... | |
| ResumeInst * | CreateResume (Value *Exn) |
| 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 * | CreateFAdd (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| 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 * | CreateFSub (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| 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 * | CreateFMul (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| 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 * | CreateFDiv (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| Value * | CreateURem (Value *LHS, Value *RHS, const Twine &Name="") |
| Value * | CreateSRem (Value *LHS, Value *RHS, const Twine &Name="") |
| Value * | CreateFRem (Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| 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 * | 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 * | 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 * | CreateBinOp (Instruction::BinaryOps Opc, Value *LHS, Value *RHS, const Twine &Name="", MDNode *FPMathTag=nullptr) |
| 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 * | CreateNot (Value *V, const Twine &Name="") |
| AllocaInst * | CreateAlloca (Type *Ty, Value *ArraySize=nullptr, const Twine &Name="") |
| LoadInst * | CreateLoad (Value *Ptr, const char *Name) |
| LoadInst * | CreateLoad (Value *Ptr, const Twine &Name="") |
| LoadInst * | CreateLoad (Type *Ty, Value *Ptr, const Twine &Name="") |
| LoadInst * | CreateLoad (Value *Ptr, bool isVolatile, const Twine &Name="") |
| StoreInst * | CreateStore (Value *Val, Value *Ptr, bool isVolatile=false) |
| LoadInst * | CreateAlignedLoad (Value *Ptr, unsigned Align, const char *Name) |
| LoadInst * | CreateAlignedLoad (Value *Ptr, unsigned Align, const Twine &Name="") |
| LoadInst * | CreateAlignedLoad (Value *Ptr, unsigned Align, bool isVolatile, const Twine &Name="") |
| StoreInst * | CreateAlignedStore (Value *Val, Value *Ptr, unsigned Align, bool isVolatile=false) |
| FenceInst * | CreateFence (AtomicOrdering Ordering, SynchronizationScope SynchScope=CrossThread, const Twine &Name="") |
| AtomicCmpXchgInst * | CreateAtomicCmpXchg (Value *Ptr, Value *Cmp, Value *New, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, SynchronizationScope SynchScope=CrossThread) |
| AtomicRMWInst * | CreateAtomicRMW (AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val, AtomicOrdering Ordering, SynchronizationScope SynchScope=CrossThread) |
| Value * | CreateGEP (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="") |
| Value * | CreateGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="") |
| Value * | CreateInBoundsGEP (Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="") |
| Value * | CreateInBoundsGEP (Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, const Twine &Name="") |
| Value * | CreateGEP (Value *Ptr, Value *Idx, const Twine &Name="") |
| Value * | CreateGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="") |
| Value * | CreateInBoundsGEP (Type *Ty, Value *Ptr, Value *Idx, const Twine &Name="") |
| Value * | CreateConstGEP1_32 (Value *Ptr, unsigned Idx0, 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 (Value *Ptr, uint64_t Idx0, const Twine &Name="") |
| Value * | CreateConstInBoundsGEP1_64 (Value *Ptr, uint64_t Idx0, const Twine &Name="") |
| Value * | CreateConstGEP2_64 (Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="") |
| Value * | CreateConstInBoundsGEP2_64 (Value *Ptr, uint64_t Idx0, uint64_t Idx1, const Twine &Name="") |
| Value * | CreateStructGEP (Type *Ty, Value *Ptr, unsigned Idx, const Twine &Name="") |
| Value * | CreateGlobalStringPtr (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... | |
| 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="") |
| 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) |
| PHINode * | CreatePHI (Type *Ty, unsigned NumReservedValues, const Twine &Name="") |
| CallInst * | CreateCall (Value *Callee, ArrayRef< Value * > Args=None, const Twine &Name="") |
| CallInst * | CreateCall (llvm::FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args, const Twine &Name="") |
| CallInst * | CreateCall (Function *Callee, ArrayRef< Value * > Args, const Twine &Name="") |
| Value * | CreateSelect (Value *C, Value *True, Value *False, const Twine &Name="") |
| 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 (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 > IntMask, const Twine &Name="") |
| Value * | CreateExtractValue (Value *Agg, ArrayRef< unsigned > Idxs, const Twine &Name="") |
| Value * | CreateInsertValue (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const Twine &Name="") |
| LandingPadInst * | CreateLandingPad (Type *Ty, unsigned NumClauses, const Twine &Name="") |
| Value * | CreateIsNull (Value *Arg, const Twine &Name="") |
Return an i1 value testing if Arg is null. More... | |
| Value * | CreateIsNotNull (Value *Arg, const Twine &Name="") |
Return an i1 value testing if Arg is not null. More... | |
| Value * | CreatePtrDiff (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 * | CreateVectorSplat (unsigned NumElts, 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... | |
| 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... | |
Public Member Functions inherited from llvm::IRBuilderBase | |
| IRBuilderBase (LLVMContext &context, MDNode *FPMathTag=nullptr) | |
| 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... | |
| const 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... | |
| 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... | |
| 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... | |
| GlobalVariable * | CreateGlobalString (StringRef Str, const Twine &Name="", unsigned AddressSpace=0) |
| 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 * | 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 * | 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, 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... | |
| CallInst * | CreateMemSet (Value *Ptr, Value *Val, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
| CallInst * | CreateMemCpy (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... | |
| CallInst * | CreateMemCpy (Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
| CallInst * | CreateMemMove (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... | |
| CallInst * | CreateMemMove (Value *Dst, Value *Src, Value *Size, unsigned Align, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr) |
| 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 * | CreateMaskedLoad (Value *Ptr, unsigned Align, Value *Mask, Value *PassThru=0, const Twine &Name="") |
| Create a call to Masked Load intrinsic. More... | |
| CallInst * | CreateMaskedStore (Value *Val, Value *Ptr, unsigned Align, Value *Mask) |
| Create a call to Masked Store intrinsic. More... | |
| CallInst * | CreateAssumption (Value *Cond) |
| Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true. More... | |
| CallInst * | CreateGCStatepointCall (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... | |
| CallInst * | CreateGCStatepointCall (uint64_t ID, uint32_t NumPatchBytes, Value *ActualCallee, ArrayRef< Use > CallArgs, ArrayRef< Value * > DeoptArgs, ArrayRef< Value * > GCArgs, const Twine &Name="") |
| InvokeInst * | CreateGCStatepointInvoke (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... | |
| InvokeInst * | CreateGCStatepointInvoke (uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef< Use > InvokeArgs, 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... | |
Additional Inherited Members | |
Protected Attributes inherited from llvm::IRBuilderBase | |
| BasicBlock * | BB |
| BasicBlock::iterator | InsertPt |
| LLVMContext & | Context |
| MDNode * | DefaultFPMathTag |
| FastMathFlags | FMF |
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 handles whether or not to preserve names in the final instruction output. This defaults to on. The second template argument specifies a class to use for creating constants. This defaults to creating minimally folded constants. The third template argument allows clients to specify custom insertion hooks that are called on every newly created insertion.
Definition at line 517 of file IRBuilder.h.
|
inline |
Definition at line 520 of file IRBuilder.h.
|
inlineexplicit |
Definition at line 525 of file IRBuilder.h.
|
inlineexplicit |
Definition at line 529 of file IRBuilder.h.
|
inlineexplicit |
Definition at line 534 of file IRBuilder.h.
|
inlineexplicit |
Definition at line 539 of file IRBuilder.h.
|
inline |
Definition at line 544 of file IRBuilder.h.
|
inline |
Definition at line 550 of file IRBuilder.h.
|
inline |
Definition at line 704 of file IRBuilder.h.
Referenced by convertMemSetToLoop(), convertTransferToLoop(), llvm::IRBuilder< true, TargetFolder >::CreateNSWAdd(), llvm::IRBuilder< true, TargetFolder >::CreateNUWAdd(), EvaluateGEPOffsetExpression(), foldUDivShl(), generateUnsignedDivisionCode(), performAtomicOp(), TurnSwitchRangeIntoICmp(), and llvm::ObjectSizeOffsetEvaluator::visitGEPOperator().
|
inline |
Definition at line 1257 of file IRBuilder.h.
|
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 608 of file IRBuilder.h.
|
inline |
Definition at line 991 of file IRBuilder.h.
Referenced by combineLoadToNewType().
|
inline |
Definition at line 996 of file IRBuilder.h.
|
inline |
Definition at line 1002 of file IRBuilder.h.
|
inline |
Definition at line 1008 of file IRBuilder.h.
Referenced by combineStoreToNewValue().
|
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 1643 of file IRBuilder.h.
|
inline |
Definition at line 967 of file IRBuilder.h.
Referenced by simplifyAllocaArraySize().
|
inline |
Definition at line 878 of file IRBuilder.h.
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), checkForNegativeOperand(), llvm::IRBuilder< true, TargetFolder >::CreateAlignmentAssumption(), llvm::IRBuilder< true, TargetFolder >::CreateAnd(), createMaskedBitTest(), foldLogOpOfMaskedICmps(), generateUnsignedDivisionCode(), llvm::IntrinsicLowering::LowerIntrinsicCall(), performAtomicOp(), ProcessUMulZExtIdiom(), and llvm::UnrollRuntimeLoopProlog().
|
inline |
Definition at line 887 of file IRBuilder.h.
|
inline |
Definition at line 890 of file IRBuilder.h.
|
inline |
Definition at line 860 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAShr(), generateSignedDivisionCode(), generateSignedRemainderCode(), and generateUnsignedDivisionCode().
|
inline |
Definition at line 869 of file IRBuilder.h.
|
inline |
Definition at line 873 of file IRBuilder.h.
|
inline |
Definition at line 1020 of file IRBuilder.h.
|
inline |
Definition at line 1027 of file IRBuilder.h.
|
inline |
Definition at line 923 of file IRBuilder.h.
Referenced by CreateBinOpAsGiven(), createReplacementInstr(), llvm::FoldBranchToCommonDest(), FoldOperationIntoSelectOperand(), and tryFactorization().
|
inline |
Definition at line 1253 of file IRBuilder.h.
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), llvm::CastToCStr(), CoerceAvailableValueToLoadType(), combineLoadToNewType(), combineStoreToNewValue(), llvm::IRBuilder< true, TargetFolder >::CreateBitOrPointerCast(), createCast(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), GetStoreValueForLoad(), llvm::InlineFunction(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), OptimizeIntToFloatBitCast(), OptimizeVectorResize(), tryPromoteAllocaToVector(), llvm::UpgradeIntrinsicCall(), UpgradeX86PSLLDQIntrinsics(), and UpgradeX86PSRLDQIntrinsics().
|
inline |
Definition at line 1325 of file IRBuilder.h.
Referenced by llvm::InstCombiner::visitLoadInst().
|
inline |
Create an unconditional 'br label X' instruction.
Definition at line 616 of file IRBuilder.h.
Referenced by llvm::ConstantFoldTerminator(), FoldTwoEntryPHINode(), generateUnsignedDivisionCode(), RemoveSwitchAfterSelectConversion(), removeUndefIntroducingPredecessor(), SimplifyTerminatorOnSelect(), SwitchToLookupTable(), and TryToSimplifyUncondBranchWithICmpInIt().
|
inline |
Definition at line 1467 of file IRBuilder.h.
Referenced by callIntrinsic(), llvm::IRBuilder< true, TargetFolder >::CreateCall(), CreateGCRelocates(), createStubLandingPad(), llvm::EmitBinaryFloatFnCall(), 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::EmitStrNLen(), llvm::EmitUnaryFloatFnCall(), generateUnsignedDivisionCode(), insertSinCosCall(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::makeDMB(), makeStatepointExplicitImpl(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1472 of file IRBuilder.h.
|
inline |
Definition at line 1477 of file IRBuilder.h.
|
inline |
Definition at line 1285 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAddrSpaceCast(), llvm::IRBuilder< true, TargetFolder >::CreateBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateFPExt(), llvm::IRBuilder< true, TargetFolder >::CreateFPToSI(), llvm::IRBuilder< true, TargetFolder >::CreateFPToUI(), llvm::IRBuilder< true, TargetFolder >::CreateFPTrunc(), llvm::IRBuilder< true, TargetFolder >::CreateIntToPtr(), llvm::IRBuilder< true, TargetFolder >::CreatePtrToInt(), createReplacementInstr(), llvm::IRBuilder< true, TargetFolder >::CreateSExt(), llvm::IRBuilder< true, TargetFolder >::CreateSIToFP(), llvm::IRBuilder< true, TargetFolder >::CreateTrunc(), llvm::IRBuilder< true, TargetFolder >::CreateUIToFP(), llvm::IRBuilder< true, TargetFolder >::CreateZExt(), and FoldOperationIntoSelectOperand().
|
inline |
Create a conditional 'br Cond, TrueDest, FalseDest' instruction.
Definition at line 622 of file IRBuilder.h.
Referenced by ConnectProlog(), llvm::ConstantFoldTerminator(), convertMemSetToLoop(), convertTransferToLoop(), generateUnsignedDivisionCode(), SimplifyBranchOnICmpChain(), SimplifyTerminatorOnSelect(), SwitchToLookupTable(), TurnSwitchRangeIntoICmp(), and llvm::UnrollRuntimeLoopProlog().
|
inline |
Definition at line 1083 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateConstGEP1_32().
|
inline |
Definition at line 1086 of file IRBuilder.h.
|
inline |
Definition at line 1128 of file IRBuilder.h.
|
inline |
Definition at line 1104 of file IRBuilder.h.
|
inline |
Definition at line 1145 of file IRBuilder.h.
|
inline |
Definition at line 1095 of file IRBuilder.h.
|
inline |
Definition at line 1136 of file IRBuilder.h.
|
inline |
Definition at line 1116 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateStructGEP().
|
inline |
Definition at line 1157 of file IRBuilder.h.
|
inline |
Definition at line 791 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreatePtrDiff().
|
inline |
Definition at line 779 of file IRBuilder.h.
|
inline |
Definition at line 1495 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateExtractElement(), insertSinCosCall(), and tryPromoteAllocaToVector().
|
inline |
Definition at line 1503 of file IRBuilder.h.
|
inline |
Return a value that has been extracted from a larger integer type.
Definition at line 1614 of file IRBuilder.h.
|
inline |
Definition at line 1541 of file IRBuilder.h.
Referenced by createCast(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), insertSinCosCall(), makeStatepointExplicitImpl(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), and unpackStoreToAggregate().
|
inline |
Definition at line 718 of file IRBuilder.h.
|
inline |
Definition at line 1449 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateFCmpOEQ(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpOGE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpOGT(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpOLE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpOLT(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpONE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpORD(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpUEQ(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpUGE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpUGT(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpULE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpULT(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpUNE(), llvm::IRBuilder< true, TargetFolder >::CreateFCmpUNO(), llvm::RecurrenceDescriptor::createMinMaxOp(), and getFCmpValue().
|
inline |
Definition at line 1385 of file IRBuilder.h.
|
inline |
Definition at line 1393 of file IRBuilder.h.
|
inline |
Definition at line 1389 of file IRBuilder.h.
|
inline |
Definition at line 1401 of file IRBuilder.h.
|
inline |
Definition at line 1397 of file IRBuilder.h.
|
inline |
Definition at line 1405 of file IRBuilder.h.
|
inline |
Definition at line 1409 of file IRBuilder.h.
|
inline |
Definition at line 1417 of file IRBuilder.h.
|
inline |
Definition at line 1425 of file IRBuilder.h.
|
inline |
Definition at line 1421 of file IRBuilder.h.
|
inline |
Definition at line 1433 of file IRBuilder.h.
|
inline |
Definition at line 1429 of file IRBuilder.h.
|
inline |
Definition at line 1437 of file IRBuilder.h.
|
inline |
Definition at line 1413 of file IRBuilder.h.
|
inline |
Definition at line 794 of file IRBuilder.h.
|
inline |
Definition at line 1014 of file IRBuilder.h.
Referenced by llvm::TargetLoweringBase::emitLeadingFence(), and llvm::TargetLoweringBase::emitTrailingFence().
|
inline |
Definition at line 762 of file IRBuilder.h.
Referenced by buildMultiplyTree().
|
inline |
Definition at line 950 of file IRBuilder.h.
|
inline |
Definition at line 1342 of file IRBuilder.h.
|
inline |
Definition at line 1242 of file IRBuilder.h.
|
inline |
Definition at line 1229 of file IRBuilder.h.
|
inline |
Definition at line 1226 of file IRBuilder.h.
|
inline |
Definition at line 1238 of file IRBuilder.h.
|
inline |
Definition at line 814 of file IRBuilder.h.
|
inline |
Definition at line 740 of file IRBuilder.h.
|
inline |
Definition at line 1032 of file IRBuilder.h.
Referenced by convertMemSetToLoop(), convertTransferToLoop(), llvm::IRBuilder< true, TargetFolder >::CreateGEP(), and genLoopLimit().
|
inline |
Definition at line 1036 of file IRBuilder.h.
|
inline |
Definition at line 1067 of file IRBuilder.h.
|
inline |
Definition at line 1070 of file IRBuilder.h.
|
inline |
Same as CreateGlobalString, but return a pointer with "i8*" type instead of a pointer to array of i8.
Definition at line 1177 of file IRBuilder.h.
|
inline |
Definition at line 1442 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateICmpEQ(), llvm::IRBuilder< true, TargetFolder >::CreateICmpNE(), llvm::IRBuilder< true, TargetFolder >::CreateICmpSGE(), llvm::IRBuilder< true, TargetFolder >::CreateICmpSGT(), llvm::IRBuilder< true, TargetFolder >::CreateICmpSLE(), llvm::IRBuilder< true, TargetFolder >::CreateICmpSLT(), llvm::IRBuilder< true, TargetFolder >::CreateICmpUGE(), llvm::IRBuilder< true, TargetFolder >::CreateICmpUGT(), llvm::IRBuilder< true, TargetFolder >::CreateICmpULE(), llvm::IRBuilder< true, TargetFolder >::CreateICmpULT(), llvm::RecurrenceDescriptor::createMinMaxOp(), foldLogOpOfMaskedICmps(), FoldOperationIntoSelectOperand(), generateMinMaxSelectPattern(), and getNewICmpValue().
|
inline |
Definition at line 1354 of file IRBuilder.h.
Referenced by llvm::ConstantFoldTerminator(), ConvertTwoCaseSwitch(), llvm::IRBuilder< true, TargetFolder >::CreateAlignmentAssumption(), llvm::IRBuilder< true, TargetFolder >::CreateIsNull(), llvm::HexagonTargetLowering::emitStoreConditional(), generateUnsignedDivisionCode(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1357 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateIsNotNull(), and createMaskedBitTest().
|
inline |
Definition at line 1375 of file IRBuilder.h.
|
inline |
Definition at line 1372 of file IRBuilder.h.
Referenced by performAtomicOp(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1381 of file IRBuilder.h.
Referenced by performAtomicOp().
|
inline |
Definition at line 1378 of file IRBuilder.h.
|
inline |
Definition at line 1363 of file IRBuilder.h.
|
inline |
Definition at line 1360 of file IRBuilder.h.
Referenced by generateUnsignedDivisionCode(), and performAtomicOp().
|
inline |
Definition at line 1369 of file IRBuilder.h.
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), and performAtomicOp().
|
inline |
Definition at line 1366 of file IRBuilder.h.
Referenced by ConnectProlog(), convertMemSetToLoop(), convertTransferToLoop(), foldUDivNegCst(), SwitchToLookupTable(), and TurnSwitchRangeIntoICmp().
|
inline |
Definition at line 1049 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateGlobalStringPtr(), llvm::IRBuilder< true, TargetFolder >::CreateInBoundsGEP(), and createReplacementInstr().
|
inline |
Definition at line 1053 of file IRBuilder.h.
|
inline |
Definition at line 1076 of file IRBuilder.h.
|
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 640 of file IRBuilder.h.
|
inline |
Definition at line 1508 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateInsertElement(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), OptimizeIntegerToVectorInsertions(), tryPromoteAllocaToVector(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1517 of file IRBuilder.h.
|
inline |
Definition at line 1549 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAggregateRet(), createCast(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), and unpackLoadToAggregate().
|
inline |
Definition at line 1316 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAlignmentAssumption(), llvm::EmitFPutC(), llvm::EmitPutChar(), EvaluateGEPOffsetExpression(), and simplifyAllocaArraySize().
|
inline |
Definition at line 1249 of file IRBuilder.h.
Referenced by CoerceAvailableValueToLoadType(), llvm::IRBuilder< true, TargetFolder >::CreateBitOrPointerCast(), and createCast().
|
inline |
Definition at line 644 of file IRBuilder.h.
|
inline |
Definition at line 649 of file IRBuilder.h.
|
inline |
Create an invoke instruction.
Definition at line 664 of file IRBuilder.h.
|
inline |
Definition at line 655 of file IRBuilder.h.
|
inline |
Return an i1 value testing if Arg is not null.
Definition at line 1574 of file IRBuilder.h.
Referenced by llvm::UnrollRuntimeLoopProlog().
|
inline |
Return an i1 value testing if Arg is null.
Definition at line 1568 of file IRBuilder.h.
|
inline |
Definition at line 1558 of file IRBuilder.h.
Referenced by createStubLandingPad().
|
inline |
Definition at line 973 of file IRBuilder.h.
Referenced by convertTransferToLoop(), llvm::IRBuilder< true, TargetFolder >::CreateAlignedLoad(), tryPromoteAllocaToVector(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombiner::visitLoadInst().
|
inline |
Definition at line 976 of file IRBuilder.h.
|
inline |
Definition at line 979 of file IRBuilder.h.
|
inline |
Definition at line 982 of file IRBuilder.h.
|
inline |
Definition at line 842 of file IRBuilder.h.
Referenced by CoerceAvailableValueToLoadType(), llvm::IRBuilder< true, TargetFolder >::CreateExtractInteger(), llvm::IRBuilder< true, TargetFolder >::CreateLShr(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), foldSelectICmpAndOr(), generateUnsignedDivisionCode(), GetShiftedValue(), GetStoreValueForLoad(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), and SwitchToLookupTable().
|
inline |
Definition at line 851 of file IRBuilder.h.
|
inline |
Definition at line 855 of file IRBuilder.h.
|
inline |
Definition at line 748 of file IRBuilder.h.
Referenced by buildMultiplyTree(), llvm::IRBuilder< true, TargetFolder >::CreateNSWMul(), llvm::IRBuilder< true, TargetFolder >::CreateNUWMul(), generatedUnsignedRemainderCode(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitCallSite().
|
inline |
Definition at line 935 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateNSWNeg(), and llvm::IRBuilder< true, TargetFolder >::CreateNUWNeg().
|
inline |
Definition at line 957 of file IRBuilder.h.
Referenced by llvm::FoldBranchToCommonDest(), performAtomicOp(), and SimplifyCondBranchToCondBranch().
|
inline |
Definition at line 712 of file IRBuilder.h.
|
inline |
Definition at line 756 of file IRBuilder.h.
|
inline |
Definition at line 944 of file IRBuilder.h.
|
inline |
Definition at line 734 of file IRBuilder.h.
|
inline |
Definition at line 715 of file IRBuilder.h.
|
inline |
Definition at line 759 of file IRBuilder.h.
|
inline |
Definition at line 947 of file IRBuilder.h.
|
inline |
Definition at line 737 of file IRBuilder.h.
|
inline |
Definition at line 894 of file IRBuilder.h.
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), checkForNegativeOperand(), llvm::IRBuilder< true, TargetFolder >::CreateOr(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), foldLogOpOfMaskedICmps(), foldSelectICmpAndOr(), generateUnsignedDivisionCode(), GetMemInstValueForLoad(), performAtomicOp(), and SimplifyCondBranchToCondBranch().
|
inline |
Definition at line 903 of file IRBuilder.h.
|
inline |
Definition at line 906 of file IRBuilder.h.
|
inline |
Definition at line 1462 of file IRBuilder.h.
Referenced by convertMemSetToLoop(), convertTransferToLoop(), generateUnsignedDivisionCode(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
|
inline |
Definition at line 1302 of file IRBuilder.h.
|
inline |
Definition at line 1293 of file IRBuilder.h.
Referenced by llvm::UpgradeIntrinsicCall().
|
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 1585 of file IRBuilder.h.
|
inline |
Definition at line 1245 of file IRBuilder.h.
Referenced by CoerceAvailableValueToLoadType(), llvm::IRBuilder< true, TargetFolder >::CreateAlignmentAssumption(), llvm::IRBuilder< true, TargetFolder >::CreateBitOrPointerCast(), createCast(), llvm::IRBuilder< true, TargetFolder >::CreatePtrDiff(), GetStoreValueForLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), and SimplifyBranchOnICmpChain().
|
inline |
Definition at line 671 of file IRBuilder.h.
|
inline |
Create a 'ret <val>' instruction.
Definition at line 597 of file IRBuilder.h.
Referenced by llvm::InlineFunction(), SimplifyCondBranchToTwoReturns(), and SwitchToLookupTable().
|
inline |
Create a 'ret void' instruction.
Definition at line 592 of file IRBuilder.h.
Referenced by SimplifyCondBranchToTwoReturns().
|
inline |
Definition at line 782 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateExactSDiv(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), and insertFastDiv().
|
inline |
Definition at line 1482 of file IRBuilder.h.
Referenced by ConvertTwoCaseSwitch(), llvm::RecurrenceDescriptor::createMinMaxOp(), FoldTwoEntryPHINode(), generateMinMaxSelectPattern(), generateUnsignedDivisionCode(), HoistThenElseCodeToIf(), performAtomicOp(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), SpeculativelyExecuteBB(), and llvm::ObjectSizeOffsetEvaluator::visitSelectInst().
|
inline |
Definition at line 1195 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateSExtOrTrunc(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1269 of file IRBuilder.h.
|
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 1214 of file IRBuilder.h.
|
inline |
Definition at line 823 of file IRBuilder.h.
Referenced by createMaskedBitTest(), llvm::IRBuilder< true, TargetFolder >::CreateShl(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), foldSelectICmpAndOr(), generateUnsignedDivisionCode(), GetMemInstValueForLoad(), GetShiftedValue(), and simplifyValueKnownNonZero().
|
inline |
Definition at line 831 of file IRBuilder.h.
|
inline |
Definition at line 836 of file IRBuilder.h.
|
inline |
Definition at line 1522 of file IRBuilder.h.
Referenced by ConcatenateTwoVectors(), llvm::IRBuilder< true, TargetFolder >::CreateShuffleVector(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), SimplifyX86insertps(), SimplifyX86vperm2(), llvm::UpgradeIntrinsicCall(), UpgradeX86PSLLDQIntrinsics(), and UpgradeX86PSRLDQIntrinsics().
|
inline |
Definition at line 1531 of file IRBuilder.h.
|
inline |
Definition at line 1235 of file IRBuilder.h.
|
inline |
Definition at line 808 of file IRBuilder.h.
Referenced by llvm::expandRemainderUpTo32Bits(), and llvm::expandRemainderUpTo64Bits().
|
inline |
Definition at line 985 of file IRBuilder.h.
Referenced by convertMemSetToLoop(), convertTransferToLoop(), llvm::IRBuilder< true, TargetFolder >::CreateAlignedStore(), tryPromoteAllocaToVector(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1170 of file IRBuilder.h.
|
inline |
Definition at line 726 of file IRBuilder.h.
Referenced by checkForNegativeOperand(), llvm::IRBuilder< true, TargetFolder >::CreateAlignmentAssumption(), llvm::IRBuilder< true, TargetFolder >::CreateNSWSub(), llvm::IRBuilder< true, TargetFolder >::CreateNUWSub(), llvm::IRBuilder< true, TargetFolder >::CreatePtrDiff(), generatedUnsignedRemainderCode(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), performAtomicOp(), simplifyValueKnownNonZero(), and SwitchToLookupTable().
|
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 631 of file IRBuilder.h.
Referenced by SimplifyBranchOnICmpChain().
|
inline |
Definition at line 1189 of file IRBuilder.h.
Referenced by CoerceAvailableValueToLoadType(), llvm::IRBuilder< true, TargetFolder >::CreateExtractInteger(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrTrunc(), llvm::IRBuilder< true, TargetFolder >::CreateZExtOrTrunc(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), EvaluateGEPOffsetExpression(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), GetStoreValueForLoad(), ProcessUGT_ADDCST_ADD(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SwitchToLookupTable(), truncateIVUse(), and llvm::UpgradeIntrinsicCall().
|
inline |
Definition at line 1277 of file IRBuilder.h.
Referenced by llvm::AArch64TargetLowering::emitLoadLinked(), and llvm::ARMTargetLowering::emitLoadLinked().
|
inline |
Definition at line 770 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateExactUDiv(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), generatedUnsignedRemainderCode(), generateSignedDivisionCode(), and insertFastDiv().
|
inline |
Definition at line 1232 of file IRBuilder.h.
|
inline |
Definition at line 675 of file IRBuilder.h.
Referenced by createStubLandingPad(), removeUndefIntroducingPredecessor(), and TryToMergeLandingPad().
|
inline |
Definition at line 802 of file IRBuilder.h.
Referenced by llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), and generateSignedRemainderCode().
|
inline |
Definition at line 1491 of file IRBuilder.h.
|
inline |
Return a vector value that contains.
NumElts elements. Definition at line 1599 of file IRBuilder.h.
|
inline |
Definition at line 910 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateXor(), foldSelectICmpAndOr(), generateSignedDivisionCode(), generateSignedRemainderCode(), and performAtomicOp().
|
inline |
Definition at line 916 of file IRBuilder.h.
|
inline |
Definition at line 919 of file IRBuilder.h.
|
inline |
Definition at line 1192 of file IRBuilder.h.
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateZExtOrTrunc(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), foldUDivShl(), GetMemInstValueForLoad(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), llvm::UpgradeIntrinsicCall(), and llvm::ObjectSizeOffsetEvaluator::visitCallSite().
|
inline |
Definition at line 1261 of file IRBuilder.h.
Referenced by llvm::AArch64TargetLowering::emitStoreConditional(), and llvm::ARMTargetLowering::emitStoreConditional().
|
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 1200 of file IRBuilder.h.
Referenced by createMaskedBitTest(), foldSelectICmpAndOr(), and SwitchToLookupTable().
|
inline |
Get the constant folder being used.
Definition at line 557 of file IRBuilder.h.
|
inline |
Insert and return the specified instruction.
Definition at line 565 of file IRBuilder.h.
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), llvm::IRBuilder< true, TargetFolder >::CreateAdd(), llvm::IRBuilder< true, TargetFolder >::CreateAggregateRet(), llvm::IRBuilder< true, TargetFolder >::CreateAlloca(), llvm::IRBuilder< true, TargetFolder >::CreateAnd(), llvm::IRBuilder< true, TargetFolder >::CreateAShr(), llvm::IRBuilder< true, TargetFolder >::CreateAtomicCmpXchg(), llvm::IRBuilder< true, TargetFolder >::CreateAtomicRMW(), llvm::IRBuilder< true, TargetFolder >::CreateBinOp(), llvm::IRBuilder< true, TargetFolder >::CreateBr(), llvm::IRBuilder< true, TargetFolder >::CreateCall(), llvm::IRBuilder< true, TargetFolder >::CreateCast(), llvm::IRBuilder< true, TargetFolder >::CreateCondBr(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP1_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP1_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP2_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP2_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP1_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP1_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP2_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP2_64(), llvm::IRBuilder< true, TargetFolder >::CreateExtractElement(), llvm::IRBuilder< true, TargetFolder >::CreateExtractValue(), llvm::IRBuilder< true, TargetFolder >::CreateFAdd(), llvm::IRBuilder< true, TargetFolder >::CreateFCmp(), llvm::IRBuilder< true, TargetFolder >::CreateFDiv(), llvm::IRBuilder< true, TargetFolder >::CreateFence(), llvm::IRBuilder< true, TargetFolder >::CreateFMul(), llvm::IRBuilder< true, TargetFolder >::CreateFNeg(), llvm::IRBuilder< true, TargetFolder >::CreateFPCast(), llvm::IRBuilder< true, TargetFolder >::CreateFRem(), llvm::IRBuilder< true, TargetFolder >::CreateFSub(), llvm::IRBuilder< true, TargetFolder >::CreateGEP(), llvm::IRBuilder< true, TargetFolder >::CreateICmp(), llvm::IRBuilder< true, TargetFolder >::CreateInBoundsGEP(), llvm::IRBuilder< true, TargetFolder >::CreateIndirectBr(), llvm::IRBuilder< true, TargetFolder >::CreateInsertElement(), llvm::IRBuilder< true, TargetFolder >::CreateInsertValue(), llvm::IRBuilder< true, TargetFolder >::CreateIntCast(), llvm::IRBuilder< true, TargetFolder >::CreateInvoke(), llvm::IRBuilder< true, TargetFolder >::CreateInvoke3(), llvm::IRBuilder< true, TargetFolder >::CreateLandingPad(), llvm::IRBuilder< true, TargetFolder >::CreateLoad(), llvm::IRBuilder< true, TargetFolder >::CreateLShr(), llvm::IRBuilder< true, TargetFolder >::CreateMul(), llvm::IRBuilder< true, TargetFolder >::CreateNeg(), llvm::IRBuilder< true, TargetFolder >::CreateNot(), llvm::IRBuilder< true, TargetFolder >::CreateOr(), llvm::IRBuilder< true, TargetFolder >::CreatePHI(), llvm::IRBuilder< true, TargetFolder >::CreatePointerBitCastOrAddrSpaceCast(), llvm::IRBuilder< true, TargetFolder >::CreatePointerCast(), llvm::IRBuilder< true, TargetFolder >::CreateResume(), llvm::IRBuilder< true, TargetFolder >::CreateRet(), llvm::IRBuilder< true, TargetFolder >::CreateRetVoid(), llvm::IRBuilder< true, TargetFolder >::CreateSDiv(), llvm::IRBuilder< true, TargetFolder >::CreateSelect(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateShl(), llvm::IRBuilder< true, TargetFolder >::CreateShuffleVector(), llvm::IRBuilder< true, TargetFolder >::CreateSRem(), llvm::IRBuilder< true, TargetFolder >::CreateStore(), llvm::IRBuilder< true, TargetFolder >::CreateSub(), llvm::IRBuilder< true, TargetFolder >::CreateSwitch(), llvm::IRBuilder< true, TargetFolder >::CreateTruncOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateUDiv(), llvm::IRBuilder< true, TargetFolder >::CreateUnreachable(), llvm::IRBuilder< true, TargetFolder >::CreateURem(), llvm::IRBuilder< true, TargetFolder >::CreateVAArg(), llvm::IRBuilder< true, TargetFolder >::CreateXor(), and llvm::IRBuilder< true, TargetFolder >::CreateZExtOrBitCast().
|
inline |
No-op overload to handle constants.
Definition at line 572 of file IRBuilder.h.
|
inline |
Return true if this builder is configured to actually add the requested names to IR created through it.
Definition at line 561 of file IRBuilder.h.
1.8.6