Skip to content

Commit f6ac7c2

Browse files
kazutakahirataSterling-Augustine
authored andcommitted
[Mips] Avoid repeated map lookups (NFC) (llvm#110075)
1 parent 41b0431 commit f6ac7c2

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)