LLVM  14.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::Value Class Reference

LLVM Value Representation. More...

#include "llvm/IR/Value.h"

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

Public Types

enum  ValueTy
 Concrete subclass of this. More...
 
using use_iterator = use_iterator_impl< Use >
 
using const_use_iterator = use_iterator_impl< const Use >
 
using user_iterator = user_iterator_impl< User >
 
using const_user_iterator = user_iterator_impl< const User >
 

Public Member Functions

 Value (const Value &)=delete
 
Valueoperator= (const Value &)=delete
 
void deleteValue ()
 Delete a pointer to a generic Value. More...
 
void dump () const
 Support for debugging, callable in GDB: V->dump() More...
 
TypegetType () const
 All values are typed, get the type of this value. More...
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 Return a constant reference to the value's name. More...
 
void setName (const Twine &Name)
 Change the name of the value. More...
 
void takeName (Value *V)
 Transfer the name from V to this value. More...
 
std::string getNameOrAsOperand () const
 
void replaceAllUsesWith (Value *V)
 Change all uses of this to point to a new Value. More...
 
void replaceNonMetadataUsesWith (Value *V)
 Change non-metadata uses of this to point to a new Value. More...
 
void replaceUsesWithIf (Value *New, llvm::function_ref< bool(Use &U)> ShouldReplace)
 Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the given Use. More...
 
void replaceUsesOutsideBlock (Value *V, BasicBlock *BB)
 replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. More...
 
void assertModuleIsMaterializedImpl () const
 
void assertModuleIsMaterialized () const
 
bool use_empty () const
 
bool materialized_use_empty () const
 
use_iterator materialized_use_begin ()
 
const_use_iterator materialized_use_begin () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
iterator_range< use_iteratormaterialized_uses ()
 
iterator_range< const_use_iteratormaterialized_uses () const
 
iterator_range< use_iteratoruses ()
 
iterator_range< const_use_iteratoruses () const
 
bool user_empty () const
 
user_iterator materialized_user_begin ()
 
const_user_iterator materialized_user_begin () const
 
user_iterator user_begin ()
 
const_user_iterator user_begin () const
 
user_iterator user_end ()
 
const_user_iterator user_end () const
 
Useruser_back ()
 
const Useruser_back () const
 
iterator_range< user_iteratormaterialized_users ()
 
iterator_range< const_user_iteratormaterialized_users () const
 
iterator_range< user_iteratorusers ()
 
iterator_range< const_user_iteratorusers () const
 
bool hasOneUse () const
 Return true if there is exactly one use of this value. More...
 
bool hasNUses (unsigned N) const
 Return true if this Value has exactly N uses. More...
 
bool hasNUsesOrMore (unsigned N) const
 Return true if this value has N uses or more. More...
 
bool hasOneUser () const
 Return true if there is exactly one user of this value. More...
 
UsegetSingleUndroppableUse ()
 Return true if there is exactly one use of this value that cannot be dropped. More...
 
const UsegetSingleUndroppableUse () const
 
bool hasNUndroppableUses (unsigned N) const
 Return true if there this value. More...
 
bool hasNUndroppableUsesOrMore (unsigned N) const
 Return true if this value has N uses or more. More...
 
void dropDroppableUses (llvm::function_ref< bool(const Use *)> ShouldDrop=[](const Use *) { return true;})
 Remove every uses that can safely be removed. More...
 
void dropDroppableUsesIn (User &Usr)
 Remove every use of this value in User that can safely be removed. More...
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 Check if this value is used in the specified basic block. More...
 
unsigned getNumUses () const
 This method computes the number of uses of this Value. More...
 
void addUse (Use &U)
 This method should only be used by the Use class. More...
 
unsigned getValueID () const
 Return an ID for the concrete type of this object. More...
 
unsigned getRawSubclassOptionalData () const
 Return the raw optional flags value contained in this value. More...
 
void clearSubclassOptionalData ()
 Clear the optional flags contained in this value. More...
 
bool hasSameSubclassOptionalData (const Value *V) const
 Check the optional flags for equality. More...
 
bool hasValueHandle () const
 Return true if there is a value handle associated with this value. More...
 
bool isUsedByMetadata () const
 Return true if there is metadata referencing this value. More...
 
bool isTransitiveUsedByMetadataOnly () const
 
bool isSwiftError () const
 Return true if this value is a swifterror value. More...
 
const ValuestripPointerCasts () const
 Strip off pointer casts, all-zero GEPs and address space casts. More...
 
ValuestripPointerCasts ()
 
const ValuestripPointerCastsAndAliases () const
 Strip off pointer casts, all-zero GEPs, address space casts, and aliases. More...
 
ValuestripPointerCastsAndAliases ()
 
const ValuestripPointerCastsSameRepresentation () const
 Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same. More...
 
ValuestripPointerCastsSameRepresentation ()
 
const ValuestripPointerCastsForAliasAnalysis () const
 Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info. More...
 
ValuestripPointerCastsForAliasAnalysis ()
 
const ValuestripInBoundsConstantOffsets () const
 Strip off pointer casts and all-constant inbounds GEPs. More...
 
ValuestripInBoundsConstantOffsets ()
 
const ValuestripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, function_ref< bool(Value &Value, APInt &Offset)> ExternalAnalysis=nullptr) const
 Accumulate the constant offset this value has compared to a base pointer. More...
 
ValuestripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds)
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false. More...
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 
const ValuestripInBoundsOffsets (function_ref< void(const Value *)> Func=[](const Value *) {}) const
 Strip off pointer casts and inbounds GEPs. More...
 
ValuestripInBoundsOffsets (function_ref< void(const Value *)> Func=[](const Value *) {})
 
bool canBeFreed () const
 Return true if the memory object referred to by V can by freed in the scope for which the SSA value defining the allocation is statically defined. More...
 
uint64_t getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull, bool &CanBeFreed) const
 Returns the number of bytes known to be dereferenceable for the pointer value. More...
 
Align getPointerAlignment (const DataLayout &DL) const
 Returns an alignment of the pointer value. More...
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 Translate PHI node to its predecessor from the given basic block. More...
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
void mutateType (Type *Ty)
 Mutate the type of this Value to be of the specified type. More...
 
template<class Compare >
void sortUseList (Compare Cmp)
 Sort the use-list. More...
 
void reverseUseList ()
 Reverse the use-list. More...
 
void print (raw_ostream &O, bool IsForDebug=false) const
 Implement operator<< on Value. More...
 
void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const
 
void printAsOperand (raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const
 Print the name of this Value out to the specified raw_ostream. More...
 
void printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const
 

Static Public Member Functions

static void dropDroppableUse (Use &U)
 Remove the droppable use U. More...
 

Static Public Attributes

static const unsigned MaxAlignmentExponent = 29
 The maximum alignment for instructions. More...
 
static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent
 

Protected Types

enum  : unsigned { NumUserOperandsBits = 27 }
 The number of operands in the subclass. More...
 

Protected Member Functions

 Value (Type *Ty, unsigned scid)
 
 ~Value ()
 Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. More...
 
void getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * >> &MDs) const
 Appends all metadata attached to this value to MDs, sorting by KindID. More...
 
bool hasMetadata () const
 Return true if this value has any metadata attached to it. More...
 
bool eraseMetadata (unsigned KindID)
 Erase all metadata attachments with the given kind. More...
 
void clearMetadata ()
 Erase all metadata attached to this Value. More...
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
MDNodegetMetadata (unsigned KindID) const
 Get the current metadata attachments for the given kind, if any. More...
 
MDNodegetMetadata (StringRef Kind) const
 
void getMetadata (unsigned KindID, SmallVectorImpl< MDNode * > &MDs) const
 Appends all attachments with the given ID to MDs in insertion order. More...
 
void getMetadata (StringRef Kind, SmallVectorImpl< MDNode * > &MDs) const
 
bool hasMetadata (unsigned KindID) const
 Return true if this value has the given type of metadata attached. More...
 
bool hasMetadata (StringRef Kind) const
 
void setMetadata (unsigned KindID, MDNode *Node)
 Set a particular kind of metadata attachment. More...
 
void setMetadata (StringRef Kind, MDNode *Node)
 
void addMetadata (unsigned KindID, MDNode &MD)
 Add a metadata attachment. More...
 
void addMetadata (StringRef Kind, MDNode &MD)
 

Protected Attributes

unsigned char SubclassOptionalData: 7
 Hold subclass data that can be dropped. More...
 
unsigned NumUserOperands: NumUserOperandsBits
 
unsigned IsUsedByMD: 1
 
unsigned HasName: 1
 
unsigned HasMetadata: 1
 
unsigned HasHungOffUses: 1
 
unsigned HasDescriptor: 1
 

Friends

class ValueAsMetadata
 
class ValueHandleBase
 

Detailed Description

LLVM Value Representation.

This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table.

Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/IR/ValueHandle.h for details.

Definition at line 75 of file Value.h.

Member Typedef Documentation

◆ const_use_iterator

using llvm::Value::const_use_iterator = use_iterator_impl<const Use>

Definition at line 355 of file Value.h.

◆ const_user_iterator

using llvm::Value::const_user_iterator = user_iterator_impl<const User>

Definition at line 392 of file Value.h.

◆ use_iterator

using llvm::Value::use_iterator = use_iterator_impl<Use>

Definition at line 354 of file Value.h.

◆ user_iterator

using llvm::Value::user_iterator = user_iterator_impl<User>

Definition at line 391 of file Value.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned
protected

The number of operands in the subclass.

This member is defined by this class, but not used for anything. Subclasses can use it to store their number of operands, if they have any.

This is stored here to save space in User on 64-bit hosts. Since most instances of Value have operands, 32-bit hosts aren't significantly affected.

Note, this should NOT be used directly by any class other than User. User uses this value to find the Use list.

Enumerator
NumUserOperandsBits 

Definition at line 114 of file Value.h.

◆ ValueTy

Concrete subclass of this.

An enumeration for keeping track of the concrete subclass of Value that is actually instantiated. Values of this enumeration are kept in the Value classes SubclassID field. They are used for concrete type identification.

Definition at line 510 of file Value.h.

Constructor & Destructor Documentation

◆ Value() [1/2]

Value::Value ( Type Ty,
unsigned  scid 
)
protected

◆ ~Value()

Value::~Value ( )
protected

Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID.

As a size optimization, the destructor has been protected, and the caller should manually call deleteValue.

Definition at line 76 of file Value.cpp.

References assert(), clearMetadata(), llvm::dbgs(), getName(), llvm::ValueAsMetadata::handleDeletion(), HasMetadata, isUsedByMetadata(), materialized_use_empty(), users(), and llvm::ValueHandleBase::ValueIsDeleted().

◆ Value() [2/2]

llvm::Value::Value ( const Value )
delete

Member Function Documentation

◆ addMetadata() [1/2]

void Value::addMetadata ( StringRef  Kind,
MDNode MD 
)
protected

Definition at line 1275 of file Metadata.cpp.

References addMetadata(), and getContext().

◆ addMetadata() [2/2]

void Value::addMetadata ( unsigned  KindID,
MDNode MD 
)
protected

◆ addUse()

void llvm::Value::addUse ( Use U)
inline

This method should only be used by the Use class.

Definition at line 502 of file Value.h.

Referenced by llvm::Use::set().

◆ assertModuleIsMaterialized()

void llvm::Value::assertModuleIsMaterialized ( ) const
inline

Definition at line 339 of file Value.h.

References assertModuleIsMaterializedImpl().

Referenced by use_begin(), use_empty(), user_back(), user_begin(), user_empty(), users(), and uses().

◆ assertModuleIsMaterializedImpl()

void Value::assertModuleIsMaterializedImpl ( ) const

Definition at line 442 of file Value.cpp.

References assert(), llvm::GlobalValue::getParent(), and M.

Referenced by assertModuleIsMaterialized().

◆ canBeFreed()

bool Value::canBeFreed ( ) const

Return true if the memory object referred to by V can by freed in the scope for which the SSA value defining the allocation is statically defined.

E.g. deallocation after the static scope of a value does not count, but a deallocation before that does.

Definition at line 768 of file Value.cpp.

References assert(), F, getType(), and I.

Referenced by getPointerDereferenceableBytes(), and isDereferenceableAndAlignedPointer().

◆ clearMetadata()

void Value::clearMetadata ( )
protected

◆ clearSubclassOptionalData()

void llvm::Value::clearSubclassOptionalData ( )
inline

Clear the optional flags contained in this value.

Definition at line 541 of file Value.h.

References SubclassOptionalData.

◆ deleteValue()

void Value::deleteValue ( )

◆ DoPHITranslation() [1/2]

Value* llvm::Value::DoPHITranslation ( const BasicBlock CurBB,
const BasicBlock PredBB 
)
inline

Definition at line 775 of file Value.h.

References DoPHITranslation().

◆ DoPHITranslation() [2/2]

const Value * Value::DoPHITranslation ( const BasicBlock CurBB,
const BasicBlock PredBB 
) const

Translate PHI node to its predecessor from the given basic block.

If this value is a PHI node with CurBB as its parent, return the value in the PHI node corresponding to PredBB. If not, return ourself. This is useful if you want to know the value something has in a predecessor block.

Definition at line 971 of file Value.cpp.

Referenced by llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), DoPHITranslation(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldOpIntoPhi(), and llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad().

◆ dropDroppableUse()

void Value::dropDroppableUse ( Use U)
static

◆ dropDroppableUses()

void Value::dropDroppableUses ( llvm::function_ref< bool(const Use *)>  ShouldDrop = [](const Use *) { return true; })

Remove every uses that can safely be removed.

This will remove for example uses in llvm.assume. This should be used when performing want to perform a tranformation but some Droppable uses pervent it. This function optionally takes a filter to only remove some droppable uses.

Definition at line 187 of file Value.cpp.

References dropDroppableUse(), and uses().

◆ dropDroppableUsesIn()

void Value::dropDroppableUsesIn ( User Usr)

Remove every use of this value in User that can safely be removed.

Definition at line 197 of file Value.cpp.

References assert(), dropDroppableUse(), llvm::User::isDroppable(), and llvm::User::operands().

◆ dump()

LLVM_DUMP_METHOD void Value::dump ( ) const

Support for debugging, callable in GDB: V->dump()

Definition at line 4754 of file AsmWriter.cpp.

References llvm::dbgs(), and print().

Referenced by CanWidenIV(), checkIVUsers(), checkPHIs(), DoFlattenLoopPair(), llvm::DbgValueLocEntry::dump(), findLoopComponents(), and sinkAndCmp0Expression().

◆ eraseMetadata()

bool Value::eraseMetadata ( unsigned  KindID)
protected

Erase all metadata attachments with the given kind.

Returns
true if any metadata was removed.

Definition at line 1279 of file Metadata.cpp.

References clearMetadata(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, llvm::SPII::Store, and llvm::LLVMContextImpl::ValueMetadata.

Referenced by llvm::GlobalObject::setVCallVisibilityMetadata().

◆ getAllMetadata()

void Value::getAllMetadata ( SmallVectorImpl< std::pair< unsigned, MDNode * >> &  MDs) const
protected

Appends all metadata attached to this value to MDs, sorting by KindID.

The first element of each pair returned is the KindID, the second element is the metadata value. Attachments with the same ID appear in insertion order.

Definition at line 1223 of file Metadata.cpp.

References assert(), getContext(), hasMetadata(), Info, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.

Referenced by llvm::Instruction::getAllMetadataOtherThanDebugLoc().

◆ getContext()

LLVMContext & Value::getContext ( ) const

All values hold a context through their type.

Definition at line 979 of file Value.cpp.

References llvm::Type::getContext().

Referenced by llvm::Instruction::addAnnotationMetadata(), llvm::GlobalVariable::addAttribute(), llvm::CallBase::addAttribute(), llvm::CallBase::addDereferenceableAttr(), llvm::CallBase::addDereferenceableOrNullAttr(), addMetadata(), llvm::CallBase::addParamAttr(), llvm::addRuntimeChecks(), llvm::GlobalObject::addTypeMetadata(), llvm::DbgVariableIntrinsic::addVariableLocationOps(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), annotateDereferenceableBytes(), llvm::SelectInst::areInvalidOperands(), BitCastConstantVector(), clearMetadata(), llvm::FenceInst::cloneImpl(), llvm::UnreachableInst::cloneImpl(), collectInsertionElements(), llvm::ComputeMultiple(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computeRecurrenceType(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), convertTo16Bit(), llvm::GlobalObject::copyMetadata(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(), llvm::ARMConstantPoolConstant::Create(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), llvm::createCallMatchingInvoke(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), llvm::InstCombiner::CreateNonTerminatorUnreachable(), llvm::InstCombinerImpl::CreateNonTerminatorUnreachable(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), CreatePrologue(), despeculateCountZeros(), llvm::Instruction::dropUnknownNonDebugMetadata(), eraseMetadata(), evaluateInDifferentElementOrder(), expandBounds(), extractMDNode(), llvm::FindDbgAddrUses(), llvm::findDbgUsers(), llvm::findDbgValues(), findLoopComponents(), fixupBranchWeights(), foldCtpop(), foldCttzCtlz(), foldInsSequenceIntoSplat(), genLoopLimit(), llvm::ValueAsMetadata::get(), llvm::DSOLocalEquivalent::get(), getAllMetadata(), getAsConstantIndexedAddress(), llvm::GlobalVariable::getAttributesAsList(), getBoundsCheckCond(), llvm::LazyValueInfo::getConstant(), llvm::LazyValueInfo::getConstantOnEdge(), llvm::ValueAsMetadata::getContext(), getDebugValueLoc(), getEdgeValueLocal(), llvm::ConstantDataSequential::getElementAsConstant(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getICmp(), llvm::ValueAsMetadata::getIfExists(), llvm::ConstantExpr::getInsertElement(), llvm::ConstantExpr::getInsertValue(), getMemCmpLoad(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMetadata(), llvm::getObjectSize(), getOffsetFromIndices(), llvm::GlobalValue::getPartition(), getPoisonFor(), llvm::FastISel::getRegForValue(), llvm::ConstantDataVector::getSplat(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::ConstantStruct::getTypeForElements(), getValueName(), handleBrSelExpect(), handleSwitchExpect(), llvm::InlineFunction(), inlineRetainOrClaimRVCalls(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVEDup(), instCombineSVELast(), instCombineSVEPTest(), instCombineSVETBL(), instCombineSVEVectorMul(), llvm::isBytewiseValue(), isLoadCombineCandidateImpl(), isLoadInvariantInLoop(), LLVMGetOperand(), lookThroughAnd(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerSubFn(), llvm::makeGuardControlFlowExplicit(), makeStatepointExplicitImpl(), AAHeapToStackFunction::manifest(), AAMemoryBehaviorImpl::manifest(), llvm::IRAttributeManifest::manifestAttrs(), llvm::MergeBasicBlockIntoOnlyPred(), mergeInlinedArrayAllocas(), narrowSDivOrSRem(), llvm::Negator::Negate(), OptimizeGlobalAddressOfMalloc(), optimizeMemCmpConstantSize(), OptimizeNoopCopyExpression(), llvm::CallBase::populateBundleOperandInfos(), processAbsIntrinsic(), processCallSite(), processUDivOrURem(), processUGT_ADDCST_ADD(), llvm::pgo::promoteIndirectCall(), llvm::CallBase::removeAttribute(), llvm::CallBase::removeAttributes(), llvm::IRPosition::removeAttrs(), llvm::ValueHandleBase::RemoveFromUseList(), llvm::CallBase::removeParamAttr(), llvm::CallBase::removeParamAttrs(), llvm::coro::replaceCoroFree(), llvm::replaceDbgValueForAlloca(), ReplaceFPIntrinsicWithCall(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), selectExplicitSectionGlobal(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setDestAlignment(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), SCEVDbgValueBuilder::setFinalExpression(), llvm::setInlineRemark(), llvm::setLoopEstimatedTripCount(), llvm::GlobalValue::setPartition(), llvm::DbgVariableIntrinsic::setRawLocation(), llvm::NoAliasScopeDeclInst::setScopeList(), llvm::GlobalObject::setSection(), SCEVDbgValueBuilder::setShortFinalExpression(), setUsedInitializer(), setValueName(), llvm::GlobalObject::setVCallVisibilityMetadata(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), simplifyAMDGCNImageIntrinsic(), SimplifyICmpInst(), SimplifyRelativeLoad(), simplifyX86extrq(), splitGlobal(), llvm::SplitKnownCriticalEdge(), SRAGlobal(), TryToShrinkGlobalToBoolean(), turnGuardIntoBranch(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), updateBranchWeights(), llvm::CallInst::updateProfWeight(), llvm::UpgradeBitCastInst(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), llvm::ValueHandleBase::ValueIsDeleted(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPtrToInt(), and llvm::InstCombinerImpl::visitShuffleVectorInst().

◆ getMetadata() [1/4]

MDNode * Value::getMetadata ( StringRef  Kind) const
protected

◆ getMetadata() [2/4]

void Value::getMetadata ( StringRef  Kind,
SmallVectorImpl< MDNode * > &  MDs 
) const
protected

Definition at line 1218 of file Metadata.cpp.

References getContext(), getMetadata(), and hasMetadata().

◆ getMetadata() [3/4]

MDNode * Value::getMetadata ( unsigned  KindID) const
protected

Get the current metadata attachments for the given kind, if any.

These functions require that the value have at most a single attachment of the given kind, and return nullptr if such an attachment is missing.

Definition at line 1197 of file Metadata.cpp.

References assert(), getContext(), hasMetadata(), Info, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.

Referenced by llvm::GlobalVariable::getDebugInfo(), llvm::Function::getEntryCount(), llvm::Function::getImportGUIDs(), getMetadata(), llvm::Function::getSectionPrefix(), llvm::Function::getSubprogram(), llvm::GlobalObject::getVCallVisibility(), hasMetadata(), isReferencingMDNode(), and print().

◆ getMetadata() [4/4]

void Value::getMetadata ( unsigned  KindID,
SmallVectorImpl< MDNode * > &  MDs 
) const
protected

Appends all attachments with the given ID to MDs in insertion order.

If the Value has no attachments with the given ID, or if ID is invalid, leaves MDs unchanged.

Definition at line 1213 of file Metadata.cpp.

References getContext(), hasMetadata(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.

◆ getName()

StringRef Value::getName ( ) const

Return a constant reference to the value's name.

This guaranteed to return the same reference as long as the value is not modified. If the value has a name, this does a hashtable lookup, so it's not free.

Definition at line 297 of file Value.cpp.

References llvm::StringMapEntry< ValueTy >::getKey(), getValueName(), and hasName().

Referenced by AddAliasScopeMetadata(), addMappingsFromTLI(), llvm::DiagnosticInfoOptimizationBase::Argument::Argument(), llvm::WinException::beginFunction(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), calculateSEHStateNumbers(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), CanPropagatePredecessorsForPHIs(), llvm::changeToInvokeAndSplitBasicBlock(), checkVars(), WidenIV::cloneArithmeticIVUser(), WidenIV::cloneBitwiseIVUser(), llvm::orc::cloneGlobalAliasDecl(), llvm::orc::cloneGlobalVariableDecl(), llvm::JumpThreadingPass::cloneInstructions(), CloneInstructionsIntoPredecessorBlockAndUpdateSSAUses(), CloneLoopBlocks(), llvm::colorEHFunclets(), llvm::InstCombinerImpl::combineLoadToNewType(), compareNames(), llvm::DivergencePropagator::computeJoinPoints(), constructPointer(), llvm::convertToDeclaration(), llvm::BranchProbabilityInfo::copyEdgeProbabilities(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), llvm::CallBrInst::Create(), createCloneDeclaration(), llvm::OpenMPIRBuilder::createDynamicWorkshareLoop(), doPromotion(), llvm::DomTreeUpdater::dump(), llvm::JumpThreadingPass::duplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), llvm::orc::IRSpeculationLayer::emit(), llvm::ExecutionEngine::emitGlobals(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::emitLinkerFlagsForUsedCOFF(), llvm::AsmPrinter::emitSpecialLLVMGlobal(), llvm::VPBasicBlock::execute(), llvm::ExtractTypeInfo(), llvm::MustBeExecutedContextExplorer::findBackwardJoinPoint(), findBaseDefiningValueCached(), llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(), fixupDebugInfoPostExtraction(), FlattenLoopPair(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), FoldCondBranchOnPHI(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldOperationIntoSelectOperand(), llvm::InstCombinerImpl::foldPHIArgBinOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgExtractValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgGEPIntoPHI(), llvm::InstCombinerImpl::foldPHIArgInsertValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgZextsIntoPHI(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldSignedTruncationCheck(), FoldTwoEntryPHINode(), forceRenaming(), llvm::JITSymbolFlags::fromGlobalValue(), generateUnsignedDivisionCode(), llvm::ReplayInlineAdvisor::getAdviceImpl(), getBranchHint(), getCalledFunctionName(), llvm::DeadArgumentEliminationPass::RetOrArg::getDescription(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::MachineBasicBlock::getFullName(), llvm::GlobalValue::getGlobalIdentifier(), llvm::DOTGraphTraits< DOTFuncInfo * >::getGraphName(), llvm::DOTGraphTraits< DOTFuncMSSAInfo * >::getGraphName(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::ExecutionEngine::getMangledName(), getName(), llvm::MachineFunction::getName(), getNameOrAsOperand(), llvm::Mangler::getNameWithPrefix(), llvm::OpenMPIRBuilder::getOrCreateRuntimeFunction(), getVarName(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::InsertPreheaderForLoop(), llvm::InstCombinerImpl::insertRangeTest(), insertSpills(), insertUniqueBackedgeBlock(), llvm::InternalizePass::internalizeModule(), llvm::invertCondition(), llvm::isControlFlowEquivalent(), llvm::HexagonTargetObjectFile::isGlobalInSmallSection(), isInPartition(), isReportingError(), isSpecialLLVMGlobalArrayForStaticInit(), isSpecialLLVMGlobalArrayToSkip(), llvm::isTLIScalarize(), llvm::AMDGPULegalizerInfo::legalizeGlobalValue(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), llvm::AMDGPUTargetLowering::LowerGlobalAddress(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::IntrinsicLowering::LowerToByteSwap(), maybePrintComdat(), llvm::JumpThreadingPass::maybethreadThroughTwoBasicBlocks(), llvm::MergeBlockIntoPredecessor(), mergeConstants(), movePHIValuesToInsertedBlock(), nameOrNone(), narrowSDivOrSRem(), nearest_common_dominator(), NegateValue(), llvm::DiagnosticPrinterRawOStream::operator<<(), false::operator<<(), llvm::operator<<(), optimizeDivRem(), optimizeDoubleFP(), OptimizeGlobalAddressOfMalloc(), optimizeSQRT(), llvm::OptLevelChanger::OptLevelChanger(), llvm::peelLoop(), performBranchToCommonDestFolding(), populateWorklist(), llvm::ValueEnumerator::print(), llvm::ARMConstantPoolConstant::print(), llvm::CallGraphNode::print(), llvm::DiagnosticInfoUnsupported::print(), llvm::DivergencePropagator::printDefs(), llvm::BranchProbabilityInfo::printEdgeProbability(), llvm::MIRFormatter::printIRValue(), PrintLLVMName(), PrintLoopInfo(), processAbsIntrinsic(), processAShr(), processGlobal(), processInternalGlobal(), llvm::LoopVectorizePass::processLoop(), processLoopInVPlanNativePath(), processOverflowIntrinsic(), processSDiv(), processSExt(), processSRem(), processUDivOrURem(), llvm::promoteLoopAccessesToScalars(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::Function::recalculateIntrinsicID(), recoverFramePointer(), rename(), replace(), ReplaceCallWith(), replaceWithInvariantCond(), replaceWithTLIFunction(), rewritePHIsForCleanupPad(), RewriteUsesOfClonedInstructions(), llvm::ArgumentPromotionPass::run(), llvm::InlineCostAnnotationPrinterPass::run(), llvm::DDGAnalysisPrinterPass::run(), runAttributorOnFunctions(), llvm::runIPSCCP(), llvm::LPPassManager::runOnFunction(), llvm::DetectRoundChange::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::InnerLoopVectorizer::scalarizeInstruction(), selectExplicitSectionGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::BranchProbabilityInfo::setEdgeProbability(), llvm::AMDGPU::shouldLowerLDSToStruct(), simplifyAllocaArraySize(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyNvvmIntrinsic(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::splitBlockBefore(), SplitBlockImpl(), splitCallSite(), llvm::OutlinableRegion::splitCandidate(), splitGlobal(), llvm::SplitKnownCriticalEdge(), SplitLandingPadPredecessorsImpl(), SRAGlobal(), StripSymtab(), suffixed_name_or(), SwitchToLookupTable(), tailMergeBlocksWithSimilarFunctionTerminators(), llvm::JumpThreadingPass::threadEdge(), llvm::JumpThreadingPass::threadGuard(), llvm::JumpThreadingPass::threadThroughTwoBasicBlocks(), llvm::InstCombinerImpl::tryFactorization(), llvm::JumpThreadingPass::tryThreadEdge(), TryToShrinkGlobalToBoolean(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), AAPrivatizablePtrArgument::updateImpl(), UpdatePHINodes(), llvm::CallInst::updateProfWeight(), llvm::UpgradeGlobalVariable(), llvm::LoopVersioning::versionLoop(), llvm::Function::viewCFG(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::DivergencePropagator::visitEdge(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::DivergencePropagator::visitLoopExitEdge(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitZExt(), WidenIV::widenWithVariantUse(), llvm::OptLevelChanger::~OptLevelChanger(), and ~Value().

◆ getNameOrAsOperand()

std::string Value::getNameOrAsOperand ( ) const

Definition at line 431 of file Value.cpp.

References llvm::empty(), getName(), printAsOperand(), and llvm::raw_string_ostream::str().

Referenced by hoist(), and llvm::hoistRegion().

◆ getNumUses()

unsigned Value::getNumUses ( ) const

This method computes the number of uses of this Value.

This is a linear time operation. Use hasOneUse, hasNUses, or hasNUsesOrMore to check for specific values.

Definition at line 243 of file Value.cpp.

References use_begin(), and use_end().

Referenced by llvm::ValueEnumerator::print().

◆ getPointerAlignment()

Align Value::getPointerAlignment ( const DataLayout DL) const

◆ getPointerDereferenceableBytes()

uint64_t Value::getPointerDereferenceableBytes ( const DataLayout DL,
bool &  CanBeNull,
bool &  CanBeFreed 
) const

Returns the number of bytes known to be dereferenceable for the pointer value.

If CanBeNull is set by this function the pointer can either be null or be dereferenceable up to the returned number of bytes.

IF CanBeFreed is true, the pointer is known to be dereferenceable at point of definition only. Caller must prove that allocation is not deallocated between point of definition and use.

Definition at line 830 of file Value.cpp.

References assert(), canBeFreed(), DL, llvm::ConstantInt::getLimitedValue(), getType(), llvm::AttributeList::ReturnIndex, and UseDerefAtPointSemantics.

Referenced by convertBitCastToGEP(), getMinimalExtentFrom(), AANonNullImpl::initialize(), AADereferenceableImpl::initialize(), and isDereferenceableAndAlignedPointer().

◆ getRawSubclassOptionalData()

unsigned llvm::Value::getRawSubclassOptionalData ( ) const
inline

Return the raw optional flags value contained in this value.

This should only be used when testing two Values for equivalence.

Definition at line 536 of file Value.h.

References SubclassOptionalData.

Referenced by llvm::FunctionComparator::cmpOperations().

◆ getSingleUndroppableUse() [1/2]

Use * Value::getSingleUndroppableUse ( )

Return true if there is exactly one use of this value that cannot be dropped.

This is specialized because it is a common request and does not require traversing the whole use list.

Definition at line 167 of file Value.cpp.

References uses().

Referenced by getSingleUndroppableUse().

◆ getSingleUndroppableUse() [2/2]

const Use* llvm::Value::getSingleUndroppableUse ( ) const
inline

Definition at line 461 of file Value.h.

References getSingleUndroppableUse().

◆ getSubclassDataFromValue()

unsigned short llvm::Value::getSubclassDataFromValue ( ) const
inlineprotected

◆ getType()

Type* llvm::Value::getType ( ) const
inline

All values are typed, get the type of this value.

Definition at line 256 of file Value.h.

Referenced by AADereferenceableImpl::addAccessedBytesForUse(), addArgumentReturnedAttrs(), addAssumeNonNull(), llvm::SSAUpdater::AddAvailableValue(), addConditions(), AddNonNullPointer(), llvm::RecurrenceDescriptor::AddReductionVar(), addVariantDeclaration(), llvm::detail::PtrUseVisitorBase::adjustOffsetForGEP(), llvm::AMDGPUAAResult::alias(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), appendToGlobalArray(), ApplyX86MaskOn1BitsVec(), AAIsDeadValueImpl::areAllUsesAssumedDead(), areBothVectorOrScalar(), areExtractShuffleVectors(), llvm::SelectInst::areInvalidOperands(), areNonOverlapSameBaseLoadAndStore(), llvm::CanonicalLoopInfo::assertOK(), BatchCommitValueTo(), BitCastConstantVector(), BreakUpSubtract(), BuildConstantFromSCEV(), buildMultiplyTree(), llvm::InnerLoopVectorizer::buildScalarSteps(), canBeFreed(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canEvaluateSExtd(), canEvaluateShiftedShift(), canEvaluateTruncated(), canEvaluateZExtd(), CanFlattenLoopPair(), canonicalizeBitCastExtElt(), canonicalizeLowbitMask(), canSafelyConvertTo16Bit(), canScalarizeAccess(), canTryToConstantAddTwoShiftAmounts(), canVectorizeInst(), CanWidenIV(), llvm::castToCStr(), checkOffsetSize(), checkOverflow(), llvm::FPMathOperator::classof(), CleanupConstantGlobalUsers(), llvm::CloneAndPruneIntoFromInst(), cloneConstantExprWithNewAddressSpace(), llvm::LoadInst::cloneImpl(), llvm::VAArgInst::cloneImpl(), llvm::TruncInst::cloneImpl(), llvm::ZExtInst::cloneImpl(), llvm::SExtInst::cloneImpl(), llvm::FPTruncInst::cloneImpl(), llvm::FPExtInst::cloneImpl(), llvm::UIToFPInst::cloneImpl(), llvm::SIToFPInst::cloneImpl(), llvm::FPToUIInst::cloneImpl(), llvm::FPToSIInst::cloneImpl(), llvm::IntToPtrInst::cloneImpl(), llvm::PtrToIntInst::cloneImpl(), llvm::BitCastInst::cloneImpl(), llvm::AddrSpaceCastInst::cloneImpl(), llvm::JumpThreadingPass::cloneInstructions(), CloneLoopBlocks(), llvm::FunctionComparator::cmpBasicBlocks(), llvm::FunctionComparator::cmpConstants(), llvm::FunctionComparator::cmpOperations(), collectBitParts(), llvm::LoopVectorizationCostModel::collectInLoopReductions(), collectInsertionElements(), collectShuffleElements(), collectSingleShuffleElements(), llvm::InstCombinerImpl::combineLoadToNewType(), combineLoadToOperationType(), combineStoreToNewValue(), combineStoreToValueType(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), CompareValueComplexity(), llvm::ObjectSizeOffsetVisitor::compute(), llvm::ObjectSizeOffsetEvaluator::compute(), llvm::computeConstantRange(), computeKnownBits(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromAssume(), computeKnownBitsFromOperator(), computeLiveOutSeed(), llvm::ComputeMultiple(), ComputeNumSignBits(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedMul(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerICmp(), computeRecurrenceType(), concatenateTwoVectors(), llvm::concatenateVectors(), ConnectProlog(), llvm::ConstantAggregate::ConstantAggregate(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCastOperand(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldLoadThroughBitcast(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), ConstructLoadOperandConstant(), convertBitCastToGEP(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), convertTo16Bit(), convertValue(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(), llvm::BinaryOperator::Create(), llvm::GetElementPtrInst::Create(), llvm::MatrixBuilder< IRBuilderTy >::CreateAdd(), CreateAdd(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAlignmentAssumption(), llvm::IRBuilderBase::CreateAnd(), createAndInstr(), llvm::IRBuilderBase::CreateAShr(), llvm::IRBuilderBase::CreateAtomicRMW(), llvm::IRBuilderBase::CreateBinaryIntrinsic(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), llvm::IRBuilderBase::CreateBitOrPointerCast(), createCast(), llvm::IRBuilderBase::CreateCast(), createCmpXchgInstFun(), llvm::MatrixBuilder< IRBuilderTy >::CreateColumnMajorLoad(), llvm::IRBuilderBase::CreateConstrainedFPBinOp(), llvm::IRBuilderBase::CreateConstrainedFPCast(), llvm::IRBuilderBase::CreateConstrainedFPCmp(), llvm::FixedPointBuilder< IRBuilderTy >::CreateDiv(), llvm::OpenMPIRBuilder::createDynamicWorkshareLoop(), llvm::VPRecipeBuilder::createEdgeMask(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemCpy(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemSet(), llvm::MatrixBuilder< IRBuilderTy >::CreateExtractElement(), llvm::IRBuilderBase::CreateExtractVector(), llvm::IRBuilderBase::CreateFAddReduce(), createFFSIntrinsic(), llvm::FixedPointBuilder< IRBuilderTy >::CreateFloatingToFixed(), llvm::IRBuilderBase::CreateFMulReduce(), llvm::IRBuilderBase::CreateFPCast(), llvm::IRBuilderBase::CreateGCGetPointerBase(), llvm::IRBuilderBase::CreateGCGetPointerOffset(), CreateGCStatepointCallCommon(), CreateGCStatepointInvokeCommon(), llvm::IRBuilderBase::CreateGlobalString(), llvm::InnerLoopVectorizer::createInductionResumeValues(), llvm::IRBuilderBase::CreateInsertVector(), llvm::IRBuilderBase::CreateIntCast(), llvm::FixedPointBuilder< IRBuilderTy >::CreateIntegerToFixed(), llvm::IRBuilderBase::CreateInvariantStart(), llvm::IRBuilderBase::CreateLaunderInvariantGroup(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::IRBuilderBase::CreateLShr(), createMalloc(), llvm::IRBuilderBase::CreateMaskedGather(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::IRBuilderBase::CreateMaskedScatter(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::MatrixBuilder< IRBuilderTy >::CreateMatrixInsert(), llvm::MatrixBuilder< IRBuilderTy >::CreateMatrixMultiply(), llvm::IRBuilderBase::CreateMemCpyInline(), llvm::createMemCpyLoopKnownSize(), llvm::createMemCpyLoopUnknownSize(), llvm::IRBuilderBase::CreateMemMove(), createMemMoveLoop(), llvm::IRBuilderBase::CreateMemSet(), createMemSetLoop(), llvm::IRBuilderBase::CreateMemTransferInst(), CreateMul(), llvm::FixedPointBuilder< IRBuilderTy >::CreateMul(), CreateNeg(), llvm::BinaryOperator::CreateNeg(), llvm::BinaryOperator::CreateNot(), llvm::BinaryOperator::CreateNSWNeg(), llvm::BinaryOperator::CreateNUWNeg(), llvm::OpenMPIRBuilder::createOffloadMapnames(), llvm::OpenMPIRBuilder::createOffloadMaptypes(), llvm::IRBuilderBase::CreateOr(), createOverflowTuple(), llvm::createPGOFuncNameVar(), llvm::IRBuilderBase::CreatePointerBitCastOrAddrSpaceCast(), llvm::IRBuilderBase::CreatePointerCast(), createPopcntIntrinsic(), createPowWithIntegerExponent(), llvm::createPrivateGlobalForString(), createPrivateNonConstGlobalForString(), createProfileFileNameVar(), llvm::createProfileFileNameVar(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::OpenMPIRBuilder::createReductions(), llvm::FunctionLoweringInfo::CreateRegs(), createRetPHINode(), llvm::MatrixBuilder< IRBuilderTy >::CreateScalarDiv(), llvm::MatrixBuilder< IRBuilderTy >::CreateScalarMultiply(), llvm::IRBuilderBase::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::Attributor::createShallowWrapper(), createShiftShuffle(), llvm::FixedPointBuilder< IRBuilderTy >::CreateShl(), llvm::IRBuilderBase::CreateShl(), llvm::FixedPointBuilder< IRBuilderTy >::CreateShr(), llvm::IRBuilderBase::CreateShuffleVector(), llvm::createSimpleTargetReduction(), llvm::OpenMPIRBuilder::createStaticWorkshareLoop(), createStepForVF(), llvm::IRBuilderBase::CreateStripInvariantGroup(), llvm::MatrixBuilder< IRBuilderTy >::CreateSub(), llvm::OpenMPIRBuilder::createTargetInit(), createTileStore(), CreateTripRemainder(), llvm::IRBuilderBase::CreateTruncOrBitCast(), llvm::IRBuilderBase::CreateUnaryIntrinsic(), llvm::IRBuilderBase::CreateVectorReverse(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::IRBuilderBase::CreateVectorSplice(), llvm::IRBuilderBase::CreateVScale(), createWrapper(), llvm::IRBuilderBase::CreateXor(), llvm::IRBuilderBase::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrTrunc(), decomposeSimpleLinearExpr(), llvm::InstCombinerImpl::Descale(), despeculateCountZeros(), detectShiftUntilBitTestIdiom(), DoFlattenLoopPair(), doPromotion(), dropDroppableUse(), dropRedundantMaskingOfLeftShiftInput(), llvm::EmbedBitcodeInModule(), llvm::emitBinaryFloatFnCall(), emitBinaryFloatFnCallHelper(), llvm::AsmPrinter::emitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::InnerLoopVectorizer::emitMinimumIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitMinimumIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), emitSetSwiftErrorValue(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::emitStpNCpy(), llvm::emitStrNCpy(), EmitX86Select(), llvm::ARMAsmPrinter::emitXXStructor(), ensureValueAvailableInSuccessor(), evaluateBitcastFromPtr(), EvaluateExpression(), evaluateFCmpRelation(), llvm::Evaluator::EvaluateFunction(), evaluateGEPOffsetExpression(), evaluateICmpRelation(), evaluateInDifferentElementOrder(), EvaluateStoreInto(), llvm::VPReductionPHIRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPlan::execute(), llvm::expandAtomicRMWToCmpXchg(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), ExtractConstantBytes(), extractInteger(), extractIntPart(), extractMaskedValue(), extractValues(), extractVector(), llvm::AArch64TargetLowering::fallBackToDAGISel(), findCommonType(), findCostForOutputBlocks(), findDemandedEltsByAllUsers(), findDemandedEltsBySingleUser(), findExtractedInputToOverallInputMapping(), llvm::FindInsertedValue(), FindLoopCounter(), llvm::findScalarElement(), llvm::InnerLoopVectorizer::fixReduction(), fixupFPReturnAndCall(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::BinOpInit::Fold(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), FoldBitCast(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::FoldBranchToCommonDest(), foldClampRangeOfTwo(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldGEPICmp(), foldGEPOfGEP(), foldGuardedFunnelShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldICmpShlOne(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithCastOp(), foldICmpWithHighBitMask(), foldIdentityShuffles(), foldInsEltIntoSplat(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldIsPowerOf2(), llvm::InstCombinerImpl::foldItoFPtoI(), foldLogicCastConstant(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgBinOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgGEPIntoPHI(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgZextsIntoPHI(), foldSelectBinOpIdentity(), foldSelectICmpAnd(), foldSelectICmpAndOr(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSetClearBits(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShuffleWithInsert(), foldSignedTruncationCheck(), FoldTwoEntryPHINode(), foldUDivShl(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), fpModeMatchesGlobalFPAtomicMode(), llvm::CFLSteensAAResult::FunctionInfo::FunctionInfo(), generateCreationChecks(), generateCreationChecksForBinOp(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), genericValueTraversal(), genLoopLimit(), llvm::MemoryLocation::get(), llvm::ConstantVector::get(), llvm::ConstantExpr::get(), getAccessType(), llvm::GCStatepointInst::getActualReturnType(), getAddressForMemoryInput(), llvm::IntToPtrInst::getAddressSpace(), llvm::SITargetLowering::getAddrModeArguments(), getAdjustedPtr(), llvm::Constant::getAggregateElement(), getAISize(), getAlternateBinop(), GetAnyNonZeroConstInt(), getAsConstantIndexedAddress(), llvm::ConstantExpr::getAsInstruction(), llvm::IRPosition::getAssociatedType(), llvm::AMDGPUTargetMachine::getAssumedAddrSpace(), getAtomicOpSize(), getAvailableLoadStore(), getBaseType(), getBoolVecFromMask(), getBoundsCheckCond(), getBranchCondString(), llvm::CastInst::getCastOpcode(), getCodeAddrSpace(), llvm::ConstantExpr::getCompare(), GetConstantInt(), llvm::VNCoercion::getConstantLoadValueForLoad(), llvm::LazyValueInfo::getConstantRange(), llvm::LazyValueInfo::getConstantRangeOnEdge(), llvm::ExecutionEngine::getConstantValue(), llvm::PredicateBase::getConstraint(), llvm::BasicBlock::getContext(), llvm::VPIntrinsic::getDeclarationForParams(), llvm::Argument::getDereferenceableBytes(), llvm::Argument::getDereferenceableOrNullBytes(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::getDestAddressSpace(), llvm::AddrSpaceCastOperator::getDestAddressSpace(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::BitCastOperator::getDestTy(), getEdgeValueLocal(), llvm::ConstantAggregateZero::getElementCount(), llvm::OpenMPIRBuilder::ReductionInfo::getElementType(), llvm::ConstantDataSequential::getElementType(), llvm::ConstantAggregateZero::getElementValue(), llvm::UndefValue::getElementValue(), llvm::PoisonValue::getElementValue(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getFCmp(), getFCmpValue(), getFrameLayout(), getFromRangeMetadata(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::GVNExpression::VariableExpression::getHashValue(), llvm::GVNExpression::ConstantExpression::getHashValue(), llvm::ConstantExpr::getICmp(), getIdentityValue(), llvm::DataLayout::getIndexedOffsetInType(), getInductionVariable(), llvm::CanonicalLoopInfo::getIndVarType(), llvm::ConstantExpr::getInsertElement(), llvm::ConstantExpr::getInsertValue(), getInvertibleOperands(), llvm::SCEVExpander::getIVIncOperand(), getKnownNonNullAndDerefBytesForUse(), llvm::SCCPInstVisitor::getLatticeValueFor(), llvm::VNCoercion::getLoadLoadClobberFullWidthSize(), llvm::TargetLoweringBase::getLoadMemOperandFlags(), llvm::VNCoercion::getLoadValueForLoad(), llvm::getMallocType(), getMaskedTypeForICmpPair(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMemSetPatternValue(), getMinimalBaseOfAccsesPointerOperand(), getMinimumFPType(), getNaturalGEPWithOffset(), getNegativeIsTrueBoolVec(), getNewICmpValue(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getNoopInput(), getNotValue(), llvm::ConstantDataSequential::getNumElements(), llvm::UndefValue::getNumElements(), getOffsetFromIndices(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::getOrderedReduction(), llvm::getOrEnforceKnownAlignment(), llvm::Argument::getParamAlign(), llvm::Argument::getParamAlignment(), llvm::Argument::getParamByRefType(), llvm::Argument::getParamByValType(), llvm::Argument::getParamInAllocaType(), llvm::Argument::getParamStructRetType(), llvm::Argument::getPassPointeeByValueCopySize(), llvm::Argument::getPointeeInMemoryValueType(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), getPointerAlignment(), llvm::GetPointerBaseWithConstantOffset(), getPointerDereferenceableBytes(), llvm::LoadInst::getPointerOperandType(), llvm::StoreInst::getPointerOperandType(), llvm::GEPOperator::getPointerOperandType(), llvm::PtrToIntOperator::getPointerOperandType(), llvm::GetElementPtrInst::getPointerOperandType(), llvm::getPointersDiff(), llvm::AA::getPotentialCopiesOfStoredValue(), llvm::LazyValueInfo::getPredicateAt(), llvm::getPtrStride(), getReducedType(), getReductionIntrinsic(), llvm::FastISel::getRegForGEPIndex(), llvm::FastISel::getRegForValue(), llvm::GetElementPtrInst::getResultElementType(), llvm::ScalarEvolution::getSCEV(), llvm::ConstantExpr::getSelect(), llvm::ConstantAggregateZero::getSequentialElement(), llvm::UndefValue::getSequentialElement(), llvm::PoisonValue::getSequentialElement(), getShuffleDemandedElts(), llvm::getShuffleReduction(), llvm::ConstantExpr::getShuffleVector(), getSign32(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::ConstantVector::getSplat(), llvm::ConstantDataVector::getSplat(), llvm::Constant::getSplatValue(), llvm::getSplatValue(), getSqrtCall(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::BitCastOperator::getSrcTy(), llvm::VPIntrinsic::getStaticVectorLength(), llvm::InnerLoopVectorizer::getStepVector(), llvm::getStrideFromPointer(), llvm::GetStringLength(), llvm::ConstantAggregateZero::getStructElement(), llvm::UndefValue::getStructElement(), llvm::PoisonValue::getStructElement(), llvm::SCCPInstVisitor::getStructLatticeValueFor(), getTargetConstantBitsFromNode(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::InlineAsm::getType(), llvm::AllocaInst::getType(), llvm::ConstantInt::getType(), llvm::GlobalValue::getType(), llvm::ValueAsMetadata::getType(), llvm::ConstantArray::getType(), llvm::ConstantStruct::getType(), llvm::ConstantVector::getType(), llvm::ConstantPointerNull::getType(), llvm::SCEVUnknown::getType(), llvm::ConstantDataArray::getType(), llvm::ConstantDataVector::getType(), llvm::InsertElementInst::getType(), llvm::ShuffleVectorInst::getType(), llvm::GetElementPtrInst::getTypeAtIndex(), llvm::getUnderlyingObject(), getUnderlyingObjectFromInt(), getUniformBase(), llvm::getUniqueCastUse(), llvm::PPCTTIImpl::getUserCost(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::SelectionDAGBuilder::getValue(), getValueFromICmpCondition(), getValueFromSimpleICmpCondition(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(), llvm::ExtractElementInst::getVectorOperandType(), WidenIV::getWideRecurrence(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), llvm::AA::getWithType(), llvm::GlobalVariable::GlobalVariable(), HandleByValArgumentInit(), llvm::ValueAsMetadata::handleDeletion(), AAValueSimplifyImpl::handleLoad(), llvm::ValueAsMetadata::handleRAUW(), llvm::Argument::hasByRefAttr(), llvm::Argument::hasByValAttr(), hasCFUser(), llvm::PHINode::hasConstantValue(), llvm::Argument::hasInAllocaAttr(), llvm::Argument::hasNestAttr(), llvm::Argument::hasNoAliasAttr(), llvm::Argument::hasNoCaptureAttr(), llvm::Argument::hasNoFreeAttr(), llvm::Argument::hasNonNullAttr(), llvm::Argument::hasPassPointeeByValueCopyAttr(), llvm::Argument::hasPointeeInMemoryValueAttr(), llvm::Argument::hasPreallocatedAttr(), hasSameArgumentList(), hasSameExtUse(), llvm::Argument::hasStructRetAttr(), llvm::haveNoCommonBitsSet(), AAPrivatizablePtrFloating::identifyPrivatizableType(), llvm::StructType::indexValid(), AANoAliasFloating::initialize(), AANoAliasCallSiteArgument::initialize(), AAAlignImpl::initialize(), AAValueSimplifyArgument::initialize(), INITIALIZE_PASS(), llvm::MIRParserImpl::initializeConstantPool(), llvm::FunctionLoweringInfo::InitializeRegForValue(), llvm::InlineFunction(), inlineGetBaseAndOffset(), inlineRetainOrClaimRVCalls(), llvm::RuntimePointerChecking::insert(), insertInteger(), insertMaskedValue(), llvm::BPFCoreSharedInfo::insertPassThrough(), llvm::InstCombinerImpl::insertRangeTest(), insertSinCosCall(), llvm::CallLowering::insertSRetOutgoingArgument(), insertUniqueBackedgeBlock(), insertVector(), instCombineConvertFromSVBool(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVELast(), instCombineSVEPTest(), instCombineSVETBL(), llvm::MemoryDependenceResults::invalidateCachedPointerInfo(), isAMXIntrinsic(), llvm::isBytewiseValue(), isCompatibleIVType(), isCompatibleReplacement(), isConstantFalse(), llvm::RISCVELFTargetObjectFile::isConstantInSmallSection(), llvm::LanaiTargetObjectFile::isConstantInSmallSection(), llvm::MipsTargetObjectFile::IsConstantInSmallSection(), llvm::isDereferenceableAndAlignedInLoop(), isDereferenceableAndAlignedPointer(), llvm::isDereferenceableAndAlignedPointer(), llvm::SystemZTTIImpl::isFoldableLoad(), llvm::InductionDescriptor::isFPInductionPHI(), isGCValue(), isHighCostExpansion(), llvm::Instruction::isIdenticalToWhenDefined(), isImageOrSamplerVal(), llvm::isImpliedCondition(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntegerWideningViableForSlice(), isInterestingPointer(), isKnownExactCastIntToFP(), llvm::isKnownNeverInfinity(), llvm::isKnownNeverNaN(), isKnownNonEqual(), isKnownNonNullFromDominatingCondition(), isKnownNonZero(), isKnownNonZeroFromAssume(), isKnownToBeAPowerOfTwo(), llvm::isLegalToPromote(), isLoadCombineCandidateImpl(), isLoadInvariantInLoop(), isLoopCounter(), llvm::CastInst::isLosslessCast(), llvm::isMathLibCallNoop(), isMinMaxWithLoads(), isNonNegative(), isNonPositive(), llvm::CastInst::isNoopCast(), isOperandOfVmullHighP64(), isPointerOperand(), llvm::isProcessableCondBI(), llvm::AArch64TargetLowering::isProfitableToHoist(), llvm::PPCTargetLowering::isProfitableToHoist(), isPromotedInstructionLegal(), isPTruePromoted(), isRepeatedByteSequence(), llvm::CallBase::isReturnNonNull(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), isSafeToEliminateVarargsCast(), llvm::isSafeToLoadUnconditionally(), isSafeToSpeculateStore(), llvm::isSafeToSpeculativelyExecute(), llvm::Instruction::isSameOperationAs(), isShuffleEquivalentToSelect(), isShuffleExtractingFromLHS(), llvm::isSplatValue(), llvm::ConstantDataSequential::isString(), isTruePredicate(), llvm::LoopAccessInfo::isUniform(), llvm::DemandedBits::isUseDead(), llvm::Attributor::isValidFunctionSignatureRewrite(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), isValidRewrite(), isVectorPromotionViable(), isVectorPromotionViableForSlice(), isZero(), likeBitCastFromVector(), llvm::GetElementPtrInst::LLVM_ATTRIBUTE_DEPRECATED(), llvm::IRBuilderBase::LLVM_ATTRIBUTE_DEPRECATED(), LLVMBuildCall(), LLVMBuildGEP(), LLVMBuildInBoundsGEP(), LLVMBuildInvoke(), LLVMBuildLoad(), LLVMBuildStructGEP(), LLVMConstGEP(), LLVMConstInBoundsGEP(), LLVMConstRealGetDouble(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), llvm::LoadInst::LoadInst(), lookThroughCast(), llvm::WebAssemblyMCInstLower::lower(), llvm::SelectionDAGBuilder::LowerAsSTATEPOINT(), LowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), LowerBSWAP(), llvm::FastISel::lowerCall(), llvm::CallLowering::lowerCall(), llvm::FastISel::lowerCallTo(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::AsmPrinter::lowerConstant(), LowerCTLZ(), LowerCTPOP(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerIsConstantIntrinsic(), LowerNegateToMultiply(), llvm::lowerObjectSizeCall(), llvm::MipsCallLowering::lowerReturn(), llvm::X86CallLowering::lowerReturn(), llvm::M68kCallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::AMDGPUCallLowering::lowerReturn(), lowerStatepointMetaArgs(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::MachineMemOperand::MachineMemOperand(), llvm::MachinePointerInfo::MachinePointerInfo(), AAIsDeadFloating::manifest(), AAIsDeadCallSiteArgument::manifest(), AAHeapToStackFunction::manifest(), AAPrivatizablePtrArgument::manifest(), llvm::SCCPInstVisitor::markOverdefined(), llvm::matchDecomposedSelectPattern(), matchFunnelShift(), matchIntPart(), matchOrConcat(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), AANoAliasCallSiteArgument::mayAliasWithArgument(), maybePrintCallAddrSpace(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), movePHIValuesToInsertedBlock(), llvm::InstDeleterIRStrategy::mutate(), narrowSDivOrSRem(), narrowVectorSelect(), NegateValue(), llvm::RandomIRBuilder::newSink(), llvm::RandomIRBuilder::newSource(), onlyTileDef(), operandWithNewAddressSpaceOrCreateUndef(), OptimizeAwayTrappingUsesOfValue(), optimizeBranch(), optimizeCallInst(), optimizeDoubleFP(), OptimizeEmptyGlobalCXXDtors(), OptimizeExtractBits(), OptimizeGlobalAddressOfMalloc(), optimizeIntegerToVectorInsertions(), optimizeMemCmpConstantSize(), OptimizeNoopCopyExpression(), optimizeOnceStoredGlobal(), optimizeVectorResizeWithIntegerBitCasts(), optimizeWithFDivFast(), optimizeWithRcp(), llvm::TargetLowering::ParseConstraints(), llvm::PointerMayBeCaptured(), llvm::AMDGPUAAResult::pointsToConstantMemory(), llvm::SelectionDAGBuilder::populateCallLoweringInfo(), llvm::VPReplicateRecipe::print(), printAsOperandImpl(), processAnd(), processAShr(), processBinOp(), llvm::JumpThreadingPass::processBranchOnXOR(), processCallSite(), processInternalGlobal(), processOverflowIntrinsic(), processPHI(), processPhiNode(), processSDiv(), processSDivOrSRem(), processSExt(), processSRem(), processUDivOrURem(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), llvm::promoteCall(), llvm::InstCombinerImpl::PromoteCastOfAllocation(), llvm::promoteLoopAccessesToScalars(), promoteSingleBlockAlloca(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeEmptyCleanup(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::replaceAllDbgUsesWith(), replaceCalledFunction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceDominatedUsesWith(), replaceFoldableUses(), ReplaceFPIntrinsicWithCall(), llvm::replaceNonLocalUsesWith(), replaceSwiftErrorOps(), llvm::replaceSymbolicStrideSCEV(), replaceUnaryCall(), llvm::Constant::replaceUndefsWith(), replaceUndefValuesInPhi(), replaceUsesOutsideBlock(), replaceUsesWithIf(), replaceWithConstant(), replaceWithTileLoad(), llvm::Record::resolveReferences(), llvm::returnTypeIsEligibleForTailCall(), reuseTableCompare(), llvm::InnerLoopVectorizer::reverseVector(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), RewriteUsesOfClonedInstructions(), llvm::MemDerefPrinterPass::run(), llvm::LoadAndStorePromoter::run(), llvm::coro::salvageDebugInfo(), llvm::salvageDebugInfoImpl(), llvm::InnerLoopVectorizer::scalarizeInstruction(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::FastISel::selectExtractValue(), llvm::GlobalAlias::setAliasee(), llvm::CallBase::setCalledFunction(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setDest(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), llvm::PHINode::setIncomingValue(), setInfoSVEStN(), llvm::GlobalVariable::setInitializer(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::setLength(), llvm::MemTransferBase< AnyMemIntrinsic >::setSource(), llvm::MemSetBase< AnyMemIntrinsic >::setValue(), shorter_filter(), shouldConvertImpl(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), shrinkFPConstantVector(), shrinkInsertElt(), shrinkSplatShuffle(), llvm::ShuffleVectorConstantExpr::ShuffleVectorConstantExpr(), SimplifyAddInst(), simplifyAllocaArraySize(), simplifyAMDGCNImageIntrinsic(), simplifyAMDGCNMemoryIntrinsicDemanded(), SimplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOfICmpsWithSameOperands(), simplifyAndOrOfFCmps(), simplifyAndOrOfICmpsWithConstants(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), SimplifyAShrInst(), simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::X86TTIImpl::simplifyDemandedUseBitsIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifyDiv(), simplifyDivRem(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), SimplifyExtractElementInst(), SimplifyFAddInst(), SimplifyFDivInst(), SimplifyFMAFMul(), simplifyFPOp(), SimplifyFRemInst(), SimplifyFSubInst(), SimplifyGEPInst(), SimplifyICmpInst(), simplifyICmpOfBools(), simplifyICmpWithBinOp(), llvm::SimplifyInsertElementInst(), SimplifyInsertValueInst(), simplifyInstsInBlock(), simplifyInvariantGroupIntrinsic(), SimplifyLoadInst(), simplifyLogicOfAddSub(), SimplifyLShrInst(), SimplifyMulInst(), simplifyNeonTbl1(), simplifyNeonVld1(), simplifyNvvmIntrinsic(), SimplifyOrInst(), simplifyOrOfICmpsWithAdd(), simplifyOrOfICmpsWithSameOperands(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), SimplifyPHINode(), simplifyRelocatesOffABase(), simplifyRem(), SimplifyRightShift(), SimplifySDivInst(), SimplifySelectInst(), simplifySelectWithICmpCond(), SimplifyShift(), SimplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), SimplifyShuffleVectorInst(), SimplifySRemInst(), SimplifySubInst(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), SimplifyUsingControlFlow(), llvm::InstCombinerImpl::SimplifyUsingDistributiveLaws(), simplifyX86addcarry(), simplifyX86immShift(), simplifyX86insertps(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86pshufb(), simplifyX86varShift(), simplifyX86vpermilvar(), simplifyX86vpermv(), SimplifyXorInst(), SinkCast(), SinkShiftAndTruncate(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::sortPtrAccesses(), speculatePHINodeLoads(), speculateSelectInstLoads(), splitCallSite(), SplitLandingPadPredecessorsImpl(), splitMergedValStore(), splitRetconCoroutine(), stripAndComputeConstantOffsets(), stripGCRelocates(), swapMayExposeCSEOpportunities(), ThreadCmpOverSelect(), llvm::OpenMPIRBuilder::tileLoops(), transformToIndexedCompare(), truncateIVUse(), tryPromoteAllocaToVector(), llvm::tryPromoteCall(), llvm::VPRecipeBuilder::tryToCreateWidenRecipe(), tryToMergePartialOverlappingStores(), tryToReplaceWithConstant(), FunctionSpecializer::tryToReplaceWithConstant(), tryToShorten(), TryToShrinkGlobalToBoolean(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UnrollRuntimeLoopRemainder(), AAPointerInfoFloating::updateImpl(), AAUndefinedBehaviorImpl::updateImpl(), AADereferenceableFloating::updateImpl(), UpdatePHINodes(), AAValueSimplifyFloating::updateWithLoad(), upgradeAbs(), llvm::UpgradeARCRuntime(), upgradeAVX512MaskToSelect(), llvm::UpgradeBitCastInst(), llvm::UpgradeGlobalVariable(), upgradeMaskedCompare(), UpgradeMaskedLoad(), UpgradeMaskToInt(), upgradePMULDQ(), UpgradeX86ALIGNIntrinsics(), UpgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86Rotate(), upgradeX86vpcom(), UpgradeX86VPERMT2Intrinsics(), llvm::ValueHandleBase::ValueIsRAUWd(), AACaptureUseTracker::valueMayBeCaptured(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), versionCallSite(), llvm::InstCombinerImpl::visitAddrSpaceCast(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFPExt(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::InstCombinerImpl::visitIntToPtr(), visitIVCast(), llvm::InstCombinerImpl::visitLandingPadInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitReturnInst(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitStoreInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitZExt(), WidenIV::widenIVUse(), llvm::InnerLoopVectorizer::widenPHIInstruction(), WidenIV::widenWithVariantUse(), llvm::LoopInfo::wouldBeOutOfLoopUseRequiringLCSSA(), llvm::reassociate::XorOpnd::XorOpnd(), llvm::BasicBlock::~BasicBlock(), llvm::Instruction::~Instruction(), and llvm::MetadataAsValue::~MetadataAsValue().

◆ getValueID()

unsigned llvm::Value::getValueID ( ) const
inline

Return an ID for the concrete type of this object.

This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves. Also, note that for instructions, the Instruction's opcode is added to InstructionVal. So this means three things:

there is no value with code InstructionVal (no opcode==0).

there are more possible values for the value type than in ValueTy enum.

the InstructionVal enumerator must be the highest valued enumerator in

the ValueTy enum.

Definition at line 529 of file Value.h.

Referenced by llvm::GlobalIFunc::classof(), llvm::ConstantData::classof(), llvm::GlobalIndirectSymbol::classof(), llvm::GlobalAlias::classof(), llvm::GlobalObject::classof(), llvm::MemoryAccess::classof(), llvm::Constant::classof(), llvm::Argument::classof(), llvm::InlineAsm::classof(), llvm::MetadataAsValue::classof(), llvm::ConstantInt::classof(), llvm::GlobalVariable::classof(), llvm::MemoryUseOrDef::classof(), llvm::ConstantFP::classof(), llvm::MemoryUse::classof(), llvm::ConstantAggregateZero::classof(), llvm::BasicBlock::classof(), llvm::ConstantAggregate::classof(), llvm::MemoryDef::classof(), llvm::ConstantArray::classof(), llvm::ConstantStruct::classof(), llvm::ConstantVector::classof(), llvm::ConstantPointerNull::classof(), llvm::GlobalValue::classof(), llvm::MemoryPhi::classof(), llvm::ConstantDataSequential::classof(), llvm::ConstantDataArray::classof(), llvm::Instruction::classof(), llvm::ConstantDataVector::classof(), llvm::ConstantTokenNone::classof(), llvm::BlockAddress::classof(), llvm::Function::classof(), llvm::DSOLocalEquivalent::classof(), llvm::ConstantExpr::classof(), llvm::UndefValue::classof(), llvm::PoisonValue::classof(), llvm::FunctionComparator::cmpConstants(), CompareValueComplexity(), deleteValue(), llvm::isa_impl< Constant, Value >::doit(), llvm::isa_impl< ConstantData, Value >::doit(), llvm::isa_impl< ConstantAggregate, Value >::doit(), llvm::isa_impl< Argument, Value >::doit(), llvm::isa_impl< InlineAsm, Value >::doit(), llvm::isa_impl< Instruction, Value >::doit(), llvm::isa_impl< BasicBlock, Value >::doit(), llvm::isa_impl< Function, Value >::doit(), llvm::isa_impl< GlobalVariable, Value >::doit(), llvm::isa_impl< GlobalAlias, Value >::doit(), llvm::isa_impl< GlobalIFunc, Value >::doit(), llvm::GlobalValue::eraseFromParent(), llvm::Instruction::getOpcode(), llvm::Constant::handleOperandChange(), llvm::GlobalValue::removeFromParent(), and llvm::GlobalValue::setThreadLocalMode().

◆ getValueName()

ValueName * Value::getValueName ( ) const

Definition at line 269 of file Value.cpp.

References assert(), getContext(), HasName, I, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueNames.

Referenced by getName(), and takeName().

◆ hasMetadata() [1/3]

bool llvm::Value::hasMetadata ( ) const
inlineprotected

Return true if this value has any metadata attached to it.

Definition at line 585 of file Value.h.

References HasMetadata.

Referenced by llvm::Instruction::dropUnknownNonDebugMetadata(), getAllMetadata(), getMetadata(), llvm::Instruction::hasMetadata(), and llvm::Instruction::hasMetadataOtherThanDebugLoc().

◆ hasMetadata() [2/3]

bool llvm::Value::hasMetadata ( StringRef  Kind) const
inlineprotected

Definition at line 592 of file Value.h.

References getMetadata().

◆ hasMetadata() [3/3]

bool llvm::Value::hasMetadata ( unsigned  KindID) const
inlineprotected

Return true if this value has the given type of metadata attached.

Definition at line 589 of file Value.h.

References getMetadata().

◆ hasName()

bool llvm::Value::hasName ( ) const
inline

◆ hasNUndroppableUses()

bool Value::hasNUndroppableUses ( unsigned  N) const

Return true if there this value.

This is specialized because it is a common request and does not require traversing the whole use list.

Definition at line 179 of file Value.cpp.

References llvm::hasNItems(), isUnDroppableUser(), N, user_begin(), and user_end().

◆ hasNUndroppableUsesOrMore()

bool Value::hasNUndroppableUsesOrMore ( unsigned  N) const

Return true if this value has N uses or more.

This is logically equivalent to getNumUses() >= N.

Definition at line 183 of file Value.cpp.

References llvm::hasNItemsOrMore(), isUnDroppableUser(), N, user_begin(), and user_end().

◆ hasNUses()

bool Value::hasNUses ( unsigned  N) const

◆ hasNUsesOrMore()

bool Value::hasNUsesOrMore ( unsigned  N) const

Return true if this value has N uses or more.

This is logically equivalent to getNumUses() >= N.

Definition at line 153 of file Value.cpp.

References llvm::hasNItemsOrMore(), N, use_begin(), and use_end().

Referenced by CanDoGlobalSRA(), hasMoreThanOneUseOtherThanLLVMUsed(), processUMulZExtIdiom(), llvm::BasicBlock::removePredecessor(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitXor().

◆ hasOneUse()

bool llvm::Value::hasOneUse ( ) const
inline

Return true if there is exactly one use of this value.

This is specialized because it is a common request and does not require traversing the whole use list.

Definition at line 435 of file Value.h.

References llvm::hasSingleElement(), and uses().

Referenced by canNotEvaluateInType(), canonicalizeSaturatedSubtract(), checkForNegativeOperand(), collectInsertionElements(), combineLoadToOperationType(), combineMaskedStore(), DeadPHICycle(), llvm::InstCombinerImpl::Descale(), dropRedundantMaskingOfLeftShiftInput(), emitGlobalConstantImpl(), findBuildAggregate_rec(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpsWithConstEq(), foldAndToXor(), llvm::FoldBranchToCommonDest(), foldClampRangeOfTwo(), FoldCondBranchOnPHI(), foldCtpop(), foldEqOfParts(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), foldIdentityExtractShuffle(), foldInsSequenceIntoSplat(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldOrToXor(), foldSelectICmpAndOr(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldUnsignedUnderflowCheck(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), foldXorToXor(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::HexagonTTIImpl::getUserCost(), llvm::Function::hasAddressTaken(), hasNonFlagsUse(), hasOneUser(), hasUseOtherThanLLVMUsed(), INITIALIZE_PASS(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), llvm::SystemZTTIImpl::isFoldableLoad(), isReachableFromPHI(), IsSafeComputationToRemove(), lookThroughAnd(), llvm::InstCombinerImpl::OptimizePointerDifference(), performBranchToCommonDestFolding(), processUGT_ADDCST_ADD(), llvm::InstCombinerImpl::PromoteCastOfAllocation(), removeEmptyCleanup(), replaceExtractElements(), ShouldBreakUpSubtract(), shouldConvertToRelLookupTable(), shouldMergeGEPs(), llvm::shouldRename(), SimplifyBSwap(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyValueKnownNonZero(), sinkAndCmp0Expression(), sinkLifetimeStartMarkers(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::InstCombinerImpl::tryFactorization(), llvm::FastISel::tryToFoldLoad(), llvm::JumpThreadingPass::tryToUnfoldSelect(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitStoreInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ hasOneUser()

bool Value::hasOneUser ( ) const

Return true if there is exactly one user of this value.

Note that this is not the same as "has one use". If a value has one use, then there certainly is a single user. But if value has several uses, it is possible that all uses are in a single user, or not.

This check is potentially costly, since it requires traversing, in the worst case, the whole use list of a value.

Definition at line 157 of file Value.cpp.

References llvm::lltok::equal, hasOneUse(), use_empty(), user_begin(), and user_end().

Referenced by llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::Instruction::isOnlyUserOfAnyOperand(), and llvm::InstCombinerImpl::visitPHINode().

◆ hasSameSubclassOptionalData()

bool llvm::Value::hasSameSubclassOptionalData ( const Value V) const
inline

Check the optional flags for equality.

Definition at line 546 of file Value.h.

References SubclassOptionalData.

◆ hasValueHandle()

bool llvm::Value::hasValueHandle ( ) const
inline

Return true if there is a value handle associated with this value.

Definition at line 551 of file Value.h.

Referenced by llvm::MemorySSAUpdater::removeMemoryAccess(), and llvm::SSAUpdaterBulk::RewriteAllUses().

◆ isSwiftError()

bool Value::isSwiftError ( ) const

Return true if this value is a swifterror value.

swifterror values can be either a function argument or an alloca with a swifterror attribute.

Definition at line 1000 of file Value.cpp.

References Arg.

Referenced by combineLoadToOperationType(), and findExtractedInputToOverallInputMapping().

◆ isTransitiveUsedByMetadataOnly()

bool Value::isTransitiveUsedByMetadataOnly ( ) const

◆ isUsedByMetadata()

bool llvm::Value::isUsedByMetadata ( ) const
inline

Return true if there is metadata referencing this value.

Definition at line 554 of file Value.h.

References IsUsedByMD.

Referenced by llvm::FindDbgAddrUses(), llvm::findDbgUsers(), llvm::findDbgValues(), llvm::Instruction::~Instruction(), and ~Value().

◆ isUsedInBasicBlock()

bool Value::isUsedInBasicBlock ( const BasicBlock BB) const

Check if this value is used in the specified basic block.

Definition at line 222 of file Value.cpp.

References BB, llvm::is_contained(), user_begin(), and user_end().

◆ materialized_use_begin() [1/2]

use_iterator llvm::Value::materialized_use_begin ( )
inline

Definition at line 357 of file Value.h.

Referenced by materialized_uses(), and use_begin().

◆ materialized_use_begin() [2/2]

const_use_iterator llvm::Value::materialized_use_begin ( ) const
inline

Definition at line 358 of file Value.h.

◆ materialized_use_empty()

bool llvm::Value::materialized_use_empty ( ) const
inline

Definition at line 350 of file Value.h.

Referenced by ~Value().

◆ materialized_user_begin() [1/2]

user_iterator llvm::Value::materialized_user_begin ( )
inline

Definition at line 394 of file Value.h.

Referenced by materialized_users(), user_back(), and user_begin().

◆ materialized_user_begin() [2/2]

const_user_iterator llvm::Value::materialized_user_begin ( ) const
inline

Definition at line 395 of file Value.h.

◆ materialized_users() [1/2]

iterator_range<user_iterator> llvm::Value::materialized_users ( )
inline

Definition at line 416 of file Value.h.

References llvm::make_range(), materialized_user_begin(), and user_end().

Referenced by forEachUser(), and users().

◆ materialized_users() [2/2]

iterator_range<const_user_iterator> llvm::Value::materialized_users ( ) const
inline

Definition at line 419 of file Value.h.

References llvm::make_range(), materialized_user_begin(), and user_end().

◆ materialized_uses() [1/2]

iterator_range<use_iterator> llvm::Value::materialized_uses ( )
inline

Definition at line 371 of file Value.h.

References llvm::make_range(), materialized_use_begin(), and use_end().

Referenced by uses().

◆ materialized_uses() [2/2]

iterator_range<const_use_iterator> llvm::Value::materialized_uses ( ) const
inline

Definition at line 374 of file Value.h.

References llvm::make_range(), materialized_use_begin(), and use_end().

◆ mutateType()

void llvm::Value::mutateType ( Type Ty)
inline

Mutate the type of this Value to be of the specified type.

Note that this is an extremely dangerous operation which can create completely invalid IR very easily. It is strongly recommended that you recreate IR objects with the right types instead of mutating them in place.

Definition at line 793 of file Value.h.

Referenced by llvm::CallBase::mutateFunctionType().

◆ operator=()

Value& llvm::Value::operator= ( const Value )
delete

◆ print() [1/2]

void Value::print ( raw_ostream O,
bool  IsForDebug = false 
) const

◆ print() [2/2]

void Value::print ( raw_ostream O,
ModuleSlotTracker MST,
bool  IsForDebug = false 
) const

◆ printAsOperand() [1/2]

void Value::printAsOperand ( raw_ostream O,
bool  PrintType,
ModuleSlotTracker MST 
) const

◆ printAsOperand() [2/2]

void Value::printAsOperand ( raw_ostream O,
bool  PrintType = true,
const Module M = nullptr 
) const

◆ replaceAllUsesWith()

void Value::replaceAllUsesWith ( Value V)

Change all uses of this to point to a new Value.

Go through the uses list for this definition and make each use point to "V" instead of "this". After this completes, 'this's use list is guaranteed to be empty.

Definition at line 520 of file Value.cpp.

Referenced by alignOutputBlockWithAggFunc(), BreakUpSubtract(), llvm::changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::CloneAndPruneIntoFromInst(), combineLoadToOperationType(), ConvertShiftToMul(), llvm::convertToDeclaration(), GeneratedRTChecks::Create(), despeculateCountZeros(), DoFlattenLoopPair(), doPromotion(), EliminateDuplicatePHINodesNaiveImpl(), llvm::objcarc::EraseInstruction(), llvm::expandAtomicRMWToCmpXchg(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findPHIToPartitionLoops(), llvm::SanitizerStatReport::finish(), foldGuardedFunnelShift(), FoldTwoEntryPHINode(), llvm::VNCoercion::getLoadValueForLoad(), llvm::Constant::handleOperandChange(), INITIALIZE_PASS(), llvm::InlineFunction(), insertSpills(), insertUniqueBackedgeBlock(), LowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), lowerExpectIntrinsic(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerLocalAllocas(), LowerNegateToMultiply(), lowerSubFn(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::MergeBasicBlockIntoOnlyPred(), mergeCleanupPad(), mergeInlinedArrayAllocas(), llvm::InstDeleterIRStrategy::mutate(), narrowSDivOrSRem(), optimizeDivRem(), OptimizeEmptyGlobalCXXDtors(), OptimizeGlobalAddressOfMalloc(), OptimizeGlobalAliases(), prepareICWorklistFromFunction(), processAbsIntrinsic(), processAnd(), processAShr(), llvm::JumpThreadingPass::processBranchOnXOR(), processInternalGlobal(), processMinMaxIntrinsic(), processOverflowIntrinsic(), processSDiv(), processSExt(), processSRem(), processUDivOrURem(), processUse(), promoteSingleBlockAlloca(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), RemovePreallocated(), removeSSACopy(), llvm::removeUnwindEdge(), replace(), replaceAliasWithAliasee(), llvm::AMDGPULibCalls::replaceCall(), ReplaceCallWith(), llvm::SCEVExpander::replaceCongruentIVs(), replaceFrameSize(), replaceLongjmpWithEmscriptenLongjmp(), replaceOperation(), replacePrepare(), replaceValue(), replaceWithTLIFunction(), llvm::BitcodeReaderValueList::resolveConstantForwardRefs(), reuseTableCompare(), llvm::rewriteLoopExitValues(), rewritePHINodesForExitAndUnswitchedBlocks(), rewritePHIs(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), llvm::runIPSCCP(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), llvm::simplifyLoopAfterUnroll(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifySuspendPoint(), sink(), speculatePHINodeLoads(), speculateSelectInstLoads(), splitAsyncCoroutine(), splitCallSite(), splitGlobal(), SplitLandingPadPredecessorsImpl(), splitRetconCoroutine(), llvm::OpenMPIRBuilder::tileLoops(), tryPromoteAllocaToVector(), tryToReplaceWithConstant(), FunctionSpecializer::tryToReplaceWithConstant(), TryToShrinkGlobalToBoolean(), llvm::UpgradeARCRuntime(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), WidenIV::widenIVUse(), WidenIV::widenWithVariantUse(), and llvm::BasicBlock::~BasicBlock().

◆ replaceNonMetadataUsesWith()

void Value::replaceNonMetadataUsesWith ( Value V)

Change non-metadata uses of this to point to a new Value.

Go through the uses list for this definition and make each use point to "V" instead of "this". This function skips metadata entries in the list.

Definition at line 524 of file Value.cpp.

◆ replaceUsesOutsideBlock()

void Value::replaceUsesOutsideBlock ( Value V,
BasicBlock BB 
)

replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block.

'This's use list is expected to have at least one element. Unlike replaceAllUsesWith() this function does not support basic block values.

Definition at line 574 of file Value.cpp.

References assert(), BB, contains(), getType(), llvm::Use::getUser(), I, replaceDbgUsesOutsideBlock(), and replaceUsesWithIf().

◆ replaceUsesWithIf()

void Value::replaceUsesWithIf ( Value New,
llvm::function_ref< bool(Use &U)>  ShouldReplace 
)

Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the given Use.

Unlike replaceAllUsesWith() this function does not support basic block values.

Definition at line 528 of file Value.cpp.

References assert(), E, getType(), llvm::Use::getUser(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::Use::set(), use_begin(), and use_end().

Referenced by llvm::OpenMPIRBuilder::createStaticWorkshareLoop(), llvm::MemorySSAUpdater::insertDef(), replaceConstants(), and replaceUsesOutsideBlock().

◆ reverseUseList()

void Value::reverseUseList ( )

Reverse the use-list.

Definition at line 981 of file Value.cpp.

◆ setMetadata() [1/2]

void Value::setMetadata ( StringRef  Kind,
MDNode Node 
)
protected

Definition at line 1262 of file Metadata.cpp.

◆ setMetadata() [2/2]

void Value::setMetadata ( unsigned  KindID,
MDNode Node 
)
protected

Set a particular kind of metadata attachment.

Sets the given attachment to MD, erasing it if MD is nullptr or replacing it if it already exists.

Definition at line 1234 of file Metadata.cpp.

Referenced by llvm::Function::setEntryCount(), llvm::Function::setSectionPrefix(), and llvm::Function::setSubprogram().

◆ setName()

void Value::setName ( const Twine Name)

Change the name of the value.

Choose a new unique name if the provided name is taken.

Parameters
NameThe new name; or "" if the value's name should be removed.

Definition at line 364 of file Value.cpp.

References F.

Referenced by llvm::AllocaInst::AllocaInst(), llvm::Argument::Argument(), llvm::BinaryOperator::BinaryOperator(), llvm::CloneBasicBlock(), llvm::CloneFunction(), llvm::CloneModule(), llvm::CmpInst::CmpInst(), llvm::EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(), llvm::EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::createInductionResumeValues(), createMemMoveLoop(), llvm::OpenMPIRBuilder::createParallel(), doPromotion(), llvm::DuplicateInstructionsInSplitBetween(), llvm::EmbedBitcodeInModule(), llvm::EpilogueVectorizerMainLoop::emitMinimumIterationCountCheck(), externalize(), llvm::InnerLoopVectorizer::fixupIVUsers(), forceRenaming(), llvm::FreezeInst::FreezeInst(), generateUnsignedDivisionCode(), llvm::GlobalValue::GlobalValue(), INITIALIZE_PASS(), llvm::LoadInst::LoadInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerObjCCall(), makeStatepointExplicitImpl(), optimizeDivRem(), optimizeSQRT(), llvm::peelLoop(), llvm::Intrinsic::remangleIntrinsicFunction(), rematerializeLiveValues(), rename(), ReplaceCallWith(), rewriteMaterializableInstructions(), llvm::InnerLoopVectorizer::scalarizeInstruction(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::ShuffleVectorInst::ShuffleVectorInst(), sinkInstruction(), SplitLandingPadPredecessorsImpl(), llvm::splitLoopBound(), StripSymtab(), SwitchToLookupTable(), takeName(), turnGuardIntoBranch(), llvm::UnaryOperator::UnaryOperator(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), versionCallSite(), llvm::LoopVersioning::versionLoop(), and llvm::InnerLoopVectorizer::widenPHIInstruction().

◆ setValueName()

void Value::setValueName ( ValueName VN)

Definition at line 280 of file Value.cpp.

References assert(), getContext(), HasName, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueNames.

Referenced by takeName().

◆ setValueSubclassData()

void llvm::Value::setValueSubclassData ( unsigned short  D)
inlineprotected

Definition at line 845 of file Value.h.

References D.

◆ sortUseList()

template<class Compare >
void llvm::Value::sortUseList ( Compare  Cmp)

Sort the use-list.

Sorts the Value's use-list by Cmp using a stable mergesort. Cmp is expected to compare two Use references.

Definition at line 876 of file Value.h.

References assert(), and I.

◆ stripAndAccumulateConstantOffsets() [1/2]

Value* llvm::Value::stripAndAccumulateConstantOffsets ( const DataLayout DL,
APInt Offset,
bool  AllowNonInbounds 
)
inline

Definition at line 710 of file Value.h.

References DL, Offset, and stripAndAccumulateConstantOffsets().

◆ stripAndAccumulateConstantOffsets() [2/2]

const Value* llvm::Value::stripAndAccumulateConstantOffsets ( const DataLayout DL,
APInt Offset,
bool  AllowNonInbounds,
function_ref< bool(Value &Value, APInt &Offset)>  ExternalAnalysis = nullptr 
) const

Accumulate the constant offset this value has compared to a base pointer.

Only 'getelementptr' instructions (GEPs) are accumulated but other instructions, e.g., casts, are stripped away as well. The accumulated constant offset is added to Offset and the base pointer is returned.

The APInt Offset has to have a bit-width equal to the IntPtr type for the address space of 'this' pointer value, e.g., use DataLayout::getIndexTypeSizeInBits(Ty).

If AllowNonInbounds is true, offsets in GEPs are stripped and accumulated even if the GEP is not "inbounds".

If ExternalAnalysis is provided it will be used to calculate a offset when a operand of GEP is not constant. For example, for a value ExternalAnalysis might try to calculate a lower bound. If ExternalAnalysis is successful, it should return true.

If this is called on a non-pointer value, it returns 'this' and the Offset is not modified.

Note that this function will never return a nullptr. It will also never manipulate the Offset in a way that would not match the difference between the underlying value and the returned one. Thus, if no constant offset was found, the returned value is the underlying one and Offset is unchanged.

Referenced by areNonOverlapSameBaseLoadAndStore(), llvm::GetPointerBaseWithConstantOffset(), stripAndAccumulateConstantOffsets(), stripAndAccumulateInBoundsConstantOffsets(), stripAndAccumulateMinimalOffsets(), stripAndComputeConstantOffsets(), and llvm::tryPromoteCall().

◆ stripAndAccumulateInBoundsConstantOffsets() [1/2]

Value* llvm::Value::stripAndAccumulateInBoundsConstantOffsets ( const DataLayout DL,
APInt Offset 
)
inline

Definition at line 724 of file Value.h.

References DL, Offset, and stripAndAccumulateConstantOffsets().

◆ stripAndAccumulateInBoundsConstantOffsets() [2/2]

const Value* llvm::Value::stripAndAccumulateInBoundsConstantOffsets ( const DataLayout DL,
APInt Offset 
) const
inline

This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false.

Definition at line 719 of file Value.h.

References DL, Offset, and stripAndAccumulateConstantOffsets().

Referenced by llvm::GlobalIndirectSymbol::getBaseObject(), llvm::getPointersDiff(), SimplifyGEPInst(), and llvm::InstCombinerImpl::visitGetElementPtrInst().

◆ stripInBoundsConstantOffsets() [1/2]

Value* llvm::Value::stripInBoundsConstantOffsets ( )
inline

Definition at line 675 of file Value.h.

References stripInBoundsConstantOffsets().

◆ stripInBoundsConstantOffsets() [2/2]

const Value * Value::stripInBoundsConstantOffsets ( ) const

Strip off pointer casts and all-constant inbounds GEPs.

Returns the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 687 of file Value.cpp.

Referenced by stripInBoundsConstantOffsets().

◆ stripInBoundsOffsets() [1/2]

Value* llvm::Value::stripInBoundsOffsets ( function_ref< void(const Value *)>  Func = [](const Value *) {})
inline

Definition at line 736 of file Value.h.

◆ stripInBoundsOffsets() [2/2]

const Value * Value::stripInBoundsOffsets ( function_ref< void(const Value *)>  Func = [](const Value *) {}) const

Strip off pointer casts and inbounds GEPs.

Returns the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 764 of file Value.cpp.

◆ stripPointerCasts() [1/2]

Value* llvm::Value::stripPointerCasts ( )
inline

Definition at line 632 of file Value.h.

References stripPointerCasts().

◆ stripPointerCasts() [2/2]

const Value * Value::stripPointerCasts ( ) const

Strip off pointer casts, all-zero GEPs and address space casts.

Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 675 of file Value.cpp.

Referenced by llvm::MachineFunction::addLandingPad(), analyzeGlobalAux(), llvm::Attributor::changeUseAfterManifest(), checkAsyncFuncPointer(), checkWFAlloc(), checkWFDealloc(), checkWFRetconPrototype(), llvm::classifyEHPersonality(), compareNames(), llvm::ObjectSizeOffsetVisitor::compute(), computePointerICmp(), emitBinaryFloatFnCallHelper(), llvm::emitCalloc(), emitLibCall(), llvm::emitMalloc(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), emitUnaryFloatFnCallHelper(), llvm::objcarc::EraseInstruction(), llvm::ExtractTypeInfo(), llvm::findAvailablePtrLoadStore(), llvm::findDevirtualizableCallsForTypeTest(), findInitTrampolineFromAlloca(), findSafeStoreForStoreStrongContraction(), FindUsedValues(), findUsedValues(), llvm::InstCombinerImpl::foldGEPICmp(), genericValueTraversal(), llvm::CoroAsyncContextDeallocInst::getAsyncContext(), getAvailableLoadStore(), getCalledFunction(), llvm::AbstractCallSite::getCalledFunction(), llvm::getConstantDataArrayInfo(), getConstantStackValue(), llvm::MemIntrinsicBase< AnyMemIntrinsic >::getDest(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), getKnownConstant(), llvm::InstrProfIncrementInst::getName(), llvm::InstrProfValueProfileInst::getName(), llvm::objcarc::GetRCIdentityRoot(), llvm::objcarc::getreturnRVOperand(), llvm::MemTransferBase< AnyMemIntrinsic >::getSource(), GetStringLengthH(), hasNoAliasAttr(), isInertARCValue(), isKnownNonConstant(), isMaskedStoreOverwrite(), llvm::isPointerOffset(), llvm::isSafeToLoadUnconditionally(), llvm::CallLowering::lowerCall(), OptimizeEmptyGlobalCXXDtors(), optimizeOnceStoredGlobal(), llvm::PointerMayBeCaptured(), llvm::JumpThreadingPass::processBlock(), removePartiallyOverlappedStores(), replacePrepare(), simplifySuspendPoint(), sinkLifetimeStartMarkers(), llvm::Constant::stripPointerCasts(), stripPointerCasts(), tryEnforceAlignment(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitLandingPadInst(), and llvm::InstCombinerImpl::visitPHINode().

◆ stripPointerCastsAndAliases() [1/2]

Value* llvm::Value::stripPointerCastsAndAliases ( )
inline

Definition at line 642 of file Value.h.

References stripPointerCastsAndAliases().

◆ stripPointerCastsAndAliases() [2/2]

const Value * Value::stripPointerCastsAndAliases ( ) const

Strip off pointer casts, all-zero GEPs, address space casts, and aliases.

Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 679 of file Value.cpp.

Referenced by stripPointerCastsAndAliases().

◆ stripPointerCastsForAliasAnalysis() [1/2]

Value* llvm::Value::stripPointerCastsForAliasAnalysis ( )
inline

Definition at line 665 of file Value.h.

References stripPointerCastsForAliasAnalysis().

◆ stripPointerCastsForAliasAnalysis() [2/2]

const Value * Value::stripPointerCastsForAliasAnalysis ( ) const

Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info.

Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'. This function should be used only in Alias analysis.

Definition at line 691 of file Value.cpp.

Referenced by llvm::GlobalsAAResult::alias(), and stripPointerCastsForAliasAnalysis().

◆ stripPointerCastsSameRepresentation() [1/2]

Value* llvm::Value::stripPointerCastsSameRepresentation ( )
inline

Definition at line 653 of file Value.h.

References stripPointerCastsSameRepresentation().

◆ stripPointerCastsSameRepresentation() [2/2]

const Value * Value::stripPointerCastsSameRepresentation ( ) const

Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same.

Returns the original uncasted value with the same representation. If this is called on a non-pointer value, it returns 'this'.

Definition at line 683 of file Value.cpp.

Referenced by llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), llvm::LazyValueInfo::getPredicateAt(), isGuaranteedNotToBeUndefOrPoison(), and stripPointerCastsSameRepresentation().

◆ takeName()

void Value::takeName ( Value V)

Transfer the name from V to this value.

After taking V's name, sets V's name to empty.

Note
It is an error to call V->takeName(V).

Definition at line 370 of file Value.cpp.

References assert(), getSymTab(), getValueName(), hasName(), setName(), llvm::StringMapEntryStorage< ValueTy >::setValue(), setValueName(), and llvm::ARM_MB::ST.

Referenced by llvm::changeToCall(), CloneInstructionsIntoPredecessorBlockAndUpdateSSAUses(), llvm::convertToDeclaration(), doPromotion(), llvm::EmbedBitcodeInModule(), llvm::InstCombinerImpl::EvaluateInDifferentType(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::FoldShiftByConstant(), FoldTwoEntryPHINode(), forceRenaming(), llvm::VNCoercion::getLoadValueForLoad(), HandleInlinedEHPad(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::GCNTTIImpl::instCombineIntrinsic(), LowerNegateToMultiply(), removeGlobalCtors(), RemovePreallocated(), llvm::removeUnwindEdge(), replaceAliasWithAliasee(), llvm::ReplaceInstWithValue(), replaceUnaryCall(), rewritePHIs(), simplifyAMDGCNImageIntrinsic(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), llvm::InstCombinerImpl::tryFactorization(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UpgradeARCRuntime(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitMul(), and llvm::InstCombinerImpl::visitOr().

◆ use_begin() [1/2]

use_iterator llvm::Value::use_begin ( )
inline

◆ use_begin() [2/2]

const_use_iterator llvm::Value::use_begin ( ) const
inline

Definition at line 365 of file Value.h.

References assertModuleIsMaterialized(), and materialized_use_begin().

◆ use_empty()

bool llvm::Value::use_empty ( ) const
inline

Definition at line 345 of file Value.h.

References assertModuleIsMaterialized().

Referenced by llvm::Attributor::checkForAllUses(), combineLoadToOperationType(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), createRetPHINode(), WidenIV::createWideIV(), DCEInstruction(), DeadPHICycle(), deleteIfDead(), llvm::AsmPrinter::doFinalization(), doPromotion(), llvm::objcarc::EraseInstruction(), hasAddressTakenAndUsed(), hasOneUser(), hasSameExtUse(), hasUseOtherThanLLVMUsed(), llvm::InlineFunction(), isLoadInvariantInLoop(), AliasScopeTracker::isNoAliasScopeDeclDead(), isTransitiveUsedByMetadataOnly(), llvm::IntrinsicLowering::LowerIntrinsicCall(), AAIsDeadFloating::manifest(), mergeConstants(), mustPreserveGV(), OptimizeAwayTrappingUsesOfLoads(), OptimizeExtractBits(), OptimizeGlobalAddressOfMalloc(), optimizeGlobalsInModule(), predictUseListOrder(), predictValueUseListOrder(), prepareICWorklistFromFunction(), processInternalGlobal(), promoteSingleBlockAlloca(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::StatepointLoweringState::relocCallVisited(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeEmptyCleanup(), llvm::MemorySSA::removeFromLookups(), removeGlobalCtors(), llvm::MemorySSAUpdater::removeMemoryAccess(), ReplaceCallWith(), llvm::LazyCallGraph::RefSCC::replaceNodeFunction(), llvm::rewriteLoopExitValues(), RewriteUsesOfClonedInstructions(), llvm::LoadAndStorePromoter::run(), llvm::runIPSCCP(), llvm::StatepointLoweringState::scheduleRelocCall(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), simplifyAndDCEInstruction(), SinkCast(), speculatePHINodeLoads(), splitCallSite(), splitGlobal(), splitGlobals(), SplitLandingPadPredecessorsImpl(), SRAGlobal(), stripDeadPrototypes(), stripDebugDeclareImpl(), llvm::stripDebugifyMetadata(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), TryToShrinkGlobalToBoolean(), llvm::UpgradeARCRuntime(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::PtrUseVisitor< SliceBuilder >::visitGetElementPtrInst(), and llvm::BasicBlock::~BasicBlock().

◆ use_end() [1/2]

use_iterator llvm::Value::use_end ( )
inline

◆ use_end() [2/2]

const_use_iterator llvm::Value::use_end ( ) const
inline

Definition at line 370 of file Value.h.

◆ user_back() [1/2]

User* llvm::Value::user_back ( )
inline

◆ user_back() [2/2]

const User* llvm::Value::user_back ( ) const
inline

Definition at line 412 of file Value.h.

References assertModuleIsMaterialized(), and materialized_user_begin().

◆ user_begin() [1/2]

user_iterator llvm::Value::user_begin ( )
inline

◆ user_begin() [2/2]

const_user_iterator llvm::Value::user_begin ( ) const
inline

Definition at line 402 of file Value.h.

References assertModuleIsMaterialized(), and materialized_user_begin().

◆ user_empty()

bool llvm::Value::user_empty ( ) const
inline

◆ user_end() [1/2]

user_iterator llvm::Value::user_end ( )
inline

◆ user_end() [2/2]

const_user_iterator llvm::Value::user_end ( ) const
inline

Definition at line 407 of file Value.h.

◆ users() [1/2]

iterator_range<user_iterator> llvm::Value::users ( )
inline

Definition at line 422 of file Value.h.

References assertModuleIsMaterialized(), and materialized_users().

Referenced by addAllGlobalValueUsers(), allUsersAreInFunction(), AllUsesOfValueWillTrapIfNull(), AlmostDeadIV(), BlockIsSimpleEnoughToThreadThrough(), llvm::calculateClrEHStateNumbers(), calculateCXXStateNumbers(), calculateSEHStateNumbers(), canPaddingBeAccessed(), llvm::canTrackGlobalVariableInterprocedurally(), checkIVUsers(), checkOverflow(), CleanupConstantGlobalUsers(), clearAssumptionsOfUsers(), llvm::InnerLoopVectorizer::clearReductionWrapFlags(), llvm::CloneAndPruneIntoFromInst(), collectFunctionUsers(), llvm::AMDGPU::collectFunctionUses(), collectLeaves(), llvm::AMDGPU::collectNonKernelAccessorsOfLDS(), completeEphemeralValues(), llvm::AbstractDependenceGraphBuilder< DataDependenceGraph >::createDefUseEdges(), createRetBitCast(), createRetPHINode(), detectPopcountIdiom(), llvm::InstCombinerImpl::dominatesAllUses(), llvm::CodeExtractor::findAllocas(), llvm::FindDbgAddrUses(), llvm::findDbgUsers(), llvm::findDbgValues(), findInitTrampolineFromAlloca(), findInnerReductionPhi(), llvm::CodeExtractor::findInputsOutputs(), FindPreallocatedCall(), llvm::InnerLoopVectorizer::fixReduction(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), getCleanupRetUnwindDest(), llvm::GCStatepointInst::getGCRelocates(), llvm::GCStatepointInst::getGCResultLocality(), llvm::HexagonTargetObjectFile::getLutUsedFunction(), llvm::getMallocType(), getModuleFromVal(), llvm::getNumOfCalls(), getPreferredExtendForValue(), getPromotableAlloca(), llvm::getUniqueCastUse(), getUnwindDestToken(), getUnwindDestTokenHelper(), GlobalUsersSafeToSRA(), llvm::Function::hasAddressTaken(), hasCFUser(), hasExceptionPointerOrCodeUser(), hasHardUserWithinLoop(), hasLifetimeMarkers(), llvm::hasOutsideLoopUser(), hasSameExtUse(), hasStoreUsersOnly(), llvm::AMDGPU::hasUserInstruction(), hasUsersIn(), insertSpills(), llvm::invertCondition(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), llvm::Loop::isAuxiliaryInductionVariable(), llvm::Function::isDefTriviallyDead(), isEphemeralValueOf(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), isGOTEquivalentCandidate(), isHighCostExpansion(), isKnownNonNullFromDominatingCondition(), isLocalAlloca(), isLoopIncrement(), isOnlyUsedInComparisonWithZero(), isOnlyUsedInEqualityComparison(), llvm::isOnlyUsedInZeroEqualityComparison(), llvm::isOverflowIntrinsicNoWrap(), isPointerValueDeadOnEntryToFunction(), isPTruePromoted(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), isSafeSROAGEP(), llvm::isSafeToDestroyConstant(), isTransitiveUsedByMetadataOnly(), isUsedByLifetimeMarker(), localAllocaNeedsStackSave(), llvm::LowerDbgDeclare(), lowerLocalAllocas(), mapWasmLandingPadIndex(), mergeInlinedArrayAllocas(), llvm::InnerLoopVectorizer::needsScalarInduction(), negateICmpIfUsedByBranchOrSelectOnly(), NegateValue(), OnlyUsedBy(), onlyUsedByLifetimeMarkersOrDroppableInstsHelper(), optimizeDoubleFP(), llvm::LoopVectorizationLegality::prepareToFoldTailByMasking(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), llvm::promoteLoopAccessesToScalars(), promoteSingleBlockAlloca(), WidenIV::pushNarrowIVUsers(), recursivelyVisitUsers(), relocationViaAlloca(), RemovePreallocated(), llvm::InstructionPrecedenceTracking::removeUsersOf(), llvm::coro::replaceCoroFree(), replaceExtractElements(), replaceLongjmpWithEmscriptenLongjmp(), rewriteNonInstructionUses(), rewriteSingleStoreAlloca(), setCannotDuplicate(), llvm::AMDGPU::shouldLowerLDSToStruct(), sinkAndCmp0Expression(), sinkLifetimeStartMarkers(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::Solve(), splitGlobal(), SRAGlobal(), swapMayExposeCSEOpportunities(), SwitchToLookupTable(), tryPromoteAllocaToVector(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UpgradeARCRuntime(), usedInGlobalVarDef(), usedInOneFunc(), useFuncSeen(), valueEscapes(), llvm::InstCombinerImpl::visitShuffleVectorInst(), and ~Value().

◆ users() [2/2]

iterator_range<const_user_iterator> llvm::Value::users ( ) const
inline

Definition at line 426 of file Value.h.

References assertModuleIsMaterialized(), and materialized_users().

◆ uses() [1/2]

iterator_range<use_iterator> llvm::Value::uses ( )
inline

◆ uses() [2/2]

iterator_range<const_use_iterator> llvm::Value::uses ( ) const
inline

Definition at line 381 of file Value.h.

References assertModuleIsMaterialized(), and materialized_uses().

Friends And Related Function Documentation

◆ ValueAsMetadata

friend class ValueAsMetadata
friend

Definition at line 79 of file Value.h.

◆ ValueHandleBase

friend class ValueHandleBase
friend

Definition at line 80 of file Value.h.

Member Data Documentation

◆ HasDescriptor

unsigned llvm::Value::HasDescriptor
protected

◆ HasHungOffUses

unsigned llvm::Value::HasHungOffUses
protected

◆ HasMetadata

unsigned llvm::Value::HasMetadata
protected

Definition at line 120 of file Value.h.

Referenced by addMetadata(), clearMetadata(), eraseMetadata(), hasMetadata(), and ~Value().

◆ HasName

unsigned llvm::Value::HasName
protected

Definition at line 119 of file Value.h.

Referenced by getValueName(), hasName(), and setValueName().

◆ IsUsedByMD

unsigned llvm::Value::IsUsedByMD
protected

Definition at line 118 of file Value.h.

Referenced by isUsedByMetadata().

◆ MaxAlignmentExponent

const unsigned llvm::Value::MaxAlignmentExponent = 29
static

The maximum alignment for instructions.

This is the greatest alignment value supported by load, store, and alloca instructions, and global values.

Definition at line 784 of file Value.h.

Referenced by llvm::getOrEnforceKnownAlignment(), and getPointerAlignment().

◆ MaximumAlignment

const unsigned llvm::Value::MaximumAlignment = 1u << MaxAlignmentExponent
static

◆ NumUserOperands

unsigned llvm::Value::NumUserOperands
protected

◆ SubclassOptionalData

unsigned char llvm::Value::SubclassOptionalData
protected

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