LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::VPLiveOut Class Reference

A value that is used outside the VPlan. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPLiveOut:
Inheritance graph
[legend]

Public Member Functions

 VPLiveOut (PHINode *Phi, VPValue *Op)
 
void fixPhi (VPlan &Plan, VPTransformState &State)
 Fixup the wrapped LCSSA phi node in the unique exit block.
 
bool usesScalars (const VPValue *Op) const override
 Returns true if the VPLiveOut uses scalars of operand Op.
 
PHINodegetPhi () const
 
void print (raw_ostream &O, VPSlotTracker &SlotTracker) const
 Print the VPLiveOut to O.
 
- Public Member Functions inherited from llvm::VPUser
 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)
 
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.
 

Static Public Member Functions

static bool classof (const VPUser *U)
 

Additional Inherited Members

- Public Types inherited from llvm::VPUser
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
 
- Protected Member Functions inherited from llvm::VPUser
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

A value that is used outside the VPlan.

The operand of the user needs to be added to the associated LCSSA phi node.

Definition at line 677 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPLiveOut()

llvm::VPLiveOut::VPLiveOut ( PHINode Phi,
VPValue Op 
)
inline

Definition at line 681 of file VPlan.h.

Member Function Documentation

◆ classof()

static bool llvm::VPLiveOut::classof ( const VPUser U)
inlinestatic

Definition at line 684 of file VPlan.h.

References llvm::VPUser::LiveOut.

◆ fixPhi()

void VPLiveOut::fixPhi ( VPlan Plan,
VPTransformState State 
)

Fixup the wrapped LCSSA phi node in the unique exit block.

This simply means we need to add the appropriate incoming value from the middle block as exiting edges from the scalar epilogue loop (if present) are already in place, and we exit the vector loop exclusively to the middle block.

Definition at line 191 of file VPlanRecipes.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::VPTransformState::CFG, llvm::VPTransformState::get(), llvm::VPLane::getFirstLane(), llvm::VPLane::getLastLaneForVF(), llvm::VPBlockBase::getNumSuccessors(), llvm::VPUser::getOperand(), llvm::VPBlockBase::getSingleSuccessor(), llvm::VPlan::getVectorLoopRegion(), llvm::vputils::isUniformAfterVectorization(), llvm::VPTransformState::UF, llvm::VPTransformState::VF, and llvm::VPTransformState::CFGState::VPBB2IRBB.

◆ getPhi()

PHINode * llvm::VPLiveOut::getPhi ( ) const
inline

Definition at line 702 of file VPlan.h.

Referenced by print().

◆ print()

void VPLiveOut::print ( raw_ostream O,
VPSlotTracker SlotTracker 
) const

◆ usesScalars()

bool llvm::VPLiveOut::usesScalars ( const VPValue Op) const
inlineoverridevirtual

Returns true if the VPLiveOut uses scalars of operand Op.

Reimplemented from llvm::VPUser.

Definition at line 696 of file VPlan.h.

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


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