LLVM 22.0.0git
llvm::VPUser Class Reference

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"

Inheritance diagram for llvm::VPUser:
[legend]

Public Types

typedef SmallVectorImpl< VPValue * >::iterator operand_iterator
typedef SmallVectorImpl< VPValue * >::const_iterator const_operand_iterator
typedef iterator_range< operand_iteratoroperand_range
typedef iterator_range< const_operand_iteratorconst_operand_range

Public Member Functions

 VPUser ()=delete
 VPUser (const VPUser &)=delete
VPUseroperator= (const VPUser &)=delete
virtual ~VPUser ()
void addOperand (VPValue *Operand)
unsigned getNumOperands () const
VPValuegetOperand (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 onlyFirstLaneUsed (const VPValue *Op) const
 Returns true if the VPUser only uses the first lane of operand Op.
virtual bool onlyFirstPartUsed (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)

Friends

class VPPhiAccessors
 Grant access to removeOperand for VPPhiAccessors, the only supported user.

Detailed Description

This class augments VPValue with operands which provide the inverse def-use edges from VPValue's users to their defs.

Definition at line 199 of file VPlanValue.h.

Member Typedef Documentation

◆ const_operand_iterator

◆ const_operand_range

◆ operand_iterator

Definition at line 258 of file VPlanValue.h.

◆ operand_range

Constructor & Destructor Documentation

◆ VPUser() [1/3]

llvm::VPUser::VPUser ( ArrayRef< VPValue * > Operands)
inlineprotected

◆ VPUser() [2/3]

llvm::VPUser::VPUser ( )
delete

◆ VPUser() [3/3]

llvm::VPUser::VPUser ( const VPUser & )
delete

References VPUser().

◆ ~VPUser()

virtual llvm::VPUser::~VPUser ( )
inlinevirtual

Definition at line 227 of file VPlanValue.h.

References operands().

Member Function Documentation

◆ addOperand()

◆ getNumOperands()

◆ getOperand()

VPValue * llvm::VPUser::getOperand ( unsigned N) const
inline

Definition at line 238 of file VPlanValue.h.

References assert(), and N.

Referenced by canNarrowLoad(), llvm::VPActiveLaneMaskPHIRecipe::clone(), llvm::VPBranchOnMaskRecipe::clone(), llvm::VPCanonicalIVPHIRecipe::clone(), llvm::VPDerivedIVRecipe::clone(), llvm::VPFirstOrderRecurrencePHIRecipe::clone(), llvm::VPPartialReductionRecipe::clone(), llvm::VPPredInstPHIRecipe::clone(), llvm::VPReductionPHIRecipe::clone(), llvm::VPScalarIVStepsRecipe::clone(), llvm::VPVectorEndPointerRecipe::clone(), llvm::VPVectorPointerRecipe::clone(), llvm::VPWidenCanonicalIVRecipe::clone(), llvm::VPWidenCastRecipe::clone(), llvm::VPWidenPHIRecipe::clone(), llvm::VPWidenPointerInductionRecipe::clone(), llvm::VPExpressionRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPPartialReductionRecipe::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPWidenMemoryRecipe::computeCost(), llvm::VPWidenSelectRecipe::computeCost(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), llvm::VPDerivedIVRecipe::execute(), llvm::VPHistogramRecipe::execute(), llvm::VPInstructionWithType::execute(), llvm::VPPartialReductionRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::VPVectorEndPointerRecipe::execute(), llvm::VPVectorPointerRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPWidenCastRecipe::execute(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenPHIRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::VPWidenSelectRecipe::execute(), llvm::VPIRInstruction::extractLastLaneOfFirstOperand(), fixReductionScalarResumeWhenVectorizingEpilog(), llvm::VPInterleaveBase::getAddr(), llvm::VPWidenMemoryRecipe::getAddr(), llvm::VPHeaderPHIRecipe::getBackedgeValue(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), llvm::VPReductionRecipe::getChainOp(), llvm::VPWidenSelectRecipe::getCond(), 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::VPWidenIntOrFpInductionRecipe::getLastUnrolledPartOperand(), llvm::VPBlendRecipe::getMask(), llvm::VPHistogramRecipe::getMask(), llvm::VPInterleaveBase::getMask(), llvm::VPReplicateRecipe::getMask(), llvm::VPWidenMemoryRecipe::getMask(), llvm::VPExpressionRecipe::getOperandOfResultType(), llvm::VPWidenIntOrFpInductionRecipe::getSplatVFValue(), llvm::VPDerivedIVRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), getStartValueFromReductionResult(), llvm::VPDerivedIVRecipe::getStepValue(), llvm::VPScalarIVStepsRecipe::getStepValue(), llvm::VPWidenInductionRecipe::getStepValue(), llvm::VPWidenInductionRecipe::getStepValue(), llvm::VPWidenStoreEVLRecipe::getStoredValue(), llvm::VPWidenStoreRecipe::getStoredValue(), llvm::VPReductionRecipe::getVecOp(), llvm::VPVectorEndPointerRecipe::getVFValue(), llvm::VPVectorEndPointerRecipe::getVFValue(), llvm::VPWidenInductionRecipe::getVFValue(), llvm::VPWidenInductionRecipe::getVFValue(), llvm::VPlanTransforms::handleMaxMinNumReductions(), llvm::VPlanTransforms::handleUncountableEarlyExit(), llvm::VPInstruction::onlyFirstLaneUsed(), llvm::VPWidenGEPRecipe::onlyFirstLaneUsed(), preparePlanForMainVectorLoop(), llvm::VPDerivedIVRecipe::print(), llvm::VPExpressionRecipe::print(), llvm::VPHistogramRecipe::print(), llvm::VPInterleaveEVLRecipe::print(), llvm::VPInterleaveRecipe::print(), llvm::VPWidenPointerInductionRecipe::print(), llvm::VPWidenSelectRecipe::print(), removeCommonBlendMask(), replaceUsesOfWith(), and llvm::VPWidenCallRecipe::VPWidenCallRecipe().

◆ onlyFirstLaneUsed()

◆ onlyFirstPartUsed()

virtual bool llvm::VPUser::onlyFirstPartUsed ( const VPValue * Op) const
inlinevirtual

Returns true if the VPUser only uses the first part of operand Op.

Conservatively returns false.

Reimplemented in llvm::VPCanonicalIVPHIRecipe, llvm::VPInstruction, llvm::VPIRInstruction, llvm::VPVectorEndPointerRecipe, and llvm::VPVectorPointerRecipe.

Definition at line 290 of file VPlanValue.h.

References assert(), llvm::is_contained(), and operands().

◆ op_begin() [1/2]

operand_iterator llvm::VPUser::op_begin ( )
inline

◆ op_begin() [2/2]

const_operand_iterator llvm::VPUser::op_begin ( ) const
inline

Definition at line 264 of file VPlanValue.h.

◆ op_end() [1/2]

operand_iterator llvm::VPUser::op_end ( )
inline

◆ op_end() [2/2]

const_operand_iterator llvm::VPUser::op_end ( ) const
inline

Definition at line 266 of file VPlanValue.h.

◆ operands() [1/2]

operand_range llvm::VPUser::operands ( )
inline

Definition at line 267 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::VPWidenPHIRecipe::clone(), llvm::VPWidenRecipe::clone(), llvm::VPWidenSelectRecipe::clone(), cloneForLane(), llvm::collectEphemeralRecipesForVPlan(), llvm::VPReplicateRecipe::computeCost(), llvm::VPWidenIntrinsicRecipe::computeCost(), llvm::VPWidenSelectRecipe::computeCost(), llvm::VPExpressionRecipe::decompose(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::VPIRPhi::execute(), llvm::VPWidenIntrinsicRecipe::execute(), llvm::VPWidenRecipe::execute(), hoistPreviousBeforeFORUsers(), llvm::vputils::isSingleScalar(), llvm::VPBlendRecipe::onlyFirstLaneUsed(), llvm::VPCanonicalIVPHIRecipe::onlyFirstLaneUsed(), llvm::VPDerivedIVRecipe::onlyFirstLaneUsed(), llvm::VPEVLBasedIVPHIRecipe::onlyFirstLaneUsed(), llvm::VPFirstOrderRecurrencePHIRecipe::onlyFirstLaneUsed(), llvm::VPInstruction::onlyFirstLaneUsed(), llvm::VPInterleaveEVLRecipe::onlyFirstLaneUsed(), llvm::VPInterleaveRecipe::onlyFirstLaneUsed(), llvm::VPIRInstruction::onlyFirstLaneUsed(), llvm::VPReductionEVLRecipe::onlyFirstLaneUsed(), llvm::VPReductionPHIRecipe::onlyFirstLaneUsed(), llvm::VPReplicateRecipe::onlyFirstLaneUsed(), llvm::VPScalarIVStepsRecipe::onlyFirstLaneUsed(), onlyFirstLaneUsed(), llvm::VPVectorEndPointerRecipe::onlyFirstLaneUsed(), llvm::VPVectorPointerRecipe::onlyFirstLaneUsed(), llvm::VPWidenGEPRecipe::onlyFirstLaneUsed(), llvm::VPWidenInductionRecipe::onlyFirstLaneUsed(), llvm::VPWidenIntrinsicRecipe::onlyFirstLaneUsed(), llvm::VPWidenLoadEVLRecipe::onlyFirstLaneUsed(), llvm::VPWidenLoadRecipe::onlyFirstLaneUsed(), llvm::VPWidenSelectRecipe::onlyFirstLaneUsed(), llvm::VPWidenStoreEVLRecipe::onlyFirstLaneUsed(), llvm::VPWidenStoreRecipe::onlyFirstLaneUsed(), llvm::VPCanonicalIVPHIRecipe::onlyFirstPartUsed(), llvm::VPInstruction::onlyFirstPartUsed(), llvm::VPIRInstruction::onlyFirstPartUsed(), onlyFirstPartUsed(), llvm::VPVectorEndPointerRecipe::onlyFirstPartUsed(), llvm::VPVectorPointerRecipe::onlyFirstPartUsed(), llvm::VPWidenIntrinsicRecipe::print(), printOperands(), scalarizeInstruction(), sinkScalarOperands(), llvm::VPBranchOnMaskRecipe::usesScalars(), llvm::VPIRInstruction::usesScalars(), llvm::VPPredInstPHIRecipe::usesScalars(), llvm::VPReplicateRecipe::usesScalars(), usesScalars(), and ~VPUser().

◆ operands() [2/2]

const_operand_range llvm::VPUser::operands ( ) const
inline

Definition at line 268 of file VPlanValue.h.

References op_begin(), and op_end().

◆ operator=()

VPUser & llvm::VPUser::operator= ( const VPUser & )
delete

References VPUser().

◆ printOperands()

◆ replaceUsesOfWith()

void VPUser::replaceUsesOfWith ( VPValue * From,
VPValue * To )

Replaces all uses of From in the VPUser with To.

Definition at line 1443 of file VPlan.cpp.

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

◆ setOperand()

◆ swapOperands()

void llvm::VPUser::swapOperands ( )
inline

Swap operands of the VPUser. It must have exactly 2 operands.

Definition at line 250 of file VPlanValue.h.

References assert(), and std::swap().

◆ usesScalars()

virtual bool llvm::VPUser::usesScalars ( const VPValue * Op) const
inlinevirtual

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, llvm::VPPredInstPHIRecipe, and llvm::VPReplicateRecipe.

Definition at line 274 of file VPlanValue.h.

References assert(), llvm::is_contained(), onlyFirstLaneUsed(), and operands().

◆ VPPhiAccessors

friend class VPPhiAccessors
friend

Grant access to removeOperand for VPPhiAccessors, the only supported user.

Definition at line 201 of file VPlanValue.h.

References VPPhiAccessors.

Referenced by VPPhiAccessors.


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