llvm-project
69dbf468 - [Sema] Avoid repeated hash lookups (NFC) (#109375)

Commit
1 year ago
[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.
Parents
Loading