Skip to content

[CodeGen] Avoid repeated hash lookups (NFC) #129465

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,10 +1359,9 @@ void VarLocBasedLDV::removeEntryValue(const MachineInstr &MI,
return;

// Try to get non-debug instruction responsible for the DBG_VALUE.
const MachineInstr *TransferInst = nullptr;
Register Reg = MI.getDebugOperand(0).getReg();
if (Reg.isValid() && RegSetInstrs.contains(Reg))
TransferInst = RegSetInstrs.find(Reg)->second;
const MachineInstr *TransferInst =
Reg.isValid() ? RegSetInstrs.lookup(Reg) : nullptr;

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