|
LLVM 23.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 384 of file VPlanValue.h.
Definition at line 449 of file VPlanValue.h.
Definition at line 451 of file VPlanValue.h.
| typedef SmallVectorImpl<VPValue*>::iterator llvm::VPUser::operand_iterator |
Definition at line 448 of file VPlanValue.h.
Definition at line 450 of file VPlanValue.h.
Definition at line 405 of file VPlanValue.h.
References addOperand().
Referenced by llvm::VPRecipeBase::classof(), operator=(), llvm::VPRecipeBase::VPRecipeBase(), and VPUser().
|
delete |
|
inlinevirtual |
Definition at line 419 of file VPlanValue.h.
References operands().
|
inlineprotected |
Definition at line 410 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(), llvm::VPWidenInductionRecipe::addUnrolledPartOperands(), and VPUser().
|
inline |
Definition at line 424 of file VPlanValue.h.
Referenced by llvm::VPHeaderPHIRecipe::addBackedgeValue(), llvm::VPInstruction::addOperand(), llvm::VPActiveLaneMaskPHIRecipe::clone(), cloneBinOpForScalarIV(), llvm::VPReplicateRecipe::computeCost(), llvm::VPIRInstruction::execute(), llvm::VPWidenGEPRecipe::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::VPInterleaveEVLRecipe::getNumStoreOperands(), llvm::VPInterleaveRecipe::getNumStoreOperands(), llvm::VPVectorEndPointerRecipe::getOffset(), llvm::VPExpressionRecipe::getOperandOfResultType(), llvm::vputils::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::VPReplicateRecipe::printRecipe(), llvm::VPWidenGEPRecipe::printRecipe(), llvm::VPWidenPointerInductionRecipe::printRecipe(), replaceUsesOfWith(), llvm::VPScalarIVStepsRecipe::setStartIndex(), llvm::VPInstruction::usesFirstLaneOnly(), llvm::VPVectorEndPointerRecipe::usesFirstPartOnly(), llvm::VPVectorPointerRecipe::usesFirstPartOnly(), and llvm::VPInstruction::VPInstruction().
Definition at line 425 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::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::VPWidenGEPRecipe::execute(), llvm::VPWidenPHIRecipe::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::VPExpressionRecipe::getOperandOfResultType(), llvm::VPVectorEndPointerRecipe::getPointer(), llvm::VPWidenIntOrFpInductionRecipe::getSplatVFValue(), llvm::VPScalarIVStepsRecipe::getStartIndex(), llvm::VPDerivedIVRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPWidenInductionRecipe::getStartValue(), llvm::VPWidenIntOrFpInductionRecipe::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(), preparePlanForEpilogueVectorLoop(), llvm::VPDerivedIVRecipe::printRecipe(), llvm::VPExpressionRecipe::printRecipe(), llvm::VPHistogramRecipe::printRecipe(), llvm::VPInterleaveEVLRecipe::printRecipe(), llvm::VPInterleaveRecipe::printRecipe(), llvm::VPWidenPointerInductionRecipe::printRecipe(), removeCommonBlendMask(), replaceUsesOfWith(), llvm::VPRecipeBuilder::replaceWithFinalIfReductionStore(), scalarizeVPWidenPointerInduction(), simplifyRecipe(), llvm::VPRecipeBuilder::tryToCreateWidenNonPhiRecipe(), tryToMatchAndCreateMulAccumulateReduction(), llvm::VPRecipeBuilder::tryToWidenMemory(), llvm::VPInstruction::usesFirstLaneOnly(), llvm::VPWidenRecipe::usesFirstLaneOnly(), and llvm::VPRecipeBuilder::widenIfHistogram().
|
inline |
Definition at line 453 of file VPlanValue.h.
Referenced by llvm::VPInstruction::getNumOperandsForOpcode(), llvm::VPInstruction::opcodeMayReadOrWriteFromMemory(), operands(), operands(), llvm::VPInstruction::operandsWithoutMask(), llvm::VPInstruction::operandsWithoutMask(), and llvm::VPReplicateRecipe::printRecipe().
|
inline |
Definition at line 454 of file VPlanValue.h.
|
inline |
Definition at line 455 of file VPlanValue.h.
Referenced by llvm::VPInstruction::getNumOperandsForOpcode(), llvm::VPInterleaveBase::getStoredValues(), llvm::VPInstruction::opcodeMayReadOrWriteFromMemory(), operands(), and operands().
|
inline |
Definition at line 456 of file VPlanValue.h.
|
inline |
Definition at line 457 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::VPReplicateRecipe::computeCost(), llvm::VPWidenIntrinsicRecipe::computeCost(), llvm::VPlanTransforms::createPartialReductions(), createReplicateRegion(), llvm::VPWidenIntrinsicRecipe::createVectorCall(), llvm::VPExpressionRecipe::decompose(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::VPIRPhi::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), hoistPreviousBeforeFORUsers(), llvm::vputils::isSingleScalar(), llvm::vputils::isUniformAcrossVFsAndUFs(), printOperands(), llvm::VPWidenIntrinsicRecipe::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 458 of file VPlanValue.h.
References op_begin(), and op_end().
|
protected |
Print the operands to O.
Definition at line 1527 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::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 1515 of file VPlan.cpp.
References getNumOperands(), getOperand(), and setOperand().
Definition at line 430 of file VPlanValue.h.
Referenced by createWidenInductionRecipe(), 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 440 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 472 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 480 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::VPIRInstruction, and llvm::VPReplicateRecipe.
Definition at line 464 of file VPlanValue.h.
References assert(), llvm::is_contained(), operands(), and usesFirstLaneOnly().
|
friend |
Grant access to removeOperand for VPPhiAccessors, the only supported user.
Definition at line 386 of file VPlanValue.h.
References VPPhiAccessors.
Referenced by VPPhiAccessors.
|
friend |
Grant access to addOperand for VPWidenMemoryRecipe.
Definition at line 388 of file VPlanValue.h.
References VPWidenMemoryRecipe.
Referenced by VPWidenMemoryRecipe.