Skip to content

Commit f4b1335

Browse files
[Mips] Avoid repeated map lookups (NFC) (#110075)
1 parent f342134 commit f4b1335

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Target/Mips/MipsAsmPrinter.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,8 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
8181

8282
MipsFI = MF.getInfo<MipsFunctionInfo>();
8383
if (Subtarget->inMips16Mode())
84-
for (const auto &I : MipsFI->StubsNeeded) {
85-
const char *Symbol = I.first;
86-
const Mips16HardFloatInfo::FuncSignature *Signature = I.second;
87-
if (StubsNeeded.find(Symbol) == StubsNeeded.end())
88-
StubsNeeded[Symbol] = Signature;
89-
}
84+
for (const auto &I : MipsFI->StubsNeeded)
85+
StubsNeeded.insert(I);
9086
MCP = MF.getConstantPool();
9187

9288
// In NaCl, all indirect jump targets must be aligned to bundle size.

0 commit comments

Comments
 (0)