-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Fix #86269: remove unused variable #86927
Fix #86269: remove unused variable #86927
Conversation
@llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-llvm-transforms Author: Shan Huang (Apochens) ChangesRemove the unused variable Full diff: https://github.com/llvm/llvm-project/pull/86927.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
index 34d39f3fe6dcac..10c92395b4777a 100644
--- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -509,7 +509,7 @@ void TailRecursionEliminator::createTailRecurseLoopHeader(CallInst *CI) {
BasicBlock *NewEntry = BasicBlock::Create(F.getContext(), "", &F, HeaderBB);
NewEntry->takeName(HeaderBB);
HeaderBB->setName("tailrecurse");
- BranchInst *BI = BranchInst::Create(HeaderBB, NewEntry);
+ BranchInst::Create(HeaderBB, NewEntry);
// If the new branch preserves the debug location of CI, it could result in
// misleading stepping, if CI is located in a conditional branch.
// So, here we don't give any debug location to BI.
|
@@ -509,7 +509,7 @@ void TailRecursionEliminator::createTailRecurseLoopHeader(CallInst *CI) { | |||
BasicBlock *NewEntry = BasicBlock::Create(F.getContext(), "", &F, HeaderBB); | |||
NewEntry->takeName(HeaderBB); | |||
HeaderBB->setName("tailrecurse"); | |||
BranchInst *BI = BranchInst::Create(HeaderBB, NewEntry); | |||
BranchInst::Create(HeaderBB, NewEntry); | |||
// If the new branch preserves the debug location of CI, it could result in | |||
// misleading stepping, if CI is located in a conditional branch. | |||
// So, here we don't give any debug location to BI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there is no "BI" variable anymore it's confusing to reference it in the comment.
Perhaps change "BI" to "the new branch"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refinement is committed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please help in merging this PR if it's ready, cause I don't have the permission. Thanks! |
Done. Thanks :) |
Remove the unused variable
BI
introduced in #86269.