[llvm-branch-commits] [llvm] IR: Remove redundant UseList check in addUse (PR #138676)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 6 04:48:23 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

Not sure if this did anything for compile time or not.

---
Full diff: https://github.com/llvm/llvm-project/pull/138676.diff


1 Files Affected:

- (modified) llvm/include/llvm/IR/Value.h (+1-1) 


``````````diff
diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h
index ae874304c4316..3f94081d7b844 100644
--- a/llvm/include/llvm/IR/Value.h
+++ b/llvm/include/llvm/IR/Value.h
@@ -509,7 +509,7 @@ class Value {
 
   /// This method should only be used by the Use class.
   void addUse(Use &U) {
-    if (UseList || hasUseList())
+    if (hasUseList())
       U.addToList(&UseList);
   }
 

``````````

</details>


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


More information about the llvm-branch-commits mailing list