LLVM 19.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::VPDef Class Referenceabstract

This class augments a recipe with a set of VPValues defined by the recipe. More...

#include "Transforms/Vectorize/VPlanValue.h"

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

Public Types

using VPRecipeTy = enum { VPBranchOnMaskSC, VPDerivedIVSC, VPExpandSCEVSC, VPInstructionSC, VPInterleaveSC, VPReductionSC, VPReplicateSC, VPScalarCastSC, VPScalarIVStepsSC, VPVectorPointerSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenCastSC, VPWidenGEPSC, VPWidenMemoryInstructionSC, VPWidenSC, VPWidenSelectSC, VPBlendSC, VPWidenPHISC, VPPredInstPHISC, VPCanonicalIVPHISC, VPActiveLaneMaskPHISC, VPFirstOrderRecurrencePHISC, VPWidenIntOrFpInductionSC, VPWidenPointerInductionSC, VPReductionPHISC, VPFirstPHISC=VPBlendSC, VPFirstHeaderPHISC=VPCanonicalIVPHISC, VPLastHeaderPHISC=VPReductionPHISC, VPLastPHISC=VPReductionPHISC, }
 An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated.
 

Public Member Functions

 VPDef (const unsigned char SC)
 
virtual ~VPDef ()
 
VPValuegetVPSingleValue ()
 Returns the only VPValue defined by the VPDef.
 
const VPValuegetVPSingleValue () const
 
VPValuegetVPValue (unsigned I)
 Returns the VPValue with index I defined by the VPDef.
 
const VPValuegetVPValue (unsigned I) const
 
ArrayRef< VPValue * > definedValues ()
 Returns an ArrayRef of the values defined by the VPDef.
 
ArrayRef< VPValue * > definedValues () const
 Returns an ArrayRef of the values defined by the VPDef.
 
unsigned getNumDefinedValues () const
 Returns the number of values defined by the VPDef.
 
unsigned getVPDefID () const
 
void dump () const
 Dump the VPDef to stderr (for debugging).
 
virtual void print (raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const =0
 Each concrete VPDef prints itself.
 

Friends

class VPValue
 

Detailed Description

This class augments a recipe with a set of VPValues defined by the recipe.

It allows recipes to define zero, one or multiple VPValues. A VPDef owns the VPValues it defines and is responsible for deleting its defined values. Single-value VPDefs that also inherit from VPValue must make sure to inherit from VPDef before VPValue.

Definition at line 314 of file VPlanValue.h.

Member Typedef Documentation

◆ VPRecipeTy

using llvm::VPDef::VPRecipeTy = enum { VPBranchOnMaskSC, VPDerivedIVSC, VPExpandSCEVSC, VPInstructionSC, VPInterleaveSC, VPReductionSC, VPReplicateSC, VPScalarCastSC, VPScalarIVStepsSC, VPVectorPointerSC, VPWidenCallSC, VPWidenCanonicalIVSC, VPWidenCastSC, VPWidenGEPSC, VPWidenMemoryInstructionSC, VPWidenSC, VPWidenSelectSC, VPBlendSC, VPWidenPHISC, VPPredInstPHISC, VPCanonicalIVPHISC, VPActiveLaneMaskPHISC, VPFirstOrderRecurrencePHISC, VPWidenIntOrFpInductionSC, VPWidenPointerInductionSC, VPReductionPHISC, VPFirstPHISC = VPBlendSC, VPFirstHeaderPHISC = VPCanonicalIVPHISC, VPLastHeaderPHISC = VPReductionPHISC, VPLastPHISC = VPReductionPHISC, }

An enumeration for keeping track of the concrete subclass of VPRecipeBase that is actually instantiated.

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

Definition at line 345 of file VPlanValue.h.

Constructor & Destructor Documentation

◆ VPDef()

llvm::VPDef::VPDef ( const unsigned char  SC)
inline

Definition at line 383 of file VPlanValue.h.

◆ ~VPDef()

virtual llvm::VPDef::~VPDef ( )
inlinevirtual

Definition at line 385 of file VPlanValue.h.

References assert(), D, and llvm::make_early_inc_range().

Member Function Documentation

◆ definedValues() [1/2]

ArrayRef< VPValue * > llvm::VPDef::definedValues ( )
inline

Returns an ArrayRef of the values defined by the VPDef.

Definition at line 420 of file VPlanValue.h.

Referenced by llvm::VPInterleaveRecipe::execute().

◆ definedValues() [2/2]

ArrayRef< VPValue * > llvm::VPDef::definedValues ( ) const
inline

Returns an ArrayRef of the values defined by the VPDef.

Definition at line 422 of file VPlanValue.h.

◆ dump()

void VPDef::dump ( ) const

Dump the VPDef to stderr (for debugging).

Definition at line 109 of file VPlan.cpp.

References llvm::dbgs(), and print().

◆ getNumDefinedValues()

unsigned llvm::VPDef::getNumDefinedValues ( ) const
inline

Returns the number of values defined by the VPDef.

Definition at line 425 of file VPlanValue.h.

References llvm::TinyPtrVector< EltTy >::size().

Referenced by sinkRecurrenceUsersAfterPrevious(), and llvm::VPlanTransforms::VPInstructionsToVPRecipes().

◆ getVPDefID()

unsigned llvm::VPDef::getVPDefID ( ) 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 430 of file VPlanValue.h.

Referenced by llvm::VPRecipeBase::isPhi(), llvm::VPRecipeBase::mayHaveSideEffects(), llvm::VPRecipeBase::mayReadFromMemory(), and llvm::VPRecipeBase::mayWriteToMemory().

◆ getVPSingleValue() [1/2]

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

◆ getVPSingleValue() [2/2]

const VPValue * llvm::VPDef::getVPSingleValue ( ) const
inline

Definition at line 403 of file VPlanValue.h.

References assert(), and llvm::TinyPtrVector< EltTy >::size().

◆ getVPValue() [1/2]

VPValue * llvm::VPDef::getVPValue ( unsigned  I)
inline

Returns the VPValue with index I defined by the VPDef.

Definition at line 410 of file VPlanValue.h.

References assert(), and I.

Referenced by llvm::VPWidenIntOrFpInductionRecipe::print(), and llvm::VPInterleaveRecipe::print().

◆ getVPValue() [2/2]

const VPValue * llvm::VPDef::getVPValue ( unsigned  I) const
inline

Definition at line 414 of file VPlanValue.h.

References assert(), and I.

◆ print()

virtual void llvm::VPDef::print ( raw_ostream O,
const Twine Indent,
VPSlotTracker SlotTracker 
) const
pure virtual

Friends And Related Function Documentation

◆ VPValue

friend class VPValue
friend

Definition at line 315 of file VPlanValue.h.


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