Skip to content

Commit fca3dd6

Browse files
committed
Updated per review
1 parent 1a55770 commit fca3dd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ void MachineLateInstrsCleanup::clearKillsForDef(Register Reg,
144144
// be ok to stop after removing that (and any other) kill-flag, but it
145145
// doesn't seem noticeably faster while it would be a bit more complicated.
146146
Reg2MIVecMap &MBBKills = RegKills[MBB->getNumber()];
147-
if (MBBKills.contains(Reg))
148-
for (auto *KillMI : MBBKills[Reg])
147+
if (auto Kills = MBBKills.find(Reg); Kills != MBBKills.end())
148+
for (auto *KillMI : Kills->second)
149149
KillMI->clearRegisterKills(Reg, TRI);
150150

151151
// Definition in current MBB: done.

0 commit comments

Comments
 (0)