[llvm] [LV][NFC] Rename getNumUsers to getNumUses (PR #155397)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 07:59:09 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:
Hm, this is clearer for some uses, but is inconsistent in other ways, as this doesn't really add a use, it adds a user object of which there are may be multiple and there's only accessors for iterating over users not uses at the moment
https://github.com/llvm/llvm-project/pull/155397
More information about the llvm-commits
mailing list