aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2022-12-15 13:58:51 -0800
committerHeejin Ahn <aheejin@gmail.com>2022-12-21 15:11:38 -0800
commit4792ba5971b6dc4801ae174d3cab98f89747a2fd (patch)
treeec1f479734ea4a0353ff8d02ff3edf62f68c8cc3 /llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
parent437346abe18ec4fc982ae36f6821487dafc1a06e (diff)
downloadllvm-4792ba5971b6dc4801ae174d3cab98f89747a2fd.zip
llvm-4792ba5971b6dc4801ae174d3cab98f89747a2fd.tar.gz
llvm-4792ba5971b6dc4801ae174d3cab98f89747a2fd.tar.bz2
[LiveDebugValues] Remove LexicalScope param from VarLoc (NFC)
It doesn't seem to be used anymore. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D140258
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
index 5ad6760..9686f82 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
@@ -386,7 +386,7 @@ private:
/// emitting a debug value.
SmallVector<unsigned, 8> OrigLocMap;
- VarLoc(const MachineInstr &MI, LexicalScopes &LS)
+ VarLoc(const MachineInstr &MI)
: Var(MI.getDebugVariable(), MI.getDebugExpression(),
MI.getDebugLoc()->getInlinedAt()),
Expr(MI.getDebugExpression()), MI(MI) {
@@ -436,9 +436,9 @@ private:
/// Take the variable and machine-location in DBG_VALUE MI, and build an
/// entry location using the given expression.
- static VarLoc CreateEntryLoc(const MachineInstr &MI, LexicalScopes &LS,
+ static VarLoc CreateEntryLoc(const MachineInstr &MI,
const DIExpression *EntryExpr, Register Reg) {
- VarLoc VL(MI, LS);
+ VarLoc VL(MI);
assert(VL.Locs.size() == 1 &&
VL.Locs[0].Kind == MachineLocKind::RegisterKind);
VL.EVKind = EntryValueLocKind::EntryValueKind;
@@ -452,9 +452,8 @@ private:
/// location will turn into the normal location if the backup is valid at
/// the time of the primary location clobbering.
static VarLoc CreateEntryBackupLoc(const MachineInstr &MI,
- LexicalScopes &LS,
const DIExpression *EntryExpr) {
- VarLoc VL(MI, LS);
+ VarLoc VL(MI);
assert(VL.Locs.size() == 1 &&
VL.Locs[0].Kind == MachineLocKind::RegisterKind);
VL.EVKind = EntryValueLocKind::EntryValueBackupKind;
@@ -466,10 +465,9 @@ private:
/// function entry), and build a copy of an entry value backup location by
/// setting the register location to NewReg.
static VarLoc CreateEntryCopyBackupLoc(const MachineInstr &MI,
- LexicalScopes &LS,
const DIExpression *EntryExpr,
Register NewReg) {
- VarLoc VL(MI, LS);
+ VarLoc VL(MI);
assert(VL.Locs.size() == 1 &&
VL.Locs[0].Kind == MachineLocKind::RegisterKind);
VL.EVKind = EntryValueLocKind::EntryValueCopyBackupKind;
@@ -1344,7 +1342,7 @@ void VarLocBasedLDV::transferDebugValue(const MachineInstr &MI,
MO.isCImm();
})) {
// Use normal VarLoc constructor for registers and immediates.
- VarLoc VL(MI, LS);
+ VarLoc VL(MI);
// End all previous ranges of VL.Var.
OpenRanges.erase(VL);
@@ -1357,7 +1355,7 @@ void VarLocBasedLDV::transferDebugValue(const MachineInstr &MI,
// This must be an undefined location. If it has an open range, erase it.
assert(MI.isUndefDebugValue() &&
"Unexpected non-undef DBG_VALUE encountered");
- VarLoc VL(MI, LS);
+ VarLoc VL(MI);
OpenRanges.erase(VL);
}
}
@@ -1407,7 +1405,7 @@ void VarLocBasedLDV::emitEntryValues(MachineInstr &MI,
continue;
const VarLoc &EntryVL = VarLocIDs[EntryValBackupIDs->back()];
- VarLoc EntryLoc = VarLoc::CreateEntryLoc(EntryVL.MI, LS, EntryVL.Expr,
+ VarLoc EntryLoc = VarLoc::CreateEntryLoc(EntryVL.MI, EntryVL.Expr,
EntryVL.Locs[0].Value.RegNo);
LocIndices EntryValueIDs = VarLocIDs.insert(EntryLoc);
assert(EntryValueIDs.size() == 1 &&
@@ -1777,7 +1775,7 @@ void VarLocBasedLDV::transferRegisterCopy(MachineInstr &MI,
if (VL.isEntryValueBackupReg(SrcReg)) {
LLVM_DEBUG(dbgs() << "Copy of the entry value: "; MI.dump(););
VarLoc EntryValLocCopyBackup =
- VarLoc::CreateEntryCopyBackupLoc(VL.MI, LS, VL.Expr, DestReg);
+ VarLoc::CreateEntryCopyBackupLoc(VL.MI, VL.Expr, DestReg);
// Stop tracking the original entry value.
OpenRanges.erase(VL);
@@ -2090,7 +2088,7 @@ void VarLocBasedLDV::recordEntryValue(const MachineInstr &MI,
// valid. It is valid until a parameter is not changed.
DIExpression *NewExpr =
DIExpression::prepend(MI.getDebugExpression(), DIExpression::EntryValue);
- VarLoc EntryValLocAsBackup = VarLoc::CreateEntryBackupLoc(MI, LS, NewExpr);
+ VarLoc EntryValLocAsBackup = VarLoc::CreateEntryBackupLoc(MI, NewExpr);
LocIndices EntryValLocIDs = VarLocIDs.insert(EntryValLocAsBackup);
OpenRanges.insert(EntryValLocIDs, EntryValLocAsBackup);
}