LLVM 19.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]

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.
 
void dump () const
 Support for debugging, callable in GDB: V->dump()
 
TypegetType () const
 All values are typed, get the type of this value.
 
LLVMContextgetContext () const
 All values hold a context through their type.
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 Return a constant reference to the value's name.
 
void setName (const Twine &Name)
 Change the name of the value.
 
void takeName (Value *V)
 Transfer the name from V to this value.
 
std::string getNameOrAsOperand () const
 
void replaceAllUsesWith (Value *V)
 Change all uses of this to point to a new Value.
 
void replaceNonMetadataUsesWith (Value *V)
 Change non-metadata uses of this to point to a new Value.
 
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.
 
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.
 
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.
 
bool hasNUses (unsigned N) const
 Return true if this Value has exactly N uses.
 
bool hasNUsesOrMore (unsigned N) const
 Return true if this value has N uses or more.
 
bool hasOneUser () const
 Return true if there is exactly one user of this value.
 
UsegetSingleUndroppableUse ()
 Return true if there is exactly one use of this value that cannot be dropped.
 
const UsegetSingleUndroppableUse () const
 
UsergetUniqueUndroppableUser ()
 Return true if there is exactly one unique user of this value that cannot be dropped (that user can have multiple uses of this value).
 
const UsergetUniqueUndroppableUser () const
 
bool hasNUndroppableUses (unsigned N) const
 Return true if there this value.
 
bool hasNUndroppableUsesOrMore (unsigned N) const
 Return true if this value has N uses or more.
 
void dropDroppableUses (llvm::function_ref< bool(const Use *)> ShouldDrop=[](const Use *) { return true;})
 Remove every uses that can safely be removed.
 
void dropDroppableUsesIn (User &Usr)
 Remove every use of this value in User that can safely be removed.
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 Check if this value is used in the specified basic block.
 
unsigned getNumUses () const
 This method computes the number of uses of this Value.
 
void addUse (Use &U)
 This method should only be used by the Use class.
 
unsigned getValueID () const
 Return an ID for the concrete type of this object.
 
unsigned getRawSubclassOptionalData () const
 Return the raw optional flags value contained in this value.
 
void clearSubclassOptionalData ()
 Clear the optional flags contained in this value.
 
bool hasSameSubclassOptionalData (const Value *V) const
 Check the optional flags for equality.
 
bool hasValueHandle () const
 Return true if there is a value handle associated with this value.
 
bool isUsedByMetadata () const
 Return true if there is metadata referencing this value.
 
bool isSwiftError () const
 Return true if this value is a swifterror value.
 
const ValuestripPointerCasts () const
 Strip off pointer casts, all-zero GEPs and address space casts.
 
ValuestripPointerCasts ()
 
const ValuestripPointerCastsAndAliases () const
 Strip off pointer casts, all-zero GEPs, address space casts, and aliases.
 
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.
 
ValuestripPointerCastsSameRepresentation ()
 
const ValuestripPointerCastsForAliasAnalysis () const
 Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info.
 
ValuestripPointerCastsForAliasAnalysis ()
 
const ValuestripInBoundsConstantOffsets () const
 Strip off pointer casts and all-constant inbounds GEPs.
 
ValuestripInBoundsConstantOffsets ()
 
const ValuestripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, bool AllowInvariantGroup=false, function_ref< bool(Value &Value, APInt &Offset)> ExternalAnalysis=nullptr) const
 Accumulate the constant offset this value has compared to a base pointer.
 
ValuestripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, bool AllowInvariantGroup=false)
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false.
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 
const ValuestripInBoundsOffsets (function_ref< void(const Value *)> Func=[](const Value *) {}) const
 Strip off pointer casts and inbounds GEPs.
 
ValuestripInBoundsOffsets (function_ref< void(const Value *)> Func=[](const Value *) {})
 
std::optional< int64_t > getPointerOffsetFrom (const Value *Other, const DataLayout &DL) const
 If this ptr is provably equal to Other plus a constant offset, return that offset in bytes.
 
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.
 
uint64_t getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull, bool &CanBeFreed) const
 Returns the number of bytes known to be dereferenceable for the pointer value.
 
Align getPointerAlignment (const DataLayout &DL) const
 Returns an alignment of the pointer value.
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 Translate PHI node to its predecessor from the given basic block.
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
void mutateType (Type *Ty)
 Mutate the type of this Value to be of the specified type.
 
template<class Compare >
void sortUseList (Compare Cmp)
 Sort the use-list.
 
void reverseUseList ()
 Reverse the use-list.
 
void print (raw_ostream &O, bool IsForDebug=false) const
 Implement operator<< on Value.
 
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.
 
void printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const
 

Static Public Member Functions

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

Static Public Attributes

static constexpr unsigned MaxAlignmentExponent = 32
 The maximum alignment for instructions.
 
static constexpr uint64_t MaximumAlignment = 1ULL << 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.
 
void getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const
 Appends all metadata attached to this value to MDs, sorting by KindID.
 
bool hasMetadata () const
 Return true if this value has any metadata attached to it.
 
bool eraseMetadata (unsigned KindID)
 Erase all metadata attachments with the given kind.
 
void eraseMetadataIf (function_ref< bool(unsigned, MDNode *)> Pred)
 Erase all metadata attachments matching the given predicate.
 
void clearMetadata ()
 Erase all metadata attached to this Value.
 
MDNodegetMetadataImpl (unsigned KindID) const
 Get metadata for the given kind, if any.
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
MDNodegetMetadata (unsigned KindID) const
 Get the current metadata attachments for the given kind, if any.
 
MDNodegetMetadata (StringRef Kind) const
 
void getMetadata (unsigned KindID, SmallVectorImpl< MDNode * > &MDs) const
 Appends all attachments with the given ID to MDs in insertion order.
 
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.
 
bool hasMetadata (StringRef Kind) const
 
void setMetadata (unsigned KindID, MDNode *Node)
 Set a particular kind of metadata attachment.
 
void setMetadata (StringRef Kind, MDNode *Node)
 
void addMetadata (unsigned KindID, MDNode &MD)
 Add a metadata attachment.
 
void addMetadata (StringRef Kind, MDNode &MD)
 

Protected Attributes

unsigned char SubclassOptionalData: 7
 Hold subclass data that can be dropped.
 
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 74 of file Value.h.

Member Typedef Documentation

◆ const_use_iterator

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

Definition at line 354 of file Value.h.

◆ const_user_iterator

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

Definition at line 391 of file Value.h.

◆ use_iterator

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

Definition at line 353 of file Value.h.

◆ user_iterator

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

Definition at line 390 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 107 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 513 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 1526 of file Metadata.cpp.

References addMetadata(), and getContext().

◆ addMetadata() [2/2]

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

Add a metadata attachment.

Definition at line 1519 of file Metadata.cpp.

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

Referenced by addMetadata().

◆ addUse()

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

This method should only be used by the Use class.

Definition at line 505 of file Value.h.

◆ assertModuleIsMaterialized()

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

Definition at line 338 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 456 of file Value.cpp.

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

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 789 of file Value.cpp.

References A, assert(), F, getType(), I, and llvm::isPointerTy().

Referenced by getPointerDereferenceableBytes().

◆ clearMetadata()

void Value::clearMetadata ( )
protected

Erase all metadata attached to this Value.

Definition at line 1557 of file Metadata.cpp.

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

Referenced by eraseMetadata(), eraseMetadataIf(), and ~Value().

◆ clearSubclassOptionalData()

void llvm::Value::clearSubclassOptionalData ( )
inline

Clear the optional flags contained in this value.

Definition at line 544 of file Value.h.

References SubclassOptionalData.

◆ deleteValue()

void Value::deleteValue ( )

Delete a pointer to a generic Value.

Definition at line 110 of file Value.cpp.

References getValueID(), and llvm_unreachable.

Referenced by llvm::BitcodeReaderValueList::assignValue(), and llvm::ilist_alloc_traits< MemoryAccess >::deleteNode().

◆ DoPHITranslation() [1/2]

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

Definition at line 797 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 1066 of file Value.cpp.

Referenced by llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), DoPHITranslation(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), 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 199 of file Value.cpp.

References dropDroppableUse(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and uses().

◆ dropDroppableUsesIn()

void Value::dropDroppableUsesIn ( User Usr)

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

Definition at line 209 of file Value.cpp.

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

◆ dump()

LLVM_DUMP_METHOD void Value::dump ( ) const

◆ 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 1530 of file Metadata.cpp.

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

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

◆ eraseMetadataIf()

void Value::eraseMetadataIf ( function_ref< bool(unsigned, MDNode *)>  Pred)
protected

Erase all metadata attachments matching the given predicate.

Definition at line 1542 of file Metadata.cpp.

References assert(), clearMetadata(), getContext(), HasMetadata, I, Info, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.

Referenced by llvm::Instruction::dropUnknownNonDebugMetadata(), and llvm::Instruction::eraseMetadataIf().

◆ 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 1475 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 1074 of file Value.cpp.

References llvm::Type::getContext().

Referenced by llvm::Instruction::addAnnotationMetadata(), llvm::GlobalVariable::addAttribute(), llvm::CallBase::addAttributeAtIndex(), llvm::CallBase::addDereferenceableParamAttr(), llvm::CallBase::addDereferenceableRetAttr(), llvm::addDiffRuntimeChecks(), llvm::CallBase::addFnAttr(), addMetadata(), llvm::CallBase::addParamAttr(), llvm::CallBase::addRetAttr(), llvm::addRuntimeChecks(), llvm::GlobalObject::addTypeMetadata(), llvm::DbgVariableIntrinsic::addVariableLocationOps(), adjustInliningThresholdUsingCallee(), annotateDereferenceableBytes(), llvm::SelectInst::areInvalidOperands(), llvm::memprof::CallStackTrie::buildAndAttachMIBMetadata(), canonicalizeForInvariantConditionInjection(), clearMetadata(), llvm::FenceInst::cloneImpl(), llvm::UnreachableInst::cloneImpl(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerDifference(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::GlobalObject::copyMetadata(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), llvm::ARMConstantPoolConstant::Create(), llvm::createCallMatchingInvoke(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), llvm::InstCombinerImpl::CreateNonTerminatorUnreachable(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), CreatePrologue(), llvm::IRBuilderBase::CreateThreadLocalAddress(), despeculateCountZeros(), diagnoseInvalidFormatString(), llvm::Instruction::dropLocation(), emitDbgAssign(), emitGlobalConstantVector(), eraseMetadata(), eraseMetadataIf(), expandBounds(), expandToSwitch(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), extractMDNode(), foldCtpop(), foldCttzCtlz(), foldInsSequenceIntoSplat(), foldLoadsRecursive(), llvm::hlsl::FrontendResource::FrontendResource(), llvm::SCEVExpander::generateOverflowCheck(), llvm::DSOLocalEquivalent::get(), llvm::NoCFIValue::get(), llvm::ConstantExpr::get(), llvm::Instruction::getAAMetadata(), getAccessType(), getAllMetadata(), llvm::GlobalVariable::getAttributesAsList(), llvm::Attributor::getAttrsFromAssumes(), llvm::getDebugValueLoc(), llvm::ConstantDataSequential::getElementAsConstant(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getInsertElement(), getKnownValueOnEdge(), getMemCmpLoad(), getMetadata(), getMetadataImpl(), llvm::GlobalValue::getPartition(), getPointerOperandAndType(), getPreferredVectorIndex(), llvm::GlobalValue::getSanitizerMetadata(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::ConstantStruct::getTypeForElements(), getValueName(), handleBrSelExpect(), llvm::ValueAsMetadata::handleRAUW(), llvm::Attributor::hasAttr(), IdentifyValidPoisonGeneratingAttributes(), IdentifyValidUBGeneratingAttributes(), llvm::InlineFunction(), inlineRetainOrClaimRVCalls(), llvm::DIBuilder::insertDbgAssign(), insertNewDbgInst(), insertSpills(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVEDup(), instCombineSVELast(), llvm::intersectAccessGroups(), llvm::AAWillReturn::isImpliedByIR(), llvm::AANoUndef::isImpliedByIR(), isLoadCombineCandidateImpl(), lowerAwaitSuspend(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerSubFn(), llvm::makeGuardControlFlowExplicit(), makeStatepointExplicitImpl(), llvm::Attributor::manifestAttrs(), matchFPExtFromF16(), maySpeculateLanes(), mergeAttributesAndFlags(), llvm::MergeBasicBlockIntoOnlyPred(), MergeCompatibleInvokesImpl(), migrateDebugInfo(), llvm::Negator::Negate(), OptimizeGlobalAddressOfAllocation(), optimizeMemCmpConstantSize(), OptimizeNoopCopyExpression(), llvm::CallBase::populateBundleOperandInfos(), processAbsIntrinsic(), processCallSite(), processUGT_ADDCST_ADD(), promoteAllocaUserToVector(), llvm::pgo::promoteIndirectCall(), llvm::ReadByteArrayFromGlobal(), llvm::CallBase::removeAttributeAtIndex(), llvm::CallBase::removeFnAttr(), llvm::CallBase::removeFnAttrs(), llvm::ValueHandleBase::RemoveFromUseList(), llvm::CallBase::removeParamAttr(), llvm::CallBase::removeParamAttrs(), llvm::CallBase::removeRetAttr(), llvm::CallBase::removeRetAttrs(), llvm::GlobalValue::removeSanitizerMetadata(), llvm::coro::replaceCoroFree(), ReplaceFPIntrinsicWithCall(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), selectExplicitSectionGlobal(), llvm::DbgAssignIntrinsic::setAddress(), llvm::DbgAssignIntrinsic::setAssignId(), llvm::MemIntrinsicBase< Derived >::setDestAlignment(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), llvm::setInlineRemark(), llvm::DbgLabelInst::setLabel(), llvm::setLoopEstimatedTripCount(), llvm::CallBase::setMemoryEffects(), llvm::Instruction::setMetadata(), setMetadata(), llvm::Instruction::setNoSanitizeMetadata(), llvm::GlobalValue::setPartition(), llvm::DbgVariableIntrinsic::setRawLocation(), llvm::GlobalValue::setSanitizerMetadata(), llvm::NoAliasScopeDeclInst::setScopeList(), llvm::GlobalObject::setSection(), llvm::DbgAssignIntrinsic::setValue(), setValueName(), llvm::GlobalObject::setVCallVisibilityMetadata(), shortenAssignment(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), simplifyAMDGCNImageIntrinsic(), simplifyUsingControlFlow(), simplifyX86extrq(), simplifyX86insertq(), splitGlobal(), llvm::SplitKnownCriticalEdge(), tryToMoveFreeBeforeNullTest(), TryToShrinkGlobalToBoolean(), turnGuardIntoBranch(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), llvm::CallInst::updateProfWeight(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), llvm::ValueHandleBase::ValueIsRAUWd(), verifyTripCount(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitReturnInst(), llvm::dxil::UAVResource::write(), and llvm::dxil::ConstantBuffer::write().

◆ 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 1470 of file Metadata.cpp.

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

◆ getMetadata() [3/4]

MDNode * llvm::Value::getMetadata ( unsigned  KindID) const
inlineprotected

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 565 of file Value.h.

References getMetadataImpl(), and HasMetadata.

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

◆ 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 1465 of file Metadata.cpp.

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

◆ getMetadataImpl()

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

Get metadata for the given kind, if any.

This is an internal function that must only be called after checking that hasMetadata() returns true.

Definition at line 1459 of file Metadata.cpp.

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

Referenced by getMetadata().

◆ 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 309 of file Value.cpp.

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

Referenced by AddAliasScopeMetadata(), llvm::SSAUpdaterBulk::AddAvailableValue(), llvm::addDiffRuntimeChecks(), addEmuTlsVar(), addMappingsFromTLI(), addReplicateRegions(), aspaceWrapValue(), llvm::WinException::beginFunction(), buildDebugInfoForNoopResumeDestroyFunc(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), llvm::BranchProbabilityInfo::calculate(), calculateCXXStateNumbers(), calculateSEHStateNumbers(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), CanPropagatePredecessorsForPHIs(), llvm::LoopVectorizationLegality::canVectorize(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::Attributor::checkForAllCallSites(), llvm::CloneBasicBlock(), llvm::orc::cloneGlobalAliasDecl(), llvm::orc::cloneGlobalVariableDecl(), llvm::JumpThreadingPass::cloneInstructions(), CloneInstructionsIntoPredecessorBlockAndUpdateSSAUses(), CloneLoopBlocks(), llvm::colorEHFunclets(), llvm::logicalview::compareName(), compareNames(), llvm::convertToDeclaration(), copyLinkageVisibility(), llvm::CallBrInst::Create(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), createCloneDeclaration(), createInvariantCond(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), createUnreachableSwitchDefault(), llvm::DomTreeUpdater::dump(), llvm::SPIRV::ConvergenceRegion::dump(), llvm::CFGMST< Edge, BBInfo >::dumpEdges(), llvm::JumpThreadingPass::duplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), llvm::ExecutionEngine::emitGlobals(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::emitLinkerFlagsForUsedCOFF(), llvm::AsmPrinter::emitSpecialLLVMGlobal(), emitTransformedIndex(), llvm::BranchProbabilityInfo::eraseBlock(), llvm::logicalview::LVCompare::execute(), llvm::VPBasicBlock::execute(), expandToSwitch(), llvm::ExtractTypeInfo(), llvm::MustBeExecutedContextExplorer::findBackwardJoinPoint(), findBasePointer(), llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(), fixupDebugInfoPostExtraction(), FoldCondBranchOnValueKnownInPredecessorImpl(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldMulShl1(), llvm::InstCombinerImpl::foldPHIArgBinOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgExtractValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgGEPIntoPHI(), llvm::InstCombinerImpl::foldPHIArgInsertValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), foldReductionIdiom(), foldSelectICmpLshrAshr(), foldSignedTruncationCheck(), FoldTwoEntryPHINode(), llvm::InstCombinerImpl::foldVectorBinop(), forceRenaming(), llvm::JITSymbolFlags::fromGlobalValue(), generateUnsignedDivisionCode(), llvm::ReplayInlineAdvisor::getAdviceImpl(), llvm::RecordKeeper::getAllDerivedDefinitions(), llvm::bfi_detail::getBlockName(), getBranchHint(), llvm::DeadArgumentEliminationPass::RetOrArg::getDescription(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::MachineBasicBlock::getFullName(), getFuncAddrForProfData(), llvm::GlobalValue::getGlobalIdentifier(), llvm::DOTGraphTraits< DOTFuncInfo * >::getGraphName(), llvm::DOTGraphTraits< DOTFuncMSSAInfo * >::getGraphName(), llvm::getIRPGONameForGlobalObject(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::ExecutionEngine::getMangledName(), llvm::MachineFunction::getName(), getNameOrAsOperand(), llvm::Mangler::getNameWithPrefix(), llvm::DOTGraphTraits< AttributorCallGraph * >::getNodeLabel(), llvm::OpenMPIRBuilder::getOrCreateRuntimeFunction(), llvm::getSamplerName(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::getSurfaceName(), llvm::getTextureName(), llvm::LazyValueInfoImpl::getValueAt(), llvm::LazyValueInfoImpl::getValueInBlock(), llvm::LazyValueInfoImpl::getValueOnEdge(), getVarName(), HandleByValArgument(), HandleInlinedEHPad(), hasOnlyUniformBranches(), hoistMinMax(), llvm::FunctionImporter::importFunctions(), llvm::logicalview::LVBinaryReader::includeInlineeLines(), INITIALIZE_PASS(), injectPendingInvariantConditions(), llvm::InlineFunction(), llvm::InsertPreheaderForLoop(), insertSpills(), insertUniqueBackedgeBlock(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::Attributor::internalizeFunctions(), llvm::InternalizePass::internalizeModule(), llvm::InvertBranch(), llvm::invertCondition(), llvm::isControlFlowEquivalent(), llvm::HexagonTargetObjectFile::isGlobalInSmallSection(), isInPartition(), isPotentiallyReachable(), isReportingError(), isSpecialLLVMGlobalArrayForStaticInit(), isSpecialLLVMGlobalArrayToSkip(), llvm::isTLIScalarize(), llvm::AMDGPULegalizerInfo::legalizeGlobalValue(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), llvm::AMDGPUTargetLowering::LowerGlobalAddress(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), lowerKernelArguments(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::TargetLowering::LowerToTLSEmulatedModel(), markAliveBlocks(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable(), llvm::SCCPInstVisitor::markBlockExecutable(), maybePrintComdat(), llvm::JumpThreadingPass::maybethreadThroughTwoBasicBlocks(), llvm::MergeBlockIntoPredecessor(), MergeCompatibleInvokesImpl(), movePHIValuesToInsertedBlock(), nearest_common_dominator(), llvm::operator<<(), optimizeDoubleFP(), OptimizeGlobalAddressOfAllocation(), optimizeLoopExitWithUnknownExitCount(), optimizeSQRT(), llvm::OptLevelChanger::OptLevelChanger(), llvm::peelLoop(), performBlockTailMerging(), llvm::DiagnosticInfoUnsupported::print(), llvm::ARMConstantPoolConstant::print(), llvm::CSKYConstantPoolConstant::print(), llvm::VPWidenCallRecipe::print(), llvm::DemandedBits::print(), llvm::CallGraphNode::print(), llvm::MemoryPhi::print(), llvm::BasicAAResult::DecomposedGEP::print(), llvm::UniformityInfoWrapperPass::print(), llvm::SDNode::print_details(), printBBName(), PrintDebugDomInfo(), printIRBlockReference(), PrintLoopInfo(), processAbsIntrinsic(), llvm::JumpThreadingPass::processBlock(), processGlobal(), processInternalGlobal(), processOverflowIntrinsic(), processSDiv(), processSRem(), llvm::JumpThreadingPass::processThreadableEdges(), llvm::promoteLoopAccessesToScalars(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), recoverFramePointer(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::CallGraphUpdater::removeFunction(), llvm::RemoveRedundantDbgInstrs(), removeRedundantDbgLocs(), rename(), replace(), ReplaceCallWith(), replaceWithCallToVeclib(), rewriteMemOpOfSelect(), rewritePHIs(), rewritePHIsForCleanupPad(), RewriteUsesOfClonedInstructions(), llvm::FunctionSpecializer::run(), llvm::LoopConstrainer::run(), llvm::InlineCostAnnotationPrinterPass::run(), llvm::ArgumentPromotionPass::run(), runAttributorLightOnFunctions(), runAttributorOnFunctions(), llvm::PlaceSafepointsPass::runImpl(), llvm::JumpThreadingPass::runImpl(), runImpl(), runIPSCCP(), llvm::LPPassManager::runOnFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::DetectRoundChange::runOnMachineFunction(), salvageDebugInfoImpl(), selectExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::IRSimilarity::IRInstructionData::setCalleeName(), simplifyAllocaArraySize(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyNvvmIntrinsic(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), sinkInstruction(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::logicalview::sortByKind(), llvm::logicalview::sortByLine(), llvm::logicalview::sortByName(), SortSymbolPair(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::splitBB(), llvm::splitBBWithSuffix(), llvm::splitBlockBefore(), SplitBlockImpl(), SplitBlockPredecessorsImpl(), splitCallSite(), llvm::OutlinableRegion::splitCandidate(), splitGlobal(), llvm::SplitKnownCriticalEdge(), SplitLandingPadPredecessorsImpl(), SRAGlobal(), SwitchToLookupTable(), llvm::thinLTOFinalizeInModule(), llvm::JumpThreadingPass::threadEdge(), llvm::JumpThreadingPass::threadGuard(), llvm::JumpThreadingPass::threadThroughTwoBasicBlocks(), trackInlinedStores(), tryFactorization(), llvm::JumpThreadingPass::tryThreadEdge(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), llvm::logicalview::LVSymbolTable::update(), llvm::Function::updateAfterNameChange(), UpdatePHINodes(), llvm::CallInst::updateProfWeight(), upgradeARMIntrinsicCall(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::ScalarEvolution::verify(), llvm::LoopVersioning::versionLoop(), llvm::Function::viewCFG(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitZExt(), llvm::OptLevelChanger::~OptLevelChanger(), and ~Value().

◆ getNameOrAsOperand()

std::string Value::getNameOrAsOperand ( ) const

◆ 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 255 of file Value.cpp.

References use_begin(), and use_end().

Referenced by llvm::OpenMPIRBuilder::createTeams(), llvm::OpenMPIRBuilder::finalize(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), and rematerializeLiveValuesAtUses().

◆ 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 851 of file Value.cpp.

References A, assert(), canBeFreed(), DL, llvm::ConstantInt::getLimitedValue(), getType(), llvm::isPointerTy(), and UseDerefAtPointSemantics.

Referenced by llvm::InstCombinerImpl::visitGetElementPtrInst().

◆ getPointerOffsetFrom()

std::optional< int64_t > Value::getPointerOffsetFrom ( const Value Other,
const DataLayout DL 
) const

If this ptr is provably equal to Other plus a constant offset, return that offset in bytes.

Essentially ptr this subtract ptr Other.

Definition at line 1027 of file Value.cpp.

References DL, llvm::User::getNumOperands(), getOffsetFromIndex(), llvm::User::getOperand(), llvm::APInt::getSExtValue(), llvm::GEPOperator::getSourceElementType(), getType(), Idx, llvm::Other, and stripAndAccumulateConstantOffsets().

◆ 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 539 of file Value.h.

References SubclassOptionalData.

◆ getSingleUndroppableUse() [1/2]

Use * Value::getSingleUndroppableUse ( )

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

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 457 of file Value.h.

References getSingleUndroppableUse().

◆ getSubclassDataFromValue()

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

Definition at line 866 of file Value.h.

Referenced by llvm::Function::stealArgumentListFrom().

◆ getType()

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

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

Definition at line 255 of file Value.h.

Referenced by llvm::AliasSetTracker::add(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::add(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::add(), addAssumeNonNull(), addConditions(), llvm::detail::PtrUseVisitorBase::adjustOffsetForGEP(), llvm::AMDGPUAAResult::alias(), llvm::NVPTXAAResult::alias(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), appendToGlobalArray(), llvm::ScalarEvolution::applyLoopGuards(), applyX86MaskOn1BitsVec(), areBothVectorOrScalar(), areExtractShuffleVectors(), llvm::SelectInst::areInvalidOperands(), areInverseVectorBitmasks(), areNonOverlapSameBaseLoadAndStore(), aspaceWrapOperand(), aspaceWrapValue(), llvm::CanonicalLoopInfo::assertOK(), llvm::BitcodeReaderValueList::assignValue(), BreakUpSubtract(), llvm::buildAtomicRMWValue(), BuildConstantFromSCEV(), buildMultiplyTree(), callBufferedPrintfArgPush(), callBufferedPrintfStart(), canBeFreed(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canContractSqrtToRsq(), canEvaluateShiftedShift(), canFoldTermCondOfLoop(), canonicalizeBitCastExtElt(), canonicalizeForInvariantConditionInjection(), canonicalizeLowbitMask(), canSafelyConvertTo16Bit(), canTryToConstantAddTwoShiftAmounts(), llvm::slpvectorizer::BoUpSLP::canVectorizeLoads(), llvm::CastInst::castIsValid(), llvm::Attributor::checkForAllCallSites(), checkOffsetSize(), checkOrAndOpImpliedByOther(), CleanupConstantGlobalUsers(), llvm::CloneAndPruneIntoFromInst(), 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(), cmpExcludesZero(), llvm::VNCoercion::coerceAvailableValueToLoadType(), collectShuffleElements(), collectSingleShuffleElements(), collectUnswitchCandidatesWithInjections(), combineLoad(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), compareCmp(), CompareValueComplexity(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromCmp(), computeKnownBitsFromICmpCond(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::computeOverflowForSignedMul(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerDifference(), computePointerICmp(), concatenateTwoVectors(), llvm::concatenateVectors(), ConnectProlog(), llvm::ConstantAggregate::ConstantAggregate(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastOperand(), constantFoldCmp(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldLoadThroughBitcast(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::Constant::containsConstantExpression(), llvm::ConvertDebugDeclareToDebugValue(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), ConvertShiftToMul(), convertStrToInt(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), countToEliminateCompares(), llvm::BinaryOperator::Create(), llvm::UnaryOperator::Create(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAlignmentAssumption(), createAndCollectMergePhiForReduction(), createAndInstr(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::IRBuilderBase::CreateAtomicRMW(), llvm::IRBuilderBase::CreateBinaryIntrinsic(), llvm::CastInst::CreateBitOrPointerCast(), llvm::OpenMPIRBuilder::createCanonicalLoop(), createCmpXchgInstFun(), llvm::MatrixBuilder::CreateColumnMajorLoad(), llvm::MatrixBuilder::CreateColumnMajorStore(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::FixedPointBuilder< IRBuilderTy >::CreateDiv(), llvm::VPRecipeBuilder::createEdgeMask(), llvm::IRBuilderBase::CreateExtractVector(), createFFSIntrinsic(), llvm::IRBuilderBase::CreateGCGetPointerBase(), llvm::IRBuilderBase::CreateGCGetPointerOffset(), llvm::IRBuilderBase::CreateGlobalString(), llvm::MatrixBuilder::CreateIndex(), llvm::InnerLoopVectorizer::createInductionResumeValue(), llvm::IRBuilderBase::CreateInsertVector(), llvm::IRBuilderBase::createIsFPClass(), llvm::IRBuilderBase::CreateIsNeg(), llvm::IRBuilderBase::CreateIsNotNeg(), llvm::IRBuilderBase::CreateIsNotNull(), llvm::IRBuilderBase::CreateIsNull(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), createLogicFromTable(), llvm::OpenMPIRBuilder::createLoopSkeleton(), llvm::IRBuilderBase::CreateMalloc(), llvm::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedGather(), llvm::IRBuilderBase::CreateMaskedScatter(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::MatrixBuilder::CreateMatrixInsert(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::FixedPointBuilder< IRBuilderTy >::CreateMul(), llvm::OpenMPIRBuilder::createOffloadMapnames(), llvm::OpenMPIRBuilder::createOffloadMaptypes(), llvm::OpenMPIRBuilder::createOrderedDepend(), createOverflowTuple(), llvm::createPGOFuncNameVar(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), createPopcntIntrinsic(), createPowWithIntegerExponent(), createPrivateConstGlobalForString(), llvm::createPrivateGlobalForString(), createProfileFileNameVar(), llvm::createProfileFileNameVar(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::OpenMPIRBuilder::createReductions(), createRetPHINode(), createScalarIVSteps(), llvm::CastInst::CreateSExtOrBitCast(), llvm::Attributor::createShallowWrapper(), createShiftShuffle(), llvm::OpenMPIRBuilder::createTargetInit(), createTargetLoopWorkshareCall(), createTblForTrunc(), createTblShuffleForZExt(), llvm::OpenMPIRBuilder::createTeams(), createTileStore(), CreateTripRemainder(), llvm::CastInst::CreateTruncOrBitCast(), llvm::IRBuilderBase::CreateVectorSplice(), llvm::IRBuilderBase::CreateVScale(), createWrapper(), llvm::CastInst::CreateZExtOrBitCast(), decompose(), despeculateCountZeros(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), DoLowering(), dropRedundantMaskingOfLeftShiftInput(), eliminateSwiftErrorArgument(), llvm::embedBitcodeInModule(), llvm::embedBufferInModule(), llvm::emitBinaryFloatFnCall(), emitBinaryFloatFnCallHelper(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::AsmPrinter::emitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), llvm::emitHotColdNew(), llvm::emitHotColdNewAligned(), llvm::emitHotColdNewAlignedNoThrow(), llvm::emitHotColdNewNoThrow(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), emitLoadFromConstantPool(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), emitTransformedIndex(), llvm::emitVSNPrintf(), llvm::emitVSPrintf(), emitX86Select(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::Evaluator::EvaluateFunction(), evaluateICmpRelation(), llvm::VPInstruction::execute(), llvm::VPWidenRecipe::execute(), llvm::VPWidenCallRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPWidenPHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::expandAtomicRMWToCmpXchg(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), expandIToFP(), llvm::expandMemMoveAsLoop(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandToSwitch(), llvm::AAMDNodes::extendToTBAA(), extractMaskedValue(), factorizeMinMaxTree(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), llvm::fcmpImpliesClass(), findBasePointer(), findCommonType(), findDemandedEltsBySingleUser(), findExtractedInputToOverallInputMapping(), FindLoopCounter(), llvm::RandomIRBuilder::findPointer(), llvm::findScalarElement(), fitArgInto64Bits(), fixupFPReturnAndCall(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::FlushFPConstant(), llvm::AMDGPULibCalls::fold(), llvm::BinOpInit::Fold(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), foldAndOrOfICmpEqConstantAndICmp(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::FoldBranchToCommonDest(), foldCastShuffle(), foldClampRangeOfTwo(), foldConsecutiveLoads(), foldCtpop(), foldCttzCtlz(), foldDependentIVs(), foldFCmpFNegCommonOp(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldGEPICmp(), foldGEPOfGEP(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), foldICmpIntrinsicWithIntrinsic(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldICmpShlOne(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUDivConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpUSubSatOrUAddSatWithConstant(), llvm::InstCombinerImpl::foldICmpWithCastOp(), foldICmpWithHighBitMask(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldIdentityShuffles(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldIsPowerOf2(), foldIsPowerOf2OrZero(), llvm::InstCombinerImpl::foldItoFPtoI(), foldLoadsRecursive(), foldLogicCastConstant(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::InstCombinerImpl::foldPHIArgBinOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgGEPIntoPHI(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), llvm::InstCombinerImpl::foldPowiReassoc(), foldReductionIdiom(), foldSelectBinOpIdentity(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSetClearBits(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstSimplifyFolder::FoldShuffleVector(), foldShuffleWithInsert(), foldSignedTruncationCheck(), FoldTwoEntryPHINode(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), forwardStoredOnceStore(), fpModeMatchesGlobalFPAtomicMode(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), generateAssignInstrs(), generateCreationChecks(), generateCreationChecksForBinOp(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), genLoopLimit(), llvm::MemoryLocation::get(), llvm::ConstantExpr::get(), llvm::Instruction::getAccessType(), getAccessType(), getAddressForMemoryInput(), llvm::IntToPtrInst::getAddressSpace(), llvm::SITargetLowering::getAddrModeArguments(), llvm::Constant::getAggregateElement(), getAISize(), llvm::getAllocSize(), getAlternateBinop(), getAnyNonZeroConstInt(), getArgSPIRVType(), getArgumentTypeAlign(), llvm::ConstantExpr::getAsInstruction(), getAssignmentInfoImpl(), llvm::IRPosition::getAssociatedType(), llvm::AAValueConstantRange::getAssumedConstant(), llvm::AAPotentialConstantValues::getAssumedConstant(), getAtomicOpSize(), getAvailableLoadStore(), getBoolVecFromMask(), getBoundsCheckCond(), getBranchCondString(), llvm::ConstantExpr::getCompare(), llvm::ScalarEvolution::getComparePredicate(), GetConstantInt(), llvm::ExecutionEngine::getConstantValue(), llvm::VNCoercion::getConstantValueForLoad(), llvm::PredicateBase::getConstraint(), llvm::BasicBlock::getContext(), llvm::VPIntrinsic::getDeclarationForParams(), llvm::Argument::getDereferenceableBytes(), llvm::Argument::getDereferenceableOrNullBytes(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::MemIntrinsicBase< Derived >::getDestAddressSpace(), llvm::CastInst::getDestTy(), llvm::ConstantAggregateZero::getElementCount(), llvm::ConstantDataSequential::getElementType(), llvm::ConstantAggregateZero::getElementValue(), llvm::UndefValue::getElementValue(), llvm::PoisonValue::getElementValue(), getExactSDiv(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getFCmp(), getFCmpValue(), llvm::MemoryLocation::getForDest(), getFromRangeMetadata(), llvm::GVNExpression::VariableExpression::getHashValue(), llvm::GVNExpression::ConstantExpression::getHashValue(), llvm::ConstantExpr::getICmp(), llvm::CanonicalLoopInfo::getIndVarType(), llvm::ConstantExpr::getInsertElement(), llvm::Instruction::getInsertionPointAfterDef(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::ConstantInt::getIntegerType(), getInvertibleOperands(), llvm::BinOpInit::getListConcat(), llvm::TargetLoweringBase::getLoadMemOperandFlags(), getMaskedTypeForICmpPair(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::ScalarEvolution::getMinusSCEV(), llvm::AAResults::getModRefInfo(), llvm::AMDGPUAAResult::getModRefInfoMask(), llvm::NVPTXAAResult::getModRefInfoMask(), getNewICmpValue(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getNoopInput(), llvm::ConstantDataSequential::getNumElements(), llvm::UndefValue::getNumElements(), llvm::offloading::getOffloadingEntryInitializer(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::Argument::getParamAlign(), llvm::Argument::getParamByRefType(), llvm::Argument::getParamByValType(), llvm::Argument::getParamInAllocaType(), llvm::Argument::getParamStructRetType(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), getPointerAlignment(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), getPointerDereferenceableBytes(), getPointerOffsetFrom(), llvm::LoadInst::getPointerOperandType(), llvm::StoreInst::getPointerOperandType(), llvm::GetElementPtrInst::getPointerOperandType(), llvm::GEPOperator::getPointerOperandType(), llvm::PtrToIntOperator::getPointerOperandType(), llvm::getPointersDiff(), llvm::LazyValueInfo::getPredicateAt(), getRangeForIntrinsic(), getSameOpcode(), llvm::VPWidenIntOrFpInductionRecipe::getScalarType(), llvm::VPCanonicalIVPHIRecipe::getScalarType(), llvm::VPDerivedIVRecipe::getScalarType(), llvm::ConstantAggregateZero::getSequentialElement(), llvm::UndefValue::getSequentialElement(), llvm::PoisonValue::getSequentialElement(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), getShuffleDemandedElts(), llvm::ConstantExpr::getShuffleVector(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::Constant::getSplatValue(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), llvm::CastInst::getSrcTy(), llvm::GCProjectionInst::getStatepoint(), llvm::VPIntrinsic::getStaticVectorLength(), getStepVector(), llvm::VNCoercion::getStoreValueForLoadHelper(), getStrideAndModOffsetOfGEP(), llvm::ConstantAggregateZero::getStructElement(), llvm::UndefValue::getStructElement(), llvm::PoisonValue::getStructElement(), getTargetConstantBitsFromNode(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::SCEVUnknown::getType(), llvm::ConstantArray::getType(), llvm::ConstantStruct::getType(), llvm::ConstantVector::getType(), llvm::ConstantPointerNull::getType(), llvm::ConstantDataArray::getType(), llvm::ConstantDataVector::getType(), llvm::ConstantTargetNone::getType(), llvm::NoCFIValue::getType(), llvm::GlobalValue::getType(), llvm::InlineAsm::getType(), llvm::AllocaInst::getType(), llvm::InsertElementInst::getType(), llvm::ShuffleVectorInst::getType(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUMaxFromMismatchedTypes(), getUniformBase(), getUniqueCastUse(), llvm::ScalarEvolution::getURemExpr(), llvm::VNCoercion::getValueForLoad(), getValueOnEdge(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(), llvm::ExtractElementInst::getVectorOperandType(), llvm::RISCVTTIImpl::getVPLegalizationStrategy(), llvm::ConstantExpr::getWithOperands(), llvm::GlobalVariable::GlobalVariable(), llvm::Argument::hasByRefAttr(), llvm::Argument::hasByValAttr(), llvm::PHINode::hasConstantValue(), llvm::Constant::hasExactInverseFP(), 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(), hoistMinMax(), llvm::MIRParserImpl::initializeConstantPool(), injectPendingInvariantConditions(), llvm::InlineFunction(), inlineGetBaseAndOffset(), insertInteger(), insertMaskedValue(), llvm::BPFCoreSharedInfo::insertPassThrough(), insertSinCosCall(), llvm::CallLowering::insertSRetOutgoingArgument(), insertUniqueBackedgeBlock(), insertVector(), instCombineConvertFromSVBool(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineRDFFR(), instCombineST1ScatterIndex(), instCombineSVEAllActive(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVELast(), instCombineSVELD1(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESrshl(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEUzp1(), instCombineSVEVectorFuseMulAddSub(), isAllActivePredicate(), llvm::Constant::isAllOnesValue(), llvm::AA::isAssumedThreadLocalObject(), isCmpSameOrSwapped(), isCompatibleReplacement(), llvm::LanaiTargetObjectFile::isConstantInSmallSection(), llvm::RISCVELFTargetObjectFile::isConstantInSmallSection(), llvm::MipsTargetObjectFile::IsConstantInSmallSection(), llvm::isDereferenceableAndAlignedInLoop(), llvm::Constant::isElementWiseEqual(), llvm::Constant::isFiniteNonZeroFP(), llvm::SystemZTTIImpl::isFoldableLoad(), isHighCostExpansion(), llvm::Instruction::isIdenticalToWhenDefined(), llvm::AANoAlias::isImpliedByIR(), llvm::isImpliedCondition(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntegerWideningViableForSlice(), isKnownNonEqual(), isKnownNonZeroFromOperator(), llvm::isLegalToPromote(), isLoadInvariantInLoop(), llvm::isMathLibCallNoop(), llvm::Constant::isMinSignedValue(), llvm::Constant::isNaN(), llvm::Constant::isNegativeZeroValue(), isNeutralValue(), llvm::CastInst::isNoopCast(), isNoopPtrIntCastPair(), llvm::Constant::isNormalFP(), llvm::Constant::isNotMinSignedValue(), llvm::Constant::isNotOneValue(), llvm::Constant::isOneValue(), isOperandOfVmullHighP64(), llvm::isProcessableCondBI(), llvm::AArch64TargetLowering::isProfitableToHoist(), llvm::PPCTargetLowering::isProfitableToHoist(), isPromotedInstructionLegal(), isPTruePromoted(), llvm::GCNTTIImpl::isReadRegisterSourceOfDivergence(), llvm::CallBase::isReturnNonNull(), isSafeLoadOfSelectToSpeculate(), isSafePHIToSpeculate(), isSafeToSpeculateStore(), llvm::isSafeToSpeculativelyExecuteWithOpcode(), llvm::Instruction::isSameOperationAs(), isShuffleEquivalentToSelect(), isShuffleExtractingFromLHS(), llvm::ConstantDataSequential::isString(), llvm::DemandedBits::isUseDead(), llvm::Attributor::isValidFunctionSignatureRewrite(), llvm::ShuffleVectorInst::isValidOperands(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), isVectorPromotionViable(), isVectorPromotionViableForSlice(), llvm::Constant::isZeroValue(), LLVMConstRealGetDouble(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), lookThroughCast(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), llvm::FastISel::lowerCall(), llvm::CallLowering::lowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::FastISel::lowerCallTo(), llvm::AsmPrinter::lowerConstant(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerIsConstantIntrinsic(), lowerKernelArguments(), LowerNegateToMultiply(), llvm::lowerObjectSizeCall(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), llvm::AMDGPUCallLowering::lowerReturn(), llvm::MipsCallLowering::lowerReturn(), llvm::X86CallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::M68kCallLowering::lowerReturn(), llvm::PPCCallLowering::lowerReturn(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::matchDecomposedSelectPattern(), matchFPExtFromF16(), matchOrConcat(), matchStridedConstant(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), maybePrintCallAddrSpace(), memChrToCharCompare(), mergeAttributesAndFlags(), llvm::MergeBasicBlockIntoOnlyPred(), mergeConditionalStoreToAddress(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), modifyIntrinsicCall(), moveAddAfterMinMax(), moveFunctionAdaptingType(), llvm::SinkInstructionStrategy::mutate(), llvm::InstDeleterIRStrategy::mutate(), narrowVectorSelect(), needsFPFromSig(), llvm::RandomIRBuilder::newSource(), operandWithNewAddressSpaceOrCreatePoison(), OptimizeAwayTrappingUsesOfValue(), optimizeBranch(), optimizeCallInst(), optimizeDoubleFP(), OptimizeEmptyGlobalCXXDtors(), OptimizeExtractBits(), llvm::VPlanTransforms::optimizeForVFAndUF(), optimizeIntegerToVectorInsertions(), optimizeMemCmpConstantSize(), optimizeMemCmpVarSize(), OptimizeNoopCopyExpression(), optimizeOnceStoredGlobal(), optimizeSection(), optimizeVectorResizeWithIntegerBitCasts(), llvm::TargetLowering::ParseConstraints(), llvm::LoopStructure::parseLoopStructure(), llvm::BasicTTIImplBase< T >::preferToKeepConstantsAttached(), llvm::VPlan::prepareToExecute(), llvm::VPReplicateRecipe::print(), processAnd(), processArg(), processAShr(), processBinOp(), llvm::JumpThreadingPass::processBranchOnXOR(), processInternalGlobal(), processNonStringArg(), processOverflowIntrinsic(), processPhiNode(), processSDiv(), processSelect(), processSExt(), processSRem(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), processZExt(), promoteAllocaUserToVector(), llvm::promoteCall(), promoteSingleBlockAlloca(), propagateNaN(), reassociateMinMaxWithConstantInOperand(), reassociateMinMaxWithConstants(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeEmptyCleanup(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::removeIncomingValueIf(), llvm::MemoryDependenceResults::removeInstruction(), llvm::replaceAllDbgUsesWith(), replaceCalledFunction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceDominatedUsesWith(), replaceFoldableUses(), ReplaceFPIntrinsicWithCall(), replaceFrameSizeAndAlignment(), llvm::replaceNonLocalUsesWith(), llvm::replaceSignedInst(), replaceSubOverflowUses(), replaceSwiftErrorOps(), replaceUnaryCall(), llvm::Constant::replaceUndefsWith(), replaceUndefValuesInPhi(), replaceUsesOutsideBlock(), replaceUsesWithIf(), replaceWithConstant(), llvm::Record::resolveReferences(), llvm::returnTypeIsEligibleForTailCall(), reuseTableCompare(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), RewriteUsesOfClonedInstructions(), llvm::LoadAndStorePromoter::run(), llvm::MemDerefPrinterPass::run(), llvm::KCFIPass::run(), runImpl(), llvm::IRTranslator::runOnMachineFunction(), llvm::salvageDebugInfoImpl(), salvageDebugInfoImpl(), llvm::SelectionDAGBuilder::salvageUnresolvedDbgValue(), llvm::InnerLoopVectorizer::scalarizeInstruction(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), llvm::SCEVComparePredicate::SCEVComparePredicate(), llvm::FastISel::selectExtractValue(), llvm::GlobalAlias::setAliasee(), llvm::CallBase::setCalledFunction(), llvm::MemIntrinsicBase< Derived >::setDest(), setInfoSVEStN(), llvm::GlobalVariable::setInitializer(), llvm::DbgAssignIntrinsic::setKillAddress(), llvm::DbgVariableIntrinsic::setKillLocation(), llvm::SCCPInstVisitor::setLatticeValueForSpecializationArguments(), llvm::MemIntrinsicBase< Derived >::setLength(), llvm::MemSetBase< BaseCL >::setValue(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), llvm::AAMDNodes::shiftTBAAStruct(), shorter_filter(), llvm::TargetLoweringBase::shouldCastAtomicLoadInIR(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), shouldConvertImpl(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AMDGPUTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicRMWInIR(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SystemZTargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), shrinkInsertElt(), shrinkSplatShuffle(), llvm::ShuffleVectorConstantExpr::ShuffleVectorConstantExpr(), llvm::RISCVTargetLowering::signExtendConstant(), simplifyAddInst(), simplifyAllocaArraySize(), simplifyAMDGCNImageIntrinsic(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfFCmps(), simplifyAndOrOfICmpsWithConstants(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), simplifyAShrInst(), simplifyAssocCastAssoc(), llvm::simplifyBinaryIntrinsic(), simplifyByDomEq(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::X86TTIImpl::simplifyDemandedUseBitsIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), llvm::ARMTTIImpl::simplifyDemandedVectorEltsIntrinsic(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifyDiv(), simplifyDivRem(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifyExtractElementInst(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFRemInst(), simplifyFSubInst(), simplifyICmpInst(), simplifyICmpOfBools(), llvm::ScalarEvolution::SimplifyICmpOperands(), simplifyICmpWithBinOp(), llvm::simplifyInsertElementInst(), simplifyInsertValueInst(), simplifyIntrinsic(), simplifyInvariantGroupIntrinsic(), simplifyLdexp(), llvm::simplifyLoadInst(), simplifyLogicOfAddSub(), simplifyMulInst(), simplifyNeonTbl1(), simplifyNeonVld1(), simplifyNvvmIntrinsic(), simplifyOrInst(), simplifyOrOfICmpsWithAdd(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyPHINode(), simplifyRelocatesOffABase(), simplifyRem(), simplifyRightShift(), simplifySDivInst(), simplifySelectInst(), simplifyShift(), simplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyShuffleVectorInst(), simplifySRemInst(), simplifySubInst(), simplifySwitchOfPowersOfTwo(), simplifyTernarylogic(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), simplifyUsingControlFlow(), simplifyX86addcarry(), simplifyX86extrq(), simplifyX86immShift(), simplifyX86insertps(), simplifyX86insertq(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86pshufb(), simplifyX86varShift(), simplifyX86vpermilvar(), simplifyX86vpermv(), simplifyXorInst(), SinkCast(), SinkShiftAndTruncate(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitBlockAndInsertForEachLane(), splitCallSite(), llvm::SplitIndirectBrCriticalEdges(), SplitLandingPadPredecessorsImpl(), splitMergedValStore(), splitRetconCoroutine(), stripGCRelocates(), swapICmpOperandsToExposeCSEOpportunities(), SwitchToLookupTable(), tagGlobalDefinition(), threadCmpOverSelect(), llvm::OpenMPIRBuilder::tileLoops(), transformToIndexedCompare(), translateExtract(), trimTrailingZerosInVector(), tryCombineFromSVBoolBinOp(), llvm::tryPromoteCall(), llvm::VPRecipeBuilder::tryToCreateWidenRecipe(), tryToImproveAlign(), tryToMergePartialOverlappingStores(), tryToRecognizeTableBasedCttz(), tryToShorten(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), unpackFromRegLoc(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), UpdatePHINodes(), updatePredecessorProfileMetadata(), upgradeAbs(), llvm::UpgradeARCRuntime(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), upgradeMaskedCompare(), upgradeMaskedLoad(), upgradeMaskToInt(), upgradePMULDQ(), upgradeX86ALIGNIntrinsics(), upgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86Rotate(), upgradeX86vpcom(), upgradeX86VPERMT2Intrinsics(), validateAndCostRequiredSelects(), valueEscapes(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), verifyTripCount(), llvm::versionCallSite(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::Interpreter::visitExtractValueInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFPExt(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::InstCombinerImpl::visitIntToPtr(), visitIVCast(), llvm::InstCombinerImpl::visitLandingPadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitReturnInst(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSIToFP(), llvm::InstCombinerImpl::visitStoreInst(), llvm::InstCombinerImpl::visitSub(), llvm::SelectionDAGBuilder::visitSwitchCase(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), llvm::InstCombinerImpl::visitZExt(), llvm::VPWidenCastRecipe::VPWidenCastRecipe(), llvm::ScalarEvolution::willNotOverflow(), WriteConstantInternal(), llvm::BasicBlock::~BasicBlock(), llvm::Instruction::~Instruction(), and llvm::MetadataAsValue::~MetadataAsValue().

◆ getUniqueUndroppableUser() [1/2]

User * Value::getUniqueUndroppableUser ( )

Return true if there is exactly one unique user of this value that cannot be dropped (that user can have multiple uses of this value).

Definition at line 179 of file Value.cpp.

References users().

Referenced by getUniqueUndroppableUser(), rematerializeLiveValuesAtUses(), and workshareLoopTargetCallback().

◆ getUniqueUndroppableUser() [2/2]

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

Definition at line 464 of file Value.h.

References getUniqueUndroppableUser().

◆ 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 532 of file Value.h.

Referenced by llvm::MemoryUseOrDef::classof(), llvm::MemoryUse::classof(), llvm::MemoryDef::classof(), compareCmp(), CompareValueComplexity(), deleteValue(), llvm::Constant::destroyConstant(), 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 281 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

◆ hasMetadata() [2/3]

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

Definition at line 596 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 593 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 191 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 195 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 processUMulZExtIdiom(), llvm::BasicBlock::removePredecessor(), llvm::InstCombinerImpl::visitPHINode(), and llvm::InstCombinerImpl::visitSub().

◆ 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 434 of file Value.h.

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

Referenced by areTwoInsertFromSameBuildVector(), canonicalizeSaturatedSubtract(), checkForNegativeOperand(), combine_CC(), combineBinOpOfExtractToReduceTree(), combineCastedMaskArithmetic(), combineFMulcFCMulc(), combineMaskedStore(), combinePMULDQ(), combineSelect(), combineSetCC(), dropRedundantMaskingOfLeftShiftInput(), emitGlobalConstantImpl(), factorizeFAddFSub(), factorizeMinMaxTree(), findBuildAggregate_rec(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseIdentifiedObject(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfSETCC(), foldAndToXor(), llvm::FoldBranchToCommonDest(), foldClampRangeOfTwo(), foldComplexAndOrPatterns(), foldCtpop(), foldCtpopPow2Test(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), foldICmpUSubSatOrUAddSatWithConstant(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldIdentityExtractShuffle(), foldIDivShl(), foldInsSequenceIntoSplat(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldOrToXor(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldSubOfMinMax(), foldUnsignedUnderflowCheck(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), foldXorToXor(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getInstructionCost(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::Function::hasAddressTaken(), hasNonFlagsUse(), hasOneUser(), hasUseOtherThanLLVMUsed(), hoistAddSub(), hoistMulAddAssociation(), llvm::InvertBranch(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isDeadPHICycle(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), isFirstInsertElement(), llvm::SystemZTTIImpl::isFoldableLoad(), isFPSatMinMaxPattern(), lowerAddSubToHorizontalOp(), llvm::MSP430TargetLowering::LowerSETCC(), narrowInsElt(), optimizeLoopExitWithUnknownExitCount(), llvm::InstCombinerImpl::OptimizePointerDifference(), performAddCombineForShiftedOperands(), performAddCSelIntoCSinc(), llvm::ARMTargetLowering::PerformBRCONDCombine(), llvm::ARMTargetLowering::PerformCMOVCombine(), performMSTORECombine(), performOrXorChainCombine(), performSETCCCombine(), performSTORECombine(), PerformVQDMULHCombine(), processUGT_ADDCST_ADD(), rematerializeLiveValuesAtUses(), removeEmptyCleanup(), replaceArgumentUses(), replaceExtractElements(), ShouldBreakUpSubtract(), shouldConvertToRelLookupTable(), shouldExpandCmpArithRMWInIR(), simplifyAMDGCNImageIntrinsic(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), sinkAndCmp0Expression(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), translateSetCCForBranch(), tryFactorization(), llvm::FastISel::tryToFoldLoad(), llvm::JumpThreadingPass::tryToUnfoldSelect(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFree(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), 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 hasOneUse(), use_empty(), user_begin(), and user_end().

Referenced by isNotUsedOrFoldableInLoop().

◆ hasSameSubclassOptionalData()

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

Check the optional flags for equality.

Definition at line 549 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 554 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 1095 of file Value.cpp.

Referenced by findExtractedInputToOverallInputMapping(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), and llvm::SwiftErrorValueTracking::preassignVRegs().

◆ isUsedByMetadata()

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

Return true if there is metadata referencing this value.

Definition at line 557 of file Value.h.

References IsUsedByMD.

Referenced by 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 234 of file Value.cpp.

References llvm::BasicBlock::begin(), llvm::BasicBlock::end(), llvm::is_contained(), user_begin(), and user_end().

◆ materialized_use_begin() [1/2]

use_iterator llvm::Value::materialized_use_begin ( )
inline

Definition at line 356 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 357 of file Value.h.

◆ materialized_use_empty()

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

Definition at line 349 of file Value.h.

Referenced by ~Value().

◆ materialized_user_begin() [1/2]

user_iterator llvm::Value::materialized_user_begin ( )
inline

Definition at line 393 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 394 of file Value.h.

◆ materialized_users() [1/2]

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

Definition at line 415 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 418 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 370 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 373 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 815 of file Value.h.

Referenced by moveFunctionAdaptingType(), and 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

Print the name of this Value out to the specified raw_ostream.

This is useful when you just want to print 'int reg126', not the instruction that generated it. If you specify a Module for context, then even constants get pretty-printed; for example, the type of a null pointer is printed symbolically.

Definition at line 5043 of file AsmWriter.cpp.

References getModuleFromVal(), Machine, printAsOperandImpl(), and printWithoutType().

Referenced by llvm::MIRPrinter::convert(), dumpUnpackedICmp(), llvm::AsmPrinter::emitGlobalVariable(), getNameOrAsOperand(), print(), llvm::VPLiveOut::print(), llvm::AliasSet::print(), llvm::MemoryPhi::print(), llvm::SCEV::print(), llvm::ScalarEvolution::print(), llvm::PassManagerPrettyStackEntry::print(), llvm::IVUsers::print(), llvm::MachineOperand::print(), llvm::GVNExpression::StoreExpression::printInternal(), and SinkInstruction().

◆ 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 534 of file Value.cpp.

Referenced by BreakUpSubtract(), llvm::changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), CleanupConstantGlobalUsers(), llvm::CloneAndPruneIntoFromInst(), combineLoadToOperationType(), ConvertShiftToMul(), llvm::convertToDeclaration(), createTblForTrunc(), createTblShuffleForZExt(), DoLowering(), doPromotion(), dropTypeTests(), EliminateDuplicatePHINodesNaiveImpl(), eliminateSwiftErrorArgument(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::objcarc::EraseInstruction(), expandAnyIntrinsic(), llvm::expandAtomicRMWToCmpXchg(), expandClampIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandExpIntrinsic(), expandFPToI(), expandIToFP(), expandLerpIntrinsic(), expandRcpIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandToSwitch(), findPHIToPartitionLoops(), llvm::SanitizerStatReport::finish(), FoldTwoEntryPHINode(), llvm::Constant::handleOperandChange(), llvm::InlineFunction(), inlineGetBaseAndOffset(), insertSpills(), insertUniqueBackedgeBlock(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), lowerAwaitSuspend(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), lowerExpectIntrinsic(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), lowerIntrinsic(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), LowerNegateToMultiply(), lowerSubFn(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), mergeCleanupPad(), llvm::InstDeleterIRStrategy::mutate(), nullifySetjmp(), optimizeDivRem(), OptimizeEmptyGlobalCXXDtors(), OptimizeGlobalAddressOfAllocation(), optimizeLoopExitWithUnknownExitCount(), processAbsIntrinsic(), processAnd(), processAShr(), llvm::JumpThreadingPass::processBranchOnXOR(), processInternalGlobal(), processMinMaxIntrinsic(), processOverflowIntrinsic(), processSDiv(), processSExt(), processSRem(), processUse(), promoteAllocaUserToVector(), promoteSingleBlockAlloca(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::removeIncomingValueIf(), removeMarkerCall(), RemovePreallocated(), llvm::removeUnwindEdge(), replace(), replaceAliasWithAliasee(), replaceAllUsesWith(), replaceArgumentUses(), replaceAsyncResumeFunction(), replaceCalledFunction(), ReplaceCallWith(), replaceFallthroughCoroEnd(), replaceFrameSizeAndAlignment(), replaceLoopPHINodesWithPreheaderValues(), replaceOperation(), replacePrepare(), llvm::replaceSignedInst(), reuseTableCompare(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), simplifySuspendPoint(), sink(), sinkMinMaxInBB(), speculatePHINodeLoads(), speculateSelectInstLoads(), splitAsyncCoroutine(), splitCallSite(), splitGlobal(), llvm::SplitIndirectBrCriticalEdges(), SplitLandingPadPredecessorsImpl(), splitRetconCoroutine(), llvm::OpenMPIRBuilder::tileLoops(), tryToRecognizeTableBasedCttz(), tryToReplaceWithGEPBuiltin(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), 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 538 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 592 of file Value.cpp.

References assert(), contains(), getType(), I, replaceDbgUsesOutsideBlock(), and replaceUsesWithIf().

◆ replaceUsesWithIf()

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

◆ reverseUseList()

void Value::reverseUseList ( )

Reverse the use-list.

Definition at line 1076 of file Value.cpp.

◆ setMetadata() [1/2]

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

Definition at line 1513 of file Metadata.cpp.

References getContext(), HasMetadata, and setMetadata().

◆ 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 1485 of file Metadata.cpp.

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

Referenced by setMetadata(), llvm::Instruction::setMetadata(), and llvm::InstCombinerImpl::visitCallInst().

◆ 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 377 of file Value.cpp.

References F.

Referenced by addReplicateRegions(), llvm::AllocaInst::AllocaInst(), llvm::Argument::Argument(), llvm::BinaryOperator::BinaryOperator(), llvm::CastInst::CastInst(), llvm::CloneBasicBlock(), cloneCandidateFunction(), llvm::CloneFunction(), llvm::CloneModule(), llvm::CmpInst::CmpInst(), llvm::EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(), llvm::EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::createInductionResumeValue(), createMemMoveLoop(), llvm::OpenMPIRBuilder::createParallel(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTeams(), doPromotion(), llvm::DuplicateInstructionsInSplitBetween(), llvm::embedBitcodeInModule(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPDerivedIVRecipe::execute(), externalize(), findBasePointer(), llvm::InnerLoopVectorizer::fixupIVUsers(), forceRenaming(), llvm::FreezeInst::FreezeInst(), generateUnsignedDivisionCode(), llvm::GlobalValue::GlobalValue(), hostParallelCallback(), InsertStackProtectors(), llvm::LoadInst::LoadInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerIntrinsicToFunction(), lowerObjCCall(), makeStatepointExplicitImpl(), optimizeDivRem(), optimizeSQRT(), llvm::LoopStructure::parseLoopStructure(), llvm::peelLoop(), llvm::Intrinsic::remangleIntrinsicFunction(), rematerializeChain(), rename(), ReplaceCallWith(), rewriteMaterializableInstructions(), llvm::LoopConstrainer::run(), runImpl(), llvm::InnerLoopVectorizer::scalarizeInstruction(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::ShuffleVectorInst::ShuffleVectorInst(), sinkInstruction(), splitBlockIfNotFirst(), SplitLandingPadPredecessorsImpl(), llvm::splitLoopBound(), SwitchToLookupTable(), targetParallelCallback(), turnGuardIntoBranch(), llvm::UnaryOperator::UnaryOperator(), llvm::UnrollRuntimeLoopRemainder(), llvm::versionCallSite(), llvm::LoopVersioning::versionLoop(), and llvm::logicalview::LVSymbolVisitor::visitKnownRecord().

◆ setValueName()

void Value::setValueName ( ValueName VN)

Definition at line 292 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 867 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 898 of file Value.h.

References assert(), and I.

◆ stripAndAccumulateConstantOffsets() [1/2]

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

Definition at line 726 of file Value.h.

References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().

◆ stripAndAccumulateConstantOffsets() [2/2]

const Value * llvm::Value::stripAndAccumulateConstantOffsets ( const DataLayout DL,
APInt Offset,
bool  AllowNonInbounds,
bool  AllowInvariantGroup = false,
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 AllowInvariantGroup is true then this method also looks through strip.invariant.group and launder.invariant.group intrinsics.

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(), CleanupConstantGlobalUsers(), computePointerICmp(), foldConsecutiveLoads(), foldLoadsRecursive(), getAssignmentInfoImpl(), getPointerOffsetFrom(), llvm::simplifyLoadInst(), stripAndAccumulateConstantOffsets(), stripAndAccumulateInBoundsConstantOffsets(), stripAndAccumulateOffsets(), transformToIndexedCompare(), and llvm::tryPromoteCall().

◆ stripAndAccumulateInBoundsConstantOffsets() [1/2]

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

Definition at line 741 of file Value.h.

References DL, llvm::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 736 of file Value.h.

References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().

Referenced by llvm::ConstantFoldCompareInstOperands(), llvm::getPointersDiff(), isNonEqualPointersWithRecursiveGEP(), and llvm::InstCombinerImpl::visitGetElementPtrInst().

◆ stripInBoundsConstantOffsets() [1/2]

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

Definition at line 687 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 705 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 753 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 785 of file Value.cpp.

Referenced by eraseLifetimeMarkersOnInputs().

◆ stripPointerCasts() [1/2]

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

Definition at line 644 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 693 of file Value.cpp.

Referenced by llvm::MachineFunction::addLandingPad(), llvm::Attributor::changeAfterManifest(), llvm::classifyEHPersonality(), compareNames(), llvm::diagnoseDontCall(), DoLowering(), llvm::emitCalloc(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), llvm::objcarc::EraseInstruction(), llvm::findAvailablePtrLoadStore(), llvm::findDevirtualizableCallsForTypeTest(), findInitTrampolineFromAlloca(), findSafeStoreForStoreStrongContraction(), FindUsedValues(), findUsedValues(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::CoroAsyncContextDeallocInst::getAsyncContext(), getAvailableLoadStore(), llvm::MemIntrinsicBase< Derived >::getDest(), getInvariantGroupClobberingInstruction(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), KernelInfo::getKernelEnvironementGVFromKernelInitCB(), getKnownConstant(), llvm::getMaybeBitcastedCallee(), llvm::InstrProfInstBase::getName(), llvm::CoroIdInst::getPromise(), llvm::objcarc::getreturnRVOperand(), llvm::MemTransferBase< BaseCL >::getSource(), isMaskedStoreOverwrite(), llvm::isSafeToLoadUnconditionally(), llvm::CallLowering::lowerCall(), OptimizeEmptyGlobalCXXDtors(), optimizeOnceStoredGlobal(), llvm::InstCombinerImpl::OptimizePointerDifference(), replacePrepare(), simplifyInvariantGroupIntrinsic(), simplifySuspendPoint(), stripPointerCasts(), llvm::Constant::stripPointerCasts(), llvm::tryDelinearizeFixedSizeImpl(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InstCombinerImpl::visitLandingPadInst(), and llvm::InstCombinerImpl::visitPHINode().

◆ stripPointerCastsAndAliases() [1/2]

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

Definition at line 654 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 697 of file Value.cpp.

Referenced by llvm::GlobalIFunc::getResolverFunction(), and stripPointerCastsAndAliases().

◆ stripPointerCastsForAliasAnalysis() [1/2]

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

Definition at line 677 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 709 of file Value.cpp.

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

◆ stripPointerCastsSameRepresentation() [1/2]

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

Definition at line 665 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 701 of file Value.cpp.

Referenced by llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), 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 383 of file Value.cpp.

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

Referenced by llvm::changeToCall(), CloneInstructionsIntoPredecessorBlockAndUpdateSSAUses(), llvm::convertToDeclaration(), DoLowering(), doPromotion(), llvm::embedBitcodeInModule(), llvm::InstCombinerImpl::EvaluateInDifferentType(), expandUDivOrURem(), foldConsecutiveLoads(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), FoldTwoEntryPHINode(), forceRenaming(), HandleInlinedEHPad(), hoistMinMax(), INITIALIZE_PASS(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVEPTest(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEUzp1(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), LowerNegateToMultiply(), llvm::MergeBlockIntoPredecessor(), modifyIntrinsicCall(), moveFunctionAdaptingType(), optimizeSection(), PropagateOperandBundles(), reassociateMinMaxWithConstantInOperand(), removeFromUsedList(), removeGlobalCtors(), RemovePreallocated(), llvm::removeUnwindEdge(), replaceAliasWithAliasee(), llvm::replaceSignedInst(), replaceUnaryCall(), rewriteMemOpOfSelect(), rewritePHIs(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), tryFactorization(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

◆ 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 364 of file Value.h.

References assertModuleIsMaterialized(), and materialized_use_begin().

◆ use_empty()

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

Definition at line 344 of file Value.h.

References assertModuleIsMaterialized().

Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), createRetPHINode(), DCEInstruction(), deleteIfDead(), llvm::Constant::destroyConstant(), llvm::AsmPrinter::doFinalization(), doPromotion(), dropIntrinsicWithUnknownMetadataArgument(), dropTypeTests(), llvm::OpenMPIRBuilder::emitBlock(), llvm::objcarc::EraseInstruction(), findArgParts(), hasAddressTakenAndUsed(), hasOneUser(), hasSameExtUse(), hasUseOtherThanLLVMUsed(), llvm::InlineFunction(), isDeadPHICycle(), isIntrinsicOrLFToBeTailCalled(), isLoadInvariantInLoop(), AliasScopeTracker::isNoAliasScopeDeclDead(), isRemovableWrite(), llvm::IntrinsicLowering::LowerIntrinsicCall(), mustPreserveGV(), OptimizeAwayTrappingUsesOfLoads(), OptimizeExtractBits(), OptimizeGlobalAddressOfAllocation(), optimizeGlobalsInModule(), processInternalGlobal(), processSelect(), llvm::promoteLoopAccessesToScalars(), promoteSingleBlockAlloca(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::StatepointLoweringState::relocCallVisited(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeEmptyCleanup(), llvm::MemorySSA::removeFromLookups(), removeGlobalCtors(), llvm::MemorySSAUpdater::removeMemoryAccess(), ReplaceCallWith(), llvm::LazyCallGraph::RefSCC::replaceNodeFunction(), replaceSubOverflowUses(), llvm::rewriteLoopExitValues(), RewriteUsesOfClonedInstructions(), llvm::LoadAndStorePromoter::run(), runIPSCCP(), llvm::StatepointLoweringState::scheduleRelocCall(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), simplifyAndDCEInstruction(), SinkCast(), speculatePHINodeLoads(), splitCallSite(), splitGlobal(), splitGlobals(), SplitLandingPadPredecessorsImpl(), stripDebugDeclareImpl(), llvm::stripDebugifyMetadata(), TryToShrinkGlobalToBoolean(), llvm::UpgradeARCRuntime(), llvm::InstCombinerImpl::visitCallInst(), llvm::PtrUseVisitor< DerivedT >::visitGetElementPtrInst(), and llvm::BasicBlock::~BasicBlock().

◆ use_end() [1/2]

use_iterator llvm::Value::use_end ( )
inline

Definition at line 368 of file Value.h.

Referenced by getNumUses(), hasNUses(), hasNUsesOrMore(), and materialized_uses().

◆ use_end() [2/2]

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

Definition at line 369 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 411 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 401 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 406 of file Value.h.

◆ users() [1/2]

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

Definition at line 421 of file Value.h.

References assertModuleIsMaterialized(), and materialized_users().

Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), llvm::canTrackGlobalVariableInterprocedurally(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), clearAssumptionsOfUsers(), llvm::CloneAndPruneIntoFromInst(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::createAnyOfTargetReduction(), createOutlinedFunction(), createRetBitCast(), createRetPHINode(), detectPopcountIdiom(), llvm::InstCombinerImpl::dominatesAllUses(), dropTypeTests(), findInitTrampolineFromAlloca(), FindPreallocatedCall(), FindSingleUseIdentifiedObject(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), forwardStoredOnceStore(), getArgSPIRVType(), getCleanupRetUnwindDest(), llvm::GCStatepointInst::getGCRelocates(), getGCResultLocality(), llvm::HexagonTargetObjectFile::getLutUsedFunction(), llvm::getNumOfCalls(), llvm::RecurrenceDescriptor::getReductionOpChain(), getUniqueUndroppableUser(), getUnwindDestToken(), getUnwindDestTokenHelper(), HasAddressTaken(), llvm::Function::hasAddressTaken(), hasExceptionPointerOrCodeUser(), hasHardUserWithinLoop(), hasLifetimeMarkers(), llvm::hasOutsideLoopUser(), hasSameExtUse(), hasStoreUsersOnly(), INITIALIZE_PASS(), insertSpills(), llvm::invertCondition(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), llvm::isAlmostDeadIV(), llvm::Loop::isAuxiliaryInductionVariable(), llvm::Constant::isConstantUsed(), llvm::RecurrenceDescriptor::isFixedOrderRecurrence(), isGOTEquivalentCandidate(), isHighCostExpansion(), isLocalAlloca(), llvm::isOverflowIntrinsicNoWrap(), isPointerValueDeadOnEntryToFunction(), isPTruePromoted(), isSafePHIToSpeculate(), localAllocaNeedsStackSave(), llvm::LowerDbgDeclare(), lowerLocalAllocas(), lowerNonLocalAlloca(), mapWasmLandingPadIndex(), negateICmpIfUsedByBranchOrSelectOnly(), nullifySetjmp(), OptimizeAwayTrappingUsesOfLoads(), optimizeDoubleFP(), OptimizeEmptyGlobalCXXDtors(), llvm::LoopVectorizationLegality::prepareToFoldTailByMasking(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), promoteSingleBlockAlloca(), relocationViaAlloca(), rematerializeLiveValuesAtUses(), RemovePreallocated(), llvm::InstructionPrecedenceTracking::removeUsersOf(), replaceConstantValueUsesInFuncWithInstr(), replaceConstatExprUsesInFuncWithInstr(), llvm::coro::replaceCoroFree(), replaceExtractElements(), replaceLoopPHINodesWithPreheaderValues(), replaceSubOverflowUses(), llvm::rewriteLoopExitValues(), rewriteNonInstructionUses(), rewriteSingleStoreAlloca(), llvm::BPFASpaceCastSimplifyPass::run(), llvm::ArgumentPromotionPass::run(), setCannotDuplicate(), shouldSpeculateInstrs(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), sinkAndCmp0Expression(), sinkLifetimeStartMarkers(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), splitGlobal(), swapICmpOperandsToExposeCSEOpportunities(), tryToElideArgumentCopy(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UpgradeARCRuntime(), usersDominator(), valueEscapes(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitShuffleVectorInst(), and ~Value().

◆ users() [2/2]

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

Definition at line 425 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 380 of file Value.h.

References assertModuleIsMaterialized(), and materialized_uses().

Friends And Related Function Documentation

◆ ValueAsMetadata

friend class ValueAsMetadata
friend

Definition at line 121 of file Value.h.

◆ ValueHandleBase

friend class ValueHandleBase
friend

Definition at line 122 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

◆ HasName

unsigned llvm::Value::HasName
protected

Definition at line 112 of file Value.h.

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

◆ IsUsedByMD

unsigned llvm::Value::IsUsedByMD
protected

Definition at line 111 of file Value.h.

Referenced by isUsedByMetadata().

◆ MaxAlignmentExponent

constexpr unsigned llvm::Value::MaxAlignmentExponent = 32
staticconstexpr

The maximum alignment for instructions.

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

Definition at line 806 of file Value.h.

Referenced by llvm::getOrEnforceKnownAlignment(), getPointerAlignment(), inferAlignment(), and llvm::InstCombinerImpl::visitCallInst().

◆ MaximumAlignment

constexpr uint64_t llvm::Value::MaximumAlignment = 1ULL << MaxAlignmentExponent
staticconstexpr

◆ NumUserOperands

unsigned llvm::Value::NumUserOperands
protected

◆ SubclassOptionalData

unsigned char llvm::Value::SubclassOptionalData
protected

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