LLVM  6.0.0svn
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
llvm::User Class Reference

#include "llvm/IR/User.h"

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

Classes

struct  const_value_op_iterator
 
struct  value_op_iterator
 Iterator for directly iterating over the operand Values. More...
 

Public Types

using op_iterator = Use *
 
using const_op_iterator = const Use *
 
using op_range = iterator_range< op_iterator >
 
using const_op_range = iterator_range< const_op_iterator >
 
- Public Types inherited from llvm::Value
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

 User (const User &)=delete
 
void operator delete (void *Usr)
 Free memory allocated for User and Use objects. More...
 
void operator delete (void *, unsigned)
 Placement delete - required by std, but never called. More...
 
void operator delete (void *, unsigned, bool)
 Placement delete - required by std, but never called. More...
 
const UsegetOperandList () const
 
UsegetOperandList ()
 
ValuegetOperand (unsigned i) const
 
void setOperand (unsigned i, Value *Val)
 
const UsegetOperandUse (unsigned i) const
 
UsegetOperandUse (unsigned i)
 
unsigned getNumOperands () const
 
ArrayRef< const uint8_t > getDescriptor () const
 Returns the descriptor co-allocated with this User instance. More...
 
MutableArrayRef< uint8_t > getDescriptor ()
 Returns the descriptor co-allocated with this User instance. More...
 
void setGlobalVariableNumOperands (unsigned NumOps)
 Set the number of operands on a GlobalVariable. More...
 
void setNumHungOffUseOperands (unsigned NumOps)
 Subclasses with hung off uses need to manage the operand count themselves. More...
 
op_iterator op_begin ()
 
const_op_iterator op_begin () const
 
op_iterator op_end ()
 
const_op_iterator op_end () const
 
op_range operands ()
 
const_op_range operands () const
 
value_op_iterator value_op_begin ()
 
value_op_iterator value_op_end ()
 
iterator_range< value_op_iteratoroperand_values ()
 
const_value_op_iterator value_op_begin () const
 
const_value_op_iterator value_op_end () const
 
iterator_range< const_value_op_iteratoroperand_values () const
 
void dropAllReferences ()
 Drop all references to operands. More...
 
void replaceUsesOfWith (Value *From, Value *To)
 Replace uses of one Value with another. More...
 
- Public Member Functions inherited from llvm::Value
 Value (const Value &)=delete
 
Valueoperator= (const Value &)=delete
 
void deleteValue ()
 Delete a pointer to a generic Value. More...
 
void dump () const
 Support for debugging, callable in GDB: V->dump() More...
 
TypegetType () const
 All values are typed, get the type of this value. More...
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 Return a constant reference to the value's name. More...
 
void setName (const Twine &Name)
 Change the name of the value. More...
 
void takeName (Value *V)
 Transfer the name from V to this value. More...
 
void replaceAllUsesWith (Value *V)
 Change all uses of this to point to a new Value. More...
 
void replaceNonMetadataUsesWith (Value *V)
 Change non-metadata uses of this to point to a new Value. More...
 
void replaceUsesOutsideBlock (Value *V, BasicBlock *BB)
 replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. More...
 
void assertModuleIsMaterializedImpl () const
 
void assertModuleIsMaterialized () const
 
bool use_empty () const
 
use_iterator materialized_use_begin ()
 
const_use_iterator materialized_use_begin () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
iterator_range< use_iteratormaterialized_uses ()
 
iterator_range< const_use_iteratormaterialized_uses () const
 
iterator_range< use_iteratoruses ()
 
iterator_range< const_use_iteratoruses () const
 
bool user_empty () const
 
user_iterator materialized_user_begin ()
 
const_user_iterator materialized_user_begin () const
 
user_iterator user_begin ()
 
const_user_iterator user_begin () const
 
user_iterator user_end ()
 
const_user_iterator user_end () const
 
Useruser_back ()
 
const Useruser_back () const
 
iterator_range< user_iteratormaterialized_users ()
 
iterator_range< const_user_iteratormaterialized_users () const
 
iterator_range< user_iteratorusers ()
 
iterator_range< const_user_iteratorusers () const
 
bool hasOneUse () const
 Return true if there is exactly one user of this value. More...
 
bool hasNUses (unsigned N) const
 Return true if this Value has exactly N users. More...
 
bool hasNUsesOrMore (unsigned N) const
 Return true if this value has N users or more. More...
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 Check if this value is used in the specified basic block. More...
 
unsigned getNumUses () const
 This method computes the number of uses of this Value. More...
 
void addUse (Use &U)
 This method should only be used by the Use class. More...
 
unsigned getValueID () const
 Return an ID for the concrete type of this object. More...
 
unsigned getRawSubclassOptionalData () const
 Return the raw optional flags value contained in this value. More...
 
void clearSubclassOptionalData ()
 Clear the optional flags contained in this value. More...
 
bool hasSameSubclassOptionalData (const Value *V) const
 Check the optional flags for equality. More...
 
bool hasValueHandle () const
 Return true if there is a value handle associated with this value. More...
 
bool isUsedByMetadata () const
 Return true if there is metadata referencing this value. More...
 
bool isSwiftError () const
 Return true if this value is a swifterror value. More...
 
const ValuestripPointerCasts () const
 Strip off pointer casts, all-zero GEPs, and aliases. More...
 
ValuestripPointerCasts ()
 
const ValuestripPointerCastsAndBarriers () const
 Strip off pointer casts, all-zero GEPs, aliases and barriers. More...
 
ValuestripPointerCastsAndBarriers ()
 
const ValuestripPointerCastsNoFollowAliases () const
 Strip off pointer casts and all-zero GEPs. More...
 
ValuestripPointerCastsNoFollowAliases ()
 
const ValuestripInBoundsConstantOffsets () const
 Strip off pointer casts and all-constant inbounds GEPs. More...
 
ValuestripInBoundsConstantOffsets ()
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 Accumulate offsets from stripInBoundsConstantOffsets(). More...
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 
const ValuestripInBoundsOffsets () const
 Strip off pointer casts and inbounds GEPs. More...
 
ValuestripInBoundsOffsets ()
 
unsigned getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull) const
 Returns the number of bytes known to be dereferenceable for the pointer value. More...
 
unsigned getPointerAlignment (const DataLayout &DL) const
 Returns an alignment of the pointer value. More...
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 Translate PHI node to its predecessor from the given basic block. More...
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
void mutateType (Type *Ty)
 Mutate the type of this Value to be of the specified type. More...
 
template<class Compare >
void sortUseList (Compare Cmp)
 Sort the use-list. More...
 
void reverseUseList ()
 Reverse the use-list. More...
 
void print (raw_ostream &O, bool IsForDebug=false) const
 Implement operator<< on Value. More...
 
void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const
 
void printAsOperand (raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const
 Print the name of this Value out to the specified raw_ostream. More...
 
void printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const
 

Static Public Member Functions

static bool classof (const Value *V)
 

Protected Member Functions

void * operator new (size_t Size)
 Allocate a User with an operand pointer co-allocated. More...
 
void * operator new (size_t Size, unsigned Us)
 Allocate a User with the operands co-allocated. More...
 
void * operator new (size_t Size, unsigned Us, unsigned DescBytes)
 Allocate a User with the operands co-allocated. More...
 
 User (Type *ty, unsigned vty, Use *, unsigned NumOps)
 
void allocHungoffUses (unsigned N, bool IsPhi=false)
 Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User. More...
 
void growHungoffUses (unsigned N, bool IsPhi=false)
 Grow the number of hung off uses. More...
 
 ~User ()=default
 
template<int Idx>
UseOp ()
 
template<int Idx>
const UseOp () const
 
- Protected Member Functions inherited from llvm::Value
 Value (Type *Ty, unsigned scid)
 
 ~Value ()
 Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. More...
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 

Static Protected Member Functions

template<int Idx, typename U >
static UseOpFrom (const U *that)
 

Friends

template<unsigned >
struct HungoffOperandTraits
 

Additional Inherited Members

- Static Public Attributes inherited from llvm::Value
static const unsigned MaxAlignmentExponent = 29
 The maximum alignment for instructions. More...
 
static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent
 
- Protected Types inherited from llvm::Value
enum  : unsigned { NumUserOperandsBits = 28 }
 The number of operands in the subclass. More...
 
- Protected Attributes inherited from llvm::Value
unsigned char SubclassOptionalData: 7
 Hold subclass data that can be dropped. More...
 
unsigned NumUserOperands: NumUserOperandsBits
 
unsigned IsUsedByMD: 1
 
unsigned HasName: 1
 
unsigned HasHungOffUses: 1
 
unsigned HasDescriptor: 1
 

Detailed Description

Definition at line 45 of file User.h.

Member Typedef Documentation

◆ const_op_iterator

Definition at line 210 of file User.h.

◆ const_op_range

Definition at line 212 of file User.h.

◆ op_iterator

Definition at line 209 of file User.h.

◆ op_range

Definition at line 211 of file User.h.

Constructor & Destructor Documentation

◆ User() [1/2]

llvm::User::User ( Type ty,
unsigned  vty,
Use ,
unsigned  NumOps 
)
inlineprotected

◆ ~User()

llvm::User::~User ( )
protecteddefault

Referenced by User().

◆ User() [2/2]

llvm::User::User ( const User )
delete

Member Function Documentation

◆ allocHungoffUses()

void llvm::User::allocHungoffUses ( unsigned  N,
bool  IsPhi = false 
)
protected

Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User.

Parameters
IsPhiidentifies callers which are phi nodes and which need N BasicBlock* allocated along with N

Definition at line 41 of file User.cpp.

References assert(), llvm::WebAssembly::End, llvm::Value::HasHungOffUses, llvm::Use::initTags(), and N.

Referenced by llvm::MemoryPhi::allocHungoffUses(), llvm::PHINode::allocHungoffUses(), growHungoffUses(), llvm::CmpInst::isImpliedFalseByMatchingCmp(), llvm::SwitchInst::removeCase(), and User().

◆ classof()

static bool llvm::User::classof ( const Value V)
inlinestatic

Definition at line 291 of file User.h.

◆ dropAllReferences()

void llvm::User::dropAllReferences ( )
inline

Drop all references to operands.

This function is in charge of "letting go" of all objects that this User refers to. This allows one to 'delete' a whole class at a time, even though there may be circular references... First all references are dropped, and all use counts go to zero. Then everything is deleted for real. Note that no operations are valid on an object that has "dropped all references", except operator delete.

Definition at line 279 of file User.h.

References operands(), and replaceUsesOfWith().

Referenced by llvm::GlobalVariable::dropAllReferences(), llvm::BasicBlock::dropAllReferences(), llvm::Function::dropAllReferences(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::slpvectorizer::BoUpSLP::getORE(), getOrInsertValueProfilingCall(), isUnconditionalBranch(), okayForPHIOfOps(), false::Simplifier::Context::print(), and llvm::MemorySSA::~MemorySSA().

◆ getDescriptor() [1/2]

ArrayRef< const uint8_t > llvm::User::getDescriptor ( ) const

◆ getDescriptor() [2/2]

MutableArrayRef< uint8_t > llvm::User::getDescriptor ( )

◆ getNumOperands()

unsigned llvm::User::getNumOperands ( ) const
inline

Definition at line 176 of file User.h.

References getDescriptor(), and llvm::Value::NumUserOperands.

Referenced by llvm::SwitchInst::addCase(), llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::PHINode::addIncoming(), AddReachableCodeToWorklist(), aliasSameBasePointerGEPs(), llvm::SelectInst::areInvalidOperands(), llvm::PHINode::block_end(), llvm::slpvectorizer::BoUpSLP::buildTree(), canReplaceGEPIdxWithZero(), canSinkInstructions(), canTransformAccumulatorRecursion(), canTrapImpl(), CC_MipsO32_FP64(), cloneConstantExprWithNewAddressSpace(), llvm::GetElementPtrInst::cloneImpl(), llvm::FuncletPadInst::cloneImpl(), llvm::CallInst::cloneImpl(), llvm::ReturnInst::cloneImpl(), llvm::BranchInst::cloneImpl(), llvm::InvokeInst::cloneImpl(), llvm::CatchReturnInst::cloneImpl(), llvm::CleanupReturnInst::cloneImpl(), llvm::FunctionComparator::cmpConstants(), llvm::FunctionComparator::cmpOperations(), computeKnownBitsFromOperator(), computeUnsignedMinMaxValuesFromKnownBits(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), ConvertDoubleToBytes(), countOperands(), llvm::CallInst::CreateFree(), createMissedAnalysis(), createPrivateNonConstGlobalForString(), llvm::createSeparateConstOffsetFromGEPPass(), DCEInstruction(), llvm::MemorySSAUtil::defClobbersUseOrDef(), deleteDeadInstruction(), llvm::DependenceInfo::depends(), doPromotion(), llvm::GVNExpression::Expression::dump(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), emitGlobalConstantArray(), emitGlobalConstantStruct(), emitSignedInt64(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::InstCombiner::eraseInstFromFunction(), EvaluateConstantChrecAtConstant(), EvaluateExpression(), llvm::Evaluator::EvaluateFunction(), evaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), expandMemCmp(), ExposePointerBase(), llvm::FenceInst::FenceInst(), findBestInsertionSet(), findUnwindDestinations(), FindUsedValues(), findUsedValues(), GEPToVectorIndex(), getAddressAccessSCEV(), getAllocationSize(), llvm::IRTranslator::getAnalysisUsage(), llvm::ConstantExpr::getAsInstruction(), llvm::PHINode::getBasicBlockIndex(), getBlockName(), getCompareCC(), getComparePred(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::X86TTIImpl::getIntImmCost(), llvm::SCEVExpander::getIVIncOperand(), llvm::InvokeInst::getLandingPadInst(), getLoopPhiForCounter(), llvm::SystemZTTIImpl::getMemoryOpCost(), getMetadataTypeOrder(), getNoopInput(), llvm::FuncletPadInst::getNumArgOperands(), llvm::CallInst::getNumArgOperands(), llvm::InvokeInst::getNumArgOperands(), llvm::SwitchInst::getNumCases(), llvm::LandingPadInst::getNumClauses(), llvm::IndirectBrInst::getNumDestinations(), llvm::CatchSwitchInst::getNumHandlers(), llvm::PHINode::getNumIncomingValues(), llvm::GEPOperator::getNumIndices(), llvm::GetElementPtrInst::getNumIndices(), llvm::SwitchInst::getNumSuccessors(), llvm::IndirectBrInst::getNumSuccessors(), llvm::CatchSwitchInst::getNumSuccessors(), GetOffsetFromIndex(), getOrInsertValueProfilingCall(), getParentPad(), getPointerOperands(), getRangeForAffineARHelper(), llvm::ReturnInst::getReturnValue(), getScalarIntrinsicDeclaration(), getSelectFoldableConstant(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::ConstantVector::getSplatValue(), llvm::DependenceInfo::getSplitIteration(), getSuccPad(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::DbgInfoIntrinsic::getVariableLocation(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), getX86SSEConditionCode(), growHungoffUses(), llvm::Constant::handleOperandChange(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), llvm::PHINode::hasConstantOrUndefValue(), llvm::GEPOperator::hasIndices(), llvm::GetElementPtrInst::hasIndices(), hasOnlyOneNonZeroIndex(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), llvm::BranchInst::isConditional(), isEmptyXXStructor(), llvm::isGEPBasedOnPointerToString(), isGEPFoldable(), llvm::Instruction::isIdenticalToWhenDefined(), isIgnorableInst(), llvm::CmpInst::isImpliedFalseByMatchingCmp(), isOnlyReachableViaThisEdge(), IsPointerOffset(), IsSafeComputationToRemove(), isSafeSROAElementUse(), llvm::isSafeToSpeculativelyExecute(), llvm::Instruction::isSameOperationAs(), isSExtLoad(), isSimpleEnoughValueToCommitHelper(), llvm::BranchInst::isUnconditional(), IsUserOfGlobalSafeForSRA(), matchesOr(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), maybePrintComdat(), mergeEmptyReturnBlocks(), moveUp(), llvm::Constant::needsRelocation(), llvm::HungoffOperandTraits< 3 >::op_end(), llvm::OptionalOperandTraits< GlobalVariable >::operands(), llvm::VariadicOperandTraits< CallInst, 1 >::operands(), llvm::HungoffOperandTraits< 3 >::operands(), llvm::ConstantExprKeyType::operator==(), orderValue(), predictValueUseListOrder(), false::Simplifier::Context::print(), propagateMetadata(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), llvm::CatchSwitchInst::removeHandler(), RemoveInstInputs(), replaceAllUsesOfWithIn(), llvm::ConstantUniqueMap< llvm::ConstantExpr >::replaceOperandsInPlace(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::returnTypeIsEligibleForTailCall(), llvm::WholeProgramDevirtPass::run(), llvm::GVNHoist::run(), llvm::InstCombiner::run(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), simplifyAndDCEInstruction(), sinkLastInstruction(), SRAGlobal(), llvm::stripGetElementPtr(), llvm::JumpThreadingPass::ThreadEdge(), transformToIndexedCompare(), llvm::UnreachableInst::UnreachableInst(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), VerifySubExpr(), llvm::LoopVersioning::versionLoop(), llvm::InstCombiner::visitGetElementPtrInst(), VisitGlobalVariableForEmission(), llvm::Interpreter::visitReturnInst(), and llvm::InstCombiner::visitReturnInst().

◆ getOperand()

Value* llvm::User::getOperand ( unsigned  i) const
inline

Definition at line 154 of file User.h.

References assert(), getOperandList(), and llvm::Value::NumUserOperands.

Referenced by llvm::AliasSetTracker::add(), AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), AddressIsTaken(), addStackMapLiveVars(), adjustToPointerSize(), aliasSameBasePointerGEPs(), llvm::AtomicCmpXchgInst::AtomicCmpXchgInst(), llvm::BinaryOperator::BinaryOperator(), BreakUpSubtract(), buildMultiplyTree(), llvm::slpvectorizer::BoUpSLP::buildTree(), CanBeSMin(), canEvaluateSExtd(), canEvaluateShifted(), canEvaluateShiftedShift(), CanEvaluateShuffled(), canEvaluateTruncated(), canEvaluateZExtd(), canFoldIVIncExpr(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::CannotBeNegativeZero(), cannotBeOrderedLessThanZeroImpl(), canonicalizeBitCastExtElt(), canonicalizeCmpWithConstant(), canonicalizeICmpBool(), CanPHITrans(), canReplaceGEPIdxWithZero(), llvm::canReplaceOperandWithVariable(), canRewriteGEPAsOffset(), canSinkInstructions(), canTransformAccumulatorRecursion(), castRequiresQueuePtr(), CC_MipsO32_FP64(), cheapToScalarize(), checkForNegativeOperand(), CleanupPointerRootUsers(), cloneConstantExprWithNewAddressSpace(), llvm::AllocaInst::cloneImpl(), llvm::LoadInst::cloneImpl(), llvm::StoreInst::cloneImpl(), llvm::AtomicCmpXchgInst::cloneImpl(), llvm::AtomicRMWInst::cloneImpl(), llvm::SelectInst::cloneImpl(), llvm::VAArgInst::cloneImpl(), llvm::ExtractElementInst::cloneImpl(), llvm::InsertElementInst::cloneImpl(), llvm::ShuffleVectorInst::cloneImpl(), llvm::TruncInst::cloneImpl(), llvm::ZExtInst::cloneImpl(), llvm::SExtInst::cloneImpl(), llvm::FPTruncInst::cloneImpl(), llvm::FPExtInst::cloneImpl(), llvm::UIToFPInst::cloneImpl(), llvm::SIToFPInst::cloneImpl(), llvm::FPToUIInst::cloneImpl(), llvm::FPToSIInst::cloneImpl(), llvm::IntToPtrInst::cloneImpl(), llvm::PtrToIntInst::cloneImpl(), llvm::BitCastInst::cloneImpl(), llvm::AddrSpaceCastInst::cloneImpl(), cloneInstructionWithNewAddressSpace(), llvm::FunctionComparator::cmpConstants(), llvm::FunctionComparator::cmpOperations(), llvm::collectCmpOps(), collectInsertionElements(), collectShuffleElements(), collectSingleShuffleElements(), CommitValueTo(), llvm::InstCombiner::commonCastTransforms(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeBytesPoppedByCalleeForSRet(), computeKnownBitsFromOperator(), computeKnownBitsFromShiftOperator(), llvm::ComputeMultiple(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedAdd(), computeUnsignedMinMaxValuesFromKnownBits(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::ConstantFoldSelectInstruction(), llvm::ConvertDebugDeclareToDebugValue(), ConvertDoubleToBytes(), ConvertShiftToMul(), ConvertToSInt(), countOperands(), CreateBinOpAsGiven(), llvm::createConstantHoistingPass(), createCTLZIntrinsic(), llvm::createDwarfEHPass(), llvm::createEfficiencySanitizerPass(), llvm::createLoopVectorizePass(), createMissedAnalysis(), createPrivateNonConstGlobalForString(), createRdxShuffleMask(), createReplacementInstr(), llvm::createSeparateConstOffsetFromGEPPass(), DCEInstruction(), llvm::decomposeBitTestICmp(), decomposeSimpleLinearExpr(), deleteDeadInstruction(), despeculateCountZeros(), detectCTLZIdiom(), detectLog2OfHalf(), detectPopcountIdiom(), llvm::GVNExpression::Expression::dump(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), emitGlobalConstantArray(), emitGlobalConstantStruct(), emitGlobalConstantVector(), emitSignedInt64(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), EvaluateConstantChrecAtConstant(), EvaluateExpression(), llvm::Evaluator::EvaluateFunction(), evaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), ExpandBinOp(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandMemCmp(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), ExposePointerBase(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), ExtractConstantBytes(), ExtractEquivalentCondition(), findBestInsertionSet(), findBuildVector(), findCommonAlignment(), findInitTrampoline(), findInitTrampolineFromAlloca(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindPredecessorAutoreleaseWithSafePath(), FindSingleUseMultiplyFactors(), findUnwindDestinations(), FindUsedValues(), findUsedValues(), foldAddWithConstant(), foldAndOrOfEqualityCmpsWithConstants(), foldAndToXor(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBoolSextMaskToSelect(), llvm::FoldBranchToCommonDest(), foldConstantCastPair(), foldConstantInsEltIntoShuffle(), llvm::InstCombiner::foldFMulConst(), foldICmpShlOne(), foldICmpWithMinMax(), foldInsSequenceIntoBroadcast(), llvm::InstCombiner::FoldItoFPtoI(), foldLogicCastConstant(), foldOperationIntoPhiValue(), foldOperationIntoSelectOperand(), foldOrToXor(), foldSelectICmpAndOr(), foldSelectInst(), llvm::InstCombiner::FoldShiftByConstant(), foldShiftedShift(), foldVecTruncToExtElt(), foldXorToXor(), llvm::ScalarEvolution::forgetValue(), GEPToVectorIndex(), ExtraFlags::get(), llvm::IndirectBrInst::getAddress(), llvm::ExtractValueInst::getAggregateOperand(), llvm::InsertValueInst::getAggregateOperand(), llvm::IRTranslator::getAnalysisUsage(), llvm::FuncletPadInst::getArgOperand(), llvm::CallInst::getArgOperand(), llvm::InvokeInst::getArgOperand(), llvm::AllocaInst::getArraySize(), getAsConstantIndexedAddress(), getBinOpsForFactorization(), getBlockName(), llvm::AArch64TTIImpl::getCastInstrCost(), getCmpOpsType(), getCommonReturnValue(), getCompareCC(), llvm::AtomicCmpXchgInst::getCompareOperand(), getComparePred(), llvm::SwitchInst::getCondition(), getConstantAt(), GetConstantInt(), llvm::SwitchInst::getDefaultDest(), getDemandedBitsLHSMask(), llvm::BinaryOperator::getFNegArgument(), getFromRangeMetadata(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::getGuaranteedNonFullPoisonOp(), llvm::PHINode::getIncomingValue(), llvm::GlobalIndirectSymbol::getIndirectSymbol(), llvm::InsertValueInst::getInsertedValueOperand(), llvm::X86TTIImpl::getIntImmCost(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::ShuffleVectorInst::getMask(), getMaskedTypeForICmpPair(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::BinaryOperator::getNegArgument(), llvm::AtomicCmpXchgInst::getNewValOperand(), getNoopInput(), llvm::BinaryOperator::getNotArgument(), GetOffsetFromIndex(), getOrInsertValueProfilingCall(), getParameterABIAttributes(), getParentPad(), llvm::CatchSwitchInst::getParentPad(), llvm::LoadInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::GEPOperator::getPointerOperand(), llvm::PtrToIntOperator::getPointerOperand(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::AtomicRMWInst::getPointerOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::VAArgInst::getPointerOperand(), llvm::PtrToIntInst::getPointerOperand(), llvm::AddrSpaceCastInst::getPointerOperand(), getPointerOperands(), getPow(), getRangeForAffineARHelper(), getRecurrenceVar(), llvm::objcarc::getreturnRVOperand(), llvm::ReturnInst::getReturnValue(), getScalarIntrinsicDeclaration(), getSelectFoldableConstant(), getShiftedValue(), getShuffleAndOtherOprd(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::getSplatValue(), llvm::ConstantVector::getSplatValue(), llvm::BitCastOperator::getSrcTy(), llvm::CastInst::getSrcTy(), llvm::getStrideFromPointer(), llvm::SwitchInst::getSuccessor(), llvm::IndirectBrInst::getSuccessor(), llvm::CatchSwitchInst::getSuccessor(), getSuccPad(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::DenseMapInfo< SimpleValue >::getTombstoneKey(), getUnderlyingArgReg(), llvm::CatchSwitchInst::getUnwindDest(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::AtomicRMWInst::getValOperand(), getValueFromConditionImpl(), getValueFromICmpCondition(), llvm::StoreInst::getValueOperand(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), getX86SSEConditionCode(), GlobalWasGeneratedByCompiler(), handleBrSelExpect(), handleFree(), handleIndirectSymViaGOTPCRel(), llvm::Constant::handleOperandChange(), handlePhiDef(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), hasOnlyOneNonZeroIndex(), hasOnlySelectUsers(), hasOutsideLoopUser(), hasSameExtUse(), hasStoreUsersOnly(), hasUnsafeFPMath(), hasValueBeenRAUWed(), hoistInsEltConst(), llvm::SCEVExpander::hoistIVInc(), llvm::hoistRegion(), llvm::NVPTXAsmPrinter::ignoreLoc(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), llvm::InlineFunction(), instrumentMaskedLoadOrStore(), isAddOfNonZero(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), isAlwaysFoldable(), isAlwaysLive(), llvm::AllocaInst::isArrayAllocation(), isBroadcastShuffle(), isCallPromotable(), isChainSelectCmpBranch(), llvm::IsConstantOffsetFromGlobal(), isContiguous(), llvm::TargetLoweringBase::isExtFree(), isExtractBitsCandidateUse(), isFMulOrFDivWithConstant(), llvm::InductionDescriptor::isFPInductionPHI(), isFuncOrArgAttr(), llvm::isGEPBasedOnPointerToString(), isGEPFoldable(), isGOTEquivalentCandidate(), isIgnorableInst(), llvm::CastInst::isIntegerCast(), isInterestingPointerComparisonOrSubtraction(), isIntExtFree(), isLoadInvariantInLoop(), isLoopInvariant(), llvm::CastInst::isLosslessCast(), llvm::AArch64TargetLowering::isMaskAndCmp0FoldingBeneficial(), llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), isMulPowOf2(), llvm::CastInst::isNoopCast(), isObjectDereferencedInBlock(), isOnlyReachableViaThisEdge(), IsPointerOffset(), isProfitableToFoldUnconditional(), llvm::AArch64TargetLowering::isProfitableToHoist(), isReassociableOp(), isReInterleaveMask(), isRepeatedByteSequence(), isReportingError(), isReturnNonNull(), isSafeAndProfitableToSinkLoad(), IsSafeComputationToRemove(), isSafeSROAElementUse(), isSafeToEliminateVarargsCast(), llvm::isSafeToSpeculativelyExecute(), isSameCompare(), llvm::Instruction::isSameOperationAs(), isSExtLoad(), isShuffleEquivalentToSelect(), isShuffleExtractingFromLHS(), isSimpleEnoughValueToCommitHelper(), llvm::AllocaInst::isStaticAlloca(), isStrideMul(), IsUserOfGlobalSafeForSRA(), isVectorReductionOp(), isZero(), llvm::AArch64TargetLowering::isZExtFree(), largestIntegerVectorType(), LdStHasDebugValue(), LinearizeExprTree(), llvm::FastISel::lowerCallTo(), llvm::AsmPrinter::lowerConstant(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), llvm::LTOModule::makeBuffer(), mapBinOpcode(), matchCondition(), matchDeMorgansLaws(), matchesOr(), matchExtractIndex(), matchPairwiseReduction(), matchPairwiseReductionAtLevel(), matchSelectFromAndOr(), llvm::matchSelectPattern(), matchVectorSplittingReduction(), maybePrintComdat(), mayDivideByZero(), mergeCleanupPad(), mergeEmptyReturnBlocks(), moveUp(), needsLFTR(), llvm::Constant::needsRelocation(), NegateValue(), llvm::orc::CtorDtorIterator::operator*(), llvm::ConstantExprKeyType::operator==(), OptimizeAwayTrappingUsesOfLoads(), optimizeBinaryDoubleFP(), llvm::FastISel::optimizeCmpPredicate(), OptimizeExtractBits(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), optimizeIntegerToVectorInsertions(), OptimizeNoopCopyExpression(), false::LibCallsShrinkWrap::perform(), PerformHeapAllocSRoA(), PickMostRelevantLoop(), llvm::PointerMayBeCaptured(), false::Simplifier::Context::print(), processAdd(), processAShr(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), processSDiv(), processSelect(), processSRem(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), promotedOpIsNUW(), llvm::promoteLoopAccessesToScalars(), propagateMetadata(), PushDefUseChildren(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), llvm::safestack::StackColoring::removeAllMarkers(), RemoveInstInputs(), replaceAllUsesOfWithIn(), llvm::InstCombiner::replacedSelectWithOperand(), replaceExtractElements(), replaceUsesOfWith(), ReplaceUsesOfWith(), reportLoadElim(), llvm::returnTypeIsEligibleForTailCall(), reuseTableCompare(), rewriteGEPAsOffset(), rewriteSingleStoreAlloca(), llvm::LoopPredicationPass::run(), llvm::WholeProgramDevirtPass::run(), llvm::GVNHoist::run(), llvm::InstCombiner::run(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::salvageDebugInfo(), llvm::FastISel::selectBinaryOp(), llvm::FastISel::selectBitCast(), llvm::FastISel::selectCast(), llvm::FastISel::selectExtractValue(), llvm::FastISel::selectGetElementPtr(), llvm::FastISel::selectOperator(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), llvm::LoadInst::setAlignment(), llvm::StoreInst::setAlignment(), setLimitsForBinOp(), ShouldBreakUpSubtract(), shouldKeepFDivF32(), shouldReorderOperands(), ShrinkDemandedConstant(), shrinkInsertElt(), shrinkSplatShuffle(), simplifyAndDCEInstruction(), simplifyAndOfICmpsWithAdd(), simplifyAndOrOfICmpsWithConstants(), simplifyAssocCastAssoc(), SimplifyAssociativeBinOp(), SimplifyBSwap(), llvm::InstCombiner::SimplifyDivRemOfSelect(), SimplifyICmpInst(), simplifyICmpWithBinOp(), llvm::SimplifyInstruction(), simplifyOrOfICmpsWithAdd(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), llvm::InstCombiner::simplifyRangeCheck(), SimplifyRelativeLoad(), simplifyValueKnownNonZero(), SimplifyWithOpReplaced(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), sinkAndCmp0Expression(), SinkCast(), SinkCmpExpression(), sinkLastInstruction(), SinkShiftAndTruncate(), skipToNextUser(), AllocaSlices::SliceBuilder::SliceBuilder(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), splitMergedValStore(), SRAGlobal(), StackMallocSizeClass(), llvm::stripGetElementPtr(), supportedAddressingMode(), swapMayExposeCSEOpportunities(), ThreadBinOpOverSelect(), llvm::JumpThreadingPass::ThreadEdge(), transformToIndexedCompare(), truncateIVUse(), TryToShrinkGlobalToBoolean(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::JumpThreadingPass::TryToUnfoldSelect(), updateOperand(), llvm::SelectionDAGBuilder::UpdateSplitBlock(), VerifySubExpr(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAddrSpaceCast(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitAnd(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitBitCast(), llvm::Interpreter::visitBitCastInst(), llvm::Interpreter::visitExtractElementInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFAdd(), llvm::Interpreter::visitFCmpInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::Interpreter::visitFPExtInst(), llvm::InstCombiner::visitFPToSI(), llvm::Interpreter::visitFPToSIInst(), llvm::InstCombiner::visitFPToUI(), llvm::Interpreter::visitFPToUIInst(), llvm::InstCombiner::visitFPTrunc(), llvm::Interpreter::visitFPTruncInst(), llvm::InstCombiner::visitFRem(), llvm::InstCombiner::visitFSub(), llvm::InstCombiner::visitGetElementPtrInst(), VisitGlobalVariableForEmission(), llvm::Interpreter::visitICmpInst(), llvm::InstCombiner::visitICmpInst(), llvm::Interpreter::visitInsertElementInst(), llvm::InstCombiner::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::InstCombiner::visitInsertValueInst(), llvm::InstCombiner::visitIntToPtr(), llvm::Interpreter::visitIntToPtrInst(), visitIVCast(), llvm::InstCombiner::visitLandingPadInst(), llvm::InstCombiner::visitLoadInst(), llvm::Interpreter::visitLShr(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitPtrToInt(), llvm::Interpreter::visitPtrToIntInst(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitSDiv(), llvm::Interpreter::visitSelectInst(), llvm::InstCombiner::visitSExt(), llvm::Interpreter::visitSExtInst(), llvm::Interpreter::visitShl(), llvm::InstCombiner::visitShl(), llvm::Interpreter::visitShuffleVectorInst(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::Interpreter::visitSIToFPInst(), llvm::InstCombiner::visitSRem(), llvm::Interpreter::visitStoreInst(), llvm::InstCombiner::visitStoreInst(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), llvm::Interpreter::visitTruncInst(), llvm::InstCombiner::visitUDiv(), llvm::Interpreter::visitUIToFPInst(), llvm::InstCombiner::visitURem(), llvm::Interpreter::visitVAArgInst(), llvm::InstCombiner::visitXor(), llvm::InstCombiner::visitZExt(), llvm::Interpreter::visitZExtInst(), X86ChooseCmpImmediateOpcode(), and llvm::reassociate::XorOpnd::XorOpnd().

◆ getOperandList() [1/2]

const Use* llvm::User::getOperandList ( ) const
inline

◆ getOperandList() [2/2]

Use* llvm::User::getOperandList ( )
inline

Definition at line 150 of file User.h.

References getOperandList().

◆ getOperandUse() [1/2]

const Use& llvm::User::getOperandUse ( unsigned  i) const
inline

◆ getOperandUse() [2/2]

Use& llvm::User::getOperandUse ( unsigned  i)
inline

Definition at line 171 of file User.h.

References assert(), getOperandList(), and llvm::Value::NumUserOperands.

◆ growHungoffUses()

void llvm::User::growHungoffUses ( unsigned  N,
bool  IsPhi = false 
)
protected

Grow the number of hung off uses.

Note that allocHungoffUses should be called if there are no uses.

Definition at line 60 of file User.cpp.

References allocHungoffUses(), assert(), getNumOperands(), getOperandList(), llvm::Value::HasHungOffUses, and llvm::Use::zap().

Referenced by llvm::SwitchInst::removeCase(), and User().

◆ Op() [1/2]

template<int Idx>
Use& llvm::User::Op ( )
inlineprotected

◆ Op() [2/2]

template<int Idx>
const Use& llvm::User::Op ( ) const
inlineprotected

Definition at line 121 of file User.h.

References assert(), llvm::Value::HasHungOffUses, and llvm::Value::NumUserOperands.

◆ op_begin() [1/2]

op_iterator llvm::User::op_begin ( )
inline

Definition at line 214 of file User.h.

References getOperandList().

Referenced by llvm::LandingPadInst::addClause(), llvm::addLandingPadInfo(), adjustToPointerSize(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::SelectInst::areInvalidOperands(), llvm::CallInst::arg_begin(), llvm::InvokeInst::arg_begin(), llvm::FuncletPadInst::arg_operands(), llvm::PHINode::block_begin(), buildMultiplyTree(), llvm::slpvectorizer::BoUpSLP::buildTree(), llvm::objcarc::CanUse(), CC_MipsO32_FP64(), llvm::TypeFinder::clear(), CloneInstructionInExitBlock(), llvm::ConstantAggregate::ConstantAggregate(), llvm::ConstantFoldLoadFromConstPtr(), llvm::CallInst::CreateFree(), createMissedAnalysis(), createPrivateNonConstGlobalForString(), createReplacementInstr(), llvm::createSeparateConstOffsetFromGEPPass(), DominatesMergePoint(), doPromotion(), llvm::EmitGEPOffset(), ExposePointerBase(), llvm::FenceInst::FenceInst(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_begin(), llvm::ConstantExpr::getAsInstruction(), getBlockName(), getComparePred(), llvm::PHINode::getIncomingBlock(), getIncrmentFactorSCEV(), llvm::SCEVExpander::getIVIncOperand(), getMetadataTypeOrder(), llvm::Use::getOperandNo(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::ConstantExpr::getWithOperands(), getX86SSEConditionCode(), llvm::CatchSwitchInst::handler_begin(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_begin(), llvm::GetElementPtrInst::idx_begin(), INITIALIZE_PASS(), llvm::ConstantExpr::isGEPWithNoNotionalOverIndexing(), llvm::Instruction::isIdenticalToWhenDefined(), largestIntegerVectorType(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), mayLoopAccessLocation(), llvm::OperandBundleUser< InvokeInst, User::op_iterator >::operandBundleFromBundleOpInfo(), operands(), llvm::OperandBundleUser< InvokeInst, User::op_iterator >::populateBundleOperandInfos(), llvm::CatchSwitchInst::removeHandler(), llvm::BitcodeReaderValueList::resolveConstantForwardRefs(), llvm::AAEvaluator::run(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_begin(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ op_begin() [2/2]

const_op_iterator llvm::User::op_begin ( ) const
inline

Definition at line 215 of file User.h.

References getOperandList().

◆ op_end() [1/2]

op_iterator llvm::User::op_end ( )
inline

Definition at line 216 of file User.h.

References getOperandList(), and llvm::Value::NumUserOperands.

Referenced by llvm::LandingPadInst::addClause(), llvm::addLandingPadInfo(), adjustToPointerSize(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::SelectInst::areInvalidOperands(), llvm::CallInst::arg_end(), llvm::InvokeInst::arg_end(), llvm::FuncletPadInst::arg_operands(), buildMultiplyTree(), canFoldIVIncExpr(), llvm::objcarc::CanUse(), CC_MipsO32_FP64(), llvm::TypeFinder::clear(), CloneInstructionInExitBlock(), llvm::ConstantFoldLoadFromConstPtr(), llvm::CallInst::CreateFree(), createMissedAnalysis(), createPrivateNonConstGlobalForString(), createReplacementInstr(), llvm::createSeparateConstOffsetFromGEPPass(), DominatesMergePoint(), doPromotion(), llvm::EmitGEPOffset(), ExposePointerBase(), llvm::FenceInst::FenceInst(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_end(), llvm::ConstantExpr::getAsInstruction(), getBlockName(), getComparePred(), getIncrmentFactorSCEV(), llvm::SCEVExpander::getIVIncOperand(), getMetadataTypeOrder(), llvm::SelectionDAGBuilder::getValueImpl(), getX86SSEConditionCode(), llvm::CatchSwitchInst::handler_end(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_end(), llvm::GetElementPtrInst::idx_end(), INITIALIZE_PASS(), llvm::Instruction::isIdenticalToWhenDefined(), largestIntegerVectorType(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), mayLoopAccessLocation(), operands(), llvm::CatchSwitchInst::removeHandler(), llvm::BitcodeReaderValueList::resolveConstantForwardRefs(), llvm::AAEvaluator::run(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_end(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ op_end() [2/2]

const_op_iterator llvm::User::op_end ( ) const
inline

Definition at line 219 of file User.h.

References getOperandList(), and llvm::Value::NumUserOperands.

◆ operand_values() [1/2]

iterator_range<value_op_iterator> llvm::User::operand_values ( )
inline

◆ operand_values() [2/2]

iterator_range<const_value_op_iterator> llvm::User::operand_values ( ) const
inline

Definition at line 267 of file User.h.

References llvm::make_range(), value_op_begin(), and value_op_end().

◆ operands() [1/2]

op_range llvm::User::operands ( )
inline

Definition at line 222 of file User.h.

References op_begin(), and op_end().

Referenced by AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), analyzeLoopUnrollCost(), appendSpeculatableOperands(), appendToUsedList(), BuildConstantFromSCEV(), callHasFloatingPointArgument(), CanEvaluateShuffled(), canFoldIVIncExpr(), canMoveAboveCall(), castRequiresQueuePtr(), cloneInstructionWithNewAddressSpace(), llvm::collectUsedGlobalVariables(), computeLiveInValues(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadFromConstPtr(), ConstHasGlobalValuePredicate(), contains(), createRdxShuffleMask(), DeleteTriviallyDeadInstructions(), dropAllReferences(), emitSignedInt64(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::InstCombiner::eraseInstFromFunction(), findArgumentCopyElisionCandidates(), findRefEdges(), forEachUser(), GetAnyNonZeroConstInt(), getBlockName(), getComparePred(), TarjanSCC::getComponentFor(), getConstantEvolvingPHIOperands(), getMetadataTypeOrder(), getNotRelocatableInstructions(), llvm::RecurrenceDescriptor::getSourceExtensionKind(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), getTypePartition(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), hasConcreteDefImpl(), hasLocalDefs(), llvm::Loop::hasLoopInvariantOperands(), hasOutsideLoopUser(), hasPositiveOperands(), llvm::PHINode::incoming_values(), instrumentMaskedLoadOrStore(), llvm::CodeExtractor::isBlockValidForExtraction(), isBroadcastShuffle(), isEphemeralValueOf(), isFuncOrArgAttr(), isReferencingMDNode(), isSExtLoad(), isSimpleEnoughValueToCommitHelper(), isStrideMul(), isUnconditionalBranch(), llvm::Loop::makeLoopInvariant(), mapBinOpcode(), llvm::LoopInfo::movementPreservesLCSSAForm(), okayForPHIOfOps(), onlySingleValue(), orderValue(), predictValueUseListOrder(), false::Simplifier::Context::print(), llvm::DemandedBitsWrapperPass::releaseMemory(), RemoveDeadConstant(), replaceAllUsesOfWithIn(), llvm::GVNHoist::run(), llvm::InstCombiner::run(), false::Simplifier::simplify(), false::Simplifier::Context::traverse(), llvm::InstCombiner::visitGetElementPtrInst(), and wrapConstantAsMetadata().

◆ operands() [2/2]

const_op_range llvm::User::operands ( ) const
inline

Definition at line 225 of file User.h.

References op_begin(), and op_end().

◆ operator delete() [1/3]

void llvm::User::operator delete ( void *  Usr)

Free memory allocated for User and Use objects.

Definition at line 167 of file User.cpp.

References assert(), llvm::Value::HasDescriptor, llvm::Value::HasHungOffUses, llvm::Value::NumUserOperands, and llvm::Use::zap().

◆ operator delete() [2/3]

void llvm::User::operator delete ( void *  ,
unsigned   
)
inline

Placement delete - required by std, but never called.

Definition at line 103 of file User.h.

References llvm_unreachable.

◆ operator delete() [3/3]

void llvm::User::operator delete ( void *  ,
unsigned  ,
bool   
)
inline

Placement delete - required by std, but never called.

Definition at line 107 of file User.h.

References llvm_unreachable.

◆ operator new() [1/3]

void * llvm::User::operator new ( size_t  Size)
protected

Allocate a User with an operand pointer co-allocated.

This is used for subclasses which need to allocate a variable number of operands, ie, 'hung off uses'.

Definition at line 151 of file User.cpp.

References llvm::Value::HasDescriptor, llvm::Value::HasHungOffUses, and llvm::Value::NumUserOperands.

◆ operator new() [2/3]

void * llvm::User::operator new ( size_t  Size,
unsigned  Us 
)
protected

Allocate a User with the operands co-allocated.

This is used for subclasses which have a fixed number of operands.

Definition at line 143 of file User.cpp.

◆ operator new() [3/3]

void * llvm::User::operator new ( size_t  Size,
unsigned  Us,
unsigned  DescBytes 
)
protected

Allocate a User with the operands co-allocated.

If DescBytes is non-zero then allocate an additional DescBytes bytes before the operands. These bytes can be accessed by calling getDescriptor.

DescBytes needs to be divisible by sizeof(void *). The allocated descriptor, if any, is aligned to sizeof(void *) bytes.

This is used for subclasses which have a fixed number of operands.

Definition at line 147 of file User.cpp.

◆ OpFrom()

template<int Idx, typename U >
static Use& llvm::User::OpFrom ( const U *  that)
inlinestaticprotected

Definition at line 112 of file User.h.

◆ replaceUsesOfWith()

void llvm::User::replaceUsesOfWith ( Value From,
Value To 
)

◆ setGlobalVariableNumOperands()

void llvm::User::setGlobalVariableNumOperands ( unsigned  NumOps)
inline

Set the number of operands on a GlobalVariable.

GlobalVariable always allocates space for a single operands, but doesn't always use it.

FIXME: As that the number of operands is used to find the start of the allocated memory in operator delete, we need to always think we have 1 operand before delete.

Definition at line 192 of file User.h.

References assert(), and llvm::Value::NumUserOperands.

Referenced by llvm::GlobalVariable::setInitializer(), and llvm::GlobalVariable::~GlobalVariable().

◆ setNumHungOffUseOperands()

void llvm::User::setNumHungOffUseOperands ( unsigned  NumOps)
inline

Subclasses with hung off uses need to manage the operand count themselves.

In these instances, the operand count isn't used to find the OperandList, so there's no issue in having the operand count change.

Definition at line 200 of file User.h.

References assert(), llvm::Value::HasHungOffUses, llvm::Value::NumUserOperands, and llvm::Value::NumUserOperandsBits.

Referenced by llvm::SwitchInst::addCase(), llvm::IndirectBrInst::addDestination(), llvm::PHINode::addIncoming(), llvm::CmpInst::isImpliedFalseByMatchingCmp(), llvm::SwitchInst::removeCase(), and llvm::IndirectBrInst::removeDestination().

◆ setOperand()

void llvm::User::setOperand ( unsigned  i,
Value Val 
)
inline

Definition at line 159 of file User.h.

References assert(), getOperandList(), and llvm::Value::NumUserOperands.

Referenced by BreakUpSubtract(), buildMultiplyTree(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), ConvertShiftToMul(), createMissedAnalysis(), llvm::createSeparateConstOffsetFromGEPPass(), DCEInstruction(), deleteDeadInstruction(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), expandMemCmp(), foldCttzCtlz(), foldICmpShlOne(), foldICmpWithMinMax(), llvm::FoldReturnIntoUncondBranch(), foldSelectICmpAndOr(), foldShiftedShift(), foldXorToXor(), llvm::BlockAddress::get(), getShiftedValue(), handleBrSelExpect(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), llvm::InlineFunction(), isBroadcastShuffle(), isOnlyReachableViaThisEdge(), isSafeAndProfitableToSinkLoad(), LinearizeExprTree(), llvm::BlockAddress::lookup(), LowerNegateToMultiply(), MarkBlocksLiveIn(), mergeEmptyReturnBlocks(), NegateValue(), false::Simplifier::Context::print(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), replaceAllUsesOfWithIn(), replaceGEPIdxWithZero(), replaceUsesOfWith(), llvm::LoopPredicationPass::run(), llvm::IndirectBrInst::setAddress(), llvm::FuncletPadInst::setArgOperand(), llvm::CallInst::setArgOperand(), llvm::InvokeInst::setArgOperand(), llvm::SwitchInst::setCondition(), llvm::SwitchInst::setDefaultDest(), llvm::PHINode::setIncomingValue(), llvm::GlobalIndirectSymbol::setIndirectSymbol(), llvm::CatchSwitchInst::setParentPad(), llvm::SwitchInst::setSuccessor(), llvm::IndirectBrInst::setSuccessor(), llvm::CatchSwitchInst::setSuccessor(), llvm::CatchSwitchInst::setUnwindDest(), llvm::SwitchInst::CaseHandle::setValue(), ShrinkDemandedConstant(), simplifyAllocaArraySize(), simplifyAndDCEInstruction(), simplifyAssocCastAssoc(), SimplifyBSwap(), llvm::InstCombiner::SimplifyDivRemOfSelect(), simplifyValueKnownNonZero(), skipToNextUser(), SpeculativelyExecuteBB(), llvm::JumpThreadingPass::ThreadEdge(), TryToSimplifyUncondBranchWithICmpInIt(), updateOperand(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitStoreInst(), and llvm::InstCombiner::visitXor().

◆ value_op_begin() [1/2]

value_op_iterator llvm::User::value_op_begin ( )
inline

◆ value_op_begin() [2/2]

const_value_op_iterator llvm::User::value_op_begin ( ) const
inline

Definition at line 261 of file User.h.

References op_begin().

◆ value_op_end() [1/2]

value_op_iterator llvm::User::value_op_end ( )
inline

◆ value_op_end() [2/2]

const_value_op_iterator llvm::User::value_op_end ( ) const
inline

Definition at line 264 of file User.h.

References op_end().

Friends And Related Function Documentation

◆ HungoffOperandTraits

template<unsigned >
friend struct HungoffOperandTraits
friend

Definition at line 47 of file User.h.


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