Skip to content

Value: Remove redundant removeFromList in dropDroppableUse #134580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Apr 7, 2025

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

The Use::set calls below will already try to unlink the use.
@arsenm arsenm added the llvm:ir label Apr 7, 2025 — with Graphite App
Copy link
Contributor Author

arsenm commented Apr 7, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Apr 7, 2025

@llvm/pr-subscribers-llvm-ir

Author: Matt Arsenault (arsenm)

Changes

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 --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)

@arsenm arsenm marked this pull request as ready for review April 7, 2025 05:10
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arsenm arsenm merged commit 4a5ff3e into main Apr 7, 2025
15 checks passed
@arsenm arsenm deleted the users/arsenm/ir/fix-double-remove-of-uselist branch April 7, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants