[llvm] Value: Remove redundant removeFromList in dropDroppableUse (PR #134580)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 6 22:09:11 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

The Use::set calls below will already try to unlink the use.

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


1 Files Affected:

- (modified) llvm/lib/IR/Value.cpp (-1) 


``````````diff
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index 2c41101ef56ff..2c7c0d3f91e14 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -215,7 +215,6 @@ void Value::dropDroppableUsesIn(User &Usr) {
 }
 
 void Value::dropDroppableUse(Use &U) {
-  U.removeFromList();
   if (auto *Assume = dyn_cast<AssumeInst>(U.getUser())) {
     unsigned OpNo = U.getOperandNo();
     if (OpNo == 0)

``````````

</details>


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


More information about the llvm-commits mailing list