LLVM  13.0.0git
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::VPValue Class Reference

#include "Transforms/Vectorize/VPlanValue.h"

Inheritance diagram for llvm::VPValue:
Inheritance graph
[legend]
Collaboration diagram for llvm::VPValue:
Collaboration graph
[legend]

Public Types

enum  {
  VPValueSC, VPVBlendSC, VPVInstructionSC, VPVMemoryInstructionSC,
  VPVPredInstPHI, VPVReductionSC, VPVReplicateSC, VPVWidenSC,
  VPVWidenCallSC, VPVWidenGEPSC, VPVWidenIntOrFpIndcutionSC, VPVWidenPHISC,
  VPVWidenSelectSC
}
 An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated. More...
 
typedef SmallVectorImpl< VPUser * >::iterator user_iterator
 
typedef SmallVectorImpl< VPUser * >::const_iterator const_user_iterator
 
typedef iterator_range< user_iteratoruser_range
 
typedef iterator_range< const_user_iteratorconst_user_range
 

Public Member Functions

ValuegetUnderlyingValue ()
 Return the underlying Value attached to this VPValue. More...
 
const ValuegetUnderlyingValue () const
 
 VPValue (Value *UV=nullptr, VPDef *Def=nullptr)
 
 VPValue (const VPValue &)=delete
 
VPValueoperator= (const VPValue &)=delete
 
virtual ~VPValue ()
 
unsigned getVPValueID () const
 
void printAsOperand (raw_ostream &OS, VPSlotTracker &Tracker) const
 
void print (raw_ostream &OS, VPSlotTracker &Tracker) const
 
void dump () const
 Dump the value to stderr (for debugging). More...
 
unsigned getNumUsers () const
 
void addUser (VPUser &User)
 
void removeUser (VPUser &User)
 Remove a single User from the list of users. More...
 
user_iterator user_begin ()
 
const_user_iterator user_begin () const
 
user_iterator user_end ()
 
const_user_iterator user_end () const
 
user_range users ()
 
const_user_range users () const
 
bool hasMoreThanOneUniqueUser ()
 Returns true if the value has more than one unique user. More...
 
void replaceAllUsesWith (VPValue *New)
 
VPDefgetDef ()
 
ValuegetLiveInIRValue ()
 Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan. More...
 

Protected Member Functions

 VPValue (const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr)
 
void setUnderlyingValue (Value *Val)
 

Protected Attributes

ValueUnderlyingVal
 
VPDefDef
 Pointer to the VPDef that defines this VPValue. More...
 

Friends

class VPBuilder
 
class VPDef
 
class VPInstruction
 
struct VPlanTransforms
 
class VPBasicBlock
 
class VPInterleavedAccessInfo
 
class VPSlotTracker
 
class VPRecipeBase
 
class VPWidenMemoryInstructionRecipe
 

Detailed Description

Definition at line 44 of file VPlanValue.h.

Member Typedef Documentation

◆ const_user_iterator

Definition at line 145 of file VPlanValue.h.

◆ const_user_range

Definition at line 147 of file VPlanValue.h.

◆ user_iterator

Definition at line 144 of file VPlanValue.h.

◆ user_range

Definition at line 146 of file VPlanValue.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated.

Values of this enumeration are kept in the SubclassID field of the VPValue objects. They are used for concrete type identification.

Enumerator
VPValueSC 
VPVBlendSC 
VPVInstructionSC 
VPVMemoryInstructionSC 
VPVPredInstPHI 
VPVReductionSC 
VPVReplicateSC 
VPVWidenSC 
VPVWidenCallSC 
VPVWidenGEPSC 
VPVWidenIntOrFpIndcutionSC 
VPVWidenPHISC 
VPVWidenSelectSC 

Definition at line 91 of file VPlanValue.h.

Constructor & Destructor Documentation

◆ VPValue() [1/3]

VPValue::VPValue ( const unsigned char  SC,
Value UV = nullptr,
VPDef Def = nullptr 
)
protected

Definition at line 61 of file VPlan.cpp.

References Def.

◆ VPValue() [2/3]

llvm::VPValue::VPValue ( Value UV = nullptr,
VPDef Def = nullptr 
)
inline

Definition at line 107 of file VPlanValue.h.

◆ VPValue() [3/3]

llvm::VPValue::VPValue ( const VPValue )
delete

◆ ~VPValue()

VPValue::~VPValue ( )
virtual

Definition at line 67 of file VPlan.cpp.

References assert(), and Def.

Member Function Documentation

◆ addUser()

void llvm::VPValue::addUser ( VPUser User)
inline

Definition at line 126 of file VPlanValue.h.

References Users.

Referenced by llvm::VPUser::addOperand().

◆ dump()

void VPValue::dump ( ) const

Dump the value to stderr (for debugging).

Definition at line 80 of file VPlan.cpp.

References llvm::dbgs(), Def, llvm::VPRecipeBase::getParent(), llvm::VPBlockBase::getPlan(), and print().

◆ getDef()

VPDef* llvm::VPValue::getDef ( )
inline

Definition at line 172 of file VPlanValue.h.

References Def.

Referenced by getLiveInIRValue().

◆ getLiveInIRValue()

Value* llvm::VPValue::getLiveInIRValue ( )
inline

Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan.

Returns nullptr if the VPValue is defined by a VPDef inside a VPlan.

Definition at line 177 of file VPlanValue.h.

References assert(), getDef(), and getUnderlyingValue().

Referenced by llvm::InnerLoopVectorizer::widenPHIInstruction().

◆ getNumUsers()

unsigned llvm::VPValue::getNumUsers ( ) const
inline

Definition at line 125 of file VPlanValue.h.

References Users.

Referenced by llvm::VPlan::execute(), hasMoreThanOneUniqueUser(), and replaceAllUsesWith().

◆ getUnderlyingValue() [1/2]

Value* llvm::VPValue::getUnderlyingValue ( )
inline

◆ getUnderlyingValue() [2/2]

const Value* llvm::VPValue::getUnderlyingValue ( ) const
inline

Definition at line 85 of file VPlanValue.h.

References UnderlyingVal.

◆ getVPValueID()

unsigned llvm::VPValue::getVPValueID ( ) const
inline
Returns
an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves.

Definition at line 117 of file VPlanValue.h.

Referenced by llvm::VPInstruction::classof(), llvm::VPWidenRecipe::classof(), llvm::VPWidenPHIRecipe::classof(), llvm::VPReductionRecipe::classof(), and llvm::VPReplicateRecipe::classof().

◆ hasMoreThanOneUniqueUser()

bool llvm::VPValue::hasMoreThanOneUniqueUser ( )
inline

Returns true if the value has more than one unique user.

Definition at line 159 of file VPlanValue.h.

References getNumUsers(), user_begin(), and user_end().

◆ operator=()

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

◆ print()

void VPValue::print ( raw_ostream OS,
VPSlotTracker Tracker 
) const

Definition at line 73 of file VPlan.cpp.

References Def, and printAsOperand().

Referenced by dump(), and llvm::operator<<().

◆ printAsOperand()

void VPValue::printAsOperand ( raw_ostream OS,
VPSlotTracker Tracker 
) const

◆ removeUser()

void llvm::VPValue::removeUser ( VPUser User)
inline

Remove a single User from the list of users.

Definition at line 129 of file VPlanValue.h.

References llvm::erase_if(), Other, and Users.

◆ replaceAllUsesWith()

void VPValue::replaceAllUsesWith ( VPValue New)

◆ setUnderlyingValue()

void llvm::VPValue::setUnderlyingValue ( Value Val)
inlineprotected

Definition at line 77 of file VPlanValue.h.

References assert(), and UnderlyingVal.

Referenced by llvm::VPBuilder::createNaryOp(), and llvm::VPInstruction::setUnderlyingInstr().

◆ user_begin() [1/2]

user_iterator llvm::VPValue::user_begin ( )
inline

Definition at line 149 of file VPlanValue.h.

References Users.

Referenced by llvm::VPlanSlp::buildGraph(), hasMoreThanOneUniqueUser(), and users().

◆ user_begin() [2/2]

const_user_iterator llvm::VPValue::user_begin ( ) const
inline

Definition at line 150 of file VPlanValue.h.

References Users.

◆ user_end() [1/2]

user_iterator llvm::VPValue::user_end ( )
inline

Definition at line 151 of file VPlanValue.h.

References Users.

Referenced by llvm::VPlanSlp::buildGraph(), hasMoreThanOneUniqueUser(), and users().

◆ user_end() [2/2]

const_user_iterator llvm::VPValue::user_end ( ) const
inline

Definition at line 152 of file VPlanValue.h.

References Users.

◆ users() [1/2]

user_range llvm::VPValue::users ( )
inline

Definition at line 153 of file VPlanValue.h.

References user_begin(), and user_end().

◆ users() [2/2]

const_user_range llvm::VPValue::users ( ) const
inline

Definition at line 154 of file VPlanValue.h.

References user_begin(), and user_end().

Friends And Related Function Documentation

◆ VPBasicBlock

friend class VPBasicBlock
friend

Definition at line 49 of file VPlanValue.h.

◆ VPBuilder

friend class VPBuilder
friend

Definition at line 45 of file VPlanValue.h.

◆ VPDef

friend class VPDef
friend

Definition at line 46 of file VPlanValue.h.

◆ VPInstruction

friend class VPInstruction
friend

Definition at line 47 of file VPlanValue.h.

Referenced by llvm::VPInstruction::clone().

◆ VPInterleavedAccessInfo

friend class VPInterleavedAccessInfo
friend

Definition at line 50 of file VPlanValue.h.

◆ VPlanTransforms

friend struct VPlanTransforms
friend

Definition at line 48 of file VPlanValue.h.

◆ VPRecipeBase

friend class VPRecipeBase
friend

Definition at line 52 of file VPlanValue.h.

◆ VPSlotTracker

friend class VPSlotTracker
friend

Definition at line 51 of file VPlanValue.h.

◆ VPWidenMemoryInstructionRecipe

friend class VPWidenMemoryInstructionRecipe
friend

Definition at line 53 of file VPlanValue.h.

Member Data Documentation

◆ Def

VPDef* llvm::VPValue::Def
protected

Pointer to the VPDef that defines this VPValue.

If it is nullptr, the VPValue is not defined by any recipe modeled in VPlan.

Definition at line 65 of file VPlanValue.h.

Referenced by dump(), getDef(), print(), VPValue(), and ~VPValue().

◆ UnderlyingVal

Value* llvm::VPValue::UnderlyingVal
protected

Definition at line 61 of file VPlanValue.h.

Referenced by getUnderlyingValue(), and setUnderlyingValue().


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