[all-commits] [llvm/llvm-project] a78b19: [IR] Use SmallSet with more inline elements in dro...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Mon Jul 15 09:19:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a78b19d8ea513a2e88fa431b549b65406384a12d
https://github.com/llvm/llvm-project/commit/a78b19d8ea513a2e88fa431b549b65406384a12d
Author: Kazu Hirata <kazu at google.com>
Date: 2024-07-15 (Mon, 15 Jul 2024)
Changed paths:
M llvm/lib/IR/Metadata.cpp
Log Message:
-----------
[IR] Use SmallSet with more inline elements in dropUnknownNonDebugMetadata (NFC) (#98853)
SmallSet here often ends up allocating memory via std::set inside
SmallSet because KnownIDs.size() goes up to 17 on an x86 host. This
patch switches to SmallSet<unsigned, 32> to avoid memory
allocations.
The increased inline elements here save 0.57% of heap allocations during
the compilation of X86ISelLowering.cpp.ii, a preprocessed version of
X86ISelLowering.cpp.
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