[clang] [TableGen] Avoid repeated map lookups (NFC) (PR #108675)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 13 20:24:16 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/108675.diff
1 Files Affected:
- (modified) clang/utils/TableGen/NeonEmitter.cpp (+1-3)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/108675
More information about the cfe-commits
mailing list