[all-commits] [llvm/llvm-project] a8a494: [SmallPtrSet] Remove SmallArray member (NFC) (#118...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Nov 30 01:21:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8a494faab8af60754c4647dbb7b24bc86a80aab
      https://github.com/llvm/llvm-project/commit/a8a494faab8af60754c4647dbb7b24bc86a80aab
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-11-30 (Sat, 30 Nov 2024)

  Changed paths:
    M llvm/include/llvm/ADT/SmallPtrSet.h
    M llvm/lib/Support/SmallPtrSet.cpp

  Log Message:
  -----------
  [SmallPtrSet] Remove SmallArray member (NFC) (#118099)

Currently SmallPtrSet stores CurArray and SmallArray, with the former
pointing to the latter in small representation. Instead, only use
CurArray and a separate IsSmall boolean.

Most of the implementation doesn't need the separate SmallArray member
-- we only need it for copy/move/swap operations, where we may switch
back from large to small representation. In those cases, we explicitly
pass down the pointer to SmallStorage.

This reduces the size of SmallPtrSet and improves compile-time.



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