[llvm] [LV][NFC] Rename getNumUsers to getNumUses (PR #155397)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 00:30:14 PDT 2025


================
@@ -110,13 +110,18 @@ class LLVM_ABI_FOR_TEST VPValue {
   void dump() const;
 #endif
 
-  unsigned getNumUsers() const { return Users.size(); }
-  void addUser(VPUser &User) { Users.push_back(&User); }
+  /// Returns the number of uses of this VPValue. The same user could appear
+  /// more than once in the list due to this value being used for multiple
+  /// operands in a recipe.
+  unsigned getNumUses() const { return Users.size(); }
 
-  /// Remove a single \p User from the list of users.
-  void removeUser(VPUser &User) {
+  /// Adds a use of this value to the list.
+  void addUse(VPUser &User) { Users.push_back(&User); }
----------------
fhahn wrote:

Currently uses/users are handled in VPlan is quite different to Values in LLVM IR, which is different for most other parts of VPlan unfortunately. With the current implementation, we cannot really consistently match LLVM IR Users' interface I think

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


More information about the llvm-commits mailing list