LLVM 20.0.0git
|
LLVM Value Representation. More...
#include "llvm/IR/Value.h"
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 | |
Value & | operator= (const Value &)=delete |
void | deleteValue () |
Delete a pointer to a generic Value. | |
void | dump () const |
Support for debugging, callable in GDB: V->dump() | |
Type * | getType () const |
All values are typed, get the type of this value. | |
LLVMContext & | getContext () const |
All values hold a context through their type. | |
bool | hasName () const |
ValueName * | getValueName () 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_iterator > | materialized_uses () |
iterator_range< const_use_iterator > | materialized_uses () const |
iterator_range< use_iterator > | uses () |
iterator_range< const_use_iterator > | uses () 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 |
User * | user_back () |
const User * | user_back () const |
iterator_range< user_iterator > | materialized_users () |
iterator_range< const_user_iterator > | materialized_users () const |
iterator_range< user_iterator > | users () |
iterator_range< const_user_iterator > | users () 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. | |
Use * | getSingleUndroppableUse () |
Return true if there is exactly one use of this value that cannot be dropped. | |
const Use * | getSingleUndroppableUse () const |
User * | 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). | |
const User * | getUniqueUndroppableUser () 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 Value * | stripPointerCasts () const |
Strip off pointer casts, all-zero GEPs and address space casts. | |
Value * | stripPointerCasts () |
const Value * | stripPointerCastsAndAliases () const |
Strip off pointer casts, all-zero GEPs, address space casts, and aliases. | |
Value * | stripPointerCastsAndAliases () |
const Value * | stripPointerCastsSameRepresentation () const |
Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same. | |
Value * | stripPointerCastsSameRepresentation () |
const Value * | stripPointerCastsForAliasAnalysis () const |
Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info. | |
Value * | stripPointerCastsForAliasAnalysis () |
const Value * | stripInBoundsConstantOffsets () const |
Strip off pointer casts and all-constant inbounds GEPs. | |
Value * | stripInBoundsConstantOffsets () |
const 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. | |
Value * | stripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, bool AllowInvariantGroup=false) |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false. | |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
const Value * | stripInBoundsOffsets (function_ref< void(const Value *)> Func=[](const Value *) {}) const |
Strip off pointer casts and inbounds GEPs. | |
Value * | stripInBoundsOffsets (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 Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
Translate PHI node to its predecessor from the given basic block. | |
Value * | DoPHITranslation (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. | |
MDNode * | getMetadataImpl (unsigned KindID) const |
Get metadata for the given kind, if any. | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
MDNode * | getMetadata (unsigned KindID) const |
Get the current metadata attachments for the given kind, if any. | |
MDNode * | getMetadata (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 |
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.
using llvm::Value::const_use_iterator = use_iterator_impl<const Use> |
using llvm::Value::const_user_iterator = user_iterator_impl<const User> |
using llvm::Value::use_iterator = use_iterator_impl<Use> |
using llvm::Value::user_iterator = user_iterator_impl<User> |
|
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 |
enum llvm::Value::ValueTy |
Definition at line 53 of file Value.cpp.
References assert(), llvm::Type::isFirstClassType(), llvm::Type::isStructTy(), and llvm::Type::isVoidTy().
Referenced by llvm::cl::ValuesClass::apply(), llvm::generateBuiltinVar(), llvm::generateGetQueryInst(), llvm::generateWaveInst(), llvm::pdb::PDBSymbolCompilandEnv::getValue(), llvm::yaml::ScalarTraits< UnsignedValue >::input(), llvm::yaml::MappingTraits< MachineConstantPoolValue >::mapping(), llvm::operator<<(), llvm::pdb::operator<<(), llvm::operator==(), llvm::yaml::ScalarTraits< UnsignedValue >::output(), valuesOverlap(), and llvm::logicalview::LVSymbolVisitor::visitKnownRecord().
|
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().
Definition at line 1529 of file Metadata.cpp.
References addMetadata(), and getContext().
Add a metadata attachment.
Definition at line 1522 of file Metadata.cpp.
References assert(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by addMetadata().
|
inline |
|
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().
void Value::assertModuleIsMaterializedImpl | ( | ) | const |
Definition at line 456 of file Value.cpp.
References assert(), and llvm::GlobalValue::getParent().
Referenced by assertModuleIsMaterialized().
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 790 of file Value.cpp.
References A, assert(), F, getType(), I, and llvm::isPointerTy().
Referenced by getPointerDereferenceableBytes().
|
protected |
Erase all metadata attached to this Value.
Definition at line 1560 of file Metadata.cpp.
References assert(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by eraseMetadata(), eraseMetadataIf(), and ~Value().
|
inline |
Clear the optional flags contained in this value.
Definition at line 544 of file Value.h.
References SubclassOptionalData.
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().
|
inline |
Definition at line 797 of file Value.h.
References DoPHITranslation().
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 1067 of file Value.cpp.
Referenced by llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), DoPHITranslation(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), and llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad().
|
static |
Remove the droppable use U
.
Definition at line 217 of file Value.cpp.
References llvm::UndefValue::get(), llvm::ConstantInt::getTrue(), llvm_unreachable, and llvm::CallBase::BundleOpInfo::Tag.
Referenced by dropDroppableUses(), dropDroppableUsesIn(), removeIntrinsicUsers(), and llvm::InstCombinerImpl::visitCallInst().
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().
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().
LLVM_DUMP_METHOD void Value::dump | ( | ) | const |
Support for debugging, callable in GDB: V->dump()
Definition at line 5266 of file AsmWriter.cpp.
References llvm::dbgs(), and print().
Referenced by CanWidenIV(), checkPHIs(), DoFlattenLoopPair(), llvm::DbgValueLocEntry::dump(), llvm::CodeExtractor::extractCodeRegion(), findLoopComponents(), setLoopComponents(), and sinkAndCmp0Expression().
Erase all metadata attachments with the given kind.
Definition at line 1533 of file Metadata.cpp.
References clearMetadata(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by llvm::Instruction::dropPoisonGeneratingMetadata().
|
protected |
Erase all metadata attachments matching the given predicate.
Definition at line 1545 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().
|
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 1478 of file Metadata.cpp.
References assert(), getContext(), hasMetadata(), Info, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
LLVMContext & Value::getContext | ( | ) | const |
All values hold a context through their type.
Definition at line 1075 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(), AddParamAndFnBasicAttributes(), llvm::CallBase::addParamAttr(), llvm::CallBase::addRangeRetAttr(), llvm::CallBase::addRetAttr(), llvm::addRuntimeChecks(), llvm::GlobalObject::addTypeMetadata(), llvm::DbgVariableIntrinsic::addVariableLocationOps(), adjustInliningThresholdUsingCallee(), annotateDereferenceableBytes(), llvm::SelectInst::areInvalidOperands(), llvm::memprof::CallStackTrie::buildAndAttachMIBMetadata(), buildIntrinsicArgTypes(), canonicalizeForInvariantConditionInjection(), clearMetadata(), llvm::FenceInst::cloneImpl(), llvm::UnreachableInst::cloneImpl(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerDifference(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), convertMetadataToAssumes(), llvm::GlobalObject::copyMetadata(), copyMetadataForAtomic(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), llvm::ARMConstantPoolConstant::Create(), llvm::createCallMatchingInvoke(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), llvm::InstCombinerImpl::CreateNonTerminatorUnreachable(), llvm::createPGONameMetadata(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), CreatePrologue(), llvm::IRBuilderBase::CreateThreadLocalAddress(), despeculateCountZeros(), diagnoseInvalidFormatString(), llvm::Instruction::dropLocation(), emitAtomicRMWLegalRemark(), emitDbgAssign(), emitGlobalConstantVector(), eraseMetadata(), eraseMetadataIf(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), expandBounds(), expandToSwitch(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), extractMDNode(), 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::getInsertElement(), getKnownValueOnEdge(), getMemCmpLoad(), getMetadata(), getMetadataImpl(), llvm::GlobalValue::getPartition(), getPointerOperandAndType(), getPreferredVectorIndex(), llvm::GlobalValue::getSanitizerMetadata(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::ConstantStruct::getTypeForElements(), getValueName(), getVTableAddrForProfData(), handleBrSelExpect(), llvm::ValueAsMetadata::handleRAUW(), llvm::Attributor::hasAttr(), IdentifyValidPoisonGeneratingAttributes(), IdentifyValidUBGeneratingAttributes(), llvm::InlineFunction(), inlineRetainOrClaimRVCalls(), llvm::DIBuilder::insertDbgAssign(), insertNewDbgInst(), insertSpills(), llvm::intersectAccessGroups(), llvm::AAWillReturn::isImpliedByIR(), llvm::AANoUndef::isImpliedByIR(), isLoadCombineCandidateImpl(), isPointerAlwaysReplaceable(), 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(), populateOperands(), processCallSite(), processUGT_ADDCST_ADD(), promoteAllocaUserToVector(), llvm::pgo::promoteIndirectCall(), llvm::propagateMetadata(), 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(), scalarizeMaskedVectorHistogram(), 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(), simplifyUsingControlFlow(), splitGlobal(), llvm::SplitKnownCriticalEdge(), tryToMoveFreeBeforeNullTest(), TryToShrinkGlobalToBoolean(), turnGuardIntoBranch(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), 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().
Definition at line 1455 of file Metadata.cpp.
References getContext(), llvm::LLVMContext::getMDKindID(), getMetadataImpl(), and hasMetadata().
|
protected |
Definition at line 1473 of file Metadata.cpp.
References getContext(), getMetadata(), and hasMetadata().
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(), and hasMetadata().
|
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 1468 of file Metadata.cpp.
References getContext(), hasMetadata(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
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 1462 of file Metadata.cpp.
References getContext(), llvm::MDAttachments::lookup(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by getMetadata().
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(), createCloneDeclaration(), createInvariantCond(), llvm::createPGONameMetadata(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), createUnreachableSwitchDefault(), llvm::SPIRV::ConvergenceRegion::dump(), llvm::sandboxir::BasicBlock::dump(), llvm::CFGMST< Edge, BBInfo >::dumpEdges(), llvm::JumpThreadingPass::duplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), llvm::OpenMPIRBuilder::emitCancelationCheckImpl(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), llvm::ExecutionEngine::emitGlobals(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::LoopVectorizationPlanner::emitInvalidCostRemarks(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::emitLinkerFlagsForUsedCOFF(), llvm::AsmPrinter::emitSpecialLLVMGlobal(), emitTransformedIndex(), llvm::BranchProbabilityInfo::eraseBlock(), llvm::logicalview::LVCompare::execute(), llvm::VPIRBasicBlock::execute(), llvm::VPBasicBlock::executeRecipes(), 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::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(), llvm::sandboxir::Value::getName(), getNameOrAsOperand(), llvm::Mangler::getNameWithPrefix(), llvm::DOTGraphTraits< AttributorCallGraph * >::getNodeLabel(), llvm::OpenMPIRBuilder::getOrCreateRuntimeFunction(), llvm::AArch64Subtarget::getPtrAuthBlockAddressDiscriminatorIfEnabled(), llvm::getSamplerName(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::getSurfaceName(), llvm::getTextureName(), llvm::LazyValueInfoImpl::getValueAt(), llvm::LazyValueInfoImpl::getValueInBlock(), llvm::LazyValueInfoImpl::getValueOnEdge(), getVarName(), HandleByValArgument(), HandleInlinedEHPad(), hoistBOAssociation(), hoistMinMax(), llvm::FunctionImporter::importFunctions(), llvm::logicalview::LVBinaryReader::includeInlineeLines(), INITIALIZE_PASS(), llvm::SelectionDAGISel::initializeAnalysisResults(), injectPendingInvariantConditions(), llvm::InlineFunction(), llvm::InsertPreheaderForLoop(), insertSpills(), insertUniqueBackedgeBlock(), 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(), LLVMGetBasicBlockName(), LLVMGetValueName(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), llvm::XtensaTargetLowering::LowerCall(), 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::XtensaConstantPoolConstant::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(), 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::InlineCostAnnotationPrinterPass::run(), llvm::ArgumentPromotionPass::run(), runAttributorLightOnFunctions(), runAttributorOnFunctions(), llvm::JumpThreadingPass::runImpl(), runImpl(), runIPSCCP(), llvm::LPPassManager::runOnFunction(), llvm::DetectRoundChange::runOnMachineFunction(), salvageDebugInfoImpl(), selectExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::IRSimilarity::IRInstructionData::setCalleeName(), shouldCheckArgs(), simplifyAllocaArraySize(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), sinkInstruction(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), SortAuthStubPair(), 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(), llvm::InvokeInst::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().
std::string Value::getNameOrAsOperand | ( | ) | const |
Definition at line 445 of file Value.cpp.
References getName(), OS, and printAsOperand().
Referenced by hoist(), llvm::FunctionSpecializer::run(), and llvm::SCCPInstVisitor::setLatticeValueForSpecializationArguments().
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::emitTargetTask(), llvm::OpenMPIRBuilder::finalize(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), and rematerializeLiveValuesAtUses().
Align Value::getPointerAlignment | ( | const DataLayout & | DL | ) | const |
Returns an alignment of the pointer value.
Returns an alignment which is either specified explicitly, e.g. via align attribute of a function argument, or guaranteed by DataLayout.
Definition at line 927 of file Value.cpp.
References A, assert(), DL, llvm::ConstantInt::getLimitedValue(), llvm::ConstantExpr::getPtrToInt(), getType(), llvm::DataLayout::Independent, llvm::isPointerTy(), llvm::Type::isSized(), llvm_unreachable, MaxAlignmentExponent, MaximumAlignment, llvm::DataLayout::MultipleOfFunctionAlign, and llvm::MaybeAlign::valueOrOne().
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::OpenMPIRBuilder::createTask(), llvm::OpenMPIRBuilder::emitTargetTask(), emitTargetTaskProxyFunction(), llvm::AMDGPU::getAlign(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), instCombineSVELD1(), instCombineSVEST1(), and llvm::SystemZSubtarget::isPC32DBLSymbol().
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 852 of file Value.cpp.
References A, assert(), canBeFreed(), DL, llvm::ConstantInt::getLimitedValue(), getType(), llvm::isPointerTy(), and UseDerefAtPointSemantics.
Referenced by llvm::InstCombinerImpl::visitGetElementPtrInst().
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 1028 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().
Referenced by llvm::DIExpression::calculateFragmentIntersect().
|
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.
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().
Definition at line 457 of file Value.h.
References getSingleUndroppableUse().
|
inlineprotected |
Definition at line 866 of file Value.h.
Referenced by llvm::Function::stealArgumentListFrom().
|
inline |
All values are typed, get the type of this value.
Definition at line 255 of file Value.h.
Referenced by llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::add(), llvm::AliasSetTracker::add(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::add(), addAssumeNonNull(), addConditions(), llvm::detail::PtrUseVisitorBase::adjustOffsetForGEP(), llvm::AMDGPUAAResult::alias(), llvm::NVPTXAAResult::alias(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), appendToGlobalArray(), applyX86MaskOn1BitsVec(), areBothVectorOrScalar(), areExtractShuffleVectors(), llvm::SelectInst::areInvalidOperands(), areInverseVectorBitmasks(), areNonOverlapSameBaseLoadAndStore(), argVectorFlatten(), aspaceWrapOperand(), aspaceWrapValue(), llvm::CanonicalLoopInfo::assertOK(), llvm::BitcodeReaderValueList::assignValue(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), BreakUpSubtract(), llvm::buildAtomicRMWValue(), BuildConstantFromSCEV(), buildMultiplyTree(), callBufferedPrintfStart(), canBeFreed(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canContractSqrtToRsq(), canEvaluateShiftedShift(), canFoldTermCondOfLoop(), canonicalizeBitCastExtElt(), canonicalizeForInvariantConditionInjection(), canonicalizeLowbitMask(), canonicalizeSaturatedAdd(), llvm::canReplacePointersIfEqual(), llvm::canReplacePointersInUseIfEqual(), 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(), llvm::ScalarEvolution::LoopGuards::collect(), collectShuffleElements(), collectSingleShuffleElements(), collectUnswitchCandidatesWithInjections(), combineConstantPoolLoads(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), compareCmp(), CompareValueComplexity(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromCmp(), computeKnownBitsFromICmpCond(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::computeOverflowForSignedMul(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerDifference(), computePointerICmp(), concatenateTwoVectors(), llvm::concatenateVectors(), ConnectProlog(), llvm::ConstantAggregate::ConstantAggregate(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastOperand(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), 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::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(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), createMemSetLoop(), llvm::FixedPointBuilder< IRBuilderTy >::CreateMul(), llvm::OpenMPIRBuilder::createOffloadMapnames(), llvm::OpenMPIRBuilder::createOffloadMaptypes(), llvm::OpenMPIRBuilder::createOrderedDepend(), llvm::createPGOFuncNameVar(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), createPopcntIntrinsic(), createPowWithIntegerExponent(), createPrivateConstGlobalForString(), llvm::createPrivateGlobalForString(), createProfileFileNameVar(), llvm::createProfileFileNameVar(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::OpenMPIRBuilder::createReductions(), createRetPHINode(), createReverseEVL(), createScalarIVSteps(), llvm::CastInst::CreateSExtOrBitCast(), llvm::Attributor::createShallowWrapper(), createShiftShuffle(), llvm::AMDGPU::createSlowPathCmp(), llvm::OpenMPIRBuilder::createTargetInit(), createTargetLoopWorkshareCall(), createTblForTrunc(), 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::VPInterleaveRecipe::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(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), llvm::fcmpImpliesClass(), findBasePointer(), findCommonType(), findDemandedEltsBySingleUser(), findExtractedInputToOverallInputMapping(), findFuncPointers(), 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(), foldConsecutiveLoads(), foldCopySignIdioms(), foldCttzCtlz(), foldDependentIVs(), foldFCmpFNegCommonOp(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), foldFPtoI(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), 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(), foldMinimumOverTrailingOrLeadingZeroCount(), 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(), 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::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::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(), getFCmpValue(), llvm::MemoryLocation::getForDest(), getFromRangeMetadata(), llvm::GVNExpression::VariableExpression::getHashValue(), llvm::GVNExpression::ConstantExpression::getHashValue(), llvm::CanonicalLoopInfo::getIndVarType(), llvm::ConstantExpr::getInsertElement(), llvm::Instruction::getInsertionPointAfterDef(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::ConstantInt::getIntegerType(), getInvertibleOperands(), llvm::BinOpInit::getListConcat(), llvm::TargetLoweringBase::getLoadMemOperandFlags(), getMaskedTypeForICmpPair(), getMatchingValue(), 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(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), 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::sandboxir::Value::getType(), llvm::ScalarEvolution::getUDivExpr(), llvm::ScalarEvolution::getUMaxFromMismatchedTypes(), llvm::getUnderlyingObject(), getUniformBase(), 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(), HandleByValArgument(), 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(), instCombineST1ScatterIndex(), instCombineSVECondLast(), instCombineSVEDupqLane(), instCombineSVELast(), instCombineSVEPTest(), llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(), 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(), isFreeConcat(), isHighCostExpansion(), llvm::Instruction::isIdenticalToWhenDefined(), llvm::AANoAlias::isImpliedByIR(), llvm::isImpliedCondition(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntegerWideningViableForSlice(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), isKnownNonEqual(), llvm::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::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), LowerNegateToMultiply(), llvm::lowerObjectSizeCall(), lowerPtrAnnotation(), 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(), llvm::SinkInstructionStrategy::mutate(), llvm::InstDeleterIRStrategy::mutate(), narrowVectorSelect(), needsFPFromSig(), llvm::RandomIRBuilder::newSource(), operandWithNewAddressSpaceOrCreatePoison(), OptimizeAwayTrappingUsesOfValue(), optimizeBranch(), optimizeCallInst(), optimizeDoubleFP(), OptimizeEmptyGlobalAtExitDtors(), OptimizeExtractBits(), llvm::VPlanTransforms::optimizeForVFAndUF(), optimizeIntegerToVectorInsertions(), optimizeMemCmpConstantSize(), optimizeMemCmpVarSize(), optimizeNaN(), OptimizeNoopCopyExpression(), optimizeOnceStoredGlobal(), optimizeSection(), optimizeVectorResizeWithIntegerBitCasts(), llvm::TargetLowering::ParseConstraints(), llvm::LoopStructure::parseLoopStructure(), populateOperands(), llvm::BasicTTIImplBase< T >::preferToKeepConstantsAttached(), llvm::VPlan::prepareToExecute(), llvm::VPReplicateRecipe::print(), processArg(), processAShr(), llvm::JumpThreadingPass::processBranchOnXOR(), processCmpIntrinsic(), processInternalGlobal(), processNonStringArg(), processOverflowIntrinsic(), processSDiv(), processSelect(), processSExt(), processSIToFP(), processSwitches(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), promoteAllocaUserToVector(), llvm::promoteCall(), promoteSingleBlockAlloca(), propagateNaN(), 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(), replaceSwiftErrorOps(), 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(), scalarize(), llvm::InnerLoopVectorizer::scalarizeInstruction(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedVectorHistogram(), 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::LoongArchTargetLowering::signExtendConstant(), 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::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyDiv(), simplifyDivRem(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifyExtractElementInst(), simplifyFAddInst(), simplifyFDivInst(), simplifyFMAFMul(), simplifyFRemInst(), simplifyFSubInst(), simplifyICmpInst(), simplifyICmpOfBools(), llvm::ScalarEvolution::SimplifyICmpOperands(), simplifyICmpWithBinOp(), llvm::simplifyInsertElementInst(), simplifyInsertValueInst(), simplifyIntrinsic(), simplifyLdexp(), llvm::simplifyLoadInst(), simplifyLogicOfAddSub(), simplifyMulInst(), simplifyOrInst(), simplifyOrOfICmpsWithAdd(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyPHINode(), simplifyReductionOperand(), simplifyRelocatesOffABase(), simplifyRem(), simplifyRightShift(), simplifySDivInst(), simplifySelectInst(), simplifyShift(), simplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyShuffleVectorInst(), simplifySRemInst(), simplifySubInst(), simplifySwitchOfPowersOfTwo(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), simplifyUsingControlFlow(), simplifyX86addcarry(), simplifyX86immShift(), simplifyX86MaskedStore(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86pmadd(), simplifyX86pmulh(), simplifyXorInst(), SinkShiftAndTruncate(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitBlockAndInsertForEachLane(), splitCallSite(), llvm::SplitIndirectBrCriticalEdges(), SplitLandingPadPredecessorsImpl(), splitMergedValStore(), splitRetconCoroutine(), stripGCRelocates(), swapICmpOperandsToExposeCSEOpportunities(), switchToLookupTable(), tagGlobalDefinition(), threadCmpOverSelect(), llvm::OpenMPIRBuilder::tileLoops(), llvm::Constant::toConstantRange(), transformGlobalArray(), transformToIndexedCompare(), translateExtract(), trimTrailingZerosInVector(), tryInsertCastToCommonAddrSpace(), llvm::tryPromoteCall(), llvm::VPRecipeBuilder::tryToCreateWidenRecipe(), tryToImproveAlign(), tryToMergePartialOverlappingStores(), tryToRecognizeTableBasedCttz(), tryToShorten(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), unpackFromRegLoc(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), UpdatePHINodes(), updatePredecessorProfileMetadata(), upgradeAbs(), upgradeAMDGCNIntrinsicCall(), llvm::UpgradeARCRuntime(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), upgradeMaskedCompare(), upgradeMaskedLoad(), upgradeMaskToInt(), upgradePMULDQ(), upgradeX86ALIGNIntrinsics(), upgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86IntrinsicCall(), upgradeX86Rotate(), upgradeX86vpcom(), upgradeX86VPERMT2Intrinsics(), validateAndCostRequiredSelects(), valueEscapes(), llvm::ValueHandleBase::ValueIsRAUWd(), 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::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::ScalarEvolution::willNotOverflow(), WriteConstantInternal(), llvm::BasicBlock::~BasicBlock(), llvm::Instruction::~Instruction(), and llvm::MetadataAsValue::~MetadataAsValue().
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().
Definition at line 464 of file Value.h.
References getUniqueUndroppableUser().
|
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:
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::Constant::handleOperandChange(), llvm::GlobalValue::removeFromParent(), and llvm::GlobalValue::setThreadLocalMode().
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().
|
inlineprotected |
Return true if this value has any metadata attached to it.
Definition at line 589 of file Value.h.
References HasMetadata.
Referenced by llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::Instruction::getAAMetadata(), getAllMetadata(), and getMetadata().
Definition at line 596 of file Value.h.
References getMetadata().
Return true if this value has the given type of metadata attached.
Definition at line 593 of file Value.h.
References getMetadata().
|
inline |
Definition at line 261 of file Value.h.
References HasName.
Referenced by addReplicateRegions(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), llvm::CloneBasicBlock(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), llvm::ExecutionEngine::emitGlobals(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::emitLinkerFlagsForUsedCOFF(), externalize(), extractSubModule(), llvm::JITSymbolFlags::fromGlobalValue(), llvm::ModuleSummaryIndex::getGlobalValueSummary(), llvm::ExecutionEngine::getMangledName(), getName(), llvm::Mangler::getNameWithPrefix(), llvm::getSamplerName(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::getSurfaceName(), llvm::getTextureName(), initSlots2BasicBlocks(), llvm::MergeBlockIntoPredecessor(), OptimizeGlobalVars(), llvm::VPWidenCallRecipe::print(), llvm::MemoryPhi::print(), printBBName(), printIRBlockReference(), takeName(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), and llvm::UpgradeGlobalVariable().
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().
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().
Return true if this Value has exactly N uses.
Definition at line 149 of file Value.cpp.
References llvm::hasNItems(), N, use_begin(), and use_end().
Referenced by canonicalizeAbs(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::RecurrenceDescriptor::getReductionOpChain(), and isSSATMinMaxPattern().
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().
|
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(), combineTargetShuffle(), dropRedundantMaskingOfLeftShiftInput(), emitGlobalConstantImpl(), factorizeFAddFSub(), factorizeMinMaxTree(), findBuildAggregate_rec(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseIdentifiedObject(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfSETCC(), foldAndToXor(), llvm::foldBranchToCommonDest(), foldClampRangeOfTwo(), foldComplexAndOrPatterns(), foldCtpop(), foldCtpopPow2Test(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldIdentityExtractShuffle(), foldIDivShl(), foldInsSequenceIntoSplat(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldNoWrapAdd(), 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::AArch64TTIImpl::getShuffleCost(), llvm::Function::hasAddressTaken(), hasNonFlagsUse(), hasOneUser(), hasUseOtherThanLLVMUsed(), hoistAddSub(), hoistMulAddAssociation(), llvm::InvertBranch(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), isDeadPHICycle(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), isF128MovedToParts(), isFirstInsertElement(), llvm::SystemZTTIImpl::isFoldableLoad(), isFPSatMinMaxPattern(), isI128MovedToParts(), lowerAddSubToHorizontalOp(), llvm::MSP430TargetLowering::LowerSETCC(), narrowInsElt(), optimizeLoopExitWithUnknownExitCount(), performAddCombineForShiftedOperands(), performAddCSelIntoCSinc(), llvm::ARMTargetLowering::PerformBRCONDCombine(), llvm::ARMTargetLowering::PerformCMOVCombine(), performMSTORECombine(), performOrXorChainCombine(), performSETCCCombine(), performSTORECombine(), PerformVQDMULHCombine(), processUGT_ADDCST_ADD(), rematerializeLiveValuesAtUses(), removeEmptyCleanup(), replaceArgumentUses(), replaceExtractElements(), ShouldBreakUpSubtract(), shouldConvertToRelLookupTable(), shouldExpandCmpArithRMWInIR(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedBits(), 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::visitFCmpInst(), 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().
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 llvm::LoopVectorizationCostModel::getReductionPatternCost(), and isNotUsedOrFoldableInLoop().
Check the optional flags for equality.
Definition at line 549 of file Value.h.
References SubclassOptionalData.
|
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().
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 1096 of file Value.cpp.
Referenced by findExtractedInputToOverallInputMapping(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), and llvm::SwiftErrorValueTracking::preassignVRegs().
|
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().
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().
|
inline |
Definition at line 356 of file Value.h.
Referenced by materialized_uses(), and use_begin().
|
inline |
|
inline |
|
inline |
Definition at line 393 of file Value.h.
Referenced by materialized_users(), user_back(), and user_begin().
|
inline |
|
inline |
Definition at line 415 of file Value.h.
References llvm::make_range(), materialized_user_begin(), and user_end().
Referenced by forEachUser(), and users().
|
inline |
Definition at line 418 of file Value.h.
References llvm::make_range(), materialized_user_begin(), and user_end().
|
inline |
Definition at line 370 of file Value.h.
References llvm::make_range(), materialized_use_begin(), and use_end().
Referenced by uses().
|
inline |
Definition at line 373 of file Value.h.
References llvm::make_range(), materialized_use_begin(), and use_end().
|
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 llvm::CallBase::mutateFunctionType().
void Value::print | ( | raw_ostream & | O, |
bool | IsForDebug = false |
||
) | const |
Implement operator<< on Value.
Definition at line 5023 of file AsmWriter.cpp.
References getModuleFromVal(), I, isReferencingMDNode(), and print().
Referenced by llvm::MIRPrinter::convert(), dump(), llvm::AMDGPUTargetAsmStreamer::EmitAmdhsaKernelDescriptor(), llvm::AMDGPU::AMDGPUMCKernelCodeT::EmitKernelCodeT(), llvm::MCTargetStreamer::emitValue(), llvm::operator<<(), print(), llvm::AccelTableBase::HashData::print(), and PrintField::printField().
void Value::print | ( | raw_ostream & | O, |
ModuleSlotTracker & | MST, | ||
bool | IsForDebug = false |
||
) | const |
Definition at line 5034 of file AsmWriter.cpp.
References A, llvm::CallingConv::C, F, llvm::ModuleSlotTracker::getMachine(), getModuleFromVal(), llvm::GlobalValue::getParent(), I, llvm::ModuleSlotTracker::incorporateFunction(), llvm_unreachable, OS, printAsOperand(), and WriteConstantInternal().
void Value::printAsOperand | ( | raw_ostream & | O, |
bool | PrintType, | ||
ModuleSlotTracker & | MST | ||
) | const |
Definition at line 5121 of file AsmWriter.cpp.
References llvm::ModuleSlotTracker::getMachine(), llvm::ModuleSlotTracker::getModule(), printAsOperandImpl(), and printWithoutType().
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 5106 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::sandboxir::Value::printAsOperandCommon(), llvm::GVNExpression::StoreExpression::printInternal(), and SinkInstruction().
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::changeToInvokeAndSplitBasicBlock(), llvm::CloneAndPruneIntoFromInst(), combineLoadToOperationType(), ConvertShiftToMul(), llvm::convertToDeclaration(), createTblForTrunc(), DoLowering(), doPromotion(), dropTypeTests(), EliminateDuplicatePHINodesNaiveImpl(), eliminateSwiftErrorArgument(), llvm::SITargetLowering::emitExpandAtomicRMW(), llvm::objcarc::EraseInstruction(), expandAbs(), expandAnyIntrinsic(), llvm::expandAtomicRMWToCmpXchg(), expandClampIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandExpIntrinsic(), expandFPToI(), expandIntegerDot(), expandIToFP(), expandLengthIntrinsic(), expandLerpIntrinsic(), expandLogIntrinsic(), expandPowIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandToSwitch(), findPHIToPartitionLoops(), llvm::SanitizerStatReport::finish(), foldTwoEntryPHINode(), llvm::Constant::handleOperandChange(), llvm::InlineFunction(), inlineGetBaseAndOffset(), insertSpills(), insertUniqueBackedgeBlock(), LLVMReplaceAllUsesWith(), 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(), OptimizeEmptyGlobalAtExitDtors(), OptimizeGlobalAddressOfAllocation(), optimizeLoopExitWithUnknownExitCount(), processAnd(), processAShr(), llvm::JumpThreadingPass::processBranchOnXOR(), processCmpIntrinsic(), processInternalGlobal(), processMinMaxIntrinsic(), processOverflowIntrinsic(), processSDiv(), processSExt(), processSIToFP(), processSRem(), processSwitches(), processUse(), promoteAllocaUserToVector(), promoteSingleBlockAlloca(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::removeIncomingValueIf(), removeMarkerCall(), RemovePreallocated(), llvm::removeUnwindEdge(), replace(), replaceAliasWithAliasee(), replaceAllUsesWith(), llvm::sandboxir::Value::replaceAllUsesWith(), replaceArgumentUses(), replaceAsyncResumeFunction(), replaceCalledFunction(), ReplaceCallWith(), replaceFallthroughCoroEnd(), replaceFrameSizeAndAlignment(), replaceLoopPHINodesWithPreheaderValues(), replaceOperation(), replacePrepare(), llvm::replaceSignedInst(), reuseTableCompare(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), scalarize(), 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(), upgradeX86IntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and llvm::BasicBlock::~BasicBlock().
void Value::replaceNonMetadataUsesWith | ( | Value * | V | ) |
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().
void Value::replaceUsesWithIf | ( | Value * | New, |
llvm::function_ref< bool(Use &U)> | ShouldReplace | ||
) |
Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the given Use.
Unlike replaceAllUsesWith() this function does not support basic block values.
Definition at line 542 of file Value.cpp.
References assert(), llvm::CallingConv::C, llvm::SmallVectorBase< Size_T >::empty(), getType(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::make_early_inc_range(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and uses().
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTask(), llvm::MemorySSAUpdater::insertDef(), insertSpills(), replaceConstants(), replaceUsesOutsideBlock(), llvm::sandboxir::Value::replaceUsesWithIf(), and llvm::TryToSimplifyUncondBranchFromEmptyBlock().
Definition at line 1516 of file Metadata.cpp.
References getContext(), HasMetadata, and setMetadata().
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 1488 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().
Change the name of the value.
Choose a new unique name if the provided name is taken.
Name | The 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(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), llvm::OpenMPIRBuilder::createParallel(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTeams(), doPromotion(), llvm::DuplicateInstructionsInSplitBetween(), llvm::embedBitcodeInModule(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPDerivedIVRecipe::execute(), externalize(), findBasePointer(), llvm::InnerLoopVectorizer::fixupIVUsers(), forceRenaming(), llvm::FreezeInst::FreezeInst(), generateUnsignedDivisionCode(), llvm::GlobalValue::GlobalValue(), InsertStackProtectors(), LLVMSetValueName(), LLVMSetValueName2(), 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(), scalarizeMaskedVectorHistogram(), llvm::ShuffleVectorInst::ShuffleVectorInst(), sinkInstruction(), splitBlockIfNotFirst(), SplitLandingPadPredecessorsImpl(), llvm::splitLoopBound(), switchToLookupTable(), turnGuardIntoBranch(), llvm::UnaryOperator::UnaryOperator(), llvm::UnrollRuntimeLoopRemainder(), versionCallSiteWithCond(), llvm::LoopVersioning::versionLoop(), and llvm::logicalview::LVSymbolVisitor::visitKnownRecord().
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().
|
inlineprotected |
void llvm::Value::sortUseList | ( | Compare | Cmp | ) |
|
inline |
Definition at line 726 of file Value.h.
References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().
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::ConstantPtrAuth::isKnownCompatibleWith(), llvm::simplifyLoadInst(), stripAndAccumulateConstantOffsets(), stripAndAccumulateInBoundsConstantOffsets(), stripAndAccumulateOffsets(), transformToIndexedCompare(), and llvm::tryPromoteCall().
|
inline |
Definition at line 741 of file Value.h.
References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().
|
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().
|
inline |
Definition at line 687 of file Value.h.
References stripInBoundsConstantOffsets().
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 706 of file Value.cpp.
Referenced by stripInBoundsConstantOffsets(), and llvm::PGOIndirectCallVisitor::tryGetVTableInstruction().
|
inline |
Definition at line 644 of file Value.h.
References stripPointerCasts().
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 694 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::VPInterleaveRecipe::execute(), 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(), OptimizeEmptyGlobalAtExitDtors(), optimizeOnceStoredGlobal(), llvm::InstCombinerImpl::OptimizePointerDifference(), replacePrepare(), simplifySuspendPoint(), stripPointerCasts(), llvm::Constant::stripPointerCasts(), llvm::tryDelinearizeFixedSizeImpl(), llvm::InstCombinerImpl::visitLandingPadInst(), and llvm::InstCombinerImpl::visitPHINode().
|
inline |
Definition at line 654 of file Value.h.
References stripPointerCastsAndAliases().
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 698 of file Value.cpp.
Referenced by llvm::GlobalIFunc::getResolverFunction(), llvm::TargetLowering::LowerToTLSEmulatedModel(), and stripPointerCastsAndAliases().
|
inline |
Definition at line 677 of file Value.h.
References stripPointerCastsForAliasAnalysis().
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 710 of file Value.cpp.
Referenced by llvm::GlobalsAAResult::alias(), and stripPointerCastsForAliasAnalysis().
|
inline |
Definition at line 665 of file Value.h.
References stripPointerCastsSameRepresentation().
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 702 of file Value.cpp.
Referenced by llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), and stripPointerCastsSameRepresentation().
void Value::takeName | ( | Value * | V | ) |
Transfer the name from V to this value.
After taking V's name, sets V's name to empty.
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().
|
inline |
Definition at line 360 of file Value.h.
References assertModuleIsMaterialized(), and materialized_use_begin().
Referenced by forEachCall(), getNumUses(), llvm::LazyValueInfoImpl::getValueAtUse(), hasNonFlagsUse(), hasNUses(), hasNUsesOrMore(), isI128MovedToParts(), OptimizeGlobalAddressOfAllocation(), llvm::MemorySSAUpdater::removeMemoryAccess(), shouldConvertToRelLookupTable(), llvm::sandboxir::Value::use_begin(), and llvm::sandboxir::Value::user_begin().
|
inline |
Definition at line 364 of file Value.h.
References assertModuleIsMaterialized(), and materialized_use_begin().
|
inline |
Definition at line 344 of file Value.h.
References assertModuleIsMaterialized().
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), computeVirtualCallSiteTypeInfoMap(), createRetPHINode(), DCEInstruction(), deleteIfDead(), llvm::Constant::destroyConstant(), llvm::AsmPrinter::doFinalization(), doPromotion(), dropTypeTests(), llvm::OpenMPIRBuilder::emitBlock(), llvm::objcarc::EraseInstruction(), findArgParts(), forEachCall(), hasAddressTakenAndUsed(), hasOneUser(), hasSameExtUse(), hasUseOtherThanLLVMUsed(), llvm::InlineFunction(), isDeadPHICycle(), isIntrinsicOrLFToBeTailCalled(), 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::slpvectorizer::BoUpSLP::removeInstructionsAndOperands(), llvm::MemorySSAUpdater::removeMemoryAccess(), ReplaceCallWith(), llvm::LazyCallGraph::RefSCC::replaceNodeFunction(), 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().
|
inline |
Definition at line 368 of file Value.h.
Referenced by getNumUses(), hasNUses(), hasNUsesOrMore(), materialized_uses(), llvm::sandboxir::Value::use_begin(), and llvm::sandboxir::Value::user_begin().
|
inline |
|
inline |
Definition at line 407 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
Referenced by llvm::OpenMPIRBuilder::createTeams(), llvm::Constant::destroyConstant(), emitGlobalConstantImpl(), llvm::OpenMPIRBuilder::emitTargetTask(), hostParallelCallback(), OptimizeGlobalAddressOfAllocation(), replaceArgumentUses(), runIPSCCP(), stripDebugDeclareImpl(), targetParallelCallback(), TryToShrinkGlobalToBoolean(), and llvm::BasicBlock::~BasicBlock().
Definition at line 411 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
|
inline |
Definition at line 397 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
Referenced by addAllGlobalValueUsers(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::Function::hasAddressTaken(), hasNUndroppableUses(), hasNUndroppableUsesOrMore(), hasOneUser(), hasSameExtUse(), llvm::SystemZTTIImpl::isFoldableLoad(), isFPSatMinMaxPattern(), isPointerUseReplacable(), isSSATMinMaxPattern(), isUsedInBasicBlock(), OptimizeExtractBits(), rematerializeLiveValuesAtUses(), llvm::Constant::removeDeadConstantUsers(), replaceAllUsesWith(), sinkAndCmp0Expression(), SinkCast(), and llvm::PredicateInfo::~PredicateInfo().
|
inline |
Definition at line 401 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
|
inline |
Definition at line 385 of file Value.h.
References assertModuleIsMaterialized().
Referenced by llvm::Function::hasAddressTaken(), and rematerializeLiveValuesAtUses().
|
inline |
Definition at line 405 of file Value.h.
Referenced by addAllGlobalValueUsers(), hasNUndroppableUses(), hasNUndroppableUsesOrMore(), hasOneUser(), isPointerUseReplacable(), isUsedInBasicBlock(), materialized_users(), OptimizeExtractBits(), llvm::Constant::removeDeadConstantUsers(), sinkAndCmp0Expression(), SinkCast(), and llvm::PredicateInfo::~PredicateInfo().
|
inline |
|
inline |
Definition at line 421 of file Value.h.
References assertModuleIsMaterialized(), and materialized_users().
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), addUsersInExitBlock(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), llvm::canTrackGlobalVariableInterprocedurally(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), clearAssumptionsOfUsers(), 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::sandboxir::Value::getNumUses(), 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(), OptimizeEmptyGlobalAtExitDtors(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), promoteSingleBlockAlloca(), relocationViaAlloca(), rematerializeLiveValuesAtUses(), RemovePreallocated(), llvm::InstructionPrecedenceTracking::removeUsersOf(), llvm::coro::replaceCoroFree(), replaceExtractElements(), replaceLoopPHINodesWithPreheaderValues(), llvm::rewriteLoopExitValues(), rewriteNonInstructionUses(), rewriteSingleStoreAlloca(), llvm::BPFASpaceCastSimplifyPass::run(), llvm::ArgumentPromotionPass::run(), setCannotDuplicate(), shouldCheckArgs(), shouldSpeculateInstrs(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), sinkAndCmp0Expression(), sinkLastInstruction(), sinkLifetimeStartMarkers(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), splitGlobal(), swapICmpOperandsToExposeCSEOpportunities(), tryToElideArgumentCopy(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UpgradeARCRuntime(), usersDominator(), valueEscapes(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitShuffleVectorInst(), and ~Value().
|
inline |
Definition at line 425 of file Value.h.
References assertModuleIsMaterialized(), and materialized_users().
|
inline |
Definition at line 376 of file Value.h.
References assertModuleIsMaterialized(), and materialized_uses().
Referenced by addIntrinsicToSummary(), canRewriteGEPAsOffset(), canSinkInstructions(), llvm::Attributor::checkForAllCallSites(), computeVirtualCallSiteTypeInfoMap(), determinePointerAccessAttrs(), dropDroppableUses(), dropTypeTests(), eliminateSwiftErrorAlloca(), findCallsAtConstantOffset(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), findLoadCallsAtConstantOffset(), llvm::InformationCache::foreachUse(), getSingleUndroppableUse(), llvm::Function::hasAddressTaken(), hasOneUse(), llvm::hasPartialIVCondition(), insertSpills(), isI32InsnAllUses(), isOnlyCopiedFromConstantMemory(), isPossibleIndirectCallTarget(), llvm::Instruction::isUsedOutsideOfBlock(), llvm::LoopInfo::movementPreservesLCSSAForm(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processSelect(), removeIntrinsicUsers(), replaceAllPrepares(), replaceLoopInvariantUses(), replacePrepare(), replaceUsesWithIf(), RewriteUsesOfClonedInstructions(), runAttributorOnFunctions(), shouldCombineToPostInc(), SinkInstruction(), llvm::updatePublicTypeTestCalls(), UpdateSSA(), and llvm::MemorySSA::verifyOrderingDominationAndDefUses().
|
inline |
Definition at line 380 of file Value.h.
References assertModuleIsMaterialized(), and materialized_uses().
|
friend |
|
friend |
|
protected |
Definition at line 115 of file Value.h.
Referenced by llvm::User::getDescriptor(), llvm::CallBase::hasDescriptor(), llvm::User::operator delete(), and llvm::User::operator new().
|
protected |
Definition at line 114 of file Value.h.
Referenced by llvm::User::allocHungoffUses(), llvm::User::getDescriptor(), llvm::User::getOperandList(), llvm::User::growHungoffUses(), llvm::User::operator delete(), llvm::User::operator new(), llvm::User::setNumHungOffUseOperands(), and llvm::User::User().
|
protected |
Definition at line 113 of file Value.h.
Referenced by addMetadata(), clearMetadata(), eraseMetadata(), eraseMetadataIf(), getMetadata(), hasMetadata(), setMetadata(), and ~Value().
|
protected |
Definition at line 112 of file Value.h.
Referenced by getValueName(), hasName(), and setValueName().
|
protected |
Definition at line 111 of file Value.h.
Referenced by isUsedByMetadata().
|
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().
|
staticconstexpr |
Definition at line 807 of file Value.h.
Referenced by llvm::AttrBuilder::addAlignmentAttr(), llvm::GEPOperator::getMaxPreservedAlignment(), getPointerAlignment(), llvm::Attribute::getWithAlignment(), and llvm::GlobalObject::setAlignment().
|
protected |
Definition at line 108 of file Value.h.
Referenced by llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::User::getOperandUse(), llvm::User::op_end(), llvm::User::operator delete(), llvm::User::operator new(), llvm::User::setGlobalVariableNumOperands(), llvm::User::setNumHungOffUseOperands(), llvm::User::setOperand(), and llvm::User::User().
Hold subclass data that can be dropped.
This member is similar to SubclassData, however it is for holding information which may be used to aid optimization, but which may be cleared to zero without affecting conservative interpretation.
Definition at line 84 of file Value.h.
Referenced by llvm::BinaryConstantExpr::BinaryConstantExpr(), clearSubclassOptionalData(), llvm::Instruction::clone(), llvm::CallBrInst::Create(), llvm::CallInst::Create(), llvm::ConstantExpr::getAsInstruction(), llvm::GEPOperator::getNoWrapFlags(), getRawSubclassOptionalData(), llvm::ConstantExpr::getWithOperands(), llvm::Instruction::hasNonNeg(), llvm::TruncInst::hasNoSignedWrap(), llvm::OverflowingBinaryOperator::hasNoSignedWrap(), llvm::TruncInst::hasNoUnsignedWrap(), llvm::OverflowingBinaryOperator::hasNoUnsignedWrap(), hasSameSubclassOptionalData(), llvm::Instruction::isIdenticalTo(), llvm::TruncInst::setHasNoSignedWrap(), llvm::TruncInst::setHasNoUnsignedWrap(), llvm::Instruction::setNonNeg(), and llvm::GetElementPtrInst::setNoWrapFlags().