[llvm] [SelectionDAG] Avoid repeated hash lookups (NFC) (PR #128999)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 21:36:54 PST 2025


================
@@ -343,9 +343,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
     for (auto &KV : EHInfo.UnwindDestToSrcs) {
       const auto *Dest = cast<const BasicBlock *>(KV.first);
       MachineBasicBlock *DestMBB = getMBB(Dest);
-      UnwindDestToSrcs[DestMBB] = SmallPtrSet<BBOrMBB, 4>();
+      auto &Srcs = UnwindDestToSrcs[DestMBB];
+      Srcs = SmallPtrSet<BBOrMBB, 4>();
----------------
kazutakahirata wrote:

Addressed in the latest revision.

https://github.com/llvm/llvm-project/pull/128999


More information about the llvm-commits mailing list