|
LLVM 24.0.0git
|
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's users to their defs. More...
#include "Transforms/Vectorize/VPlanValue.h"
Public Types | |
| typedef SmallVectorImpl< VPValue * >::iterator | operand_iterator |
| typedef SmallVectorImpl< VPValue * >::const_iterator | const_operand_iterator |
| typedef iterator_range< operand_iterator > | operand_range |
| typedef iterator_range< const_operand_iterator > | const_operand_range |
Public Member Functions | |
| VPUser ()=delete | |
| VPUser (const VPUser &)=delete | |
| VPUser & | operator= (const VPUser &)=delete |
| virtual | ~VPUser () |
| unsigned | getNumOperands () const |
| VPValue * | getOperand (unsigned N) const |
| void | setOperand (unsigned I, VPValue *New) |
| void | swapOperands () |
| Swap operands of the VPUser. It must have exactly 2 operands. | |
| void | replaceUsesOfWith (VPValue *From, VPValue *To) |
Replaces all uses of From in the VPUser with To. | |
| operand_iterator | op_begin () |
| const_operand_iterator | op_begin () const |
| operand_iterator | op_end () |
| const_operand_iterator | op_end () const |
| operand_range | operands () |
| const_operand_range | operands () const |
| virtual bool | usesScalars (const VPValue *Op) const |
Returns true if the VPUser uses scalars of operand Op. | |
| virtual bool | usesFirstLaneOnly (const VPValue *Op) const |
Returns true if the VPUser only uses the first lane of operand Op. | |
| virtual bool | usesFirstPartOnly (const VPValue *Op) const |
Returns true if the VPUser only uses the first part of operand Op. | |
Protected Member Functions | |
| void | printOperands (raw_ostream &O, VPSlotTracker &SlotTracker) const |
Print the operands to O. | |
| VPUser (ArrayRef< VPValue * > Operands) | |
| void | addOperand (VPValue *Operand) |
Friends | |
| class | VPPhiAccessors |
| Grant access to removeOperand for VPPhiAccessors, the only supported user. | |
| class | VPWidenMemoryRecipe |
| Grant access to addOperand for VPWidenMemoryRecipe. | |
This class augments VPValue with operands which provide the inverse def-use edges from VPValue's users to their defs.
Definition at line 401 of file VPlanValue.h.
Definition at line 466 of file VPlanValue.h.
Definition at line 468 of file VPlanValue.h.
| typedef SmallVectorImpl<VPValue*>::iterator llvm::VPUser::operand_iterator |
Definition at line 465 of file VPlanValue.h.
Definition at line 467 of file VPlanValue.h.
Definition at line 422 of file VPlanValue.h.
References addOperand().
Referenced by llvm::VPRecipeBase::classof(), operator=(), llvm::VPRecipeBase::VPRecipeBase(), and VPUser().
|
delete |
|
inlinevirtual |
Definition at line 436 of file VPlanValue.h.
References operands().
|
inlineprotected |
Definition at line 427 of file VPlanValue.h.
References llvm::VPValue::addUser().
Referenced by llvm::VPHeaderPHIRecipe::addBackedgeValue(), llvm::VPInstruction::addMask(), llvm::VPVectorEndPointerRecipe::addOffset(), llvm::VPInstruction::addOperand(), llvm::VPVectorPointerRecipe::addPerPartOffset(), llvm::VPWidenCanonicalIVRecipe::addPerPartStep(), and llvm::VPWidenInductionRecipe::addUnrolledPartOperands().
|
inline |
Definition at line 441 of file VPlanValue.h.
Referenced by llvm::VPHeaderPHIRecipe::addBackedgeValue(), llvm::VPInstruction::addOperand(), llvm::VPActiveLaneMaskPHIRecipe::clone(), cloneBinOpForScalarIV(), llvm::VPReplicateRecipe::computeCost(), llvm::VPIRInstruction::execute(), llvm::VPWidenRecipe::execute(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), llvm::VPReductionRecipe::getCondOp(), llvm::VPWidenIntOrFpInductionRecipe::getLastUnrolledPartOperand(), llvm::VPHistogramRecipe::getMask(), llvm::VPInstruction::getMask(), llvm::VPInterleaveBase::getMask(), llvm::VPReplicateRecipe::getMask(), llvm::VPPhiAccessors::getNumIncoming(), llvm::VPBlendRecipe::getNumIncomingValues(), llvm::VPInstruction::getNumOperandsWithoutMask(), llvm::VPReplicateRecipe::getNumOperandsWithoutMask(), llvm::VPInterleaveEVLRecipe::getNumStoreOperands(), llvm::VPInterleaveRecipe::getNumStoreOperands(), llvm::VPVectorEndPointerRecipe::getOffset(), getRecipesForUncountableExit(), llvm::VPWidenIntOrFpInductionRecipe::getSplatVFValue(), llvm::VPScalarIVStepsRecipe::getStartIndex(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPWidenCanonicalIVRecipe::getStepValue(), llvm::VPVectorPointerRecipe::getVFxPart(), llvm::VPInstruction::isMasked(), llvm::VPBlendRecipe::isNormalized(), llvm::VPExpressionRecipe::printRecipe(), llvm::VPIRPhi::printRecipe(), llvm::VPWidenPointerInductionRecipe::printRecipe(), replaceUsesOfWith(), llvm::VPScalarIVStepsRecipe::setStartIndex(), llvm::VPInstruction::usesFirstLaneOnly(), llvm::VPVectorEndPointerRecipe::usesFirstPartOnly(), llvm::VPVectorPointerRecipe::usesFirstPartOnly(), and llvm::VPInstruction::VPInstruction().
Definition at line 442 of file VPlanValue.h.
Referenced by addLaneToStartIndex(), llvm::VPInstruction::addOperand(), addStartIndexForScalarSteps(), canNarrowLoad(), llvm::VPActiveLaneMaskPHIRecipe::clone(), llvm::VPBranchOnMaskRecipe::clone(), llvm::VPDerivedIVRecipe::clone(), llvm::VPFirstOrderRecurrencePHIRecipe::clone(), llvm::VPPredInstPHIRecipe::clone(), llvm::VPReductionPHIRecipe::clone(), llvm::VPScalarIVStepsRecipe::clone(), llvm::VPVectorPointerRecipe::clone(), llvm::VPWidenCastRecipe::clone(), llvm::VPWidenPointerInductionRecipe::clone(), llvm::VPExpressionRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPScalarIVStepsRecipe::computeCost(), llvm::VPWidenMemIntrinsicRecipe::computeCost(), llvm::VPlanTransforms::createInLoopReductionRecipes(), createWidenInductionRecipe(), decideCallWidening(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPHistogramRecipe::execute(), llvm::VPInstructionWithType::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::VPVectorPointerRecipe::execute(), llvm::VPWidenCastRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::VPInterleaveBase::getAddr(), llvm::VPHeaderPHIRecipe::getBackedgeValue(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), llvm::VPWidenCanonicalIVRecipe::getCanonicalIV(), llvm::VPReductionRecipe::getChainOp(), llvm::VPReductionRecipe::getCondOp(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::VPInterleaveEVLRecipe::getEVL(), llvm::VPReductionEVLRecipe::getEVL(), llvm::VPWidenLoadEVLRecipe::getEVL(), llvm::VPWidenStoreEVLRecipe::getEVL(), llvm::VPBlendRecipe::getIncomingValue(), llvm::VPPhiAccessors::getIncomingValue(), llvm::VPDerivedIVRecipe::getIndex(), llvm::VPWidenIntOrFpInductionRecipe::getLastUnrolledPartOperand(), llvm::VPBlendRecipe::getMask(), llvm::VPHistogramRecipe::getMask(), llvm::VPInstruction::getMask(), llvm::VPInterleaveBase::getMask(), llvm::VPReplicateRecipe::getMask(), llvm::VPVectorEndPointerRecipe::getOffset(), llvm::VPVectorEndPointerRecipe::getPointer(), llvm::VPWidenIntOrFpInductionRecipe::getSplatVFValue(), llvm::VPScalarIVStepsRecipe::getStartIndex(), llvm::VPDerivedIVRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPWidenInductionRecipe::getStartValue(), llvm::VPDerivedIVRecipe::getStepValue(), llvm::VPScalarIVStepsRecipe::getStepValue(), llvm::VPWidenCanonicalIVRecipe::getStepValue(), llvm::VPWidenInductionRecipe::getStepValue(), llvm::VPWidenInductionRecipe::getStepValue(), llvm::VPWidenStoreEVLRecipe::getStoredValue(), llvm::VPWidenStoreRecipe::getStoredValue(), llvm::VPVectorPointerRecipe::getStride(), llvm::VPReductionRecipe::getVecOp(), llvm::VPScalarIVStepsRecipe::getVFValue(), llvm::VPVectorEndPointerRecipe::getVFValue(), llvm::VPWidenInductionRecipe::getVFValue(), llvm::VPWidenInductionRecipe::getVFValue(), llvm::VPVectorPointerRecipe::getVFxPart(), handleFirstArgMinOrMax(), llvm::VPlanTransforms::handleMultiUseReductions(), handleUncountableExitsWithSideEffects(), llvm::VPlanTransforms::makeMemOpWideningDecisions(), preparePlanForEpilogueVectorLoop(), preparePlanForMainVectorLoop(), llvm::VPDerivedIVRecipe::printRecipe(), llvm::VPExpressionRecipe::printRecipe(), llvm::VPHistogramRecipe::printRecipe(), llvm::VPInterleaveEVLRecipe::printRecipe(), llvm::VPInterleaveRecipe::printRecipe(), llvm::VPWidenPointerInductionRecipe::printRecipe(), removeCommonBlendMask(), replaceUsesOfWith(), llvm::VPRecipeBuilder::replaceWithFinalIfReductionStore(), llvm::vputils::scalarizeVPWidenPointerInduction(), simplifyRecipe(), llvm::VPRecipeBuilder::tryToCreateWidenNonPhiRecipe(), tryToMatchAndCreateMulAccumulateReduction(), llvm::VPRecipeBuilder::tryToWidenMemory(), llvm::VPInstruction::usesFirstLaneOnly(), llvm::VPWidenRecipe::usesFirstLaneOnly(), VPWidenMemoryRecipe, and llvm::VPRecipeBuilder::widenIfHistogram().
|
inline |
Definition at line 470 of file VPlanValue.h.
Referenced by operands(), operands(), llvm::VPInstruction::operandsWithoutMask(), and llvm::VPInstruction::operandsWithoutMask().
|
inline |
Definition at line 471 of file VPlanValue.h.
|
inline |
Definition at line 472 of file VPlanValue.h.
Referenced by llvm::VPInterleaveBase::getStoredValues(), operands(), and operands().
|
inline |
Definition at line 473 of file VPlanValue.h.
|
inline |
Definition at line 474 of file VPlanValue.h.
References op_begin(), and op_end().
Referenced by llvm::VPWidenCallRecipe::args(), llvm::VPWidenCallRecipe::args(), llvm::VPBlendRecipe::clone(), llvm::VPExpressionRecipe::clone(), llvm::VPHistogramRecipe::clone(), llvm::VPInstruction::clone(), llvm::VPInstructionWithType::clone(), llvm::VPIRInstruction::clone(), llvm::VPPhi::clone(), llvm::VPReplicateRecipe::clone(), llvm::VPWidenCallRecipe::clone(), llvm::VPWidenGEPRecipe::clone(), llvm::VPWidenIntrinsicRecipe::clone(), llvm::VPWidenMemIntrinsicRecipe::clone(), llvm::VPWidenPHIRecipe::clone(), llvm::VPWidenRecipe::clone(), cloneForLane(), llvm::collectEphemeralRecipesForVPlan(), llvm::VPInstructionWithType::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPWidenIntrinsicRecipe::computeCost(), llvm::VPlanTransforms::createPartialReductions(), llvm::VPWidenIntrinsicRecipe::createVectorCall(), llvm::VPExpressionRecipe::decompose(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::VPInstructionWithType::execute(), llvm::VPIRPhi::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::VPInstruction::getNumOperandsForOpcode(), hoistPreviousBeforeFORUsers(), llvm::vputils::isSingleScalar(), llvm::vputils::isUniformAcrossVFsAndUFs(), llvm::VPInstruction::opcodeMayReadOrWriteFromMemory(), llvm::VPReplicateRecipe::operandsWithoutMask(), printOperands(), llvm::VPInstructionWithType::printRecipe(), llvm::VPReplicateRecipe::printRecipe(), sinkScalarOperands(), llvm::VPBlendRecipe::usesFirstLaneOnly(), llvm::VPCurrentIterationPHIRecipe::usesFirstLaneOnly(), llvm::VPDerivedIVRecipe::usesFirstLaneOnly(), llvm::VPFirstOrderRecurrencePHIRecipe::usesFirstLaneOnly(), llvm::VPInstruction::usesFirstLaneOnly(), llvm::VPInterleaveEVLRecipe::usesFirstLaneOnly(), llvm::VPInterleaveRecipe::usesFirstLaneOnly(), llvm::VPIRInstruction::usesFirstLaneOnly(), llvm::VPReductionEVLRecipe::usesFirstLaneOnly(), llvm::VPReductionPHIRecipe::usesFirstLaneOnly(), llvm::VPReplicateRecipe::usesFirstLaneOnly(), llvm::VPScalarIVStepsRecipe::usesFirstLaneOnly(), usesFirstLaneOnly(), llvm::VPVectorEndPointerRecipe::usesFirstLaneOnly(), llvm::VPVectorPointerRecipe::usesFirstLaneOnly(), llvm::VPWidenCallRecipe::usesFirstLaneOnly(), llvm::VPWidenGEPRecipe::usesFirstLaneOnly(), llvm::VPWidenInductionRecipe::usesFirstLaneOnly(), llvm::VPWidenIntrinsicRecipe::usesFirstLaneOnly(), llvm::VPWidenLoadEVLRecipe::usesFirstLaneOnly(), llvm::VPWidenLoadRecipe::usesFirstLaneOnly(), llvm::VPWidenRecipe::usesFirstLaneOnly(), llvm::VPWidenStoreEVLRecipe::usesFirstLaneOnly(), llvm::VPWidenStoreRecipe::usesFirstLaneOnly(), llvm::VPInstruction::usesFirstPartOnly(), llvm::VPIRInstruction::usesFirstPartOnly(), usesFirstPartOnly(), llvm::VPVectorEndPointerRecipe::usesFirstPartOnly(), llvm::VPVectorPointerRecipe::usesFirstPartOnly(), llvm::VPBranchOnMaskRecipe::usesScalars(), llvm::VPIRInstruction::usesScalars(), llvm::VPReplicateRecipe::usesScalars(), usesScalars(), and ~VPUser().
|
inline |
Definition at line 475 of file VPlanValue.h.
References op_begin(), and op_end().
|
protected |
Print the operands to O.
Definition at line 1519 of file VPlan.cpp.
References llvm::interleaveComma(), and operands().
Referenced by llvm::VPActiveLaneMaskPHIRecipe::printRecipe(), llvm::VPBranchOnMaskRecipe::printRecipe(), llvm::VPCurrentIterationPHIRecipe::printRecipe(), llvm::VPFirstOrderRecurrencePHIRecipe::printRecipe(), llvm::VPInstruction::printRecipe(), llvm::VPInstructionWithType::printRecipe(), llvm::VPPredInstPHIRecipe::printRecipe(), llvm::VPReductionPHIRecipe::printRecipe(), llvm::VPReplicateRecipe::printRecipe(), llvm::VPScalarIVStepsRecipe::printRecipe(), llvm::VPVectorEndPointerRecipe::printRecipe(), llvm::VPVectorPointerRecipe::printRecipe(), llvm::VPWidenCanonicalIVRecipe::printRecipe(), llvm::VPWidenCastRecipe::printRecipe(), llvm::VPWidenGEPRecipe::printRecipe(), llvm::VPWidenIntOrFpInductionRecipe::printRecipe(), llvm::VPWidenIntrinsicRecipe::printRecipe(), llvm::VPWidenLoadEVLRecipe::printRecipe(), llvm::VPWidenLoadRecipe::printRecipe(), llvm::VPWidenRecipe::printRecipe(), llvm::VPWidenStoreEVLRecipe::printRecipe(), and llvm::VPWidenStoreRecipe::printRecipe().
Replaces all uses of From in the VPUser with To.
Definition at line 1507 of file VPlan.cpp.
References getNumOperands(), getOperand(), and setOperand().
Definition at line 447 of file VPlanValue.h.
Referenced by createWidenInductionRecipe(), llvm::VPlanTransforms::foldTailByMasking(), handleFirstArgMinOrMax(), llvm::VPlanTransforms::handleMaxMinNumReductions(), handleUncountableExitsWithSideEffects(), llvm::VPlanTransforms::optimizeFindIVReductions(), preparePlanForEpilogueVectorLoop(), preparePlanForMainVectorLoop(), replaceUsesOfWith(), llvm::VPHeaderPHIRecipe::setBackedgeValue(), llvm::VPBlendRecipe::setMask(), llvm::VPScalarIVStepsRecipe::setStartIndex(), llvm::VPHeaderPHIRecipe::setStartValue(), and llvm::VPWidenInductionRecipe::setStepValue().
|
inline |
Swap operands of the VPUser. It must have exactly 2 operands.
Definition at line 457 of file VPlanValue.h.
References assert(), and std::swap().
Returns true if the VPUser only uses the first lane of operand Op.
Conservatively returns false.
Reimplemented in llvm::VPBlendRecipe, llvm::VPCurrentIterationPHIRecipe, llvm::VPDerivedIVRecipe, llvm::VPFirstOrderRecurrencePHIRecipe, llvm::VPInstruction, llvm::VPInterleaveBase, llvm::VPInterleaveEVLRecipe, llvm::VPInterleaveRecipe, llvm::VPIRInstruction, llvm::VPReductionEVLRecipe, llvm::VPReductionPHIRecipe, llvm::VPReplicateRecipe, llvm::VPScalarIVStepsRecipe, llvm::VPVectorEndPointerRecipe, llvm::VPVectorPointerRecipe, llvm::VPWidenCallRecipe, llvm::VPWidenGEPRecipe, llvm::VPWidenInductionRecipe, llvm::VPWidenIntrinsicRecipe, llvm::VPWidenLoadEVLRecipe, llvm::VPWidenLoadRecipe, llvm::VPWidenRecipe, llvm::VPWidenStoreEVLRecipe, and llvm::VPWidenStoreRecipe.
Definition at line 489 of file VPlanValue.h.
References assert(), llvm::is_contained(), and operands().
Referenced by usesScalars().
Returns true if the VPUser only uses the first part of operand Op.
Conservatively returns false.
Reimplemented in llvm::VPInstruction, llvm::VPIRInstruction, llvm::VPVectorEndPointerRecipe, and llvm::VPVectorPointerRecipe.
Definition at line 497 of file VPlanValue.h.
References assert(), llvm::is_contained(), and operands().
Returns true if the VPUser uses scalars of operand Op.
Conservatively returns if only first (scalar) lane is used, as default.
Reimplemented in llvm::VPBranchOnMaskRecipe, llvm::VPInstructionWithType, llvm::VPIRInstruction, and llvm::VPReplicateRecipe.
Definition at line 481 of file VPlanValue.h.
References assert(), llvm::is_contained(), operands(), and usesFirstLaneOnly().
Referenced by llvm::VPInstructionWithType::usesScalars().
|
friend |
Grant access to removeOperand for VPPhiAccessors, the only supported user.
Definition at line 403 of file VPlanValue.h.
References VPPhiAccessors.
Referenced by VPPhiAccessors.
|
friend |
Grant access to addOperand for VPWidenMemoryRecipe.
Definition at line 405 of file VPlanValue.h.
References getOperand(), and VPWidenMemoryRecipe.
Referenced by VPWidenMemoryRecipe.