LLVM 17.0.0git
Public Types | Public Member Functions | Protected Member Functions | List of all members
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:
Inheritance graph
[legend]

Public Types

enum class  VPUserID { Recipe , LiveOut }
 Subclass identifier (for isa/dyn_cast). More...
 
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 ()
 
VPUserID getVPUserID () const
 
void addOperand (VPValue *Operand)
 
unsigned getNumOperands () const
 
VPValuegetOperand (unsigned N) const
 
void setOperand (unsigned I, VPValue *New)
 
void removeLastOperand ()
 
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.
 

Protected Member Functions

void printOperands (raw_ostream &O, VPSlotTracker &SlotTracker) const
 Print the operands to O.
 
 VPUser (ArrayRef< VPValue * > Operands, VPUserID ID)
 
 VPUser (std::initializer_list< VPValue * > Operands, VPUserID ID)
 
template<typename IterT >
 VPUser (iterator_range< IterT > Operands, VPUserID ID)
 

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 201 of file VPlanValue.h.

Member Typedef Documentation

◆ const_operand_iterator

Definition at line 268 of file VPlanValue.h.

◆ const_operand_range

Definition at line 270 of file VPlanValue.h.

◆ operand_iterator

Definition at line 267 of file VPlanValue.h.

◆ operand_range

Definition at line 269 of file VPlanValue.h.

Member Enumeration Documentation

◆ VPUserID

enum class llvm::VPUser::VPUserID
strong

Subclass identifier (for isa/dyn_cast).

Enumerator
Recipe 
LiveOut 

Definition at line 204 of file VPlanValue.h.

Constructor & Destructor Documentation

◆ VPUser() [1/5]

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

Definition at line 220 of file VPlanValue.h.

References addOperand(), and Operands.

◆ VPUser() [2/5]

llvm::VPUser::VPUser ( std::initializer_list< VPValue * >  Operands,
VPUserID  ID 
)
inlineprotected

Definition at line 225 of file VPlanValue.h.

References Operands.

◆ VPUser() [3/5]

template<typename IterT >
llvm::VPUser::VPUser ( iterator_range< IterT >  Operands,
VPUserID  ID 
)
inlineprotected

Definition at line 229 of file VPlanValue.h.

References addOperand(), and Operands.

◆ VPUser() [4/5]

llvm::VPUser::VPUser ( )
delete

◆ VPUser() [5/5]

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

◆ ~VPUser()

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

Definition at line 238 of file VPlanValue.h.

References operands().

Member Function Documentation

◆ addOperand()

void llvm::VPUser::addOperand ( VPValue Operand)
inline

◆ getNumOperands()

unsigned llvm::VPUser::getNumOperands ( ) const
inline

◆ getOperand()

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

Definition at line 251 of file VPlanValue.h.

References assert(), N, and Operands.

Referenced by canSimplifyBranchOnCond(), llvm::VPWidenRecipe::execute(), llvm::VPWidenSelectRecipe::execute(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenPHIRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPActiveLaneMaskPHIRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::VPLiveOut::fixPhi(), llvm::VPInterleaveRecipe::getAddr(), llvm::VPWidenMemoryInstructionRecipe::getAddr(), llvm::VPHeaderPHIRecipe::getBackedgeValue(), llvm::VPDerivedIVRecipe::getCanonicalIV(), llvm::VPReductionRecipe::getChainOp(), llvm::VPReductionRecipe::getCondOp(), llvm::VPWidenPHIRecipe::getIncomingValue(), llvm::VPBlendRecipe::getIncomingValue(), llvm::VPInterleaveRecipe::getMask(), llvm::VPBranchOnMaskRecipe::getMask(), llvm::VPWidenMemoryInstructionRecipe::getMask(), llvm::VPBlendRecipe::getMask(), llvm::VPCanonicalIVPHIRecipe::getScalarType(), llvm::VPWidenCanonicalIVRecipe::getScalarType(), llvm::VPWidenIntOrFpInductionRecipe::getStartValue(), llvm::VPHeaderPHIRecipe::getStartValue(), llvm::VPDerivedIVRecipe::getStartValue(), llvm::VPWidenIntOrFpInductionRecipe::getStepValue(), llvm::VPDerivedIVRecipe::getStepValue(), llvm::VPScalarIVStepsRecipe::getStepValue(), llvm::VPWidenMemoryInstructionRecipe::getStoredValue(), llvm::VPReductionRecipe::getVecOp(), llvm::VPInstruction::onlyFirstLaneUsed(), llvm::VPlanTransforms::optimizeInductions(), and llvm::VPWidenSelectRecipe::print().

◆ getVPUserID()

VPUserID llvm::VPUser::getVPUserID ( ) const
inline

Definition at line 243 of file VPlanValue.h.

Referenced by llvm::VPRecipeBase::classof().

◆ onlyFirstLaneUsed()

virtual bool llvm::VPUser::onlyFirstLaneUsed ( const VPValue Op) const
inlinevirtual

◆ 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 273 of file VPlanValue.h.

References Operands.

◆ op_end() [1/2]

operand_iterator llvm::VPUser::op_end ( )
inline

Definition at line 274 of file VPlanValue.h.

References Operands.

Referenced by operands().

◆ op_end() [2/2]

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

Definition at line 275 of file VPlanValue.h.

References Operands.

◆ operands() [1/2]

operand_range llvm::VPUser::operands ( )
inline

◆ operands() [2/2]

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

Definition at line 277 of file VPlanValue.h.

References op_begin(), and op_end().

◆ operator=()

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

◆ printOperands()

void VPUser::printOperands ( raw_ostream O,
VPSlotTracker SlotTracker 
) const
protected

◆ removeLastOperand()

void llvm::VPUser::removeLastOperand ( )
inline

Definition at line 262 of file VPlanValue.h.

References Operands.

◆ setOperand()

void llvm::VPUser::setOperand ( unsigned  I,
VPValue New 
)
inline

Definition at line 256 of file VPlanValue.h.

References I, and Operands.

Referenced by llvm::VPlanTransforms::optimizeInductions(), and llvm::VPHeaderPHIRecipe::setStartValue().

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

Definition at line 283 of file VPlanValue.h.

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

Referenced by llvm::VPlanTransforms::optimizeInductions().


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