[PATCH] D140258: [LiveDebugValues] Remove LexicalScope param from VarLoc (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 21:18:35 PST 2022
aheejin created this revision.
aheejin added a reviewer: vsk.
Herald added subscribers: wingo, hiraditya.
Herald added a project: All.
aheejin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
It doesn't seem to be used anymore.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140258
Files:
llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
Index: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
===================================================================
--- llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+++ llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
@@ -386,7 +386,7 @@
/// 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 @@
/// 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 @@
/// 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 @@
/// 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 @@
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 @@
// 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 @@
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 @@
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 @@
// 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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140258.483719.patch
Type: text/x-patch
Size: 4203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221217/617a9a39/attachment.bin>
More information about the llvm-commits
mailing list