[all-commits] [llvm/llvm-project] 07fbba: [mlir] Reduce Diagnostic storage across standard l...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Thu Sep 24 01:46:48 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 07fbbac878025ecf8f3b25f28ec38c826e6f4891
https://github.com/llvm/llvm-project/commit/07fbbac878025ecf8f3b25f28ec38c826e6f4891
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M mlir/include/mlir/IR/Diagnostics.h
M mlir/lib/IR/Diagnostics.cpp
Log Message:
-----------
[mlir] Reduce Diagnostic storage across standard library debug modes (NFC) (#226070)
The multi-part diagnostic support added a SmallVector of part boundaries
to Diagnostic. With libstdc++'s _GLIBCXX_DEBUG enabled, the two
std::vector members also grow substantially: sizeof(Diagnostic) reaches
288 bytes. This exceeds the 256-byte limit for default
SmallVector<Diagnostic> and breaks Transform dialect builds that use
that type.
Use zero-inline SmallVectors for the owned string buffers and attached
notes. Both collections already allocated when populated, while their
empty representation no longer grows under _GLIBCXX_DEBUG. Give the
part-boundary vector zero inline elements as well: ordinary diagnostics
have a single part and never populate it. Keep the four inline argument
slots, so common diagnostic assembly retains its existing allocation
behavior. Splitting a diagnostic now allocates boundary storage.
On this 64-bit checkout, sizeof(Diagnostic) falls from 224 to 192 bytes
normally and from 288 to 192 bytes with _GLIBCXX_DEBUG.
Assisted-by: Codex
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