[llvm] [Mips] Avoid repeated map lookups (NFC) (PR #110075)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 20:21:03 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110075
None
>From 5100a804f27d3e6c45fbfa99e1e7a5c5c0eae414 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 25 Sep 2024 06:36:37 -0700
Subject: [PATCH] [Mips] Avoid repeated map lookups (NFC)
---
llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index e267a6d0844c64..f4af1d08dde5da 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -81,12 +81,8 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
MipsFI = MF.getInfo<MipsFunctionInfo>();
if (Subtarget->inMips16Mode())
- for (const auto &I : MipsFI->StubsNeeded) {
- const char *Symbol = I.first;
- const Mips16HardFloatInfo::FuncSignature *Signature = I.second;
- if (StubsNeeded.find(Symbol) == StubsNeeded.end())
- StubsNeeded[Symbol] = Signature;
- }
+ for (const auto &I : MipsFI->StubsNeeded)
+ StubsNeeded.insert(I);
MCP = MF.getConstantPool();
// In NaCl, all indirect jump targets must be aligned to bundle size.
More information about the llvm-commits
mailing list