LLVM  8.0.1
Classes | Public Member Functions | Protected Attributes | List of all members
llvm::IRBuilderBase Class Reference

Common base class shared among various IRBuilders. More...

#include "llvm/IR/IRBuilder.h"

Inheritance diagram for llvm::IRBuilderBase:
Inheritance graph
[legend]
Collaboration diagram for llvm::IRBuilderBase:
Collaboration graph
[legend]

Classes

class  FastMathFlagGuard
 
class  InsertPoint
 InsertPoint - A saved insertion point. More...
 
class  InsertPointGuard
 

Public Member Functions

 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)
 
CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, uint64_t Size, unsigned Align, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value. More...
 
CallInstCreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size, unsigned Align, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemCpy (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, uint64_t Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert a memcpy between the specified pointers. More...
 
CallInstCreateMemCpy (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateElementUnorderedAtomicMemCpy (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, uint64_t Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert an element unordered-atomic memcpy between the specified pointers. More...
 
CallInstCreateElementUnorderedAtomicMemCpy (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateMemMove (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, uint64_t Size, 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, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size, bool isVolatile=false, MDNode *TBAATag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateElementUnorderedAtomicMemMove (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, uint64_t Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 Create and insert an element unordered-atomic memmove between the specified pointers. More...
 
CallInstCreateElementUnorderedAtomicMemMove (Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign, Value *Size, uint32_t ElementSize, MDNode *TBAATag=nullptr, MDNode *TBAAStructTag=nullptr, MDNode *ScopeTag=nullptr, MDNode *NoAliasTag=nullptr)
 
CallInstCreateFAddReduce (Value *Acc, Value *Src)
 Create a vector fadd reduction intrinsic of the source vector. More...
 
CallInstCreateFMulReduce (Value *Acc, Value *Src)
 Create a vector fmul reduction intrinsic of the source vector. More...
 
CallInstCreateAddReduce (Value *Src)
 Create a vector int add reduction intrinsic of the source vector. More...
 
CallInstCreateMulReduce (Value *Src)
 Create a vector int mul reduction intrinsic of the source vector. More...
 
CallInstCreateAndReduce (Value *Src)
 Create a vector int AND reduction intrinsic of the source vector. More...
 
CallInstCreateOrReduce (Value *Src)
 Create a vector int OR reduction intrinsic of the source vector. More...
 
CallInstCreateXorReduce (Value *Src)
 Create a vector int XOR reduction intrinsic of the source vector. More...
 
CallInstCreateIntMaxReduce (Value *Src, bool IsSigned=false)
 Create a vector integer max reduction intrinsic of the source vector. More...
 
CallInstCreateIntMinReduce (Value *Src, bool IsSigned=false)
 Create a vector integer min reduction intrinsic of the source vector. More...
 
CallInstCreateFPMaxReduce (Value *Src, bool NoNaN=false)
 Create a vector float max reduction intrinsic of the source vector. More...
 
CallInstCreateFPMinReduce (Value *Src, bool NoNaN=false)
 Create a vector float min reduction intrinsic of the source vector. More...
 
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="")
 Conveninence function for the common case when CallArgs are filled in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer. More...
 
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="")
 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="")
 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...
 
CallInstCreateUnaryIntrinsic (Intrinsic::ID ID, Value *V, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with 1 operand which is mangled on its type. More...
 
CallInstCreateBinaryIntrinsic (Intrinsic::ID ID, Value *LHS, Value *RHS, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with 2 operands which is mangled on the first type. More...
 
CallInstCreateIntrinsic (Intrinsic::ID ID, ArrayRef< Type *> Types, ArrayRef< Value *> Args, Instruction *FMFSource=nullptr, const Twine &Name="")
 Create a call to intrinsic ID with args, mangled using Types. More...
 
CallInstCreateMinNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minnum intrinsic. More...
 
CallInstCreateMaxNum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maxnum intrinsic. More...
 
CallInstCreateMinimum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the minimum intrinsic. More...
 
CallInstCreateMaximum (Value *LHS, Value *RHS, const Twine &Name="")
 Create call to the maximum intrinsic. More...
 

Protected Attributes

BasicBlockBB
 
BasicBlock::iterator InsertPt
 
LLVMContextContext
 
MDNodeDefaultFPMathTag
 
FastMathFlags FMF
 
ArrayRef< OperandBundleDefDefaultOperandBundles
 

Detailed Description

Common base class shared among various IRBuilders.

Definition at line 89 of file IRBuilder.h.

Constructor & Destructor Documentation

◆ IRBuilderBase()

llvm::IRBuilderBase::IRBuilderBase ( LLVMContext context,
MDNode FPMathTag = nullptr,
ArrayRef< OperandBundleDef OpBundles = None 
)
inline

Definition at line 103 of file IRBuilder.h.

Member Function Documentation

◆ clearFastMathFlags()

void llvm::IRBuilderBase::clearFastMathFlags ( )
inline

Clear the fast-math flags.

Definition at line 214 of file IRBuilder.h.

References llvm::FastMathFlags::clear().

◆ ClearInsertionPoint()

void llvm::IRBuilderBase::ClearInsertionPoint ( )
inline

Clear the insertion point: created instructions will not be inserted into a block.

Definition at line 116 of file IRBuilder.h.

Referenced by llvm::SCEVExpander::clearInsertPoint().

◆ CreateAddReduce()

CallInst * IRBuilderBase::CreateAddReduce ( Value Src)

Create a vector int add reduction intrinsic of the source vector.

Definition at line 342 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_add, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateAndReduce()

CallInst * IRBuilderBase::CreateAndReduce ( Value Src)

Create a vector int AND reduction intrinsic of the source vector.

Definition at line 352 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_and, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateAssumption()

CallInst * IRBuilderBase::CreateAssumption ( Value Cond)

Create an assume intrinsic call that allows the optimizer to assume that the provided condition will be true.

Definition at line 453 of file IRBuilder.cpp.

References assert(), llvm::Intrinsic::assume, BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt1Ty(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), and llvm::Value::getType().

◆ CreateBinaryIntrinsic()

CallInst * IRBuilderBase::CreateBinaryIntrinsic ( Intrinsic::ID  ID,
Value LHS,
Value RHS,
Instruction FMFSource = nullptr,
const Twine Name = "" 
)

Create a call to intrinsic ID with 2 operands which is mangled on the first type.

Definition at line 742 of file IRBuilder.cpp.

References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Value::getType(), and Name.

◆ CreateElementUnorderedAtomicMemCpy() [1/2]

CallInst* llvm::IRBuilderBase::CreateElementUnorderedAtomicMemCpy ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
uint64_t  Size,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert an element unordered-atomic memcpy between the specified pointers.

DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.

If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 472 of file IRBuilder.h.

◆ CreateElementUnorderedAtomicMemCpy() [2/2]

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemCpy ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
Value Size,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateElementUnorderedAtomicMemMove() [1/2]

CallInst* llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
uint64_t  Size,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert an element unordered-atomic memmove between the specified pointers.

DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.

If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 516 of file IRBuilder.h.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::BitmaskEnumDetail::Mask(), and Name.

◆ CreateElementUnorderedAtomicMemMove() [2/2]

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemMove ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
Value Size,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateElementUnorderedAtomicMemSet() [1/2]

CallInst* llvm::IRBuilderBase::CreateElementUnorderedAtomicMemSet ( Value Ptr,
Value Val,
uint64_t  Size,
unsigned  Align,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert an element unordered-atomic memset of the region of memory starting at the given pointer to the given value.

If the pointer isn't an i8*, it will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 423 of file IRBuilder.h.

◆ CreateElementUnorderedAtomicMemSet() [2/2]

CallInst * IRBuilderBase::CreateElementUnorderedAtomicMemSet ( Value Ptr,
Value Val,
Value Size,
unsigned  Align,
uint32_t  ElementSize,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateFAddReduce()

CallInst * IRBuilderBase::CreateFAddReduce ( Value Acc,
Value Src 
)

Create a vector fadd reduction intrinsic of the source vector.

The first parameter is a scalar accumulator value for ordered reductions.

Definition at line 322 of file IRBuilder.cpp.

References createCallHelper(), llvm::Intrinsic::experimental_vector_reduce_fadd, llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and llvm::Type::getVectorElementType().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateFMulReduce()

CallInst * IRBuilderBase::CreateFMulReduce ( Value Acc,
Value Src 
)

Create a vector fmul reduction intrinsic of the source vector.

The first parameter is a scalar accumulator value for ordered reductions.

Definition at line 332 of file IRBuilder.cpp.

References createCallHelper(), llvm::Intrinsic::experimental_vector_reduce_fmul, llvm::Intrinsic::getDeclaration(), GetInsertBlock(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and llvm::Type::getVectorElementType().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateFPMaxReduce()

CallInst * IRBuilderBase::CreateFPMaxReduce ( Value Src,
bool  NoNaN = false 
)

Create a vector float max reduction intrinsic of the source vector.

Definition at line 379 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_fmax, FMF, getReductionIntrinsic(), and llvm::FastMathFlags::setNoNaNs().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateFPMinReduce()

CallInst * IRBuilderBase::CreateFPMinReduce ( Value Src,
bool  NoNaN = false 
)

Create a vector float min reduction intrinsic of the source vector.

Definition at line 390 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_fmin, FMF, getReductionIntrinsic(), and llvm::FastMathFlags::setNoNaNs().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateGCRelocate()

CallInst * IRBuilderBase::CreateGCRelocate ( Instruction Statepoint,
int  BaseOffset,
int  DerivedOffset,
Type ResultType,
const Twine Name = "" 
)

Create a call to the experimental.gc.relocate intrinsics to project the relocated value of one pointer from the statepoint.

Definition at line 718 of file IRBuilder.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, BB, createCallHelper(), llvm::Intrinsic::experimental_gc_relocate, llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), and llvm::GlobalValue::getParent().

◆ CreateGCResult()

CallInst * IRBuilderBase::CreateGCResult ( Instruction Statepoint,
Type ResultType,
const Twine Name = "" 
)

Create a call to the experimental.gc.result intrinsic to extract the result from a call wrapped in a statepoint.

Definition at line 706 of file IRBuilder.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, BB, createCallHelper(), llvm::Intrinsic::experimental_gc_result, llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getParent(), and llvm::GlobalValue::getParent().

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointCall() [1/3]

CallInst * IRBuilderBase::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.

Definition at line 625 of file IRBuilder.cpp.

References Name, and llvm::None.

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointCall() [2/3]

CallInst * IRBuilderBase::CreateGCStatepointCall ( 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.

Definition at line 634 of file IRBuilder.cpp.

References Name.

◆ CreateGCStatepointCall() [3/3]

CallInst * IRBuilderBase::CreateGCStatepointCall ( uint64_t  ID,
uint32_t  NumPatchBytes,
Value ActualCallee,
ArrayRef< Use CallArgs,
ArrayRef< Value *>  DeoptArgs,
ArrayRef< Value *>  GCArgs,
const Twine Name = "" 
)

Conveninence function for the common case when CallArgs are filled in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to get the Value pointer.

Definition at line 643 of file IRBuilder.cpp.

References Name, and llvm::None.

◆ CreateGCStatepointInvoke() [1/3]

InvokeInst * IRBuilderBase::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 = "" 
)

Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.

Definition at line 675 of file IRBuilder.cpp.

References Name, and llvm::None.

Referenced by makeStatepointExplicitImpl().

◆ CreateGCStatepointInvoke() [2/3]

InvokeInst * IRBuilderBase::CreateGCStatepointInvoke ( 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 = "" 
)

Create an invoke to the experimental.gc.statepoint intrinsic to start a new statepoint sequence.

Definition at line 686 of file IRBuilder.cpp.

References Name.

◆ CreateGCStatepointInvoke() [3/3]

InvokeInst * IRBuilderBase::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 = "" 
)

Definition at line 696 of file IRBuilder.cpp.

References Name, and llvm::None.

◆ CreateGlobalString()

GlobalVariable * IRBuilderBase::CreateGlobalString ( StringRef  Str,
const Twine Name = "",
unsigned  AddressSpace = 0 
)

Make a new global variable with initializer type i8*.

CreateGlobalString - Make a new global variable with an initializer that has array of i8 type filled in with the nul terminated string value specified.

Make a new global variable with an initializer that has array of i8 type filled in with the null terminated string value specified. The new global variable will be marked mergable with any others of the same contents. If Name is specified, it is the name of the global variable created.

If Name is specified, it is the name of the global variable created.

Definition at line 43 of file IRBuilder.cpp.

References BB, Context, llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::ConstantDataArray::getString(), llvm::Value::getType(), llvm::GlobalValue::Global, Name, llvm::GlobalValue::NotThreadLocal, llvm::GlobalValue::PrivateLinkage, and llvm::GlobalValue::setUnnamedAddr().

Referenced by isReportingError().

◆ CreateIntMaxReduce()

CallInst * IRBuilderBase::CreateIntMaxReduce ( Value Src,
bool  IsSigned = false 
)

Create a vector integer max reduction intrinsic of the source vector.

Definition at line 367 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_smax, llvm::Intrinsic::experimental_vector_reduce_umax, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateIntMinReduce()

CallInst * IRBuilderBase::CreateIntMinReduce ( Value Src,
bool  IsSigned = false 
)

Create a vector integer min reduction intrinsic of the source vector.

Definition at line 373 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_smin, llvm::Intrinsic::experimental_vector_reduce_umin, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateIntrinsic()

CallInst * IRBuilderBase::CreateIntrinsic ( Intrinsic::ID  ID,
ArrayRef< Type *>  Types,
ArrayRef< Value *>  Args,
Instruction FMFSource = nullptr,
const Twine Name = "" 
)

Create a call to intrinsic ID with args, mangled using Types.

If FMFSource is provided, copy fast-math-flags from that instruction to the intrinsic.

Definition at line 751 of file IRBuilder.cpp.

References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), and llvm::BasicBlock::getModule().

Referenced by getMulHu().

◆ CreateInvariantStart()

CallInst * IRBuilderBase::CreateInvariantStart ( Value Ptr,
ConstantInt Size = nullptr 
)

◆ CreateLifetimeEnd()

CallInst * IRBuilderBase::CreateLifetimeEnd ( Value Ptr,
ConstantInt Size = nullptr 
)

◆ CreateLifetimeStart()

CallInst * IRBuilderBase::CreateLifetimeStart ( Value Ptr,
ConstantInt Size = nullptr 
)

◆ CreateMaskedGather()

CallInst * IRBuilderBase::CreateMaskedGather ( Value Ptrs,
unsigned  Align,
Value Mask = nullptr,
Value PassThru = nullptr,
const Twine Name = "" 
)

Create a call to Masked Gather intrinsic.

Create a call to a Masked Gather intrinsic.

Ptrs - vector of pointers for loading Align - alignment for one element Mask - vector of booleans which indicates what vector lanes should be accessed in memory PassThru - pass-through value that is used to fill the masked-off lanes of the result Name - name of the result variable

Definition at line 523 of file IRBuilder.cpp.

References Context, llvm::VectorType::get(), llvm::UndefValue::get(), llvm::Constant::getAllOnesValue(), llvm::Type::getInt1Ty(), getInt32(), llvm::Value::getType(), llvm::BitmaskEnumDetail::Mask(), and llvm::Intrinsic::masked_gather.

Referenced by llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ CreateMaskedLoad()

CallInst * IRBuilderBase::CreateMaskedLoad ( Value Ptr,
unsigned  Align,
Value Mask,
Value PassThru = nullptr,
const Twine Name = "" 
)

Create a call to Masked Load intrinsic.

Create a call to a Masked Load intrinsic.

Ptr - base pointer for the load Align - alignment of the source location Mask - vector of booleans which indicates what vector lanes should be accessed in memory PassThru - pass-through value that is used to fill the masked-off lanes of the result Name - name of the result variable

Definition at line 471 of file IRBuilder.cpp.

References assert(), llvm::UndefValue::get(), getInt32(), llvm::Value::getType(), llvm::BitmaskEnumDetail::Mask(), and llvm::Intrinsic::masked_load.

Referenced by simplifyX86MaskedLoad(), TypeSizeToSizeIndex(), UpgradeMaskedLoad(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ CreateMaskedScatter()

CallInst * IRBuilderBase::CreateMaskedScatter ( Value Data,
Value Ptrs,
unsigned  Align,
Value Mask = nullptr 
)

Create a call to Masked Scatter intrinsic.

Create a call to a Masked Scatter intrinsic.

Data - data to be stored, Ptrs - the vector of pointers, where the Data elements should be stored Align - alignment for one element Mask - vector of booleans which indicates what vector lanes should be accessed in memory

Definition at line 554 of file IRBuilder.cpp.

References assert(), Context, llvm::Data, llvm::VectorType::get(), llvm::Constant::getAllOnesValue(), llvm::Type::getInt1Ty(), getInt32(), llvm::Value::getType(), and llvm::Intrinsic::masked_scatter.

Referenced by llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ CreateMaskedStore()

CallInst * IRBuilderBase::CreateMaskedStore ( Value Val,
Value Ptr,
unsigned  Align,
Value Mask 
)

Create a call to Masked Store intrinsic.

Create a call to a Masked Store intrinsic.

Val - data to be stored, Ptr - base pointer for the store Align - alignment of the destination location Mask - vector of booleans which indicates what vector lanes should be accessed in memory

Definition at line 492 of file IRBuilder.cpp.

References assert(), BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), getInt32(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), llvm::Intrinsic::masked_store, and Name.

Referenced by simplifyX86MaskedStore(), TypeSizeToSizeIndex(), UpgradeMaskedStore(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ CreateMaximum()

CallInst* llvm::IRBuilderBase::CreateMaximum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the maximum intrinsic.

Definition at line 714 of file IRBuilder.h.

References llvm::Intrinsic::maximum, and Name.

◆ CreateMaxNum()

CallInst* llvm::IRBuilderBase::CreateMaxNum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the maxnum intrinsic.

Definition at line 704 of file IRBuilder.h.

References llvm::Intrinsic::maxnum, and Name.

◆ CreateMemCpy() [1/2]

CallInst* llvm::IRBuilderBase::CreateMemCpy ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
uint64_t  Size,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert a memcpy between the specified pointers.

If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 446 of file IRBuilder.h.

References isVolatile().

Referenced by canTransformToMemCmp(), CreateElementUnorderedAtomicMemSet(), handleMemIntrinsicPtrUse(), isCallPromotable(), isReportingError(), llvm::LibCallSimplifier::LibCallSimplifier(), mayLoopAccessLocation(), moveUp(), and StackMallocSizeClass().

◆ CreateMemCpy() [2/2]

CallInst * IRBuilderBase::CreateMemCpy ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
Value Size,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode TBAAStructTag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateMemMove() [1/2]

CallInst* llvm::IRBuilderBase::CreateMemMove ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
uint64_t  Size,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert a memmove between the specified pointers.

If the pointers aren't i8*, they will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 494 of file IRBuilder.h.

References isVolatile().

Referenced by canTransformToMemCmp(), CreateElementUnorderedAtomicMemCpy(), handleMemIntrinsicPtrUse(), isCallPromotable(), llvm::LibCallSimplifier::LibCallSimplifier(), mayLoopAccessLocation(), and moveUp().

◆ CreateMemMove() [2/2]

CallInst * IRBuilderBase::CreateMemMove ( Value Dst,
unsigned  DstAlign,
Value Src,
unsigned  SrcAlign,
Value Size,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateMemSet() [1/2]

CallInst* llvm::IRBuilderBase::CreateMemSet ( Value Ptr,
Value Val,
uint64_t  Size,
unsigned  Align,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)
inline

Create and insert a memset to the specified pointer and the specified value.

If the pointer isn't an i8*, it will be converted. If a TBAA tag is specified, it will be added to the instruction. Likewise with alias.scope and noalias tags.

Definition at line 404 of file IRBuilder.h.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, isVolatile(), and Size.

Referenced by canTransformToMemCmp(), createInvokeHelper(), getAllocaSizeInBytes(), handleMemIntrinsicPtrUse(), hasUndefContents(), isCallPromotable(), llvm::LibCallSimplifier::LibCallSimplifier(), and moveUp().

◆ CreateMemSet() [2/2]

CallInst * IRBuilderBase::CreateMemSet ( Value Ptr,
Value Val,
Value Size,
unsigned  Align,
bool  isVolatile = false,
MDNode TBAATag = nullptr,
MDNode ScopeTag = nullptr,
MDNode NoAliasTag = nullptr 
)

◆ CreateMinimum()

CallInst* llvm::IRBuilderBase::CreateMinimum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the minimum intrinsic.

Definition at line 709 of file IRBuilder.h.

References llvm::Intrinsic::minimum, and Name.

◆ CreateMinNum()

CallInst* llvm::IRBuilderBase::CreateMinNum ( Value LHS,
Value RHS,
const Twine Name = "" 
)
inline

Create call to the minnum intrinsic.

Definition at line 699 of file IRBuilder.h.

References llvm::Intrinsic::minnum, and Name.

◆ CreateMulReduce()

CallInst * IRBuilderBase::CreateMulReduce ( Value Src)

Create a vector int mul reduction intrinsic of the source vector.

Definition at line 347 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_mul, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateOrReduce()

CallInst * IRBuilderBase::CreateOrReduce ( Value Src)

Create a vector int OR reduction intrinsic of the source vector.

Definition at line 357 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_or, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ CreateUnaryIntrinsic()

CallInst * IRBuilderBase::CreateUnaryIntrinsic ( Intrinsic::ID  ID,
Value V,
Instruction FMFSource = nullptr,
const Twine Name = "" 
)

Create a call to intrinsic ID with 1 operand which is mangled on its type.

Definition at line 734 of file IRBuilder.cpp.

References BB, createCallHelper(), llvm::Intrinsic::getDeclaration(), llvm::BasicBlock::getModule(), llvm::Value::getType(), and Name.

Referenced by canonicalizeSaturatedSubtract(), getMulHu(), and simplifyX86round().

◆ CreateXorReduce()

CallInst * IRBuilderBase::CreateXorReduce ( Value Src)

Create a vector int XOR reduction intrinsic of the source vector.

Definition at line 362 of file IRBuilder.cpp.

References llvm::Intrinsic::experimental_vector_reduce_xor, and getReductionIntrinsic().

Referenced by llvm::createSimpleTargetReduction().

◆ getContext()

LLVMContext& llvm::IRBuilderBase::getContext ( ) const
inline

◆ getCurrentDebugLocation()

const DebugLoc& llvm::IRBuilderBase::getCurrentDebugLocation ( ) const
inline

Get location information used by debugging information.

Definition at line 154 of file IRBuilder.h.

◆ getCurrentFunctionReturnType()

Type * IRBuilderBase::getCurrentFunctionReturnType ( ) const

◆ getDefaultFPMathTag()

MDNode* llvm::IRBuilderBase::getDefaultFPMathTag ( ) const
inline

Get the floating point math metadata being used.

Definition at line 208 of file IRBuilder.h.

◆ getDoubleTy()

Type* llvm::IRBuilderBase::getDoubleTy ( )
inline

Fetch the type representing a 64-bit floating point value.

Definition at line 375 of file IRBuilder.h.

References llvm::Type::getDoubleTy().

Referenced by optimizeDoubleFP().

◆ getFalse()

ConstantInt* llvm::IRBuilderBase::getFalse ( )
inline

◆ getFastMathFlags()

FastMathFlags llvm::IRBuilderBase::getFastMathFlags ( ) const
inline

Get the flags to be applied to created floating point ops.

Definition at line 211 of file IRBuilder.h.

Referenced by getMulHu().

◆ getFloatTy()

Type* llvm::IRBuilderBase::getFloatTy ( )
inline

Fetch the type representing a 32-bit floating point value.

Definition at line 370 of file IRBuilder.h.

References llvm::Type::getFloatTy().

Referenced by getMulHu(), and optimizeDoubleFP().

◆ getHalfTy()

Type* llvm::IRBuilderBase::getHalfTy ( )
inline

Fetch the type representing a 16-bit floating point value.

Definition at line 365 of file IRBuilder.h.

References llvm::Type::getHalfTy().

◆ GetInsertBlock()

BasicBlock* llvm::IRBuilderBase::GetInsertBlock ( ) const
inline

Definition at line 121 of file IRBuilder.h.

Referenced by callIntrinsic(), canTransformToMemCmp(), llvm::SanitizerStatReport::create(), createCallHelper(), CreateFAddReduce(), createFFSIntrinsic(), CreateFMulReduce(), CreateGCStatepointCallCommon(), CreateGCStatepointInvokeCommon(), llvm::createHWAddressSanitizerPass(), createInvokeHelper(), createPopcntIntrinsic(), llvm::AArch64TargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(), llvm::emitBinaryFloatFnCall(), llvm::emitCalloc(), llvm::emitFGetCUnlocked(), llvm::emitFGetSUnlocked(), llvm::emitFPutC(), llvm::emitFPutCUnlocked(), llvm::emitFPutS(), llvm::emitFPutSUnlocked(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::emitMalloc(), 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::PPCTargetLowering::emitTrailingFence(), emitUnaryFloatFnCallHelper(), generateUnsignedDivisionCode(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), llvm::TargetLoweringBase::getIRStackGuard(), getReductionIntrinsic(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), insertSinCosCall(), isKnownTypeIdMember(), isReportingError(), llvm::ARMTargetLowering::makeDMB(), performMaskedAtomicOp(), RetagMask(), and UseTlsOffset().

◆ GetInsertPoint()

BasicBlock::iterator llvm::IRBuilderBase::GetInsertPoint ( ) const
inline

◆ getInt()

ConstantInt* llvm::IRBuilderBase::getInt ( const APInt AI)
inline

Get a constant integer value.

Definition at line 323 of file IRBuilder.h.

References llvm::ConstantInt::get().

Referenced by canTransformToMemCmp().

◆ getInt1()

ConstantInt* llvm::IRBuilderBase::getInt1 ( bool  V)
inline

Get a constant value representing either true or false.

Definition at line 282 of file IRBuilder.h.

References llvm::ConstantInt::get().

Referenced by llvm::createBitMaskForGaps(), CreateMemCpy(), CreateMemMove(), and CreateMemSet().

◆ getInt128Ty()

IntegerType* llvm::IRBuilderBase::getInt128Ty ( )
inline

Fetch the type representing a 128-bit integer.

Definition at line 357 of file IRBuilder.h.

References llvm::Type::getInt128Ty().

◆ getInt16()

ConstantInt* llvm::IRBuilderBase::getInt16 ( uint16_t  C)
inline

Get a constant 16-bit value.

Definition at line 302 of file IRBuilder.h.

References llvm::ConstantInt::get().

◆ getInt16Ty()

IntegerType* llvm::IRBuilderBase::getInt16Ty ( )
inline

Fetch the type representing a 16-bit integer.

Definition at line 342 of file IRBuilder.h.

References llvm::Type::getInt16Ty().

◆ getInt1Ty()

IntegerType* llvm::IRBuilderBase::getInt1Ty ( )
inline

Fetch the type representing a single bit.

Definition at line 332 of file IRBuilder.h.

References llvm::Type::getInt1Ty().

Referenced by CreateAssumption(), EmitX86ScalarSelect(), getX86MaskVec(), simplifyX86round(), and upgradeMaskedCompare().

◆ getInt32()

ConstantInt* llvm::IRBuilderBase::getInt32 ( uint32_t  C)
inline

Get a constant 32-bit value.

Definition at line 307 of file IRBuilder.h.

References llvm::ConstantInt::get().

Referenced by CreateElementUnorderedAtomicMemCpy(), CreateElementUnorderedAtomicMemMove(), CreateElementUnorderedAtomicMemSet(), CreateGCRelocate(), CreateGCRelocates(), llvm::createInterleaveMask(), CreateMaskedGather(), CreateMaskedLoad(), CreateMaskedScatter(), CreateMaskedStore(), createOrdering(), createRdxShuffleMask(), llvm::createReplicatedMask(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::VPBranchOnMaskRecipe::execute(), llvm::VPBasicBlock::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixReduction(), foldVecTruncToExtElt(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), getIntrinsicForMaskedAtomicRMWBinOp32(), getMulHu(), llvm::InnerLoopVectorizer::getOrCreateScalarValue(), llvm::getOrderedReduction(), getOrInsertGlobal(), getScalarIntrinsicDeclaration(), llvm::getShuffleReduction(), getSignature(), getStatepointArgs(), getSuccState(), INITIALIZE_PASS(), insertSinCosCall(), instrumentMaskedLoadOrStore(), instrumentOneFunc(), isIndirectBrTarget(), isReportingError(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::makeDMB(), optimizeIntegerToVectorInsertions(), llvm::InnerLoopVectorizer::packScalarIntoVectorValue(), llvm::InnerLoopVectorizer::reverseVector(), shouldKeepInEntry(), simplifyAllocaArraySize(), switchToSelect(), TypeSizeToSizeIndex(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), and llvm::InnerLoopVectorizer::vectorizeMemoryInstruction().

◆ getInt32Ty()

IntegerType* llvm::IRBuilderBase::getInt32Ty ( )
inline

◆ getInt64()

ConstantInt* llvm::IRBuilderBase::getInt64 ( uint64_t  C)
inline

◆ getInt64Ty()

IntegerType* llvm::IRBuilderBase::getInt64Ty ( )
inline

◆ getInt8()

ConstantInt* llvm::IRBuilderBase::getInt8 ( uint8_t  C)
inline

Get a constant 8-bit value.

Definition at line 297 of file IRBuilder.h.

References llvm::ConstantInt::get().

Referenced by canTransformToMemCmp(), convert_i1_to_i8(), createResumeEntryBlock(), isReportingError(), and shouldKeepInEntry().

◆ getInt8PtrTy()

PointerType* llvm::IRBuilderBase::getInt8PtrTy ( unsigned  AddrSpace = 0)
inline

◆ getInt8Ty()

IntegerType* llvm::IRBuilderBase::getInt8Ty ( )
inline

◆ getIntN()

ConstantInt* llvm::IRBuilderBase::getIntN ( unsigned  N,
uint64_t  C 
)
inline

Get a constant N-bit value, zero extended or truncated from a 64-bit value.

Definition at line 318 of file IRBuilder.h.

References llvm::ConstantInt::get().

Referenced by canTransformToMemCmp().

◆ getIntNTy()

IntegerType* llvm::IRBuilderBase::getIntNTy ( unsigned  N)
inline

Fetch the type representing an N-bit integer.

Definition at line 360 of file IRBuilder.h.

References llvm::Type::getIntNTy().

Referenced by ApplyX86MaskOn1BitsVec(), getMulHu(), getOrInsertGlobal(), simplifyX86round(), and TypeSizeToSizeIndex().

◆ getIntPtrTy()

IntegerType* llvm::IRBuilderBase::getIntPtrTy ( const DataLayout DL,
unsigned  AddrSpace = 0 
)
inline

Fetch the type representing a pointer to an integer value.

Definition at line 390 of file IRBuilder.h.

References llvm::DataLayout::getIntPtrType().

Referenced by llvm::SanitizerStatReport::create(), llvm::createHWAddressSanitizerPass(), getOrInsertGlobal(), and mayLoopAccessLocation().

◆ getTrue()

ConstantInt* llvm::IRBuilderBase::getTrue ( )
inline

◆ getVoidTy()

Type* llvm::IRBuilderBase::getVoidTy ( )
inline

◆ restoreIP()

void llvm::IRBuilderBase::restoreIP ( InsertPoint  IP)
inline

◆ saveAndClearIP()

InsertPoint llvm::IRBuilderBase::saveAndClearIP ( )
inline

Returns the current insert point, clearing it in the process.

Definition at line 193 of file IRBuilder.h.

◆ saveIP()

InsertPoint llvm::IRBuilderBase::saveIP ( ) const
inline

Returns the current insert point.

Definition at line 188 of file IRBuilder.h.

Referenced by llvm::InnerLoopVectorizer::getOrCreateVectorValue().

◆ SetCurrentDebugLocation()

void llvm::IRBuilderBase::SetCurrentDebugLocation ( DebugLoc  L)
inline

◆ setDefaultFPMathTag()

void llvm::IRBuilderBase::setDefaultFPMathTag ( MDNode FPMathTag)
inline

Set the floating point math metadata to be used.

Definition at line 217 of file IRBuilder.h.

◆ setFastMathFlags()

void llvm::IRBuilderBase::setFastMathFlags ( FastMathFlags  NewFMF)
inline

◆ SetInsertPoint() [1/3]

void llvm::IRBuilderBase::SetInsertPoint ( BasicBlock TheBB)
inline

This specifies that created instructions should be appended to the end of the specified block.

Definition at line 127 of file IRBuilder.h.

References llvm::BasicBlock::end().

Referenced by canTransformToMemCmp(), combineLoadToOperationType(), llvm::ObjectSizeOffsetEvaluator::compute(), llvm::createEfficiencySanitizerPass(), createFFSIntrinsic(), createRdxShuffleMask(), createResumeEntryBlock(), createRetPHINode(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), despeculateCountZeros(), eraseDeadBBsAndChildren(), llvm::VPBasicBlock::execute(), llvm::VPlan::execute(), FitWeights(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixLCSSAPHIs(), llvm::InnerLoopVectorizer::fixNonInductionPHIs(), llvm::InnerLoopVectorizer::fixReduction(), llvm::AMDGPULibCalls::fold(), FoldTwoEntryPHINode(), generatedUnsignedRemainderCode(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::InnerLoopVectorizer::getBroadcastInstrs(), llvm::InnerLoopVectorizer::getOrCreateVectorValue(), getScalarIntrinsicDeclaration(), getSignature(), handleFinalSuspend(), insertSinCosCall(), instrumentMaskedLoadOrStore(), isCallPromotable(), isKnownTypeIdMember(), isLoopInvariant(), isReInterleaveMask(), lowerSubFn(), makeStatepointExplicitImpl(), mayLoopAccessLocation(), llvm::EscapeEnumerator::Next(), performMaskedAtomicOp(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), ReduceSwitchRange(), removeBitcastsFromLoadStoreOnMinMax(), removeUndefIntroducingPredecessor(), RetagMask(), llvm::LoopPredicationPass::run(), setInsertionPoint(), llvm::SCEVExpander::setInsertPoint(), shouldKeepInEntry(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToTwoReturns(), SimplifyIndirectBrOnSelect(), splitMergedValStore(), StackMallocSizeClass(), SwitchToLookupTable(), switchToSelect(), TypeSizeToSizeIndex(), llvm::UpgradeIntrinsicCall(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().

◆ SetInsertPoint() [2/3]

void llvm::IRBuilderBase::SetInsertPoint ( Instruction I)
inline

This specifies that created instructions should be inserted before the specified instruction.

Definition at line 134 of file IRBuilder.h.

References assert(), llvm::BasicBlock::end(), llvm::Instruction::getDebugLoc(), llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::Instruction::getParent().

◆ SetInsertPoint() [3/3]

void llvm::IRBuilderBase::SetInsertPoint ( BasicBlock TheBB,
BasicBlock::iterator  IP 
)
inline

This specifies that created instructions should be inserted at the specified point.

Definition at line 143 of file IRBuilder.h.

References llvm::BasicBlock::end().

◆ SetInstDebugLocation()

void llvm::IRBuilderBase::SetInstDebugLocation ( Instruction I) const
inline

If this builder has a current debug location, set it on the specified instruction.

Definition at line 158 of file IRBuilder.h.

References llvm::Instruction::setDebugLoc().

Referenced by createCallHelper(), createInvokeHelper(), and getCurrentFunctionReturnType().

Member Data Documentation

◆ BB

BasicBlock* llvm::IRBuilderBase::BB
protected

◆ Context

LLVMContext& llvm::IRBuilderBase::Context
protected

Definition at line 95 of file IRBuilder.h.

Referenced by CreateGlobalString(), CreateMaskedGather(), and CreateMaskedScatter().

◆ DefaultFPMathTag

MDNode* llvm::IRBuilderBase::DefaultFPMathTag
protected

◆ DefaultOperandBundles

ArrayRef<OperandBundleDef> llvm::IRBuilderBase::DefaultOperandBundles
protected

Definition at line 100 of file IRBuilder.h.

◆ FMF

FastMathFlags llvm::IRBuilderBase::FMF
protected

◆ InsertPt

BasicBlock::iterator llvm::IRBuilderBase::InsertPt
protected

Definition at line 94 of file IRBuilder.h.

Referenced by getCurrentFunctionReturnType().


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