[llvm] [VPlan] Version VPValue names in VPSlotTracker. (PR #81411)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 13 05:05:44 PDT 2024
================
@@ -443,29 +444,36 @@ 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
+/// 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<>), apending 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.
class VPSlotTracker {
- DenseMap<const VPValue *, unsigned> Slots;
+ /// Keep track of versioned names assigned to VPValues with underlying IR
+ /// values
+ DenseMap<const VPValue *, std::string> VPValue2Name;
+ /// Keep track of the next number to use to deduplicate the base name.
----------------
ayalz wrote:
```suggestion
/// Keep track of the next number to use to version the base name.
```
https://github.com/llvm/llvm-project/pull/81411
More information about the llvm-commits
mailing list