[llvm] [LV] Provide utility routine to find uncounted exit recipes (PR #152530)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 06:48:09 PDT 2025


================
@@ -148,6 +148,8 @@ class LLVM_ABI_FOR_TEST VPValue {
     return Current != user_end();
   }
 
+  bool hasOneUse() const { return getNumUsers() == 1; }
----------------
david-arm wrote:

Hi @fhahn, I think this is pretty confusing. Can we rename the existing `getNumUsers` to `getNumUses` to more closely match the naming conventions using for IR values? If a recipe has duplicate input operands then the number of uses != 1, but the number of users may still be 1. If so, I'd like to put up a patch to tidy this up a little.

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


More information about the llvm-commits mailing list