LLVM 20.0.0git
Public Member Functions | List of all members
llvm::VPSlotTracker Class Reference

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

#include "Transforms/Vectorize/VPlanValue.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>.
 

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

Constructor & Destructor Documentation

◆ VPSlotTracker()

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

Definition at line 464 of file VPlanValue.h.

Member Function Documentation

◆ 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 1577 of file VPlan.cpp.

References assert(), llvm::VPRecipeBase::getParent(), llvm::VPBlockBase::getPlan(), and Name.

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


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