Skip to content

Commit f6b4e03

Browse files
Use lookup.
1 parent 85e4493 commit f6b4e03

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,11 +1359,9 @@ void VarLocBasedLDV::removeEntryValue(const MachineInstr &MI,
13591359
return;
13601360

13611361
// Try to get non-debug instruction responsible for the DBG_VALUE.
1362-
const MachineInstr *TransferInst = nullptr;
13631362
Register Reg = MI.getDebugOperand(0).getReg();
1364-
if (Reg.isValid())
1365-
if (auto It = RegSetInstrs.find(Reg); It != RegSetInstrs.end())
1366-
TransferInst = It->second;
1363+
const MachineInstr *TransferInst =
1364+
Reg.isValid() ? RegSetInstrs.lookup(Reg) : nullptr;
13671365

13681366
// Case of the parameter's DBG_VALUE at the start of entry MBB.
13691367
if (!TransferInst && !LastNonDbgMI && MI.getParent()->isEntryBlock())

0 commit comments

Comments
 (0)