[llvm] f4b1335 - [Mips] Avoid repeated map lookups (NFC) (#110075)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 07:58:13 PDT 2024


Author: Kazu Hirata
Date: 2024-09-26T07:58:09-07:00
New Revision: f4b1335b8921013ef0e45976cab0bc9e4e44f0ee

URL: https://github.com/llvm/llvm-project/commit/f4b1335b8921013ef0e45976cab0bc9e4e44f0ee
DIFF: https://github.com/llvm/llvm-project/commit/f4b1335b8921013ef0e45976cab0bc9e4e44f0ee.diff

LOG: [Mips] Avoid repeated map lookups (NFC) (#110075)

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsAsmPrinter.cpp

Removed: 
    


################################################################################
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