[llvm] [VPlan] Track VPValue names in VPlan. (PR #81411)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 00:26:47 PDT 2024


================
@@ -443,21 +444,32 @@ class VPDef {
 class VPlan;
 class VPBasicBlock;
 
-/// This class can be used to assign consecutive numbers to all VPValues in a
-/// VPlan and allows querying the numbering for printing, similar to the
-/// ModuleSlotTracker for IR values.
+/// This class can be used to assign consecutive numbers to VPValues in a
+/// VPlan without underlying values and deduplicated names to VPValues with
+/// underlying values. Allows querying the numbering and deduplicated names for
+/// printing, similar to the ModuleSlotTracker for IR values.
 class VPSlotTracker {
+  /// Keep track of de-duplicated names assigned to VPValues with underlying IR
+  /// values
+  DenseMap<const VPValue *, std::string> AssignedNames;
----------------
ayalz wrote:

```suggestion
  DenseMap<const VPValue *, std::string> VPValue2Name;
```
?

https://github.com/llvm/llvm-project/pull/81411


More information about the llvm-commits mailing list