LLVM  3.7.0
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 <User.h>

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

Classes

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

Public Types

typedef Useop_iterator
 
typedef const Useconst_op_iterator
 
typedef iterator_range
< op_iterator
op_range
 
typedef iterator_range
< const_op_iterator
const_op_range
 
- Public Types inherited from llvm::Value
enum  ValueTy
 Concrete subclass of this. More...
 
typedef use_iterator_impl< Useuse_iterator
 
typedef use_iterator_impl
< const Use
const_use_iterator
 
typedef user_iterator_impl< Useruser_iterator
 
typedef user_iterator_impl
< const User
const_user_iterator
 

Public Member Functions

 ~User () override
 
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...
 
UsegetOperandList ()
 
const UsegetOperandList () const
 
ValuegetOperand (unsigned i) const
 
void setOperand (unsigned i, Value *Val)
 
const UsegetOperandUse (unsigned i) const
 
UsegetOperandUse (unsigned i)
 
unsigned getNumOperands () const
 
void setGlobalVariableNumOperands (unsigned NumOps)
 Set the number of operands on a GlobalVariable. More...
 
void setFunctionNumOperands (unsigned NumOps)
 Set the number of operands on a Function. 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 ()
 
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
virtual ~Value ()
 
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 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...
 
bool use_empty () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
iterator_range< use_iteratoruses ()
 
iterator_range
< const_use_iterator
uses () const
 
bool user_empty () 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_iteratorusers ()
 
iterator_range
< const_user_iterator
users () 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...
 
void intersectOptionalDataWith (const Value *V)
 Clear any optional flags not set in the given Value. 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...
 
ValuestripPointerCasts ()
 Strip off pointer casts, all-zero GEPs, and aliases. More...
 
const ValuestripPointerCasts () const
 
ValuestripPointerCastsNoFollowAliases ()
 Strip off pointer casts and all-zero GEPs. More...
 
const ValuestripPointerCastsNoFollowAliases () const
 
ValuestripInBoundsConstantOffsets ()
 Strip off pointer casts and all-constant inbounds GEPs. More...
 
const ValuestripInBoundsConstantOffsets () const
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 Accumulate offsets from stripInBoundsConstantOffsets(). More...
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 
ValuestripInBoundsOffsets ()
 Strip off pointer casts and inbounds GEPs. More...
 
const ValuestripInBoundsOffsets () const
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 Translate PHI node to its predecessor from the given basic block. More...
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 
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) const
 Implement operator<< on Value. More...
 
void print (raw_ostream &O, ModuleSlotTracker &MST) 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...
 
 User (Type *ty, unsigned vty, Use *OpList, 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...
 
template<int Idx>
UseOp ()
 
template<int Idx>
const UseOp () const
 
- Protected Member Functions inherited from llvm::Value
 Value (Type *Ty, unsigned scid)
 
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 = 29 }
 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
 
bool IsUsedByMD: 1
 
bool HasName: 1
 
bool HasHungOffUses: 1
 

Detailed Description

Definition at line 36 of file User.h.

Member Typedef Documentation

Definition at line 179 of file User.h.

Definition at line 181 of file User.h.

Definition at line 178 of file User.h.

Definition at line 180 of file User.h.

Constructor & Destructor Documentation

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

Definition at line 75 of file User.h.

Member Function Documentation

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 43 of file User.cpp.

References llvm::Value::HasHungOffUses, llvm::Use::initTags(), N, and size.

Referenced by llvm::PHINode::allocHungoffUses(), and growHungoffUses().

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

Definition at line 239 of file User.h.

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 227 of file User.h.

References operands().

Referenced by llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), and llvm::expandRemainderUpTo64Bits().

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

Definition at line 138 of file User.h.

References llvm::Value::NumUserOperands.

Referenced by llvm::SwitchInst::addCase(), llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), AddReachableCodeToWorklist(), aliasSameBasePointerGEPs(), CanEvaluateShuffled(), canReplaceGEPIdxWithZero(), canTrapImpl(), llvm::GetElementPtrInst::cloneImpl(), llvm::CallInst::cloneImpl(), llvm::ReturnInst::cloneImpl(), llvm::BranchInst::cloneImpl(), llvm::InvokeInst::cloneImpl(), llvm::collectUsedGlobalVariables(), computeKnownBitsFromOperator(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::DecodeVPERMILPMask(), DeleteDeadInstruction(), llvm::DependenceAnalysis::depends(), emitGlobalConstantArray(), emitGlobalConstantStruct(), llvm::InstCombiner::EraseInstFromFunction(), EvaluateExpression(), EvaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), FindUsedValues(), findUsedValues(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldSelectOpOp(), GEPToVectorIndex(), llvm::ConstantExpr::getAsInstruction(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::getMergedGlobalExpr(), getNoopInput(), llvm::CallInst::getNumArgOperands(), llvm::GEPOperator::getNumIndices(), llvm::GetElementPtrInst::getNumIndices(), GetOffsetFromIndex(), llvm::Constant::getRelocationInfo(), llvm::ConstantVector::getSplatValue(), llvm::DependenceAnalysis::getSplitIteration(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), growHungoffUses(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), llvm::GEPOperator::hasIndices(), llvm::GetElementPtrInst::hasIndices(), llvm::Function::hasPersonalityFn(), llvm::Instruction::isIdenticalToWhenDefined(), isLikelyComplexAddressComputation(), IsPointerOffset(), IsSafeComputationToRemove(), isSafeSROAElementUse(), llvm::isSafeToSpeculativelyExecute(), llvm::Instruction::isSameOperationAs(), isSimpleEnoughValueToCommitHelper(), IsUserOfGlobalSafeForSRA(), llvm::Loop::makeLoopInvariant(), llvm::MapValue(), mergeEmptyReturnBlocks(), llvm::HungoffOperandTraits< 2 >::op_end(), llvm::OptionalOperandTraits< Function >::operands(), llvm::VariadicOperandTraits< CallInst, 1 >::operands(), llvm::HungoffOperandTraits< 2 >::operands(), llvm::ConstantExprKeyType::operator==(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), llvm::PHINode::removeIncomingValue(), RemoveInstInputs(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::returnTypeIsEligibleForTailCall(), llvm::InstCombiner::run(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), SinkThenElseCodeToEnd(), SRAGlobal(), llvm::stripGetElementPtr(), upgradeGlobalArray(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), VerifySubExpr(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::Interpreter::visitReturnInst(), llvm::InstCombiner::visitReturnInst(), and WriteInstruction().

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

Definition at line 118 of file User.h.

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

Referenced by llvm::AliasSetTracker::add(), AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), AddressIsTaken(), aliasSameBasePointerGEPs(), BreakUpSubtract(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateShuffled(), CanEvaluateTruncated(), CanEvaluateZExtd(), llvm::CannotBeNegativeZero(), llvm::CannotBeOrderedLessThanZero(), CanPHITrans(), canReplaceGEPIdxWithZero(), CheapToScalarize(), checkForNegativeOperand(), CleanupPointerRootUsers(), 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(), CollectBSwapParts(), CollectInsertionElements(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::collectUsedGlobalVariables(), CommitValueTo(), llvm::InstCombiner::commonCastTransforms(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromOperator(), computeKnownBitsFromTrueCondition(), llvm::ComputeMultiple(), ComputeNumSignBits(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), ConstantFoldLoadInst(), ConstantFoldLoadThroughBitcast(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::ConstantFoldSelectInstruction(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createReplacementInstr(), llvm::DecodeVPERMILPMask(), decomposeBitTestICmp(), DecomposeGEPExpression(), DeleteDeadInstruction(), DemandedBitsLHSMask(), detectLog2OfHalf(), emitGlobalConstantArray(), emitGlobalConstantStruct(), emitGlobalConstantVector(), llvm::X86AsmPrinter::EmitInstruction(), EvaluateExpression(), EvaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), ExtractConstantBytes(), ExtractEquivalentCondition(), llvm::FCmpInst::FCmpInst(), findBeginCatchSplitPoint(), FindInitTrampoline(), FindInitTrampolineFromAlloca(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseMultiplyFactors(), FindUsedValues(), findUsedValues(), llvm::InstCombiner::FoldAndOfFCmps(), llvm::InstCombiner::FoldAndOfICmps(), llvm::FoldBranchToCommonDest(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), foldConstantCastPair(), llvm::InstCombiner::FoldFCmp_IntToFP_Cst(), llvm::InstCombiner::foldFMulConst(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldItoFPtoI(), foldLogOpOfMaskedICmpsHelper(), FoldOperationIntoSelectOperand(), llvm::InstCombiner::FoldOrOfFCmps(), llvm::InstCombiner::FoldOrOfICmps(), foldSelectICmpAndOr(), foldSelectInst(), llvm::InstCombiner::FoldSelectOpOp(), llvm::InstCombiner::FoldShiftByConstant(), foldUDivShl(), GEPToVectorIndex(), llvm::InsertValueInst::getAggregateOperand(), llvm::GlobalAlias::getAliasee(), llvm::CallInst::getArgOperand(), llvm::AllocaInst::getArraySize(), getBinOpsForFactorization(), llvm::SwitchInst::CaseIteratorT< SwitchInst, ConstantInt, BasicBlock >::getCaseValue(), getCommonReturnValue(), llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::BinaryOperator::getFNegArgument(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::InsertValueInst::getInsertedValueOperand(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::getMergedGlobalExpr(), llvm::BinaryOperator::getNegArgument(), llvm::AtomicCmpXchgInst::getNewValOperand(), getNoopInput(), llvm::BinaryOperator::getNotArgument(), GetOffsetFromIndex(), llvm::LoadInst::getPointerOperand(), llvm::GEPOperator::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::PtrToIntOperator::getPointerOperand(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::PtrToIntInst::getPointerOperand(), llvm::Constant::getRelocationInfo(), GetShiftedValue(), getShuffleAndOtherOprd(), llvm::ConstantVector::getSplatValue(), llvm::BitCastOperator::getSrcTy(), llvm::BasicBlock::getTerminatingMustTailCall(), getUniformBase(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), getValueFromFromCondition(), llvm::StoreInst::getValueOperand(), llvm::ConstantExpr::getWithOperandReplaced(), handleBranchExpect(), handleIndirectSymViaGOTPCRel(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), hoistBeforePos(), llvm::BinaryOperator::init(), INITIALIZE_PASS(), insertFastDiv(), isAllocSiteRemovable(), llvm::AllocaInst::isArrayAllocation(), isChainSelectCmpBranch(), IsConstantOffsetFromGlobal(), isEliminableCastPair(), llvm::TargetLoweringBase::isExtFree(), isExtractBitsCandidateUse(), isFMulOrFDivWithConstant(), isGOTEquivalentCandidate(), llvm::CastInst::isIntegerCast(), isInterestingPointerComparisonOrSubtraction(), isIntExtFree(), isLikelyComplexAddressComputation(), llvm::CastInst::isLosslessCast(), llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), llvm::CastInst::isNoopCast(), IsPointerOffset(), isProfitableToFoldUnconditional(), llvm::AArch64TargetLowering::isProfitableToHoist(), isRepeatedByteSequence(), isSafeAndProfitableToSinkLoad(), IsSafeComputationToRemove(), isSafeSROAElementUse(), isSafeToEliminateVarargsCast(), llvm::isSafeToSpeculativelyExecute(), isSameCompare(), llvm::Instruction::isSameOperationAs(), isShuffleExtractingFromLHS(), isSimpleEnoughValueToCommitHelper(), isStrideMul(), IsUserOfGlobalSafeForSRA(), LdStHasDebugValue(), LinearizeExprTree(), LookThroughFPExtensions(), llvm::FastISel::lowerCallTo(), llvm::AsmPrinter::lowerConstant(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), llvm::Loop::makeLoopInvariant(), llvm::MapValue(), matchPairwiseReduction(), matchPairwiseReductionAtLevel(), llvm::matchSelectPattern(), matchVectorSplittingReduction(), mergeEmptyReturnBlocks(), needsLFTR(), NegateValue(), llvm::orc::CtorDtorIterator::operator*(), llvm::ConstantExprKeyType::operator==(), OptimizeAwayTrappingUsesOfLoads(), llvm::FastISel::optimizeCmpPredicate(), OptimizeExtractBits(), OptimizeIntegerToVectorInsertions(), OptimizeIntToFloatBitCast(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), llvm::promoteLoopAccessesToScalars(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), llvm::AliasSetTracker::remove(), RemoveInstInputs(), llvm::InstCombiner::replacedSelectWithOperand(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::returnTypeIsEligibleForTailCall(), reuseOrInsertFastDiv(), reuseTableCompare(), rewriteSingleStoreAlloca(), llvm::InstCombiner::run(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::FastISel::selectBinaryOp(), llvm::FastISel::selectBitCast(), llvm::FastISel::selectCast(), llvm::FastISel::selectExtractValue(), llvm::FastISel::selectGetElementPtr(), llvm::FastISel::selectOperator(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), ShouldBreakUpSubtract(), ShrinkDemandedConstant(), SimplifyAndOfICmps(), SimplifyAssociativeBinOp(), llvm::InstCombiner::SimplifyDivRemOfSelect(), SimplifyICmpInst(), llvm::SimplifyInstruction(), SimplifyOrOfICmps(), llvm::InstCombiner::simplifyRangeCheck(), SinkCast(), SinkCmpExpression(), SinkShiftAndTruncate(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SRAGlobal(), llvm::stripGetElementPtr(), swapMayExposeCSEOpportunities(), SymbolicallyEvaluateGEP(), ThreadBinOpOverSelect(), tryFactorization(), tryPromoteAllocaToVector(), TryToShrinkGlobalToBoolean(), TryToSimplifyUncondBranchWithICmpInIt(), upgradeGlobalArray(), VerifySubExpr(), 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(), llvm::Interpreter::visitICmpInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithCastAndCast(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), 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::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::visitSwitchInst(), 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(), WriteConstants(), and WriteInstruction().

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

Definition at line 115 of file User.h.

References getOperandList().

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

Definition at line 133 of file User.h.

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

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 63 of file User.cpp.

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

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

Definition at line 96 of file User.h.

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

Definition at line 184 of file User.h.

References getOperandList().

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

Definition at line 188 of file User.h.

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

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

Definition at line 215 of file User.h.

References value_op_begin(), and value_op_end().

Referenced by findCallees(), and rematerializeLiveValues().

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

Definition at line 194 of file User.h.

References op_begin(), and op_end().

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

Free memory allocated for User and Use objects.

Definition at line 121 of file User.cpp.

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

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

Placement delete - required by std, but never called.

Definition at line 80 of file User.h.

References llvm_unreachable.

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

Placement delete - required by std, but never called.

Definition at line 84 of file User.h.

References llvm_unreachable.

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 106 of file User.cpp.

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

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 94 of file User.cpp.

References llvm::Value::HasHungOffUses, llvm::Use::initTags(), and llvm::Value::NumUserOperands.

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

Definition at line 88 of file User.h.

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

Replace uses of one Value with another.

Replaces all references to the "From" definition with references to the "To" definition.

Definition at line 24 of file User.cpp.

References getNumOperands(), getOperand(), and setOperand().

Referenced by llvm::LoopVersioning::addPHINodes(), llvm::DemoteRegToStack(), OptimizeGlobalAddressOfMalloc(), rematerializeLiveValues(), ReplaceUsesOfMallocWithGlobal(), and sink().

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

Set the number of operands on a Function.

Function 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 161 of file User.h.

References llvm::Value::NumUserOperands.

Referenced by llvm::Function::setPersonalityFn(), and llvm::Function::~Function().

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 148 of file User.h.

References llvm::Value::NumUserOperands.

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

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 169 of file User.h.

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

Referenced by llvm::SwitchInst::addCase(), llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), and llvm::PHINode::removeIncomingValue().

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

Definition at line 122 of file User.h.

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

Referenced by BreakUpSubtract(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), ConvertShiftToMul(), DeleteDeadInstruction(), findBasePointer(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::FoldReturnIntoUncondBranch(), GetShiftedValue(), handleBranchExpect(), INITIALIZE_PASS(), llvm::InlineFunction(), LinearizeExprTree(), LowerNegateToMultiply(), mergeEmptyReturnBlocks(), NegateValue(), ProcessUMulZExtIdiom(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), replaceGEPIdxWithZero(), replaceUsesOfWith(), llvm::GlobalAlias::setAliasee(), llvm::CallInst::setArgOperand(), llvm::Function::setPrefixData(), llvm::Function::setPrologueData(), llvm::SwitchInst::CaseIt::setValue(), ShrinkDemandedConstant(), simplifyAllocaArraySize(), llvm::InstCombiner::SimplifyDivRemOfSelect(), SinkThenElseCodeToEnd(), SpeculativelyExecuteBB(), TryToSimplifyUncondBranchWithICmpInIt(), updateOperand(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitStoreInst(), and llvm::InstCombiner::visitXor().

value_op_iterator llvm::User::value_op_begin ( )
inline

Definition at line 209 of file User.h.

References op_begin().

Referenced by deleteDeadInstruction(), llvm::EliminateDuplicatePHINodes(), and operand_values().

value_op_iterator llvm::User::value_op_end ( )
inline

Definition at line 212 of file User.h.

References op_end().

Referenced by deleteDeadInstruction(), llvm::EliminateDuplicatePHINodes(), and operand_values().

Friends And Related Function Documentation

template<unsigned >
friend struct HungoffOperandTraits
friend

Definition at line 39 of file User.h.


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