LLVM/project f76a202 — bolt/lib/Passes IdenticalCodeFolding.cpp, bolt/test/AArch64 icf-negate-ra-state.s

[BOLT] Compare unwind and EH state in ICF (#244049)

ICF compared a CFI pseudo instruction only by its operand, an index into
the frame instruction table of its own function, but not by the frame
instruction behind it. It did not compare the rules in effect at the
entry (CIE initial instructions plus FDE instructions before the first
advance), as these don't end up in pseudo instructions. ICF also doesn't
compare the personality routine, whether the function has an LSDA, the
AArch64 return address signing state, or DW_CFA_GNU_args_size. For all
of these, BOLT keeps them outside the instruction stream. Since ICF
compares functions instruction by instruction, by opcode and operands,
and MCPlusBuilder::equals() skips annotations, so any state kept in
function fields or annotations is only compared when ICF checks for it
explicitly, like for landing pads and LSDA tables.

If two functions with identical code but different unwind info were
folded, the folded function would then always unwind with the rules of
the selected function, which could be wrong sometimes.


    [12 lines not shown]
DeltaFile
+243-0bolt/test/X86/icf-eh-state.s
+186-0bolt/test/X86/icf-cfi.s
+157-0bolt/test/AArch64/icf-negate-ra-state.s
+112-1bolt/lib/Passes/IdenticalCodeFolding.cpp
+698-14 files

LLVM/project 438f15b — lldb/source/API SBEvent.cpp SBInstruction.cpp

[lldb] Intern debugger-owned SB API strings in the debugger pool (#244348)

Intern strings returned by SB classes that belong to a debugger in that
debugger's pool (which currently is still the global pool).

GetDebuggerStringPool is a helper that takes a Target by reference, so
no getter can ask for a debugger's pool without a target. That was
intentional, to force the caller to think about that (and intern the
string in the global pool), making it easy to use the API correctly and
hard to do so incorrectly.

Assisted-by: Claude
DeltaFile
+22-14lldb/source/API/SBCommandInterpreter.cpp
+22-5lldb/source/API/SBValue.cpp
+14-8lldb/source/API/SBBreakpointName.cpp
+12-8lldb/source/API/SBProcess.cpp
+11-3lldb/source/API/SBInstruction.cpp
+7-5lldb/source/API/SBEvent.cpp
+88-438 files not shown
+136-6114 files

LLVM/project 58567f5 — utils/bazel/llvm-project-overlay/libc BUILD.bazel, utils/bazel/llvm-project-overlay/libc/src/__support BUILD.bazel

[Bazel] Fixes c14928b (#244398)

This fixes c14928b15f20ca5039342eaa4dc6cd22079cbdf2 (#243955).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=c14928b15f20ca5039342eaa4dc6cd22079cbdf2

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+15-0utils/bazel/llvm-project-overlay/libc/src/stdlib/BUILD.bazel
+10-0utils/bazel/llvm-project-overlay/libc/test/src/stdlib/BUILD.bazel
+5-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+3-0utils/bazel/llvm-project-overlay/libc/src/__support/BUILD.bazel
+33-04 files

LLVM/project b9ad60a — clang/cmake/caches Fuchsia.cmake Fuchsia-stage2.cmake

[CMake][Fuchsia] Set libc++ hardening mode explicitly (#244380)

This restores the behavior prior to #223854 due to CMP0126.
DeltaFile
+5-0clang/cmake/caches/Fuchsia-stage2.cmake
+2-0clang/cmake/caches/Fuchsia.cmake
+7-02 files

FreeBSD/ports 5533b59 — net/otelcol-contrib Makefile

net/otelcol-contrib: follow the arch naming convention

Bump PORTREVISION.
DeltaFile
+3-2net/otelcol-contrib/Makefile
+3-21 files

FreeBSD/ports df12d34 — editors/vscode Makefile, textproc/obsidian Makefile

*/*: Bump port revision after electron43 update (d88f46d28143)
DeltaFile
+1-1x11/tabby/Makefile
+1-1textproc/obsidian/Makefile
+1-0editors/vscode/Makefile
+3-23 files

FreeBSD/ports d88f46d — devel/electron43 distinfo, devel/electron43/files patch-third__party_blink_renderer_core_frame_web__frame__test.cc patch-third__party_blink_renderer_core_page_context__menu__controller.cc

devel/electron43: Update to 43.8.12

Changelog:
- https://github.com/electron/electron/releases/tag/v43.8.11
- https://github.com/electron/electron/releases/tag/v43.8.12

Reported by:    GitHub (watch releases)
DeltaFile
+7-7devel/electron43/distinfo
+5-5devel/electron43/files/patch-third__party_blink_renderer_platform_runtime__enabled__features.json5
+5-5devel/electron43/files/patch-media_base_media__switches.h
+4-4devel/electron43/files/patch-third__party_blink_renderer_core_page_context__menu__controller.cc
+4-4devel/electron43/files/patch-base_allocator_partition__allocator_src_partition__alloc_partition__root.cc
+3-3devel/electron43/files/patch-third__party_blink_renderer_core_frame_web__frame__test.cc
+28-287 files not shown
+43-4313 files

LLVM/project 7764376 — llvm/lib/Target/AArch64 AArch64MacroFusion.cpp, llvm/test/CodeGen/AArch64 misched-fusion-fmin-fmax.ll misched-fusion-fmin-fmax-pre-ra.mir

[AArch64] Cluster NM form FMINNM/FMAXNM too (#239222)

Adding positive tests for the entire matrix because their I believe
their count is still reasonable while getting full coverage, plus
representative cases for the negative mixed kinds. Also move kind enum
to an anonymous namespace (slipped through in the previous patch).
DeltaFile
+977-2llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-post-ra.mir
+464-2llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax-pre-ra.mir
+381-1llvm/test/CodeGen/AArch64/misched-fusion-fmin-fmax.ll
+24-3llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
+1,846-84 files

FreeBSD/src ba04542 — tests/sys/kern ssl_sendfile.c

tests/ssl_sendfile: size socket buffers before connecting

The :grow, :truncate and :eagain_vs_eof cases rely on the socket buffers
filling up before the whole file has been sent. :grow and :truncate shrank
SO_SNDBUF and SO_RCVBUF only after the connection was established, when
the receiver had already advertised a window based on the default buffer
size; TCP does not shrink an advertised window. :eagain_vs_eof used the
default, autosized buffers. With a large net.inet.tcp.recvspace, or once
autosizing has grown the buffers, the whole 2 MB file fits in the socket
buffers:

  :grow and :truncate: sendfile(2) returns before the file is resized, and
the poll loop that waits for the sender to block spins forever on a
writable socket.
  :eagain_vs_eof: the loop that keeps writing until
EAGAIN never sees it, since sendfile(2) returns 0 at EOF.

Either way kyua reports a timeout, which is why doubling the timeouts did
not help. Apply a 128 KB buffer size to the listening socket, which the

    [12 lines not shown]
DeltaFile
+15-17tests/sys/kern/ssl_sendfile.c
+15-171 files

LLVM/project 08a4e35 — llvm/include/llvm/Support KnownFPClass.h, llvm/lib/Analysis ValueTracking.cpp

[KnownFPClass] Add KnownFPClass::fadd(x, CRHS) to rule out subnormal results (#237966)

Add KnownFPClass::fadd(x, CRHS) to rule out subnormal results when the
CRHS is normal and abs(CRHS) > 2^(expMin + precision - 1). Use this
overload in ValueTracking.

Fixes #234364
DeltaFile
+212-0llvm/test/Transforms/Attributor/nofpclass-fadd-fsub.ll
+26-0llvm/test/Transforms/Attributor/nofpclass-constrained-fadd-fsub.ll
+26-0llvm/lib/Support/KnownFPClass.cpp
+8-2llvm/lib/Analysis/ValueTracking.cpp
+2-2llvm/test/Transforms/InstCombine/fadd.ll
+3-0llvm/include/llvm/Support/KnownFPClass.h
+277-46 files

NetBSD/pkgsrc-wip 4c61631 — nss PLIST Makefile, nss/patches patch-me patch-nss_coreconf_nsinstall_Makefile

nss: add 4.134 update
DeltaFile
+213-0nss/Makefile
+142-0nss/PLIST
+28-0nss/patches/patch-mn
+26-0nss/patches/patch-md
+24-0nss/patches/patch-nss_coreconf_nsinstall_Makefile
+18-0nss/patches/patch-me
+451-012 files not shown
+590-018 files

LLVM/project 7c48fb0 — lldb/source/Plugins/Instruction/RISCV EmulateInstructionRISCV.cpp, lldb/unittests/Instruction/RISCV TestRISCVEmulator.cpp TestRiscvInstEmulation.cpp

[lldb][RISCV] Instruction emulation should ignore bare sc.w/d (#244082)

RV32A/RV64A does compare-and-swap with a sequence like (example from
docs.riscv.org)

```
        # a0 holds address of memory location
        # a1 holds expected value
        # a2 holds desired value
        # a0 holds return value, 0 if successful, !0 otherwise
    cas:
        lr.w t0, (a0)        # Load original value.
        bne t0, a1, fail     # Doesn't match, so fail.
        sc.w t0, a2, (a0)    # Try to update.
        bnez t0, cas         # Retry if store-conditional failed.
        li a0, 0             # Set return to success.
        jr ra                # Return.
    fail:
        li a0, 1             # Set return to failure.

    [17 lines not shown]
DeltaFile
+69-0lldb/unittests/Instruction/RISCV/TestRiscvInstEmulation.cpp
+5-6lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+7-0lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
+81-63 files

FreeBSD/ports ac3da27 — sysutils/restic Makefile distinfo

sysutils/restic: Update to 0.20.0

ChangeLog:      https://github.com/restic/restic/releases/tag/v0.20.0
MFH:            2026Q4
DeltaFile
+5-5sysutils/restic/distinfo
+1-2sysutils/restic/Makefile
+6-72 files

SmartOS/live c8296e7 — . README.md

README: running a Nix build wider than one package at a time

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+10-0README.md
+10-01 files

LLVM/project 6a7ec42 — llvm/lib/DWARFLinker/Classic DWARFLinkerDeclContext.cpp, llvm/test/tools/dsymutil/Inputs compilation-prefix-map-odr.s

[dsymutil] Undo prefix mapping before resolving paths for ODR uniquing

The classic linker resolves the declaration file of a type with
realpath() to tell apart types with the same name, line and size. For
paths remapped by compilation caching, which don't exist on disk,
realpath() fails and only the file name is left, so different types
declared in headers with the same name in different directories were
merged. Undo the prefix mapping from compilation-prefix-map.json first.
DeltaFile
+679-0llvm/test/tools/dsymutil/Inputs/compilation-prefix-map-odr.s
+47-0llvm/test/tools/dsymutil/X86/compilation-prefix-map-odr.test
+3-0llvm/lib/DWARFLinker/Classic/DWARFLinkerDeclContext.cpp
+729-03 files

LLVM/project 376e34f — llvm/lib/DWARFLinker/Classic DWARFLinker.cpp, llvm/test/tools/dsymutil/Inputs swift-interface-prefix-map.s compilation-prefix-map.s

[dsymutil] Support compilation-prefix-map.json from compilation caching

Compilation caching can prefix map the paths that the compiler sees, so
that cache keys don't depend on where the build happens, for example
/path/to/project becomes /^src. The build system records the mapping in
a compilation-prefix-map.json file in a parent directory of the object
files, as a JSON object from each remapped prefix to the original one.

dsymutil didn't support it, so it used the remapped paths from the
debug info as is: it failed to copy the Swift interfaces that the debug
info refers to, didn't recognize interfaces from the SDK or the
toolchain that it should skip, and wrote the remapped paths into the
dSYM.

Load the compilation-prefix-map.json closest to each object file, and
use it to find Swift interfaces and Clang modules, and to restore the
original paths in the path attributes and line tables of the linked
debug info. Clang modules use the map of the object file that refers to
them. -object-prefix-map still only applies to looking up Clang

    [6 lines not shown]
DeltaFile
+349-0llvm/test/tools/dsymutil/Inputs/compilation-prefix-map.s
+262-0llvm/test/tools/dsymutil/Inputs/swift-interface-prefix-map.s
+70-0llvm/test/tools/dsymutil/X86/swift-interface-prefix-map.test
+58-0llvm/test/tools/dsymutil/X86/compilation-prefix-map.test
+52-0llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+36-14llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+827-1412 files not shown
+972-5718 files

LLVM/project 6f0ff78 — lldb/source/DataFormatters FormatManager.cpp, lldb/source/Plugins/Language/CPlusPlus CPlusPlusLanguage.cpp

[lldb] Let language plugins add formatter candidate languages (#244347)

This patch adds Language::GetAdditionalFormatterLanguages(), which
FormatManager::GetCandidateLanguages() asks every language plugin. A
plugin can use it to apply its formatters to values of another language,
or to apply the formatters of another language to its own values.

Assisted-by: Claude
DeltaFile
+68-16lldb/unittests/DataFormatter/FormatManagerTests.cpp
+9-14lldb/source/DataFormatters/FormatManager.cpp
+15-0lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
+14-0lldb/unittests/Language/ObjC/ObjCLanguageTest.cpp
+11-0lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
+10-0lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+127-304 files not shown
+147-3010 files

LLVM/project 87564ad — libc/src/__support/OSUtil/linux/syscall_wrappers unshare.h, libc/src/sched unshare.h

[libc] Implement unshare (#244039)

Unshare is a linux specific syscall wrapper. This PR adds an
implementation and tests.

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+34-0libc/src/__support/OSUtil/linux/syscall_wrappers/unshare.h
+33-0libc/src/sched/linux/unshare.cpp
+27-0libc/test/src/sched/unshare_test.cpp
+25-0libc/src/sched/unshare.h
+15-0libc/src/sched/linux/CMakeLists.txt
+13-0libc/test/src/sched/CMakeLists.txt
+147-07 files not shown
+178-013 files

LLVM/project 744a6f8 — lldb/unittests/API CMakeLists.txt SBTypeSyntheticTest.cpp

[lldb] Fix operator!= on invalid SB type formatter objects (#244360)

With an invalid left operand, operator!= returned the result of
operator==.

Assisted-by: Claude
DeltaFile
+25-0lldb/unittests/API/SBTypeFilterTest.cpp
+25-0lldb/unittests/API/SBTypeFormatTest.cpp
+25-0lldb/unittests/API/SBTypeNameSpecifierTest.cpp
+25-0lldb/unittests/API/SBTypeSummaryTest.cpp
+9-0lldb/unittests/API/SBTypeSyntheticTest.cpp
+4-0lldb/unittests/API/CMakeLists.txt
+113-05 files not shown
+118-511 files

LLVM/project 290263a — mlir/docs SPIRVToLLVMDialectConversion.md, mlir/lib/Conversion/SPIRVToLLVM SPIRVToLLVM.cpp

[mlir][SPIR-V] Add SPIRVToLLVM conversion for array and struct constants (#243896)

Arrays of scalars lower to a single llvm.mlir.constant, other aggregates
to llvm.insertvalue chains

This also enables array and struct spirv.Variable initializers
DeltaFile
+89-4mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+35-0mlir/test/Conversion/SPIRVToLLVM/constant-op-to-llvm.mlir
+11-0mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
+5-5mlir/docs/SPIRVToLLVMDialectConversion.md
+140-94 files

LLVM/project 0546b33 — llvm/include/llvm/Support PrefixMapper.h, llvm/lib/Support PrefixMapper.cpp

Address review feedback
DeltaFile
+3-3llvm/include/llvm/Support/PrefixMapper.h
+2-2llvm/lib/Support/PrefixMapper.cpp
+5-52 files

LLVM/project 24b9400 — llvm/include/llvm/Support PrefixMapper.h, llvm/lib/Support PrefixMapper.cpp

[Support] Address PrefixMapper review feedback

Match a mapping whose Old ends with a separator, such as "/=/new" or
"/old/=/new", against paths below it; it used to match only the exact
path. Append the rest of the path with its leading separator intact, so
Windows paths keep their separators: "C:/old/a" now maps to "C:/new/a"
instead of "C:/new\a".

Make the map functions const, document how separators are matched and
joined, test separators, sort() and addInverseRange(), and drop the
unused StringSaver references.
DeltaFile
+101-9llvm/unittests/Support/PrefixMapperTest.cpp
+22-12llvm/include/llvm/Support/PrefixMapper.h
+12-12llvm/lib/Support/PrefixMapper.cpp
+135-333 files

LLVM/project a4c63c6 — llvm/include/llvm/Support VirtualFileSystem.h, llvm/lib/Support VirtualFileSystem.cpp

[Support] Add vfs::findFileInParentDirectories()

Several tools look for a file in a directory and its parent
directories, for example clang-format for .clang-format and clang-tidy
for .clang-tidy, and each has its own loop for that. Add a function for
it, which dsymutil will use to find the compilation-prefix-map.json
files that compilation caching writes.
DeltaFile
+30-0llvm/unittests/Support/VirtualFileSystemTest.cpp
+16-0llvm/lib/Support/VirtualFileSystem.cpp
+11-0llvm/include/llvm/Support/VirtualFileSystem.h
+57-03 files

LLVM/project 0adb0ea — llvm/include/llvm/Support PrefixMapper.h, llvm/lib/Support CMakeLists.txt PrefixMapper.cpp

[Support] Add PrefixMapper

Add a utility for remapping path prefixes, along with MappedPrefix for
parsing "old=new" mappings. Mappings are matched on whole path
components and respect the configured path style, so Windows paths are
matched case- and separator-insensitively.

This will be used by dsymutil to undo the path prefix mapping applied
by compilation caching.
DeltaFile
+355-0llvm/unittests/Support/PrefixMapperTest.cpp
+190-0llvm/lib/Support/PrefixMapper.cpp
+141-0llvm/include/llvm/Support/PrefixMapper.h
+1-0llvm/unittests/Support/CMakeLists.txt
+1-0llvm/lib/Support/CMakeLists.txt
+688-05 files

LLVM/project 4badd34 — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Pack clang::Module's members more tightly

- `Kind` becomes a 4-bit bitfield next to the other flags: `ModuleKind` has 9
  enumerators. The enum gets a fixed `unsigned` underlying type so that the
  bitfield is unsigned on all ABIs.
- `UseExportAsModuleLinkName` becomes a bitfield too.
- `VisibilityID` moves next to `DefinitionLoc`, so that the two 4-byte members
  share an 8-byte slot instead of each being followed by padding.
- `HeaderKindBeginIndex` holds indices into `HeadersStorage`, so it becomes a
  `uint16_t` array, with an assertion against modules with 65535 or more
  headers. The largest module in the scans below has 29.

`sizeof(Module)` goes from 328 to 304 bytes.

Measured with an assertions-disabled Release build of `clang-scan-deps
-format experimental-full -j 20` on 200 TUs (10 TUs importing various SDK
frameworks, each in 20 module context hashes), with an empty module cache and
with one populated by the previous scan. Each of 40 rounds runs the binaries
of the whole series in random order. Peak memory footprint from

    [7 lines not shown]
DeltaFile
+18-12clang/include/clang/Basic/Module.h
+6-6clang/lib/Basic/Module.cpp
+24-182 files

LLVM/project 9131954 — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Track a module's unresolved `export *` separately

Most export declarations in module maps are a plain `export *`, which
doesn't refer to any module and always resolves to a wildcard export. Instead
of storing it in `UnresolvedExports`, whose element is 96 bytes (mostly the
inline storage of the `ModuleId`), record it in a new bit,
`UnresolvedWildcardExport`, and resolve it first in
`ModuleMap::resolveExports()`.

The module statistics come from temporary instrumentation that records, for
every module, the largest size each container reaches and whether each member
is ever set, in the scans measured below; numbers are given as "empty /
populated module cache". The scanner creates 1.89M / 0.38M modules, but only
about 40-55k of them are alive at the same time, since a TU's modules are freed
once it's scanned, so the peak memory goes down by roughly the bytes saved per
module times that.

`UnresolvedWildcardExport` is set in 40.3% / 23.1% of the modules, while the
remaining (named) unresolved exports are used by only 0.4% / 0.3% of them (76%

    [23 lines not shown]
DeltaFile
+23-3clang/include/clang/Basic/Module.h
+15-6clang/lib/Lex/ModuleMap.cpp
+8-1clang/lib/Basic/Module.cpp
+2-1clang/lib/Serialization/ASTReader.cpp
+48-114 files

LLVM/project 34d515a — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Shrink the inline storage of clang::Module's containers

Most of `Module`'s containers reserve inline storage for one or two elements,
or are `std::vector`s (24 bytes instead of 16 for a `SmallVector<T, 0>`), even
though they're empty in almost every module, or almost always hold exactly
one element.

The module statistics come from temporary instrumentation that records, for
every module, the largest size each container reaches and whether each member
is ever set, in the scans measured below; numbers are given as "empty /
populated module cache". The scanner creates 1.89M / 0.38M modules, but only
about 40-55k of them are alive at the same time, since a TU's modules are freed
once it's scanned, so the peak memory goes down by roughly the bytes saved per
module times that.

These get no inline storage:

- `AffectingClangModules`, `DirectUses`, `UndeclaredUses` and `Conflicts`
  are empty in every module of these scans.

    [40 lines not shown]
DeltaFile
+16-16clang/include/clang/Basic/Module.h
+1-1clang/lib/Basic/Module.cpp
+17-172 files

LLVM/project 4e55949 — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Move clang::Module's submodule list out of line

`SubModules` and `SubModuleIndex` take 40 bytes in every module, but only the
modules that have submodules use them. Move them into a
`Module::SubmoduleMembers` struct, stored in a `Module::LazyMembers`.
`submodules()` doesn't allocate the struct for modules without submodules.

The module statistics come from temporary instrumentation that records, for
every module, the largest size each container reaches and whether each member
is ever set, in the scans measured below; numbers are given as "empty /
populated module cache". The scanner creates 1.89M / 0.38M modules, but only
about 40-55k of them are alive at the same time, since a TU's modules are freed
once it's scanned, so the peak memory goes down by roughly the bytes saved per
module times that.

91.4% / 94.5% of the modules are submodules, but most modules are leaves: only
11.4% / 8.5% have submodules (31.2% / 46.8% of the top-level modules, 9.6% /
6.3% of the submodules). The ones that do usually have several: 28% / 24% have
one, 27% / 23% two, and the rest three or more, up to 301. A module without

    [36 lines not shown]
DeltaFile
+31-15clang/include/clang/Basic/Module.h
+3-2clang/lib/Basic/Module.cpp
+34-172 files

LLVM/project b88381e — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Move top-level-only members out of clang::Module

Seven members are only ever set on top-level modules, but take 200 bytes in
every module, and most modules are submodules: `PresumedModuleMapFile`,
`DirectoryDependencies`, `ASTFileName`, `ASTFileKey`, `Signature`,
`APINotesFile` and `ConfigMacros`. Move them into a `Module::TopLevelMembers`
struct, stored in a `Module::LazyMembers` like the rarely used members.

- `ASTFileName`/`ASTFileKey` were already only read and written through
  `getTopLevelModule()`, and `DirectoryDependencies` only written through it.
- `PresumedModuleMapFile` is only set on the module being built (found via
  `lookupModule()`, hence top-level) and on top-level modules read from a PCM;
  it gets `get/setPresumedModuleMapFile()`.
- `APINotesFile` is only set by `APINotesManager` on the module being built
  (`Preprocessor::getCurrentModule()`, also found via `lookupModule()`); it
  gets `get/setAPINotesFile()`.
- `ConfigMacros` can only be declared on top-level modules
  (`err_mmap_config_macro_submodule`); it gets `getConfigMacros()`,
  `addConfigMacro(s)()` and `clearConfigMacros()`.

    [39 lines not shown]
DeltaFile
+87-30clang/include/clang/Basic/Module.h
+5-5clang/lib/Serialization/ASTWriter.cpp
+4-4clang/lib/Serialization/ASTReader.cpp
+3-2clang/lib/Basic/Module.cpp
+2-2clang/lib/Frontend/FrontendAction.cpp
+1-2clang/lib/Lex/ModuleMap.cpp
+102-453 files not shown
+105-489 files

LLVM/project d4d6422 — clang/include/clang/Basic Module.h, clang/lib/Basic Module.cpp

[clang] Move rarely used members out of clang::Module

Move nineteen members that are empty or unset in almost every module into a
`Module::ColdMembers` struct (584 bytes), managed by a small private helper,
`Module::LazyMembers<T>`, which holds a `std::unique_ptr<T>` and allocates it
on the first write. Reads go through `get()`, which returns a static empty
instance when nothing is allocated; `clear()` and `take()` don't allocate
either. Users go through accessors: `getX()` returns an `ArrayRef`,
`StringRef` or value (empty when the struct isn't allocated), `addX()`/`setX()`
write, `takeX()` moves a list out (for the resolve-and-re-add loops in
`ModuleMap`), and `clearX()` (which doesn't allocate) is used by the
`ASTReader` when a PCM replaces the module map's information. The member is
`mutable` because the visible modules cache is built lazily from a const
member function. The behaviour is unchanged.

The module statistics come from temporary instrumentation that records, for
every module, the largest size each container reaches and whether each member
is ever set, in the scans measured below; numbers are given as "empty /
populated module cache". The scanner creates 1.89M / 0.38M modules, but only

    [40 lines not shown]
DeltaFile
+278-73clang/include/clang/Basic/Module.h
+41-51clang/lib/Lex/ModuleMap.cpp
+27-19clang/lib/Basic/Module.cpp
+9-10clang/lib/Serialization/ASTReader.cpp
+10-9clang/lib/Serialization/ASTWriter.cpp
+4-2clang/lib/Lex/PPDirectives.cpp
+369-1646 files not shown
+378-17312 files