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

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 8 09:52:10 PDT 2025


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

>From dedd3209ffec0129ff862ff8808eacbf13c15688 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 6 May 2025 12:06:17 +0200
Subject: [PATCH] IR: Remove redundant UseList check in addUse

Not sure if this did anything for compile time or not.
---
 llvm/include/llvm/IR/Value.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h
index 241b9e2860c4c..c276899e673a3 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);
   }
 



More information about the llvm-branch-commits mailing list