[llvm] [InstrRef][NFC] Delete unused variables (PR #75501)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 14 09:34:45 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Felipe de Azevedo Piovezan (felipepiovezan)
<details>
<summary>Changes</summary>
`V` was unused, and all the other deletions follow from that observation.
---
Full diff: https://github.com/llvm/llvm-project/pull/75501.diff
1 Files Affected:
- (modified) llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp (+2-8)
``````````diff
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 87a0ba58b14c01..93002625807c4d 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -1375,15 +1375,9 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
if (!MI.isDebugValue())
return false;
- const DILocalVariable *Var = MI.getDebugVariable();
- const DIExpression *Expr = MI.getDebugExpression();
- const DILocation *DebugLoc = MI.getDebugLoc();
- const DILocation *InlinedAt = DebugLoc->getInlinedAt();
- assert(Var->isValidLocationForIntrinsic(DebugLoc) &&
+ assert(MI.getDebugVariable()->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
"Expected inlined-at fields to agree");
- DebugVariable V(Var, Expr, InlinedAt);
- DbgValueProperties Properties(MI);
// If there are no instructions in this lexical scope, do no location tracking
// at all, this variable shouldn't get a legitimate location range.
@@ -1417,7 +1411,7 @@ bool InstrRefBasedLDV::transferDebugValue(const MachineInstr &MI) {
}
}
}
- VTracker->defVar(MI, Properties, DebugOps);
+ VTracker->defVar(MI, DbgValueProperties(MI), DebugOps);
}
// If performing final tracking of transfers, report this variable definition
``````````
</details>
https://github.com/llvm/llvm-project/pull/75501
More information about the llvm-commits
mailing list