|
LLVM
5.0.0
|
#include "llvm/IR/User.h"
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 > |
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> | |
| Use & | Op () |
| template<int Idx> | |
| const Use & | Op () 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 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 = 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 |
| using llvm::User::const_op_iterator = const Use* |
| using llvm::User::op_iterator = Use* |
Definition at line 74 of file User.h.
References assert(), getOperandList(), llvm::Value::HasHungOffUses, llvm::Value::NumUserOperands, and llvm::Value::NumUserOperandsBits.
Referenced by llvm::slpvectorizer::BoUpSLP::vectorizeTree().
|
protecteddefault |
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 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(), 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 279 of file User.h.
References operands().
Referenced by llvm::GlobalVariable::dropAllReferences(), llvm::BasicBlock::dropAllReferences(), llvm::Function::dropAllReferences(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), and llvm::MemorySSA::~MemorySSA().
| MutableArrayRef< uint8_t > llvm::User::getDescriptor | ( | ) |
Returns the descriptor co-allocated with this User instance.
Definition at line 99 of file User.cpp.
References assert(), llvm::Value::HasDescriptor, and llvm::Value::HasHungOffUses.
|
inline |
Definition at line 176 of file User.h.
References llvm::Value::NumUserOperands.
Referenced by llvm::SwitchInst::addCase(), llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::CatchSwitchInst::addHandler(), AddReachableCodeToWorklist(), aliasSameBasePointerGEPs(), canReplaceGEPIdxWithZero(), canSinkInstructions(), canTransformAccumulatorRecursion(), canTrapImpl(), 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(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::CallInst::dataOperandHasImpliedAttr(), llvm::InvokeInst::dataOperandHasImpliedAttr(), DCEInstruction(), deleteDeadInstruction(), llvm::DependenceInfo::depends(), doPromotion(), llvm::Function::dropAllReferences(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), emitGlobalConstantArray(), emitGlobalConstantStruct(), llvm::InstCombiner::eraseInstFromFunction(), EvaluateExpression(), llvm::Evaluator::EvaluateFunction(), evaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), FindUsedValues(), findUsedValues(), GEPToVectorIndex(), getAddressAccessSCEV(), getAllocationSize(), llvm::ConstantExpr::getAsInstruction(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::SystemZTTIImpl::getMemoryOpCost(), getNoopInput(), llvm::CallInst::getNumArgOperands(), llvm::GEPOperator::getNumIndices(), llvm::GetElementPtrInst::getNumIndices(), GetOffsetFromIndex(), llvm::Function::getPersonalityFn(), llvm::Function::getPrefixData(), llvm::Function::getPrologueData(), llvm::ConstantVector::getSplatValue(), llvm::DependenceInfo::getSplitIteration(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), llvm::DbgInfoIntrinsic::getVariableLocation(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), growHungoffUses(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), llvm::GEPOperator::hasIndices(), llvm::GetElementPtrInst::hasIndices(), INITIALIZE_PASS(), isEmptyXXStructor(), llvm::isGEPBasedOnPointerToString(), llvm::Instruction::isIdenticalToWhenDefined(), IsPointerOffset(), IsSafeComputationToRemove(), isSafeSROAElementUse(), llvm::isSafeToSpeculativelyExecute(), llvm::Instruction::isSameOperationAs(), isSimpleEnoughValueToCommitHelper(), IsUserOfGlobalSafeForSRA(), mergeEmptyReturnBlocks(), llvm::Constant::needsRelocation(), llvm::HungoffOperandTraits< 3 >::op_end(), llvm::OptionalOperandTraits< GlobalVariable >::operands(), llvm::VariadicOperandTraits< CallInst, 1 >::operands(), llvm::HungoffOperandTraits< 3 >::operands(), llvm::ConstantExprKeyType::operator==(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), llvm::CatchSwitchInst::removeHandler(), llvm::PHINode::removeIncomingValue(), RemoveInstInputs(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::returnTypeIsEligibleForTailCall(), llvm::InstCombiner::run(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), simplifyAndDCEInstruction(), sinkLastInstruction(), SRAGlobal(), llvm::stripGetElementPtr(), llvm::JumpThreadingPass::ThreadEdge(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::MemorySSA::verifyDefUses(), VerifySubExpr(), llvm::InstCombiner::visitGetElementPtrInst(), VisitGlobalVariableForEmission(), llvm::Interpreter::visitReturnInst(), and llvm::InstCombiner::visitReturnInst().
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(), aliasSameBasePointerGEPs(), BreakUpSubtract(), canEvaluateSExtd(), canEvaluateShifted(), canEvaluateShiftedShift(), CanEvaluateShuffled(), canEvaluateTruncated(), canEvaluateZExtd(), llvm::CannotBeNegativeZero(), cannotBeOrderedLessThanZeroImpl(), canonicalizeBitCastExtElt(), canonicalizeCmpWithConstant(), canonicalizeICmpBool(), CanPHITrans(), canReplaceGEPIdxWithZero(), llvm::canReplaceOperandWithVariable(), canRewriteGEPAsOffset(), canSinkInstructions(), canTransformAccumulatorRecursion(), 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(), collectValuesToDemote(), CommitValueTo(), llvm::InstCombiner::commonCastTransforms(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), computeKnownBitsFromOperator(), computeKnownBitsFromShiftOperator(), llvm::ComputeMultiple(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedAdd(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), llvm::ConstantExprKeyType::ConstantExprKeyType(), ConstantFold(), llvm::ConstantFoldCastOperand(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::ConstantFoldSelectInstruction(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createReplacementInstr(), DCEInstruction(), llvm::decomposeBitTestICmp(), deleteDeadInstruction(), despeculateCountZeros(), detectCTLZIdiom(), detectLog2OfHalf(), detectPopcountIdiom(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), emitGlobalConstantArray(), emitGlobalConstantStruct(), emitGlobalConstantVector(), EvaluateExpression(), llvm::Evaluator::EvaluateFunction(), evaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), ExtractConstantBytes(), ExtractEquivalentCondition(), findBuildVector(), findCommonAlignment(), findInitTrampoline(), findInitTrampolineFromAlloca(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseMultiplyFactors(), FindUsedValues(), findUsedValues(), foldAddWithConstant(), foldAndOrOfEqualityCmpsWithConstants(), foldAndToXor(), foldBitCastBitwiseLogic(), foldBitCastSelect(), foldBoolSextMaskToSelect(), llvm::FoldBranchToCommonDest(), foldConstantCastPair(), foldConstantInsEltIntoShuffle(), llvm::InstCombiner::foldFMulConst(), foldICmpWithMinMax(), foldInsSequenceIntoBroadcast(), llvm::InstCombiner::FoldItoFPtoI(), foldLogicCastConstant(), foldOperationIntoPhiValue(), foldOperationIntoSelectOperand(), foldOrToXor(), foldSelectICmpAndOr(), foldSelectInst(), llvm::InstCombiner::FoldShiftByConstant(), foldShiftedShift(), foldVecTruncToExtElt(), foldXorToXor(), GEPToVectorIndex(), llvm::InsertValueInst::getAggregateOperand(), llvm::CallInst::getArgOperand(), llvm::AllocaInst::getArraySize(), getAsConstantIndexedAddress(), getBinOpsForFactorization(), llvm::SwitchInst::CaseHandleImpl< SwitchInst, ConstantInt, BasicBlock >::getCaseValue(), llvm::AArch64TTIImpl::getCastInstrCost(), getCmpOpsType(), getCommonReturnValue(), llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::MemoryUseOrDef::getDefiningAccess(), getDemandedBitsLHSMask(), llvm::BinaryOperator::getFNegArgument(), llvm::getGEPInductionOperand(), getGEPSmallConstantIntOffsetV(), llvm::getGuaranteedNonFullPoisonOp(), llvm::GlobalIndirectSymbol::getIndirectSymbol(), llvm::InsertValueInst::getInsertedValueOperand(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), getMaskedTypeForICmpPair(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::BinaryOperator::getNegArgument(), llvm::AtomicCmpXchgInst::getNewValOperand(), getNoopInput(), llvm::BinaryOperator::getNotArgument(), GetOffsetFromIndex(), llvm::LoadInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::GEPOperator::getPointerOperand(), llvm::PtrToIntOperator::getPointerOperand(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::PtrToIntInst::getPointerOperand(), llvm::AddrSpaceCastInst::getPointerOperand(), getPointerOperands(), getRecurrenceVar(), llvm::objcarc::getreturnRVOperand(), getShiftedValue(), getShuffleAndOtherOprd(), llvm::getSplatValue(), llvm::ConstantVector::getSplatValue(), llvm::BitCastOperator::getSrcTy(), llvm::BasicBlock::getTerminatingMustTailCall(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), getValueFromConditionImpl(), getValueFromICmpCondition(), llvm::StoreInst::getValueOperand(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), handleBrSelExpect(), handleFree(), handleIndirectSymViaGOTPCRel(), handlePhiDef(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), hoistInsEltConst(), llvm::hoistRegion(), INITIALIZE_PASS(), isAddOfNonZero(), isAllocSiteRemovable(), llvm::AllocaInst::isArrayAllocation(), isChainSelectCmpBranch(), llvm::TargetLoweringBase::isExtFree(), isExtractBitsCandidateUse(), isFMulOrFDivWithConstant(), llvm::SystemZTargetLowering::isFoldableMemAccessOffset(), llvm::InductionDescriptor::isFPInductionPHI(), llvm::isGEPBasedOnPointerToString(), isGOTEquivalentCandidate(), llvm::CastInst::isIntegerCast(), isInterestingPointerComparisonOrSubtraction(), isIntExtFree(), isLoadInvariantInLoop(), llvm::CastInst::isLosslessCast(), llvm::AArch64TargetLowering::isMaskAndCmp0FoldingBeneficial(), llvm::RecurrenceDescriptor::isMinMaxSelectCmpPattern(), llvm::CastInst::isNoopCast(), IsPointerOffset(), isProfitableToFoldUnconditional(), llvm::AArch64TargetLowering::isProfitableToHoist(), isRepeatedByteSequence(), isReturnNonNull(), isSafeAndProfitableToSinkLoad(), IsSafeComputationToRemove(), isSafeSROAElementUse(), isSafeToEliminateVarargsCast(), llvm::isSafeToSpeculativelyExecute(), isSameCompare(), llvm::Instruction::isSameOperationAs(), isShuffleEquivalentToSelect(), isShuffleExtractingFromLHS(), isSimpleEnoughValueToCommitHelper(), isStrideMul(), IsUserOfGlobalSafeForSRA(), LdStHasDebugValue(), LinearizeExprTree(), llvm::FastISel::lowerCallTo(), llvm::AsmPrinter::lowerConstant(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), MatchBinaryOp(), matchCondition(), matchDeMorgansLaws(), matchExtractIndex(), matchPairwiseReduction(), matchPairwiseReductionAtLevel(), llvm::matchSelectPattern(), matchVectorSplittingReduction(), mayDivideByZero(), mergeEmptyReturnBlocks(), needsLFTR(), llvm::Constant::needsRelocation(), NegateValue(), llvm::orc::CtorDtorIterator::operator*(), llvm::ConstantExprKeyType::operator==(), OptimizeAwayTrappingUsesOfLoads(), llvm::FastISel::optimizeCmpPredicate(), OptimizeExtractBits(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), optimizeIntegerToVectorInsertions(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), processAdd(), processAShr(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), processSDiv(), processSelect(), processSRem(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::promoteLoopAccessesToScalars(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), llvm::safestack::StackColoring::removeAllMarkers(), RemoveInstInputs(), llvm::InstCombiner::replacedSelectWithOperand(), replaceExtractElements(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::returnTypeIsEligibleForTailCall(), reuseTableCompare(), rewriteGEPAsOffset(), rewriteSingleStoreAlloca(), 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(), setLimitsForBinOp(), ShouldBreakUpSubtract(), 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(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), sinkAndCmp0Expression(), SinkCast(), SinkCmpExpression(), sinkLastInstruction(), SinkShiftAndTruncate(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), splitMergedValStore(), SRAGlobal(), llvm::stripGetElementPtr(), swapMayExposeCSEOpportunities(), ThreadBinOpOverSelect(), llvm::JumpThreadingPass::ThreadEdge(), TryToShrinkGlobalToBoolean(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::JumpThreadingPass::TryToUnfoldSelect(), 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(), 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(), and llvm::reassociate::XorOpnd::XorOpnd().
Definition at line 147 of file User.h.
References llvm::Value::HasHungOffUses.
Referenced by llvm::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::CatchSwitchInst::addHandler(), getOperand(), getOperandList(), getOperandUse(), growHungoffUses(), llvm::HungoffOperandTraits< 3 >::op_begin(), op_begin(), llvm::HungoffOperandTraits< 3 >::op_end(), op_end(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), setOperand(), and User().
|
inline |
Definition at line 150 of file User.h.
References getOperandList().
Definition at line 167 of file User.h.
References assert(), getOperandList(), and llvm::Value::NumUserOperands.
Referenced by BrPHIToSelect(), llvm::formLCSSAForInstructions(), llvm::CallInst::getArgOperandUse(), and sinkLastInstruction().
Definition at line 171 of file User.h.
References assert(), 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 60 of file User.cpp.
References allocHungoffUses(), assert(), getNumOperands(), getOperandList(), llvm::Value::HasHungOffUses, and llvm::Use::zap().
|
inlineprotected |
Definition at line 118 of file User.h.
Referenced by llvm::CallInst::getCalledFunction(), llvm::CallInst::getCalledValue(), llvm::CatchPadInst::getCatchSwitch(), llvm::DbgInfoIntrinsic::getVariableLocation(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::CallInst::isInlineAsm(), llvm::ShuffleVectorInst::isValidOperands(), llvm::PHINode::removeIncomingValue(), llvm::CallInst::setCalledFunction(), llvm::CatchPadInst::setCatchSwitch(), and llvm::BranchInst::swapSuccessors().
|
inline |
Definition at line 214 of file User.h.
References getOperandList().
Referenced by llvm::addLandingPadInfo(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::CallInst::arg_begin(), llvm::objcarc::CanUse(), CloneInstructionInExitBlock(), llvm::ConstantAggregate::ConstantAggregate(), createReplacementInstr(), DominatesMergePoint(), doPromotion(), llvm::EmitGEPOffset(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_begin(), llvm::ConstantExpr::getAsInstruction(), llvm::SCEVExpander::getIVIncOperand(), llvm::Use::getOperandNo(), llvm::ConstantExpr::getWithOperands(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_begin(), llvm::GetElementPtrInst::idx_begin(), llvm::ConstantExpr::isGEPWithNoNotionalOverIndexing(), llvm::Instruction::isIdenticalToWhenDefined(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), operands(), llvm::PHINode::removeIncomingValue(), llvm::BitcodeReaderValueList::resolveConstantForwardRefs(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_begin(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 215 of file User.h.
References getOperandList().
|
inline |
Definition at line 216 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
Referenced by llvm::addLandingPadInfo(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::CallInst::arg_end(), llvm::objcarc::CanUse(), CloneInstructionInExitBlock(), createReplacementInstr(), DominatesMergePoint(), doPromotion(), llvm::EmitGEPOffset(), FoldCondBranchOnPHI(), llvm::FoldReturnIntoUncondBranch(), llvm::gep_type_end(), llvm::ConstantExpr::getAsInstruction(), llvm::SCEVExpander::getIVIncOperand(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::GEPOperator::idx_end(), llvm::GetElementPtrInst::idx_end(), llvm::Instruction::isIdenticalToWhenDefined(), operands(), llvm::CatchSwitchInst::removeHandler(), llvm::PHINode::removeIncomingValue(), llvm::BitcodeReaderValueList::resolveConstantForwardRefs(), llvm::SimplifyInstruction(), SpeculativelyExecuteBB(), value_op_end(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 219 of file User.h.
References getOperandList(), and llvm::Value::NumUserOperands.
|
inline |
Definition at line 246 of file User.h.
References llvm::make_range(), value_op_begin(), and value_op_end().
Referenced by dependsOnLocalPhi(), getScalarizationOverhead(), operandReferences(), rematerializeLiveValues(), tryToVectorizeHorReductionOrInstOperands(), and llvm::LazyCallGraph::visitReferences().
|
inline |
Definition at line 267 of file User.h.
References llvm::make_range(), value_op_begin(), and value_op_end().
|
inline |
Definition at line 222 of file User.h.
References op_begin(), and op_end().
Referenced by AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), analyzeLoopUnrollCost(), appendSpeculatableOperands(), appendToUsedList(), callHasFloatingPointArgument(), CanEvaluateShuffled(), canMoveAboveCall(), cloneInstructionWithNewAddressSpace(), llvm::collectUsedGlobalVariables(), computeLiveInValues(), llvm::ConstantFoldInstruction(), ConstHasGlobalValuePredicate(), contains(), DeleteTriviallyDeadInstructions(), dropAllReferences(), llvm::InstCombiner::eraseInstFromFunction(), findArgumentCopyElisionCandidates(), findRefEdges(), GetAnyNonZeroConstInt(), getConstantEvolvingPHIOperands(), getNotRelocatableInstructions(), llvm::RecurrenceDescriptor::getSourceExtensionKind(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), hasConcreteDefImpl(), hasLocalDefs(), llvm::Loop::hasLoopInvariantOperands(), hasPositiveOperands(), llvm::CodeExtractor::isBlockValidForExtraction(), isEphemeralValueOf(), isReferencingMDNode(), isSimpleEnoughValueToCommitHelper(), llvm::Loop::makeLoopInvariant(), llvm::LoopInfo::movementPreservesLCSSAForm(), onlySingleValue(), RemoveDeadConstant(), llvm::InstCombiner::run(), false::Simplifier::simplify(), false::Simplifier::Context::traverse(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 225 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 167 of file User.cpp.
References assert(), llvm::Value::HasDescriptor, llvm::Value::HasHungOffUses, llvm::Value::NumUserOperands, and llvm::Use::zap().
|
inline |
Placement delete - required by std, but never called.
Definition at line 103 of file User.h.
References llvm_unreachable().
Placement delete - required by std, but never called.
Definition at line 107 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 151 of file User.cpp.
References llvm::Value::HasDescriptor, llvm::Value::HasHungOffUses, and llvm::Value::NumUserOperands.
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.
Replace uses of one Value with another.
Replaces all references to the "From" definition with references to the "To" definition.
Definition at line 22 of file User.cpp.
References assert(), E, getNumOperands(), getOperand(), and setOperand().
Referenced by llvm::DemoteRegToStack(), llvm::CodeExtractor::findOrCreateBlockForHoisting(), makeAllConstantUsesInstructions(), OptimizeGlobalAddressOfMalloc(), processMemAccess(), ReduceSwitchRange(), rematerializeLiveValues(), removeEmptyCleanup(), ReplaceUsesOfMallocWithGlobal(), sink(), and llvm::slpvectorizer::BoUpSLP::vectorizeTree().
|
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().
|
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::LandingPadInst::addClause(), llvm::IndirectBrInst::addDestination(), llvm::CatchSwitchInst::addHandler(), llvm::Function::dropAllReferences(), llvm::SwitchInst::removeCase(), llvm::IndirectBrInst::removeDestination(), llvm::CatchSwitchInst::removeHandler(), and llvm::PHINode::removeIncomingValue().
Definition at line 159 of file User.h.
References assert(), getOperandList(), and llvm::Value::NumUserOperands.
Referenced by BreakUpSubtract(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonIRemTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), ConvertShiftToMul(), DCEInstruction(), deleteDeadInstruction(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), llvm::DuplicateInstructionsInSplitBetween(), eliminateRecursiveTailCall(), foldCttzCtlz(), llvm::FoldReturnIntoUncondBranch(), foldShiftedShift(), foldXorToXor(), getShiftedValue(), handleBrSelExpect(), INITIALIZE_PASS(), llvm::InlineFunction(), LinearizeExprTree(), LowerNegateToMultiply(), mergeEmptyReturnBlocks(), NegateValue(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processUMulZExtIdiom(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), remapInstruction(), replaceGEPIdxWithZero(), replaceUsesOfWith(), llvm::CallInst::setArgOperand(), llvm::MemoryUseOrDef::setDefiningAccess(), llvm::GlobalIndirectSymbol::setIndirectSymbol(), llvm::SwitchInst::CaseHandle::setValue(), ShrinkDemandedConstant(), simplifyAllocaArraySize(), simplifyAndDCEInstruction(), simplifyAssocCastAssoc(), llvm::InstCombiner::SimplifyDivRemOfSelect(), simplifyValueKnownNonZero(), SpeculativelyExecuteBB(), llvm::JumpThreadingPass::ThreadEdge(), TryToSimplifyUncondBranchWithICmpInIt(), updateOperand(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), 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().
|
inline |
Definition at line 240 of file User.h.
References op_begin().
Referenced by llvm::EliminateDuplicatePHINodes(), llvm::TargetTransformInfo::getUserCost(), markAliveBlocks(), and operand_values().
|
inline |
Definition at line 261 of file User.h.
References op_begin().
|
inline |
Definition at line 243 of file User.h.
References op_end().
Referenced by llvm::EliminateDuplicatePHINodes(), llvm::TargetTransformInfo::getUserCost(), markAliveBlocks(), and operand_values().
|
inline |
|
friend |
1.8.6