[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #108675)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 13 20:23:45 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/108675
None
>From fa4c54d7fbe37e66b66ceceb124a9136460dd42c Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 13 Sep 2024 09:38:21 -0700
Subject: [PATCH] [TableGen] Avoid repeated map lookups (NFC)
---
clang/utils/TableGen/NeonEmitter.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/utils/TableGen/NeonEmitter.cpp b/clang/utils/TableGen/NeonEmitter.cpp
index 9e5480be20adac..82148f98d04fcc 100644
--- a/clang/utils/TableGen/NeonEmitter.cpp
+++ b/clang/utils/TableGen/NeonEmitter.cpp
@@ -2155,9 +2155,7 @@ void NeonEmitter::genOverloadTypeCheckCode(raw_ostream &OS,
}
if (Mask) {
- std::string Name = Def->getMangledName();
- OverloadMap.insert(std::make_pair(Name, OverloadInfo()));
- OverloadInfo &OI = OverloadMap[Name];
+ OverloadInfo &OI = OverloadMap[Def->getMangledName()];
OI.Mask |= Mask;
OI.PtrArgNum |= PtrArgNum;
OI.HasConstPtr = HasConstPtr;
More information about the cfe-commits
mailing list