LLVM 24.0.0git
llvm::VPSlotTracker Class Reference

This class can be used to assign names to VPValues. More...

#include "Transforms/Vectorize/VPlanHelpers.h"

Public Member Functions

 VPSlotTracker (const VPlan *Plan=nullptr)
std::string getOrCreateName (const VPValue *V) const
 Returns the name assigned to V, if there is one, otherwise try to construct one from the underlying value, if there's one; else return <badref>.
ArrayRef< StringRefgetMDNames ()
 Returns the cached metadata kind names.
const ModulegetModule () const
 Returns the module the plan operates on, if any.

Detailed Description

This class can be used to assign names to VPValues.

For VPValues without underlying value, assign consecutive numbers and use those as names (wrapped in vp<>). Otherwise, use the name from the underlying value (wrapped in ir<>), appending a .V version number if there are multiple uses of the same name. Allows querying names for VPValues for printing, similar to the ModuleSlotTracker for IR values.

Definition at line 414 of file VPlanHelpers.h.

Constructor & Destructor Documentation

◆ VPSlotTracker()

llvm::VPSlotTracker::VPSlotTracker ( const VPlan * Plan = nullptr)
inline

Member Function Documentation

◆ getMDNames()

ArrayRef< StringRef > llvm::VPSlotTracker::getMDNames ( )
inline

Returns the cached metadata kind names.

Definition at line 459 of file VPlanHelpers.h.

References getModule().

◆ getModule()

const Module * llvm::VPSlotTracker::getModule ( ) const
inline

Returns the module the plan operates on, if any.

Definition at line 467 of file VPlanHelpers.h.

Referenced by getMDNames().

◆ getOrCreateName()

std::string VPSlotTracker::getOrCreateName ( const VPValue * V) const

Returns the name assigned to V, if there is one, otherwise try to construct one from the underlying value, if there's one; else return <badref>.

Definition at line 1596 of file VPlan.cpp.

Referenced by llvm::VPValue::printAsOperand().


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