LLVM 22.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 |
LLVM_ABI void | deleteValue () |
Delete a pointer to a generic Value. | |
LLVM_ABI void | dump () const |
Support for debugging, callable in GDB: V->dump() | |
Type * | getType () const |
All values are typed, get the type of this value. | |
LLVM_ABI LLVMContext & | getContext () const |
All values hold a context through their type. | |
bool | hasName () const |
LLVM_ABI ValueName * | getValueName () const |
LLVM_ABI void | setValueName (ValueName *VN) |
LLVM_ABI StringRef | getName () const |
Return a constant reference to the value's name. | |
LLVM_ABI void | setName (const Twine &Name) |
Change the name of the value. | |
LLVM_ABI void | takeName (Value *V) |
Transfer the name from V to this value. | |
LLVM_ABI std::string | getNameOrAsOperand () const |
LLVM_ABI void | replaceAllUsesWith (Value *V) |
Change all uses of this to point to a new Value. | |
LLVM_ABI void | replaceNonMetadataUsesWith (Value *V) |
Change non-metadata uses of this to point to a new Value. | |
LLVM_ABI 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. | |
LLVM_ABI 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. | |
LLVM_ABI void | assertModuleIsMaterializedImpl () const |
void | assertModuleIsMaterialized () const |
bool | hasUseList () const |
Check if this Value has a use-list. | |
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. | |
LLVM_ABI bool | hasNUses (unsigned N) const |
Return true if this Value has exactly N uses. | |
LLVM_ABI bool | hasNUsesOrMore (unsigned N) const |
Return true if this value has N uses or more. | |
LLVM_ABI bool | hasOneUser () const |
Return true if there is exactly one user of this value. | |
LLVM_ABI Use * | getSingleUndroppableUse () |
Return true if there is exactly one use of this value that cannot be dropped. | |
const Use * | getSingleUndroppableUse () const |
LLVM_ABI 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 |
LLVM_ABI bool | hasNUndroppableUses (unsigned N) const |
Return true if there this value. | |
LLVM_ABI bool | hasNUndroppableUsesOrMore (unsigned N) const |
Return true if this value has N uses or more. | |
LLVM_ABI void | dropDroppableUses (llvm::function_ref< bool(const Use *)> ShouldDrop=[](const Use *) { return true;}) |
Remove every uses that can safely be removed. | |
LLVM_ABI void | dropDroppableUsesIn (User &Usr) |
Remove every use of this value in User that can safely be removed. | |
LLVM_ABI bool | isUsedInBasicBlock (const BasicBlock *BB) const |
Check if this value is used in the specified basic block. | |
LLVM_ABI 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. | |
LLVM_ABI bool | isSwiftError () const |
Return true if this value is a swifterror value. | |
LLVM_ABI const Value * | stripPointerCasts () const |
Strip off pointer casts, all-zero GEPs and address space casts. | |
Value * | stripPointerCasts () |
LLVM_ABI const Value * | stripPointerCastsAndAliases () const |
Strip off pointer casts, all-zero GEPs, address space casts, and aliases. | |
Value * | stripPointerCastsAndAliases () |
LLVM_ABI 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 () |
LLVM_ABI const Value * | stripPointerCastsForAliasAnalysis () const |
Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info. | |
Value * | stripPointerCastsForAliasAnalysis () |
LLVM_ABI const Value * | stripInBoundsConstantOffsets () const |
Strip off pointer casts and all-constant inbounds GEPs. | |
Value * | stripInBoundsConstantOffsets () |
LLVM_ABI const Value * | stripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds, bool AllowInvariantGroup=false, function_ref< bool(Value &Value, APInt &Offset)> ExternalAnalysis=nullptr, bool LookThroughIntToPtr=false) 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, function_ref< bool(Value &Value, APInt &Offset)> ExternalAnalysis=nullptr, bool LookThroughIntToPtr=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) |
LLVM_ABI 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 *) {}) |
LLVM_ABI 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. | |
LLVM_ABI 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. | |
LLVM_ABI uint64_t | getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull, bool &CanBeFreed) const |
Returns the number of bytes known to be dereferenceable for the pointer value. | |
LLVM_ABI Align | getPointerAlignment (const DataLayout &DL) const |
Returns an alignment of the pointer value. | |
LLVM_ABI 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. | |
LLVM_ABI void | reverseUseList () |
Reverse the use-list. | |
LLVM_ABI void | print (raw_ostream &O, bool IsForDebug=false) const |
Implement operator<< on Value. | |
LLVM_ABI void | print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const |
LLVM_ABI 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. | |
LLVM_ABI void | printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const |
Static Public Member Functions | |
static LLVM_ABI 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 | |
LLVM_ABI | Value (Type *Ty, unsigned scid) |
LLVM_ABI | ~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. | |
LLVM_ABI 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. | |
LLVM_ABI bool | eraseMetadata (unsigned KindID) |
Erase all metadata attachments with the given kind. | |
LLVM_ABI void | eraseMetadataIf (function_ref< bool(unsigned, MDNode *)> Pred) |
Erase all metadata attachments matching the given predicate. | |
LLVM_ABI void | clearMetadata () |
Erase all metadata attached to this Value. | |
LLVM_ABI 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. | |
LLVM_ABI MDNode * | getMetadata (StringRef Kind) const |
LLVM_ABI void | getMetadata (unsigned KindID, SmallVectorImpl< MDNode * > &MDs) const |
Appends all attachments with the given ID to MDs in insertion order. | |
LLVM_ABI 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 |
LLVM_ABI void | setMetadata (unsigned KindID, MDNode *Node) |
Set a particular kind of metadata attachment. | |
LLVM_ABI void | setMetadata (StringRef Kind, MDNode *Node) |
LLVM_ABI void | addMetadata (unsigned KindID, MDNode &MD) |
Add a metadata attachment. | |
LLVM_ABI 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 llvm::sandboxir::Value::Ctx, llvm::sandboxir::Tracker::emplaceIfTracking(), llvm::sandboxir::Context::getTracker(), llvm::Use::getUser(), llvm::sandboxir::Context::getValue(), and llvm::sandboxir::Context::runSetUseCallbacks().
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 |
Definition at line 1612 of file Metadata.cpp.
References addMetadata(), and getContext().
Add a metadata attachment.
Definition at line 1605 of file Metadata.cpp.
References assert(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by addMetadata().
|
inline |
This method should only be used by the Use class.
Definition at line 513 of file Value.h.
References hasUseList().
|
inline |
Definition at line 337 of file Value.h.
References assertModuleIsMaterializedImpl().
Referenced by use_begin(), use_empty(), user_back(), user_begin(), users(), and uses().
void Value::assertModuleIsMaterializedImpl | ( | ) | const |
Definition at line 467 of file Value.cpp.
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 816 of file Value.cpp.
Referenced by evaluatePtrAddRecAtMaxBTCWillNotWrap().
|
protected |
Erase all metadata attached to this Value.
Definition at line 1643 of file Metadata.cpp.
References assert(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
Referenced by eraseMetadata(), and eraseMetadataIf().
|
inline |
Clear the optional flags contained in this value.
Definition at line 555 of file Value.h.
References SubclassOptionalData.
void Value::deleteValue | ( | ) |
Delete a pointer to a generic Value.
Definition at line 111 of file Value.cpp.
References OS, printAsOperand(), and llvm::sandboxir::Value::Val.
Referenced by llvm::BitcodeReaderValueList::assignValue(), and llvm::ilist_alloc_traits< MemoryAccess >::deleteNode().
|
inline |
Definition at line 820 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 1090 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 226 of file Value.cpp.
Referenced by 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.
void Value::dropDroppableUsesIn | ( | User & | Usr | ) |
LLVM_DUMP_METHOD void Value::dump | ( | ) | const |
Support for debugging, callable in GDB: V->dump()
Definition at line 5465 of file AsmWriter.cpp.
References llvm::dbgs(), and print().
Referenced by CanWidenIV(), checkPHIs(), DoFlattenLoopPair(), llvm::DbgValueLocEntry::dump(), llvm::CodeExtractor::extractCodeRegion(), findLoopComponents(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::GlobalMergeFunc::merge(), setLoopComponents(), and sinkAndCmp0Expression().
Erase all metadata attachments with the given kind.
Definition at line 1616 of file Metadata.cpp.
References clearMetadata(), getContext(), HasMetadata, llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::ValueMetadata.
|
protected |
Erase all metadata attachments matching the given predicate.
Definition at line 1628 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 1561 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 1098 of file Value.cpp.
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::addParamAttrs(), llvm::CallBase::addRangeRetAttr(), llvm::CallBase::addRetAttr(), llvm::CallBase::addRetAttrs(), llvm::addRuntimeChecks(), llvm::memprof::CallStackTrie::addSingleAllocTypeAttribute(), llvm::GlobalObject::addTypeMetadata(), llvm::DbgVariableIntrinsic::addVariableLocationOps(), adjustInliningThresholdUsingCallee(), annotateDereferenceableBytes(), llvm::SelectInst::areInvalidOperands(), llvm::memprof::CallStackTrie::buildAndAttachMIBMetadata(), llvm::SPIRVGlobalRegistry::buildAssignType(), buildIntrinsicArgTypes(), llvm::buildMD(), llvm::MachineFunction::CallSiteInfo::CallSiteInfo(), canonicalizeForInvariantConditionInjection(), clearMetadata(), llvm::CoroIdInst::clearPromise(), 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::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedExpandLoad(), llvm::InstCombinerImpl::CreateNonTerminatorUnreachable(), createNVVMInternalAddrspaceWrap(), llvm::createPGONameMetadata(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), CreatePrologue(), llvm::IRBuilderBase::CreateThreadLocalAddress(), despeculateCountZeros(), diagnoseInvalidFormatString(), llvm::Instruction::dropLocation(), emitAtomicRMWLegalRemark(), emitDbgAssign(), emitGlobalConstantVector(), llvm::AsmPrinter::emitSpecialLLVMGlobal(), llvm::GVNExpression::CallExpression::equals(), eraseMetadata(), eraseMetadataIf(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), expandBounds(), expandToSwitch(), llvm::SCEVExpander::expandUnionPredicate(), llvm::SCEVExpander::expandWrapPredicate(), extractMDNode(), foldInsSequenceIntoSplat(), foldLoadsRecursive(), foldURemOfLoopIncrement(), llvm::SCEVExpander::generateOverflowCheck(), llvm::DSOLocalEquivalent::get(), llvm::NoCFIValue::get(), llvm::ConstantExpr::get(), llvm::Instruction::getAAMetadata(), getAccessType(), llvm::Constant::getAggregateElement(), getAllMetadata(), llvm::GlobalVariable::getAttributesAsList(), llvm::Attributor::getAttrsFromAssumes(), llvm::ConstantDataSequential::getElementAsConstant(), llvm::ScalarEvolution::getElementSize(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getInsertElement(), getKnownValueOnEdge(), getMemCmpLoad(), getMetadata(), getMetadataImpl(), llvm::GlobalValue::getPartition(), getPointerOperandAndType(), getPreferredVectorIndex(), llvm::GlobalValue::getSanitizerMetadata(), llvm::Constant::getSplatValue(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::ConstantStruct::getTypeForElements(), getVTableAddrForProfData(), handleBrSelExpect(), llvm::ValueAsMetadata::handleRAUW(), llvm::Attributor::hasAttr(), IdentifyValidPoisonGeneratingAttributes(), IdentifyValidUBGeneratingAttributes(), llvm::InlineFunctionImpl(), inlineRetainOrClaimRVCalls(), insertNewDbgInst(), insertSpills(), llvm::intersectAccessGroups(), llvm::AAWillReturn::isImpliedByIR(), llvm::AANoUndef::isImpliedByIR(), isLoadCombineCandidateImpl(), isPointerAlwaysReplaceable(), isValidIndirectionTable(), lowerAwaitSuspend(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerSubFn(), llvm::makeGuardControlFlowExplicit(), makeStatepointExplicitImpl(), llvm::Attributor::manifestAttrs(), markLoadsAsInvariant(), matchFPExtFromF16(), maySpeculateLanes(), mergeAttributesAndFlags(), llvm::MergeBasicBlockIntoOnlyPred(), mergeCompatibleInvokesImpl(), migrateDebugInfo(), llvm::Negator::Negate(), OptimizeGlobalAddressOfAllocation(), optimizeMemCmpConstantSize(), OptimizeNoopCopyExpression(), llvm::CallBase::populateBundleOperandInfos(), llvm::AsmPrinter::preprocessXXStructorList(), processCallSite(), processUGT_ADDCST_ADD(), promoteAllocaUserToVector(), llvm::pgo::promoteIndirectCall(), llvm::propagateMetadata(), llvm::ReadByteArrayFromGlobal(), llvm::CallBase::removeAttributeAtIndex(), llvm::CallBase::removeFnAttr(), llvm::CallBase::removeFnAttrs(), llvm::CallBase::removeParamAttr(), llvm::CallBase::removeParamAttrs(), llvm::CallBase::removeRetAttr(), llvm::CallBase::removeRetAttrs(), llvm::GlobalValue::removeSanitizerMetadata(), llvm::coro::replaceCoroFree(), ReplaceFPIntrinsicWithCall(), llvm::DbgVariableIntrinsic::replaceVariableLocationOp(), reportNonStaticGEPChain(), llvm::SPIRVTTIImpl::rewriteIntrinsicWithAddressSpace(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), selectExplicitSectionGlobal(), llvm::DbgAssignIntrinsic::setAddress(), llvm::DbgAssignIntrinsic::setAssignId(), llvm::MemIntrinsicBase< Derived >::setDestAlignment(), llvm::InstrProfCntrInstBase::setIndex(), 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::GlobalObject::setSectionPrefix(), llvm::DbgAssignIntrinsic::setValue(), llvm::GlobalObject::setVCallVisibilityMetadata(), shortenAssignment(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), simplifyUsingControlFlow(), simplifyX86MaskedStore(), splitGlobal(), llvm::SplitKnownCriticalEdge(), llvm::coro::suppressCoroAllocs(), llvm::CallBase::tryIntersectAttributes(), tryToMoveFreeBeforeNullTest(), TryToShrinkGlobalToBoolean(), turnGuardIntoBranch(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), upgradeSingleNVVMAnnotation(), verifyTripCount(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPtrToInt(), and llvm::InstCombinerImpl::visitReturnInst().
Definition at line 1538 of file Metadata.cpp.
References getContext(), llvm::LLVMContext::getMDKindID(), getMetadataImpl(), and hasMetadata().
|
protected |
Definition at line 1556 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 576 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 1551 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 1545 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 322 of file Value.cpp.
Referenced by AddAliasScopeMetadata(), llvm::SSAUpdaterBulk::AddAvailableValue(), llvm::addDiffRuntimeChecks(), addEmuTlsVar(), addMappingsFromTLI(), addReplicateRegions(), aspaceWrapValue(), llvm::WinException::beginFunction(), llvm::SPIRVGlobalRegistry::buildAssignType(), buildDebugInfoForNoopResumeDestroyFunc(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), calcPredicateUsingBooleans(), calcPredicateUsingInteger(), 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::InstCombinerImpl::combineLoadToNewType(), llvm::logicalview::compareName(), compareNames(), llvm::VPBasicBlock::connectToPredecessors(), constructEntryMetadata(), llvm::convertToDeclaration(), copyLinkageVisibility(), llvm::CallBrInst::Create(), llvm::CallInst::Create(), createCloneDeclaration(), createInvariantCond(), createMemprofDefaultOptionsVar(), createMergedFunction(), createNVVMInternalAddrspaceWrap(), llvm::createPGONameMetadata(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTargetDeinit(), llvm::OpenMPIRBuilder::createTargetInit(), createUnreachableSwitchDefault(), diagnoseAmbiguousHandle(), diagnoseHandleNotFound(), diagnoseUndominatedLoad(), llvm::SPIRV::ConvergenceRegion::dump(), llvm::dumpBasicBlockLabel(), llvm::CFGMST< Edge, BBInfo >::dumpEdges(), llvm::sandboxir::BasicBlock::dumpOS(), 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::MCUnwindV2EpilogTargetExpr::evaluateAsRelocatableImpl(), llvm::logicalview::LVCompare::execute(), llvm::VPBasicBlock::executeRecipes(), expandCrossIntrinsic(), expandToSwitch(), llvm::CodeExtractor::extractCodeRegion(), llvm::ExtractTypeInfo(), llvm::MustBeExecutedContextExplorer::findBackwardJoinPoint(), findBasePointer(), llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(), fixIrreducible(), fixupDebugInfoPostExtraction(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), foldCondBranchOnValueKnownInPredecessorImpl(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), foldIntegerRepackThroughZExt(), 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(), getAllocaName(), getArm64ECMangledFunctionName(), llvm::bfi_detail::getBlockName(), getBranchHint(), llvm::DeadArgumentEliminationPass::RetOrArg::getDescription(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::MachineBasicBlock::getFullName(), getFuncAddrForProfData(), llvm::DOTGraphTraits< DOTFuncInfo * >::getGraphName(), llvm::DOTGraphTraits< DOTFuncMSSAInfo * >::getGraphName(), llvm::getIRPGONameForGlobalObject(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::ExecutionEngine::getMangledName(), llvm::MachineFunction::getName(), llvm::sandboxir::Value::getName(), llvm::Mangler::getNameWithPrefix(), getNewName(), llvm::DOTGraphTraits< AttributorCallGraph * >::getNodeLabel(), getOrCreateRefVariable(), llvm::OpenMPIRBuilder::getOrCreateRuntimeFunction(), llvm::AArch64Subtarget::getPtrAuthBlockAddressDiscriminatorIfEnabled(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::LazyValueInfoImpl::getValueAt(), llvm::LazyValueInfoImpl::getValueInBlock(), llvm::LazyValueInfoImpl::getValueOnEdge(), getVarName(), globalVariableNeedsRedirect(), HandleByValArgument(), handleByValParam(), HandleInlinedEHPad(), llvm::SuspendCrossingInfo::hasPathCrossingSuspendPoint(), llvm::SuspendCrossingInfo::hasPathOrLoopCrossingSuspendPoint(), hoistBOAssociation(), hoistMinMax(), llvm::FunctionImporter::importFunctions(), llvm::logicalview::LVBinaryReader::includeInlineeLines(), INITIALIZE_PASS(), llvm::SelectionDAGISel::initializeAnalysisResults(), injectPendingInvariantConditions(), llvm::InlineFunctionImpl(), llvm::InsertPreheaderForLoop(), insertSpills(), insertUniqueBackedgeBlock(), llvm::Attributor::internalizeFunctions(), llvm::InternalizePass::internalizeModule(), llvm::InvertBranch(), llvm::invertCondition(), llvm::isCFGuardFunction(), 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::GlobalMergeFunc::merge(), llvm::MergeBlockIntoPredecessor(), mergeCompatibleInvokesImpl(), movePHIValuesToInsertedBlock(), nearest_common_dominator(), llvm::operator<<(), optimizeDoubleFP(), OptimizeGlobalAddressOfAllocation(), optimizeLoopExitWithUnknownExitCount(), optimizeSQRT(), llvm::OptLevelChanger::OptLevelChanger(), llvm::peelLoop(), performBlockTailMerging(), populateReductionFunction(), llvm::DiagnosticInfoUnsupported::print(), llvm::ARMConstantPoolConstant::print(), llvm::CSKYConstantPoolConstant::print(), llvm::RISCVConstantPoolValue::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(), recoverFramePointer(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::CallGraphUpdater::removeFunction(), llvm::RemoveRedundantDbgInstrs(), removeRedundantDbgLocs(), rename(), replace(), ReplaceCallWith(), replaceLoad(), replaceMemCpy(), replaceWithCallToVeclib(), rewriteMemOpOfSelect(), rewritePHIs(), rewritePHIsForCleanupPad(), RewriteUsesOfClonedInstructions(), llvm::FunctionSpecializer::run(), llvm::InlineCostAnnotationPrinterPass::run(), llvm::ArgumentPromotionPass::run(), llvm::SimplifyTypeTestsPass::run(), llvm::IR2VecPrinterPass::run(), runAttributorLightOnFunctions(), runAttributorOnFunctions(), llvm::JumpThreadingPass::runImpl(), runImpl(), runIPSCCP(), llvm::LPPassManager::runOnFunction(), llvm::DetectRoundChange::runOnMachineFunction(), runSanitizeRealtimeBlocking(), salvageDebugInfoImpl(), scalarizeMaskedLoad(), selectExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), llvm::HexagonTargetObjectFile::SelectSectionForGlobal(), llvm::RISCVELFTargetObjectFile::SelectSectionForGlobal(), llvm::IRSimilarity::IRInstructionData::setCalleeName(), shouldCheckArgs(), simplifyAllocaArraySize(), SimplifyCondBranchToCondBranch(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::simplifyInstruction(), 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(), llvm::stableHashValue(), switchToLookupTable(), llvm::thinLTOFinalizeInModule(), llvm::JumpThreadingPass::threadEdge(), llvm::JumpThreadingPass::threadGuard(), llvm::JumpThreadingPass::threadThroughTwoBasicBlocks(), trackInlinedStores(), translateMetadata(), tryFactorization(), llvm::JumpThreadingPass::tryThreadEdge(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), unifyLoopExits(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), llvm::logicalview::LVSymbolTable::update(), UpdatePHINodes(), llvm::CallInst::updateProfWeight(), llvm::InvokeInst::updateProfWeight(), updateSubprogramLinkageName(), upgradeAArch64IntrinsicCall(), upgradeARMIntrinsicCall(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), llvm::ScalarEvolution::verify(), llvm::LoopVersioning::versionLoop(), llvm::Function::viewCFG(), DataScalarizerVisitor::visitAllocaInst(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), DataScalarizerVisitor::visitGetElementPtrInst(), DataScalarizerVisitor::visitLoadInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitZExt(), and llvm::OptLevelChanger::~OptLevelChanger().
std::string Value::getNameOrAsOperand | ( | ) | const |
Definition at line 457 of file Value.cpp.
Referenced by llvm::AsmPrinter::emitSpecialLLVMGlobal(), 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 265 of file Value.cpp.
Referenced by 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 953 of file Value.cpp.
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 878 of file Value.cpp.
Referenced by evaluatePtrAddRecAtMaxBTCWillNotWrap(), and 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 1051 of file Value.cpp.
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 550 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 176 of file Value.cpp.
Referenced by getSingleUndroppableUse().
Definition at line 462 of file Value.h.
References getSingleUndroppableUse().
|
inlineprotected |
|
inline |
All values are typed, get the type of this value.
Definition at line 256 of file Value.h.
Referenced by llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::add(), llvm::AliasSetTracker::add(), addAssumeNonNull(), addConditions(), llvm::detail::PtrUseVisitorBase::adjustOffsetForGEP(), llvm::AMDGPUAAResult::alias(), llvm::AAResults::alias(), analyzeCostOfVecReduction(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), appendToGlobalArray(), applyX86MaskOn1BitsVec(), areBothVectorOrScalar(), areExtractShuffleVectors(), llvm::SelectInst::areInvalidOperands(), areInverseVectorBitmasks(), areNonOverlapSameBaseLoadAndStore(), aspaceWrapOperand(), llvm::CanonicalLoopInfo::assertOK(), llvm::BitcodeReaderValueList::assignValue(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), atomicSupportedIfLegalIntType(), llvm::SPIRVGlobalRegistry::buildAssignPtr(), llvm::SPIRVGlobalRegistry::buildAssignType(), llvm::buildAtomicRMWValue(), llvm::buildCmpXchgValue(), llvm::MachineIRBuilder::buildConstant(), BuildConstantFromSCEV(), llvm::MachineIRBuilder::buildFConstant(), buildMultiplyTree(), llvm::OpenMPIRBuilder::calculateCanonicalLoopTripCount(), callBufferedPrintfStart(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canContractSqrtToRsq(), canEvaluateShiftedShift(), canonicalizeBitCastExtElt(), canonicalizeForInvariantConditionInjection(), canonicalizeLowbitMask(), canonicalizeSaturatedAdd(), llvm::canPeelLastIteration(), 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::PtrToAddrInst::cloneImpl(), llvm::BitCastInst::cloneImpl(), llvm::AddrSpaceCastInst::cloneImpl(), llvm::JumpThreadingPass::cloneInstructions(), cloneLoopBlocks(), CloneLoopBlocks(), llvm::FunctionComparator::cmpBasicBlocks(), cmpExcludesZero(), llvm::VNCoercion::coerceAvailableValueToLoadType(), collectMemAccessInfo(), collectShuffleElements(), collectSingleShuffleElements(), collectUnswitchCandidatesWithInjections(), combineConstantPoolLoads(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), compareCmp(), CompareValueComplexity(), llvm::CommonPointerBase::compute(), 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(), copyArrayElemsForMemCpy(), copyFunctionByValArgs(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), countToEliminateCompares(), llvm::BinaryOperator::Create(), llvm::UnaryOperator::Create(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAlignmentAssumption(), createAndInstr(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::IRBuilderBase::CreateAtomicRMW(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::IRBuilderBase::CreateBinaryIntrinsic(), llvm::CastInst::CreateBitOrPointerCast(), createCmpXchgInstFun(), llvm::MatrixBuilder::CreateColumnMajorLoad(), llvm::MatrixBuilder::CreateColumnMajorStore(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::IRBuilderBase::CreateDereferenceableAssumption(), llvm::FixedPointBuilder< IRBuilderTy >::CreateDiv(), llvm::IRBuilderBase::CreateExtractVector(), createFFSIntrinsic(), llvm::IRBuilderBase::CreateGCGetPointerBase(), llvm::IRBuilderBase::CreateGCGetPointerOffset(), llvm::IRBuilderBase::CreateGlobalString(), llvm::MatrixBuilder::CreateIndex(), llvm::IRBuilderBase::CreateInsertVector(), llvm::IRBuilderBase::createIsFPClass(), llvm::IRBuilderBase::CreateIsNeg(), llvm::IRBuilderBase::CreateIsNotNeg(), llvm::IRBuilderBase::CreateIsNotNull(), llvm::IRBuilderBase::CreateIsNull(), llvm::EpilogueVectorizerMainLoop::createIterationCountCheck(), 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(), createMemprofDefaultOptionsVar(), createMemSetLoop(), createMergedFunction(), llvm::FixedPointBuilder< IRBuilderTy >::CreateMul(), createNVVMInternalAddrspaceWrap(), 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(), createRawLoad(), 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(), createTypedBufferLoad(), llvm::IRBuilderBase::CreateVectorSplice(), createWrapper(), llvm::CastInst::CreateZExtOrBitCast(), decompose(), despeculateCountZeros(), detectShiftUntilBitTestIdiom(), detectShiftUntilZeroIdiom(), DoLowering(), dropRedundantMaskingOfLeftShiftInput(), eliminateSwiftErrorArgument(), llvm::embedBitcodeInModule(), llvm::embedBufferInModule(), llvm::emitBinaryFloatFnCall(), emitBinaryFloatFnCallHelper(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AsmPrinter::emitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), emitGlobalConstantVector(), llvm::emitHotColdNew(), llvm::emitHotColdNewAligned(), llvm::emitHotColdNewAlignedNoThrow(), llvm::emitHotColdNewNoThrow(), llvm::emitHotColdSizeReturningNew(), llvm::emitHotColdSizeReturningNewAligned(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), emitLoadFromConstantPool(), llvm::LoongArchTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::LoongArchTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::RISCVTargetLowering::emitMaskedAtomicRMWIntrinsic(), emitMemsetExpansion(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(), llvm::OpenMPIRBuilder::emitOffloadingArrays(), llvm::OpenMPIRBuilder::emitScanReduction(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitTrailingFence(), emitTransformedIndex(), llvm::OpenMPIRBuilder::emitUserDefinedMapper(), llvm::emitVSNPrintf(), llvm::emitVSPrintf(), emitX86Select(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::Evaluator::EvaluateFunction(), evaluateICmpRelation(), llvm::VPInstruction::execute(), llvm::VPWidenRecipe::execute(), llvm::VPWidenIntrinsicRecipe::execute(), llvm::VPHistogramRecipe::execute(), llvm::VPVectorEndPointerRecipe::execute(), llvm::VPWidenPHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPInterleaveRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPPartialReductionRecipe::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::expandAtomicRMWToCmpXchg(), expandBufferLoadIntrinsic(), expandCrossIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), expandIToFP(), llvm::expandMemMoveAsLoop(), expandNormalizeIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandSignIntrinsic(), expandToSwitch(), llvm::AAMDNodes::extendToTBAA(), extractMaskedValue(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), findArgumentCopyElisionCandidates(), findBasePointer(), findCommonType(), findDemandedEltsBySingleUser(), findExtractedInputToOverallInputMapping(), findFuncPointers(), FindLoopCounter(), llvm::RandomIRBuilder::findPointer(), llvm::findScalarElement(), fitArgInto64Bits(), fixupFPReturnAndCall(), flushDenormalConstantFP(), llvm::FlushFPConstant(), llvm::AMDGPULibCalls::fold(), llvm::BinOpInit::Fold(), llvm::InstCombinerImpl::foldAddLikeCommutative(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), foldAndOrOfICmpEqConstantAndICmp(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldBinopWithRecurrence(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBitmaskMul(), llvm::foldBranchToCommonDest(), foldCastShuffle(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldConsecutiveLoads(), foldCopySignIdioms(), foldCttzCtlz(), foldDependentIVs(), foldFCmpFNegCommonOp(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), foldFCmpWithFloorAndCeil(), foldFPtoI(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEquality(), foldICmpEqualityWithOffset(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), foldICmpIntrinsicWithIntrinsic(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldICmpShlLHSC(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUDivConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldICmpUSubSatOrUAddSatWithConstant(), llvm::InstCombinerImpl::foldICmpWithCastOp(), foldICmpWithHighBitMask(), llvm::InstCombinerImpl::foldICmpWithTrunc(), foldICmpXorXX(), foldIdentityShuffles(), foldIntegerPackFromVector(), foldIntegerRepackThroughZExt(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), 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(), llvm::InstCombinerImpl::foldPtrToIntOfGEP(), foldReductionIdiom(), foldSelectBinOpIdentity(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::foldSelectOpOp(), foldSetClearBits(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstSimplifyFolder::FoldShuffleVector(), foldShuffleWithInsert(), foldSignedTruncationCheck(), foldTwoEntryPHINode(), foldURemOfLoopIncrement(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldVecExtTruncToExtElt(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), forwardStoredOnceStore(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), gatherPossiblyVectorizableLoads(), generateAssignInstrs(), generateKeySubkey(), generateSignedDivisionCode(), generateSignedRemainderCode(), generateUnsignedDivisionCode(), genLoopLimit(), llvm::MemoryLocation::get(), llvm::ConstantExpr::get(), 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(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), getConstantInt(), llvm::ExecutionEngine::getConstantValue(), llvm::VNCoercion::getConstantValueForLoad(), llvm::PredicateBase::getConstraint(), llvm::getDeinterleavedVectorType(), 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(), getFunctionPointerElemType(), llvm::GVNExpression::VariableExpression::getHashValue(), llvm::GVNExpression::ConstantExpression::getHashValue(), llvm::CanonicalLoopInfo::getIndVarType(), llvm::ConstantExpr::getInsertElement(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::ConstantInt::getIntegerType(), getInvertibleOperands(), llvm::BinOpInit::getListConcat(), llvm::TargetLoweringBase::getLoadMemOperandFlags(), getMaskedTypeForICmpPair(), getMatchingValue(), llvm::VNCoercion::getMemInstValueForLoad(), getMemOperands(), getMemSetPattern16Value(), llvm::ScalarEvolution::getMinusSCEV(), llvm::BasicAAResult::getModRefInfo(), llvm::AAResults::getModRefInfo(), llvm::AMDGPUAAResult::getModRefInfoMask(), getNewICmpValue(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getNoopInput(), llvm::ConstantDataSequential::getNumElements(), llvm::UndefValue::getNumElements(), llvm::offloading::getOffloadingEntryInitializer(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), llvm::VPIntrinsic::getOrInsertDeclarationForParams(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::PtrToAddrInst::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::LoadInst::getPointerOperandType(), llvm::StoreInst::getPointerOperandType(), llvm::GetElementPtrInst::getPointerOperandType(), llvm::GEPOperator::getPointerOperandType(), llvm::PtrToIntOperator::getPointerOperandType(), llvm::PtrToAddrOperator::getPointerOperandType(), llvm::getPointersDiff(), llvm::LazyValueInfo::getPredicateAt(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), getSameOpcode(), llvm::VPWidenIntOrFpInductionRecipe::getScalarType(), llvm::VPCanonicalIVPHIRecipe::getScalarType(), llvm::VPDerivedIVRecipe::getScalarType(), llvm::RecurrenceDescriptor::getSentinelValue(), 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::XtensaTargetLowering::getSingleConstraintMatchWeight(), llvm::Constant::getSplatValue(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), llvm::CastInst::getSrcTy(), llvm::GCProjectionInst::getStatepoint(), llvm::VPIntrinsic::getStaticVectorLength(), llvm::VNCoercion::getStoreValueForLoadHelper(), getStrideAndModOffsetOfGEP(), llvm::ConstantAggregateZero::getStructElement(), llvm::UndefValue::getStructElement(), llvm::PoisonValue::getStructElement(), getTargetConstantBitsFromNode(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), 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(), getValueFromICmpCtpop(), getValueOnEdge(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::LoopVectorizationCostModel::getVectorIntrinsicCost(), llvm::ExtractElementInst::getVectorOperandType(), llvm::RISCVTTIImpl::getVPLegalizationStrategy(), llvm::ConstantExpr::getWithOperands(), globalSize(), llvm::GlobalVariable::GlobalVariable(), HandleByValArgument(), handleSpaceCheckIntrinsics(), llvm::CallBase::hasArgumentWithAdditionalReturnCaptureComponents(), llvm::PHINode::hasConstantValue(), llvm::Constant::hasExactInverseFP(), hasSameArgumentList(), hasSameExtUse(), llvm::haveNoCommonBitsSet(), haveNoCommonBitsSetSpecialCases(), hoistConditionalLoadsStores(), hoistMinMax(), llvm::memtag::incrementThreadLong(), inferAlignment(), llvm::inferAttribute(), llvm::MIRParserImpl::initializeConstantPool(), injectPendingInvariantConditions(), llvm::InlineFunctionImpl(), 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(), isAtomicRMWLegalXChgTy(), 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::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(), 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(), lookThroughCastConst(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), llvm::FastISel::lowerCall(), llvm::CallLowering::lowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::FastISel::lowerCallTo(), llvm::AsmPrinter::lowerConstant(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), LowerNegateToMultiply(), llvm::lowerObjectSizeCall(), lowerPtrAnnotation(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::AMDGPUCallLowering::lowerReturn(), llvm::MipsCallLowering::lowerReturn(), llvm::X86CallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::M68kCallLowering::lowerReturn(), llvm::PPCCallLowering::lowerReturn(), llvm::RISCVCallLowering::lowerReturn(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::lowerUnaryVectorIntrinsicAsLoop(), llvm::matchDecomposedSelectPattern(), matchOrConcat(), matchPartStore(), matchStridedConstant(), matchSubIntegerPackFromVector(), 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(), optimizeIntegerToVectorInsertions(), optimizeMemCmpConstantSize(), optimizeMemCmpVarSize(), optimizeNaN(), OptimizeNoopCopyExpression(), optimizeOnceStoredGlobal(), llvm::InstCombinerImpl::OptimizePointerDifference(), optimizeSection(), optimizeVectorResizeWithIntegerBitCasts(), llvm::VPTransformState::packScalarIntoVectorizedValue(), llvm::CallBase::paramHasNonNullAttr(), llvm::TargetLowering::ParseConstraints(), llvm::LoopStructure::parseLoopStructure(), llvm::peelLoop(), populateReductionFunction(), llvm::BasicTTIImplBase< T >::preferToKeepConstantsAttached(), llvm::VPReplicateRecipe::print(), processArg(), processAShr(), processBlockAddr(), llvm::JumpThreadingPass::processBranchOnXOR(), processCmpIntrinsic(), processInternalGlobal(), processNonStringArg(), processOverflowIntrinsic(), processSDiv(), processSelect(), processSExt(), processSIToFP(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), processUse(), promoteAllocaUserToVector(), llvm::promoteCall(), promoteSingleBlockAlloca(), propagateNaN(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::HashRecognize::recognizeCRC(), remarkFlatAddrspaceAccess(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeEmptyCleanup(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::removeIncomingValueIf(), llvm::MemoryDependenceResults::removeInstruction(), llvm::replaceAllDbgUsesWith(), replaceCalledFunction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceDominatedUsesWith(), replaceFoldableUses(), ReplaceFPIntrinsicWithCall(), replaceFrameSizeAndAlignment(), llvm::GlobalVariable::replaceInitializer(), replaceLoad(), llvm::replaceNonLocalUsesWith(), llvm::replaceSignedInst(), replaceSwiftErrorOps(), llvm::Constant::replaceUndefsWith(), replaceUndefValuesInPhi(), llvm::Record::resolveReferences(), llvm::returnTypeIsEligibleForTailCall(), reuseTableCompare(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::NVPTXTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::SPIRVTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), RewriteUsesOfClonedInstructions(), rmwOpMayLowerToLibcall(), llvm::LoadAndStorePromoter::run(), llvm::MemDerefPrinterPass::run(), llvm::KCFIPass::run(), runImpl(), runOnDeviceFunction(), runOnKernelFunction(), llvm::IRTranslator::runOnMachineFunction(), llvm::salvageDebugInfoImpl(), salvageDebugInfoImpl(), llvm::SelectionDAGBuilder::salvageUnresolvedDbgValue(), scalarize(), 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::SITargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), 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(), simplifyAShrInst(), simplifyAssocCastAssoc(), llvm::simplifyBinaryIntrinsic(), simplifyByDomEq(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::GCNTTIImpl::simplifyDemandedLaneMaskArg(), 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(), llvm::simplifyInstruction(), simplifyIntrinsic(), simplifyLdexp(), llvm::simplifyLoadInst(), simplifyLogicOfAddSub(), simplifyMulInst(), simplifyOrInst(), simplifyOrOfICmpsWithAdd(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyPHINode(), simplifyReductionOperand(), simplifyRelocatesOffABase(), simplifyRem(), simplifyRightShift(), simplifySDivInst(), simplifySelectInst(), simplifySelectWithICmpCond(), simplifyShift(), simplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyShuffleVectorInst(), simplifySRemInst(), simplifySubInst(), simplifySwitchOfPowersOfTwo(), simplifyUnaryIntrinsic(), simplifyUnsignedRangeCheck(), simplifyUsingControlFlow(), simplifyX86addcarry(), simplifyX86immShift(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86pmadd(), simplifyX86pmulh(), simplifyXorInst(), SinkShiftAndTruncate(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitBlockAndInsertForEachLane(), splitCallSite(), llvm::coro::AnyRetconABI::splitCoroutine(), llvm::SplitIndirectBrCriticalEdges(), SplitLandingPadPredecessorsImpl(), splitMergedValStore(), stripGCRelocates(), swapICmpOperandsToExposeCSEOpportunities(), switchToLookupTable(), tagGlobalDefinition(), threadCmpOverSelect(), llvm::OpenMPIRBuilder::tileLoops(), llvm::Constant::toConstantRange(), transformGlobalArray(), transformToIndexedCompare(), trimTrailingZerosInVector(), tryInsertCastToCommonAddrSpace(), llvm::tryPromoteCall(), llvm::VPRecipeBuilder::tryToCreateWidenRecipe(), tryToMergePartialOverlappingStores(), tryToRecognizeTableBasedCttz(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), unpackFromRegLoc(), unpackLoadToAggregate(), llvm::UnrollRuntimeLoopRemainder(), llvm::SPIRVGlobalRegistry::updateAssignType(), UpdatePHINodes(), updatePredecessorProfileMetadata(), upgradeAArch64IntrinsicCall(), upgradeAbs(), upgradeAMDGCNIntrinsicCall(), llvm::UpgradeARCRuntime(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), llvm::UpgradeGlobalVariable(), llvm::UpgradeIntrinsicCall(), upgradeMaskedCompare(), upgradeMaskedLoad(), upgradeMaskToInt(), upgradeNVVMIntrinsicCall(), upgradePMULDQ(), upgradeX86ALIGNIntrinsics(), upgradeX86BinaryIntrinsics(), upgradeX86ConcatShift(), upgradeX86IntrinsicCall(), upgradeX86Rotate(), upgradeX86vpcom(), upgradeX86VPERMT2Intrinsics(), validateAndCostRequiredSelects(), valueEscapes(), 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(), DataScalarizerVisitor::visitLoadInst(), llvm::InstCombinerImpl::visitLoadInst(), 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(), widenCImmType(), llvm::ScalarEvolution::willNotOverflow(), WriteConstantInternal(), 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 188 of file Value.cpp.
Referenced by getUniqueUndroppableUser(), rematerializeLiveValuesAtUses(), and workshareLoopTargetCallback().
Definition at line 469 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 543 of file Value.h.
Referenced by llvm::MemoryUseOrDef::classof(), llvm::MemoryUse::classof(), llvm::MemoryDef::classof(), compareCmp(), CompareValueComplexity(), 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().
|
inlineprotected |
Return true if this value has any metadata attached to it.
Definition at line 602 of file Value.h.
References HasMetadata.
Referenced by llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::Instruction::getAAMetadata(), getAllMetadata(), and getMetadata().
Definition at line 609 of file Value.h.
References getMetadata().
Return true if this value has the given type of metadata attached.
Definition at line 606 of file Value.h.
References getMetadata().
|
inline |
Definition at line 262 of file Value.h.
References HasName.
Referenced by addReplicateRegions(), llvm::SPIRVGlobalRegistry::buildGlobalVariable(), llvm::CloneBasicBlock(), llvm::dumpBasicBlockLabel(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), llvm::ExecutionEngine::emitGlobals(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::emitLinkerFlagsForUsedCOFF(), externalize(), extractSubModule(), llvm::JITSymbolFlags::fromGlobalValue(), getArm64ECMangledFunctionName(), llvm::ModuleSummaryIndex::getGlobalValueSummary(), llvm::ExecutionEngine::getMangledName(), llvm::Mangler::getNameWithPrefix(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), initSlots2BasicBlocks(), llvm::MergeBlockIntoPredecessor(), OptimizeGlobalVars(), llvm::VPWidenCallRecipe::print(), llvm::MemoryPhi::print(), printBBName(), printIRBlockReference(), llvm::stableHashValue(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), and llvm::UpgradeGlobalVariable().
Return true if this value has N uses or more.
This is logically equivalent to getNumUses() >= N.
Return true if this Value has exactly N uses.
Definition at line 150 of file Value.cpp.
Referenced by canonicalizeAbs(), llvm::OpenMPIRBuilder::finalize(), llvm::InstCombinerImpl::foldBinopWithRecurrence(), 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 158 of file Value.cpp.
Referenced by llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), isCommutative(), processUMulZExtIdiom(), 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 439 of file Value.h.
References llvm::hasSingleElement(), and uses().
Referenced by areTwoInsertFromSameBuildVector(), canonicalizeSaturatedSubtract(), checkForNegativeOperand(), collectOffsetOp(), combine_CC(), combineBinOpOfExtractToReduceTree(), combineMaskedStore(), combinePMULDQ(), combineSelect(), combineSetCC(), combineStoreValueFPToInt(), combineTargetShuffle(), llvm::OpenMPIRBuilder::createTeams(), dropRedundantMaskingOfLeftShiftInput(), emitGlobalConstantImpl(), llvm::OpenMPIRBuilder::emitTargetTask(), factorizeFAddFSub(), factorizeMinMaxTree(), findBuildAggregateRec(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseIdentifiedObject(), llvm::InstCombinerImpl::foldAddWithConstant(), foldAndOrOfICmpEqConstantAndICmp(), foldAndOrOfICmpsWithConstEq(), foldAndOrOfSETCC(), foldAndToXor(), llvm::InstCombinerImpl::foldBinopWithRecurrence(), llvm::foldBranchToCommonDest(), foldClampRangeOfTwo(), foldComplexAndOrPatterns(), foldCtpop(), foldCtpopPow2Test(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFrexpOfSelect(), llvm::InstCombinerImpl::foldGEPICmp(), foldGEPOfPhi(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpInstWithConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldIdentityExtractShuffle(), foldIDivShl(), foldInsSequenceIntoSplat(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldIntrinsicUsingDistributiveLaws(), foldNoWrapAdd(), llvm::InstCombinerImpl::foldOpIntoPhi(), foldOrToXor(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldSubOfMinMax(), foldUnsignedUnderflowCheck(), llvm::InstCombinerImpl::foldVectorBinop(), foldVectorCmp(), foldVecTruncToExtElt(), foldXorToXor(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getInstructionCost(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), hasNonFlagsUse(), hasUseOtherThanLLVMUsed(), hoistAddSub(), hoistMulAddAssociation(), llvm::InvertBranch(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), llvm::AArch64TTIImpl::isExtPartOfAvgExpr(), isF128MovedToParts(), llvm::RecurrenceDescriptor::isFindIVPattern(), isFirstInsertElement(), llvm::SystemZTTIImpl::isFoldableLoad(), isFPSatMinMaxPattern(), isI128MovedToParts(), lowerAddSubToHorizontalOp(), llvm::MSP430TargetLowering::LowerSETCC(), llvm::X86::mayFoldIntoStore(), narrowInsElt(), optimizeLoopExitWithUnknownExitCount(), performAddCombineForShiftedOperands(), performAddCSelIntoCSinc(), llvm::ARMTargetLowering::PerformBRCONDCombine(), llvm::ARMTargetLowering::PerformCMOVCombine(), performMSTORECombine(), performOrXorChainCombine(), performSETCCCombine(), performSHLCombine(), performSTORECombine(), PerformVQDMULHCombine(), processUGT_ADDCST_ADD(), rematerializeLiveValuesAtUses(), removeEmptyCleanup(), replaceArgumentUses(), replaceExtractElements(), shouldConvertToRelLookupTable(), shouldExpandCmpArithRMWInIR(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySetCCIntoEq(), 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 166 of file Value.cpp.
Referenced by llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::GCNTTIImpl::hoistLaneIntrinsicThroughOperand(), and isNotUsedOrFoldableInLoop().
Check the optional flags for equality.
Definition at line 560 of file Value.h.
References SubclassOptionalData.
|
inline |
Check if this Value has a use-list.
Definition at line 344 of file Value.h.
Referenced by addUse(), findLoadCallsAtConstantOffset(), findMayClobberedPtrAccess(), llvm::InstCombinerImpl::foldOpIntoPhi(), materialized_use_begin(), materialized_user_begin(), and llvm::InstCombinerImpl::SimplifyDemandedVectorElts().
|
inline |
Return true if there is a value handle associated with this value.
Definition at line 565 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 1119 of file Value.cpp.
Referenced by collectMemAccessInfo(), findExtractedInputToOverallInputMapping(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), and llvm::SwiftErrorValueTracking::preassignVRegs().
|
inline |
Return true if there is metadata referencing this value.
Definition at line 568 of file Value.h.
References IsUsedByMD.
bool Value::isUsedInBasicBlock | ( | const BasicBlock * | BB | ) | const |
Check if this value is used in the specified basic block.
Not supported for ConstantData.
|
inline |
Definition at line 356 of file Value.h.
References assert(), and hasUseList().
Referenced by materialized_uses(), and use_begin().
|
inline |
Definition at line 360 of file Value.h.
References assert(), and hasUseList().
|
inline |
Definition at line 394 of file Value.h.
References assert(), and hasUseList().
Referenced by materialized_users(), user_back(), and user_begin().
|
inline |
Definition at line 398 of file Value.h.
References assert(), and hasUseList().
|
inline |
Definition at line 420 of file Value.h.
References llvm::make_range(), materialized_user_begin(), and user_end().
Referenced by forEachUser(), and users().
|
inline |
Definition at line 423 of file Value.h.
References llvm::make_range(), materialized_user_begin(), and user_end().
|
inline |
Definition at line 374 of file Value.h.
References llvm::make_range(), materialized_use_begin(), and use_end().
Referenced by uses().
|
inline |
Definition at line 377 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 838 of file Value.h.
Referenced by llvm::CallBase::mutateFunctionType(), and scalarizeInstruction().
void Value::print | ( | raw_ostream & | O, |
bool | IsForDebug = false |
||
) | const |
Implement operator<< on Value.
Definition at line 5222 of file AsmWriter.cpp.
References getModuleFromVal(), I, isReferencingMDNode(), and print().
Referenced by convertMCP(), dump(), llvm::operator<<(), print(), llvm::AccelTableBase::HashData::print(), llvm::DXILResourceMap::print(), and RecurrenceInfo::print().
void Value::print | ( | raw_ostream & | O, |
ModuleSlotTracker & | MST, | ||
bool | IsForDebug = false |
||
) | const |
Definition at line 5233 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 5320 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 5305 of file AsmWriter.cpp.
References getModuleFromVal(), Machine, printAsOperandImpl(), and printWithoutType().
Referenced by convertMCP(), deleteValue(), dumpUnpackedICmp(), llvm::AsmPrinter::emitGlobalVariable(), print(), llvm::AliasSet::print(), llvm::MemoryPhi::print(), llvm::SCEV::print(), llvm::ScalarEvolution::print(), llvm::PassManagerPrettyStackEntry::print(), llvm::IVUsers::print(), llvm::dxil::ResourceInfo::print(), llvm::MachineOperand::print(), llvm::GVNExpression::StoreExpression::printInternal(), remarkAlloca(), remarkFlatAddrspaceAccess(), llvm::GISelValueTrackingPrinterPass::run(), llvm::MachineUniformityPrinterPass::run(), 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 546 of file Value.cpp.
Referenced by llvm::changeToInvokeAndSplitBasicBlock(), checkOrAndOpImpliedByOther(), llvm::coro::Shape::cleanCoroutine(), llvm::CloneAndPruneIntoFromInst(), combineLoadToOperationType(), ConvertShiftToMul(), llvm::convertToDeclaration(), llvm::coro::BaseCloner::create(), createMergedFunction(), createRawLoad(), createTblForTrunc(), createTypedBufferLoad(), DoLowering(), doPromotion(), downcastI64toI32InsertExtractElements(), dropTypeTests(), EliminateDuplicatePHINodesNaiveImpl(), eliminateSwiftErrorArgument(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::objcarc::EraseInstruction(), llvm::expandAtomicRMWToCmpXchg(), expandBufferLoadIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), expandIntrinsic(), expandIToFP(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), expandToSwitch(), findPHIToPartitionLoops(), llvm::SanitizerStatReport::finish(), fixI8UseChain(), foldTwoEntryPHINode(), handleByValParam(), llvm::Constant::handleOperandChange(), llvm::InlineFunctionImpl(), inlineGetBaseAndOffset(), insertSpills(), insertUniqueBackedgeBlock(), LLVMReplaceAllUsesWith(), llvm::lowerAtomicCmpXchgInst(), llvm::lowerAtomicRMWInst(), lowerAwaitSuspend(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), lowerExpectIntrinsic(), llvm::SITargetLowering::lowerIdempotentRMWIntoFencedLoad(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), LowerNegateToMultiply(), lowerSubFn(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::lowerUnaryVectorIntrinsicAsLoop(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), mergeCleanupPad(), llvm::InstDeleterIRStrategy::mutate(), nullifySetjmp(), optimizeDivRem(), OptimizeEmptyGlobalAtExitDtors(), OptimizeGlobalAddressOfAllocation(), optimizeLoopExitWithUnknownExitCount(), processAnd(), processAShr(), processBlockAddr(), llvm::JumpThreadingPass::processBranchOnXOR(), processCall(), processCmpIntrinsic(), processInternalGlobal(), processMinMaxIntrinsic(), processOverflowIntrinsic(), processSDiv(), processSExt(), processSIToFP(), processSRem(), processUse(), promoteAllocaUserToVector(), promoteSingleBlockAlloca(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeGlobalCtors(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::removeIncomingValueIf(), removeMarkerCall(), RemovePreallocated(), llvm::removeUnwindEdge(), replace(), replaceAliasWithAliasee(), llvm::SPIRVGlobalRegistry::replaceAllUsesWith(), replaceAllUsesWith(), replaceArgumentUses(), replaceAsyncResumeFunction(), replaceCalledFunction(), ReplaceCallWith(), replaceFallthroughCoroEnd(), replaceFrameSizeAndAlignment(), replaceLoad(), replaceLoopPHINodesWithPreheaderValues(), replaceOperation(), replacePrepare(), llvm::coro::BaseCloner::replaceRetconOrAsyncSuspendUses(), llvm::replaceSignedInst(), reuseTableCompare(), llvm::rewriteLoopExitValues(), rewritePHIs(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), llvm::SimplifyTypeTestsPass::run(), scalarize(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), simplifySuspendPoint(), sink(), sinkMinMaxInBB(), speculatePHINodeLoads(), speculateSelectInstLoads(), splitCallSite(), llvm::coro::AsyncABI::splitCoroutine(), llvm::coro::AnyRetconABI::splitCoroutine(), splitGlobal(), llvm::SplitIndirectBrCriticalEdges(), SplitLandingPadPredecessorsImpl(), llvm::OpenMPIRBuilder::tileLoops(), tryToRecognizeTableBasedCttz(), tryToReplaceWithGEPBuiltin(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), upgradeX86IntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), DataScalarizerVisitor::visitAllocaInst(), llvm::InstCombinerImpl::visitExtractElementInst(), DataScalarizerVisitor::visitGetElementPtrInst(), DataScalarizerVisitor::visitLoadInst(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
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.
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 554 of file Value.cpp.
Referenced by llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createTask(), llvm::MemorySSAUpdater::insertDef(), insertSpills(), and llvm::TryToSimplifyUncondBranchFromEmptyBlock().
Definition at line 1599 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 1571 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 390 of file Value.cpp.
Referenced by addReplicateRegions(), llvm::AllocaInst::AllocaInst(), llvm::BinaryOperator::BinaryOperator(), llvm::CastInst::CastInst(), llvm::CloneBasicBlock(), cloneCandidateFunction(), llvm::CloneFunction(), llvm::CloneModule(), llvm::CmpInst::CmpInst(), convertToLocalCopy(), llvm::OpenMPIRBuilder::AtomicInfo::CreateAlloca(), createInductionAdditionalBypassValues(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), llvm::createSanitizerCtorAndInitFunctions(), llvm::OpenMPIRBuilder::createTeams(), llvm::EpilogueVectorizerMainLoop::createVectorizedLoopSkeleton(), llvm::EpilogueVectorizerEpilogueLoop::createVectorizedLoopSkeleton(), doPromotion(), llvm::DuplicateInstructionsInSplitBetween(), llvm::embedBitcodeInModule(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), emitTargetTaskProxyFunction(), emitTransformedIndex(), llvm::VPDerivedIVRecipe::execute(), externalize(), findBasePointer(), forceRenaming(), llvm::FreezeInst::FreezeInst(), generateUnsignedDivisionCode(), getArm64ECMangledFunctionName(), 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(), scalarizeInstruction(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), llvm::ShuffleVectorInst::ShuffleVectorInst(), sinkInstruction(), SplitLandingPadPredecessorsImpl(), llvm::splitLoopBound(), switchToLookupTable(), turnGuardIntoBranch(), llvm::UnaryOperator::UnaryOperator(), llvm::UnrollRuntimeLoopRemainder(), versionCallSiteWithCond(), llvm::LoopVersioning::versionLoop(), and llvm::logicalview::LVSymbolVisitor::visitKnownRecord().
|
inlineprotected |
void llvm::Value::sortUseList | ( | Compare | Cmp | ) |
|
inline |
Definition at line 745 of file Value.h.
References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().
LLVM_ABI const Value * llvm::Value::stripAndAccumulateConstantOffsets | ( | const DataLayout & | DL, |
APInt & | Offset, | ||
bool | AllowNonInbounds, | ||
bool | AllowInvariantGroup = false , |
||
function_ref< bool(Value &Value, APInt &Offset)> | ExternalAnalysis = nullptr , |
||
bool | LookThroughIntToPtr = false |
||
) | 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 LookThroughIntToPtr
is true then this method also looks through IntToPtr and PtrToInt constant expressions. The returned pointer may not have the same provenance as this value.
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(), llvm::ConstantFoldCompareInstOperands(), foldConsecutiveLoads(), foldLoadsRecursive(), getAssignmentInfoImpl(), llvm::getPointersDiff(), inferAlignment(), llvm::ConstantPtrAuth::isKnownCompatibleWith(), llvm::simplifyLoadInst(), stripAndAccumulateConstantOffsets(), stripAndAccumulateInBoundsConstantOffsets(), stripAndAccumulateOffsets(), transformToIndexedCompare(), and llvm::tryPromoteCall().
|
inline |
Definition at line 764 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 759 of file Value.h.
References DL, llvm::Offset, and stripAndAccumulateConstantOffsets().
Referenced by isNonEqualPointersWithRecursiveGEP(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
inline |
Definition at line 700 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 713 of file Value.cpp.
Referenced by stripInBoundsConstantOffsets(), and llvm::PGOIndirectCallVisitor::tryGetVTableInstruction().
|
inline |
Definition at line 657 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 701 of file Value.cpp.
Referenced by llvm::MachineFunction::addLandingPad(), canParameterizeCallOperand(), llvm::Attributor::changeAfterManifest(), llvm::classifyEHPersonality(), compareNames(), llvm::diagnoseDontCall(), DoLowering(), llvm::emitCalloc(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), llvm::emitMemCpyChk(), llvm::emitPutChar(), llvm::emitPutS(), llvm::objcarc::EraseInstruction(), llvm::findAvailablePtrLoadStore(), llvm::findDevirtualizableCallsForTypeTest(), findInitTrampolineFromAlloca(), findSafeStoreForStoreStrongContraction(), FindUsedValues(), findUsedValues(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::AnyCoroIdRetconInst::getAllocFunction(), llvm::CoroAsyncContextDeallocInst::getAsyncContext(), llvm::CoroSuspendAsyncInst::getAsyncContextProjectionFunction(), llvm::CoroIdAsyncInst::getAsyncFunctionPointer(), llvm::CoroAsyncContextAllocInst::getAsyncFunctionPointer(), getAvailableLoadStore(), llvm::CoroIdInst::getCoroutine(), llvm::AnyCoroIdRetconInst::getDeallocFunction(), llvm::MemIntrinsicBase< Derived >::getDest(), getInvariantGroupClobberingInstruction(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), KernelInfo::getKernelEnvironementGVFromKernelInitCB(), getKnownConstant(), llvm::getMaybeBitcastedCallee(), llvm::CoroSuspendAsyncInst::getMustTailCallFunction(), llvm::CoroAsyncEndInst::getMustTailCallFunction(), llvm::InstrProfInstBase::getNameValue(), llvm::CoroIdInst::getPromise(), llvm::AnyCoroIdRetconInst::getPrototype(), llvm::CoroIdInst::getRawInfo(), llvm::CoroSuspendAsyncInst::getResumeFunction(), llvm::objcarc::getreturnRVOperand(), llvm::MemTransferBase< BaseCL >::getSource(), llvm::isSafeToLoadUnconditionally(), llvm::CallLowering::lowerCall(), OptimizeEmptyGlobalAtExitDtors(), replacePrepare(), simplifySuspendPoint(), stripPointerCasts(), llvm::Constant::stripPointerCasts(), llvm::tryDelinearizeFixedSizeImpl(), llvm::InstCombinerImpl::visitLandingPadInst(), and llvm::InstCombinerImpl::visitPHINode().
|
inline |
Definition at line 667 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 705 of file Value.cpp.
Referenced by llvm::GlobalIFunc::getResolverFunction(), llvm::TargetLowering::LowerToTLSEmulatedModel(), and stripPointerCastsAndAliases().
|
inline |
Definition at line 690 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 717 of file Value.cpp.
Referenced by llvm::GlobalsAAResult::alias(), and stripPointerCastsForAliasAnalysis().
|
inline |
Definition at line 678 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 709 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 396 of file Value.cpp.
Referenced by llvm::changeToCall(), cloneInstructionsIntoPredecessorBlockAndUpdateSSAUses(), llvm::convertToDeclaration(), llvm::coro::BaseCloner::create(), DoLowering(), doPromotion(), llvm::embedBitcodeInModule(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::InstCombinerImpl::EvaluateInDifferentType(), expandUDivOrURem(), foldConsecutiveLoads(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), foldIntegerRepackThroughZExt(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), foldTwoEntryPHINode(), forceRenaming(), HandleInlinedEHPad(), hoistMinMax(), INITIALIZE_PASS(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineRDFFR(), instCombineSMECntsElts(), 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(), rewriteCall(), rewriteMemOpOfSelect(), rewritePHIs(), scalarizeMaskedLoad(), simplifyAMDGCNImageIntrinsic(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), tryFactorization(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Definition at line 364 of file Value.h.
References assertModuleIsMaterialized(), and materialized_use_begin().
Referenced by forEachCall(), llvm::LazyValueInfoImpl::getValueAtUse(), hasNonFlagsUse(), OptimizeGlobalAddressOfAllocation(), llvm::MemorySSAUpdater::removeMemoryAccess(), shouldConvertToRelLookupTable(), llvm::sandboxir::Value::use_begin(), and llvm::sandboxir::Value::user_begin().
|
inline |
Definition at line 368 of file Value.h.
References assertModuleIsMaterialized(), and materialized_use_begin().
|
inline |
Definition at line 346 of file Value.h.
References assertModuleIsMaterialized().
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), checkOrAndOpImpliedByOther(), computeVirtualCallSiteTypeInfoMap(), createRetPHINode(), DCEInstruction(), deleteIfDead(), llvm::Constant::destroyConstant(), llvm::AsmPrinter::doFinalization(), doPromotion(), dropTypeTests(), llvm::OpenMPIRBuilder::emitBlock(), llvm::SITargetLowering::emitExpandAtomicAddrSpacePredicate(), llvm::objcarc::EraseInstruction(), findArgParts(), foldURemOfLoopIncrement(), forEachCall(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), hasAddressTakenAndUsed(), hasSameExtUse(), hasUseOtherThanLLVMUsed(), llvm::InlineFunctionImpl(), 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(), llvm::StatepointLoweringState::scheduleRelocCall(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), simplifyAndDCEInstruction(), SinkCast(), speculatePHINodeLoads(), splitCallSite(), splitGlobal(), splitGlobals(), SplitLandingPadPredecessorsImpl(), stripDebugDeclareImpl(), llvm::stripDebugifyMetadata(), TryToShrinkGlobalToBoolean(), llvm::UpgradeARCRuntime(), user_empty(), llvm::InstCombinerImpl::visitCallInst(), and llvm::PtrUseVisitor< DerivedT >::visitGetElementPtrInst().
|
inline |
Definition at line 372 of file Value.h.
Referenced by materialized_uses(), and llvm::sandboxir::Value::user_begin().
|
inline |
|
inline |
Definition at line 412 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(), stripDebugDeclareImpl(), targetParallelCallback(), and TryToShrinkGlobalToBoolean().
Definition at line 416 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
|
inline |
Definition at line 402 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
Referenced by addAllGlobalValueUsers(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::GCNTTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::slpvectorizer::BoUpSLP::getReorderingData(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), hasSameExtUse(), llvm::SystemZTTIImpl::isFoldableLoad(), isFPSatMinMaxPattern(), isI128MovedToParts(), isPointerUseReplacable(), isSSATMinMaxPattern(), llvm::X86::mayFoldIntoStore(), OptimizeExtractBits(), performSTORECombine(), rematerializeLiveValuesAtUses(), llvm::Constant::removeDeadConstantUsers(), replaceAccessesWithHandle(), replaceAllUsesWith(), sinkAndCmp0Expression(), and SinkCast().
|
inline |
Definition at line 406 of file Value.h.
References assertModuleIsMaterialized(), and materialized_user_begin().
|
inline |
Definition at line 389 of file Value.h.
References use_empty().
Referenced by rematerializeLiveValuesAtUses().
|
inline |
Definition at line 410 of file Value.h.
Referenced by addAllGlobalValueUsers(), isPointerUseReplacable(), materialized_users(), OptimizeExtractBits(), llvm::Constant::removeDeadConstantUsers(), replaceAccessesWithHandle(), sinkAndCmp0Expression(), and SinkCast().
|
inline |
|
inline |
Definition at line 426 of file Value.h.
References assertModuleIsMaterialized(), and materialized_users().
Referenced by addFullyUnrolledInstructionsToIgnore(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), llvm::canTrackGlobalVariableInterprocedurally(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), clearAssumptionsOfUsers(), llvm::InstCombinerImpl::convertOrOfShiftsToFunnelShift(), llvm::createAnyOfReduction(), createOutlinedFunction(), createRetBitCast(), createRetPHINode(), detectPopcountIdiom(), llvm::InstCombinerImpl::dominatesAllUses(), dropTypeTests(), expandBufferLoadIntrinsic(), findInitTrampolineFromAlloca(), findMayClobberedPtrAccess(), FindPreallocatedCall(), FindSingleUseIdentifiedObject(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), forwardHandleAccesses(), forwardStoredOnceStore(), llvm::FunctionPropertiesUpdater::FunctionPropertiesUpdater(), getArgSPIRVType(), getCleanupRetUnwindDest(), getFSqrtDivOptPattern(), llvm::GCStatepointInst::getGCRelocates(), getGCResultLocality(), getInvariantGroupClobberingInstruction(), llvm::HexagonTargetObjectFile::getLutUsedFunction(), llvm::getNumOfCalls(), llvm::sandboxir::Value::getNumUses(), llvm::RecurrenceDescriptor::getReductionOpChain(), getUnwindDestToken(), getUnwindDestTokenHelper(), HasAddressTaken(), hasExceptionPointerOrCodeUser(), hasHardUserWithinLoop(), hasLifetimeMarkers(), llvm::hasOutsideLoopUser(), hasSameExtUse(), hasStoreUsersOnly(), insertSpills(), llvm::invertCondition(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), llvm::isAlmostDeadIV(), isArgUnmodifiedByAllCalls(), llvm::Loop::isAuxiliaryInductionVariable(), llvm::Constant::isConstantUsed(), llvm::RecurrenceDescriptor::isFixedOrderRecurrence(), isGOTEquivalentCandidate(), isHighCostExpansion(), isI32InsnAllUses(), isKnownNonNullFromDominatingCondition(), llvm::isOverflowIntrinsicNoWrap(), isPointerValueDeadOnEntryToFunction(), isPTruePromoted(), isSafePHIToSpeculate(), isWorthFoldingIntoRegRegScale(), localAllocaNeedsStackSave(), llvm::LowerDbgDeclare(), lowerLocalAllocas(), mapWasmLandingPadIndex(), llvm::VPlanTransforms::materializeBroadcasts(), 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(), reportInvalidDirection(), llvm::rewriteLoopExitValues(), rewriteNonInstructionUses(), rewriteSingleStoreAlloca(), rewriteUses(), llvm::BPFASpaceCastSimplifyPass::run(), llvm::ArgumentPromotionPass::run(), llvm::SimplifyTypeTestsPass::run(), runIPSCCP(), llvm::coro::BaseCloner::salvageDebugInfo(), setCannotDuplicate(), shouldCheckArgs(), shouldCombineToPostInc(), shouldSpeculateInstrs(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), sinkAndCmp0Expression(), sinkLastInstruction(), sinkLifetimeStartMarkers(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), splitGlobal(), llvm::coro::suppressCoroAllocs(), swapICmpOperandsToExposeCSEOpportunities(), tryToElideArgumentCopy(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UpgradeARCRuntime(), usersDominator(), valueEscapes(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPHINode(), and llvm::InstCombinerImpl::visitShuffleVectorInst().
|
inline |
Definition at line 430 of file Value.h.
References assertModuleIsMaterialized(), and materialized_users().
|
inline |
Definition at line 380 of file Value.h.
References assertModuleIsMaterialized(), and materialized_uses().
Referenced by addIntrinsicToSummary(), canRewriteGEPAsOffset(), canSinkInstructions(), llvm::Attributor::checkForAllCallSites(), computeVirtualCallSiteTypeInfoMap(), determinePointerAccessAttrs(), dropTypeTests(), eliminateSwiftErrorAlloca(), findCallsAtConstantOffset(), llvm::findDevirtualizableCallsForTypeCheckedLoad(), llvm::findDevirtualizableCallsForTypeTest(), findLoadCallsAtConstantOffset(), findUser(), llvm::InformationCache::foreachUse(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), handleByValParam(), hasOneUse(), llvm::hasPartialIVCondition(), insertSpills(), isCommutative(), isOnlyCopiedFromConstantMemory(), isPossibleIndirectCallTarget(), llvm::LoopInfo::movementPreservesLCSSAForm(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processSelect(), removeIntrinsicUsers(), replaceAllPrepares(), replaceLoopInvariantUses(), replacePrepare(), RewriteUsesOfClonedInstructions(), runAttributorOnFunctions(), llvm::X86TargetLowering::shouldReduceLoadWidth(), SinkInstruction(), llvm::updatePublicTypeTestCalls(), UpdateSSA(), llvm::sandboxir::Value::use_begin(), and llvm::MemorySSA::verifyOrderingDominationAndDefUses().
|
inline |
Definition at line 384 of file Value.h.
References assertModuleIsMaterialized(), and materialized_uses().
|
friend |
|
friend |
|
protected |
Definition at line 116 of file Value.h.
Referenced by llvm::CallBase::hasDescriptor(), and llvm::User::User().
|
protected |
Definition at line 115 of file Value.h.
Referenced by llvm::User::getOperandList(), llvm::User::setNumHungOffUseOperands(), and llvm::User::User().
|
protected |
Definition at line 114 of file Value.h.
Referenced by addMetadata(), clearMetadata(), eraseMetadata(), eraseMetadataIf(), getMetadata(), hasMetadata(), and setMetadata().
|
protected |
|
protected |
Definition at line 112 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 829 of file Value.h.
Referenced by llvm::getOrEnforceKnownAlignment(), inferAlignment(), and llvm::InstCombinerImpl::visitCallInst().
|
staticconstexpr |
Definition at line 830 of file Value.h.
Referenced by llvm::AttrBuilder::addAlignmentAttr(), llvm::GEPOperator::getMaxPreservedAlignment(), llvm::Attribute::getWithAlignment(), isSafeCheapLoadStore(), and llvm::GlobalObject::setAlignment().
|
protected |
Definition at line 109 of file Value.h.
Referenced by llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::User::getOperandUse(), llvm::User::op_end(), llvm::GlobalVariable::operator=(), 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 85 of file Value.h.
Referenced by llvm::BinaryConstantExpr::BinaryConstantExpr(), clearSubclassOptionalData(), llvm::CallBrInst::Create(), llvm::CallInst::Create(), llvm::ConstantExpr::getAsInstruction(), llvm::GEPOperator::getNoWrapFlags(), getRawSubclassOptionalData(), llvm::ConstantExpr::getWithOperands(), llvm::BasicBlock::hasAddressTaken(), llvm::TruncInst::hasNoSignedWrap(), llvm::OverflowingBinaryOperator::hasNoSignedWrap(), llvm::TruncInst::hasNoUnsignedWrap(), llvm::OverflowingBinaryOperator::hasNoUnsignedWrap(), hasSameSubclassOptionalData(), llvm::BasicBlock::invalidateOrders(), llvm::BasicBlock::isInstrOrderValid(), llvm::TruncInst::setHasNoSignedWrap(), llvm::TruncInst::setHasNoUnsignedWrap(), and llvm::GetElementPtrInst::setNoWrapFlags().