mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 05:06:07 +00:00
[MCA] Avoid repeated hash lookups (NFC) (#110622)
This commit is contained in:
parent
0089f39e0f
commit
d50d9613e3
@ -665,8 +665,9 @@ InstrBuilder::getOrCreateInstrDesc(const MCInst &MCI,
|
||||
SchedClassID = *VariantSchedClassIDOrErr;
|
||||
|
||||
auto VDKey = std::make_pair(hashMCInst(MCI), SchedClassID);
|
||||
if (VariantDescriptors.contains(VDKey))
|
||||
return *VariantDescriptors[VDKey];
|
||||
auto It = VariantDescriptors.find(VDKey);
|
||||
if (It != VariantDescriptors.end())
|
||||
return *It->second;
|
||||
|
||||
return createInstrDescImpl(MCI, IVec);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user