|
LLVM
3.7.0
|
#include <User.h>
Classes | |
| struct | value_op_iterator |
| Iterator for directly iterating over the operand Values. More... | |
Public Types | |
| typedef Use * | op_iterator |
| typedef const Use * | const_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< Use > | use_iterator |
| typedef use_iterator_impl < const Use > | const_use_iterator |
| typedef user_iterator_impl< User > | user_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... | |
| Use * | getOperandList () |
| const Use * | getOperandList () const |
| Value * | getOperand (unsigned i) const |
| void | setOperand (unsigned i, Value *Val) |
| const Use & | getOperandUse (unsigned i) const |
| Use & | getOperandUse (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_iterator > | operand_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... | |
| Type * | getType () const |
| All values are typed, get the type of this value. More... | |
| LLVMContext & | getContext () const |
| All values hold a context through their type. More... | |
| bool | hasName () const |
| ValueName * | getValueName () 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_iterator > | uses () |
| 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 |
| User * | user_back () |
| const User * | user_back () const |
| iterator_range< user_iterator > | users () |
| 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... | |
| Value * | stripPointerCasts () |
| Strip off pointer casts, all-zero GEPs, and aliases. More... | |
| const Value * | stripPointerCasts () const |
| Value * | stripPointerCastsNoFollowAliases () |
| Strip off pointer casts and all-zero GEPs. More... | |
| const Value * | stripPointerCastsNoFollowAliases () const |
| Value * | stripInBoundsConstantOffsets () |
| Strip off pointer casts and all-constant inbounds GEPs. More... | |
| const Value * | stripInBoundsConstantOffsets () const |
| Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
| Accumulate offsets from stripInBoundsConstantOffsets(). More... | |
| const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
| Value * | stripInBoundsOffsets () |
| Strip off pointer casts and inbounds GEPs. More... | |
| const Value * | stripInBoundsOffsets () const |
| Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
| Translate PHI node to its predecessor from the given basic block. More... | |
| const Value * | DoPHITranslation (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> | |
| Use & | Op () |
| template<int Idx> | |
| const Use & | Op () 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 Use & | OpFrom (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 |
| typedef const Use* llvm::User::const_op_iterator |
| typedef Use* llvm::User::op_iterator |
Definition at line 54 of file User.h.
References getOperandList(), llvm::Value::HasHungOffUses, llvm::Value::NumUserOperands, and llvm::Value::NumUserOperandsBits.
Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User.
| IsPhi | identifies 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().
|
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().
|
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().
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().
|
inline |
Definition at line 112 of file User.h.
References llvm::Value::HasHungOffUses.
Referenced by llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), getOperand(), getOperandList(), getOperandUse(), growHungoffUses(), llvm::HungoffOperandTraits< 2 >::op_begin(), op_begin(), llvm::HungoffOperandTraits< 2 >::op_end(), op_end(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), setOperand(), and User().
Definition at line 115 of file User.h.
References getOperandList().
Definition at line 129 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
Referenced by ConstructSSAForLoadSet(), llvm::CallInst::getArgOperandUse(), processInstruction(), and llvm::InstCombiner::visitICmpInst().
Definition at line 133 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
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().
|
inlineprotected |
Definition at line 93 of file User.h.
Referenced by llvm::CallInst::getCalledFunction(), llvm::CallInst::getCalledValue(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::CallInst::isInlineAsm(), llvm::ShuffleVectorInst::isValidOperands(), llvm::PHINode::removeIncomingValue(), llvm::CallInst::setCalledFunction(), and llvm::BranchInst::swapSuccessors().
|
inline |
Definition at line 183 of file User.h.
References getOperandList().
Referenced by llvm::AddLandingPadInfo(), AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::CallInst::arg_operands(), callHasFloatingPointArgument(), llvm::objcarc::CanUse(), changeToCall(), CloneInstructionInExitBlock(), llvm::ConstantArray::ConstantArray(), ConstantFoldConstantExpressionImpl(), llvm::ConstantFoldInstruction(), llvm::ConstantStruct::ConstantStruct(), llvm::ConstantVector::ConstantVector(), createReplacementInstr(), DecomposeGEPExpression(), DominatesMergePoint(), llvm::EmitGEPOffset(), llvm::InstCombiner::EraseInstFromFunction(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_begin(), llvm::ConstantExpr::getAsInstruction(), getConstantEvolvingPHIOperands(), llvm::SCEVExpander::getIVIncOperand(), getNoopInput(), llvm::Use::getOperandNo(), llvm::ConstantExpr::getWithOperands(), hasConcreteDefImpl(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_begin(), llvm::GetElementPtrInst::idx_begin(), llvm::ConstantExpr::isGEPWithNoNotionalOverIndexing(), llvm::Instruction::isIdenticalToWhenDefined(), operands(), llvm::RemapInstruction(), llvm::PHINode::removeIncomingValue(), llvm::TypeFinder::run(), llvm::FastISel::selectGetElementPtr(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_begin(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 184 of file User.h.
References getOperandList().
|
inline |
Definition at line 185 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
Referenced by llvm::AddLandingPadInfo(), AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::CallInst::arg_operands(), callHasFloatingPointArgument(), llvm::objcarc::CanUse(), changeToCall(), CloneInstructionInExitBlock(), ConstantFoldConstantExpressionImpl(), llvm::ConstantFoldInstruction(), createReplacementInstr(), DecomposeGEPExpression(), DominatesMergePoint(), llvm::EmitGEPOffset(), llvm::InstCombiner::EraseInstFromFunction(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_end(), llvm::ConstantExpr::getAsInstruction(), getConstantEvolvingPHIOperands(), llvm::SCEVExpander::getIVIncOperand(), getNoopInput(), hasConcreteDefImpl(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_end(), llvm::GetElementPtrInst::idx_end(), llvm::Instruction::isIdenticalToWhenDefined(), operands(), llvm::RemapInstruction(), llvm::PHINode::removeIncomingValue(), llvm::TypeFinder::run(), llvm::FastISel::selectGetElementPtr(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_end(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 188 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
|
inline |
Definition at line 215 of file User.h.
References value_op_begin(), and value_op_end().
Referenced by findCallees(), and rematerializeLiveValues().
|
inline |
Definition at line 191 of file User.h.
References op_begin(), and op_end().
Referenced by computeLiveInValues(), ConstHasGlobalValuePredicate(), contains(), DeleteTriviallyDeadInstructions(), dropAllReferences(), llvm::Loop::hasLoopInvariantOperands(), isReferencingMDNode(), isSimpleEnoughValueToCommitHelper(), RemoveDeadConstant(), llvm::InstCombiner::run(), upgradeGlobalArray(), llvm::InstCombiner::visitGetElementPtrInst(), and WriteConstants().
|
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().
|
inline |
Placement delete - required by std, but never called.
Definition at line 80 of file User.h.
References llvm_unreachable.
Placement delete - required by std, but never called.
Definition at line 84 of file User.h.
References llvm_unreachable.
|
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.
|
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.
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().
|
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().
|
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().
|
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().
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().
|
inline |
Definition at line 209 of file User.h.
References op_begin().
Referenced by deleteDeadInstruction(), llvm::EliminateDuplicatePHINodes(), and operand_values().
|
inline |
Definition at line 212 of file User.h.
References op_end().
Referenced by deleteDeadInstruction(), llvm::EliminateDuplicatePHINodes(), and operand_values().
|
friend |
1.8.6