[llvm] 4eef3de - [Mips] Avoid repeated hash lookups (NFC) (#129420)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 2 01:11:26 PST 2025
Author: Kazu Hirata
Date: 2025-03-02T01:11:23-08:00
New Revision: 4eef3de58840a62042d727a764c73ae2edc98c8f
URL: https://github.com/llvm/llvm-project/commit/4eef3de58840a62042d727a764c73ae2edc98c8f
DIFF: https://github.com/llvm/llvm-project/commit/4eef3de58840a62042d727a764c73ae2edc98c8f.diff
LOG: [Mips] Avoid repeated hash lookups (NFC) (#129420)
Added:
Modified:
llvm/lib/Target/Mips/Mips16ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Mips/Mips16ISelLowering.cpp b/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
index d97f59b5b2c76..1027bcff84f8c 100644
--- a/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
+++ b/llvm/lib/Target/Mips/Mips16ISelLowering.cpp
@@ -435,9 +435,8 @@ getOpndList(SmallVectorImpl<SDValue> &Ops,
Mips16IntrinsicHelperType IntrinsicFind = { Symbol, "" };
const Mips16HardFloatInfo::FuncSignature *Signature =
Mips16HardFloatInfo::findFuncSignature(Symbol);
- if (!IsPICCall && (Signature && (FuncInfo->StubsNeeded.find(Symbol) ==
- FuncInfo->StubsNeeded.end()))) {
- FuncInfo->StubsNeeded[Symbol] = Signature;
+ if (!IsPICCall && Signature &&
+ FuncInfo->StubsNeeded.try_emplace(Symbol, Signature).second) {
//
// S2 is normally saved if the stub is for a function which
// returns a float or double value and is not otherwise. This is
More information about the llvm-commits
mailing list