Skip to content

Commit 333dd5e

Browse files
kazutakahiratajoaosaffran
authored and
joaosaffran
committed
[SelectionDAG] Avoid repeated hash lookups (NFC) (llvm#128999)
1 parent 2be9317 commit 333dd5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
343343
for (auto &KV : EHInfo.UnwindDestToSrcs) {
344344
const auto *Dest = cast<const BasicBlock *>(KV.first);
345345
MachineBasicBlock *DestMBB = getMBB(Dest);
346-
UnwindDestToSrcs[DestMBB] = SmallPtrSet<BBOrMBB, 4>();
346+
auto &Srcs = UnwindDestToSrcs[DestMBB];
347347
for (const auto P : KV.second)
348-
UnwindDestToSrcs[DestMBB].insert(getMBB(cast<const BasicBlock *>(P)));
348+
Srcs.insert(getMBB(cast<const BasicBlock *>(P)));
349349
}
350350
EHInfo.UnwindDestToSrcs = std::move(UnwindDestToSrcs);
351351
}

0 commit comments

Comments
 (0)