[all-commits] [llvm/llvm-project] 69dbf4: [Sema] Avoid repeated hash lookups (NFC) (#109375)
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Fri Sep 20 07:55:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 69dbf468bf0beb87e2a8d9f9f597296d642028d6
https://github.com/llvm/llvm-project/commit/69dbf468bf0beb87e2a8d9f9f597296d642028d6
Author: Kazu Hirata <kazu at google.com>
Date: 2024-09-20 (Fri, 20 Sep 2024)
Changed paths:
M clang/include/clang/Sema/SemaObjC.h
M clang/lib/Sema/SemaDeclObjC.cpp
Log Message:
-----------
[Sema] Avoid repeated hash lookups (NFC) (#109375)
GlobalMethodPool, the type of MethodPool, is a type wrapping DenseMap
and exposes only a subset of the DenseMap methods.
This patch adds operator[] to GlobalMethodPool so that we can avoid
repeated hash lookups. I don't bother using references or rvalue
references in operator[] because Selector, the key type, is small and
trivially copyable. Note that Selector is a class that wraps a
PointerUnion.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list