[all-commits] [llvm/llvm-project] ca59c6: [Allocator] Drop RedZoneSize (non-sanitizer) and B...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Jun 27 19:16:18 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ca59c69132eef55cc42bf8854706590dfddf5584
https://github.com/llvm/llvm-project/commit/ca59c69132eef55cc42bf8854706590dfddf5584
Author: Fangrui Song <i at maskray.me>
Date: 2026-06-28 (Sun, 28 Jun 2026)
Changed paths:
M clang-tools-extra/clangd/CompileCommands.cpp
M clang/unittests/Lex/PPMemoryAllocationsTest.cpp
M lldb/include/lldb/Utility/ConstString.h
M lldb/source/Target/Statistics.cpp
M lldb/source/Utility/ConstString.cpp
M lldb/test/API/commands/statistics/basic/TestStats.py
M llvm/include/llvm/Support/Allocator.h
M llvm/include/llvm/Support/PerThreadBumpPtrAllocator.h
M llvm/lib/Support/Allocator.cpp
M llvm/lib/TableGen/Record.cpp
M llvm/tools/llubi/lib/Context.cpp
M llvm/tools/llubi/lib/Context.h
M llvm/unittests/ADT/ConcurrentHashtableTest.cpp
M llvm/unittests/DebugInfo/MSF/MappedBlockStreamTest.cpp
M llvm/unittests/Support/AllocatorTest.cpp
M llvm/unittests/Support/PerThreadBumpPtrAllocatorTest.cpp
M llvm/unittests/Support/ThreadSafeAllocatorTest.cpp
Log Message:
-----------
[Allocator] Drop RedZoneSize (non-sanitizer) and BytesAllocated members (#205711)
`RedZoneSize` is only read inside `#if LLVM_ADDRESS_SANITIZER_BUILD`.
Additionally gate it under `LLVM_ENABLE_ABI_BREAKING_CHECKS` so that
release-non-assertions builds don't incur the overhead. To support
non-asan build with asan library users, the variable is only omitted in
`!LLVM_ENABLE_ABI_BREAKING_CHECKS` builds.
`BytesAllocated` is incremented on every Allocate (a hot-path memory
read-modify-write) only to back `getBytesAllocated()`. Drop the member.
There is a measurable stage2 instruction-count reduction.
https://llvm-compile-time-tracker.com/compare.php?from=25a6b5be6853b2c493ef392d41e43dd35ad4839a&to=8ebc975635ad717deb392d20b50f1a1f6bb16054&stat=instructions:u
Migrate the in-tree consumers:
- TableGen dumpAllocationStats drops the line; the clangd debug log
reports
getTotalMemory().
- clang's PPMemoryAllocationsTest measures getTotalMemory()/#define;
over 1M
defines this is 120.06 B/define, matching the prior ~120 B, so the
existing
bound holds.
- lldb's ConstString MemoryStats (https://reviews.llvm.org/D117914)
drops bytes_used/bytes_unused
Aided by Claude Opus 4.8
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