[mlir][NVVM] Split out the dialect declaration to improve build time (NFC) (#222783)
Move NVVMDialect to a self-contained declaration header and use it in
five consumers that do not need generated NVVM operations.
Across three controlled rebuilds of the affected TUs, median
instructions fell from 215.791B to 161.538B (-25.141%) and median wall
time fell from 33.40s to 24.66s (-26.168%).
Assisted-by: Codex
[mlir][LLVM] Split out the dialect declaration (NFC) (#222782)
Move LLVMDialect to a declaration header that retains its attribute and
type API but excludes generated operation classes. This narrows 12
dialect-only consumers.
Across three controlled rebuilds of the affected TUs, median
instructions fell from 207.570B to 176.073B (-15.174%) and median wall
time fell from 30.72s to 25.52s (-16.927%).
Assisted-by: Codex
[lldb][Fortran] Add TypeSystemFortran files (#218016)
This PR adds the foundational TypeSystemFortran class. To satisfy the
compiler, it implements all required pure virtual functions from the
base TypeSystem class as stubs (returning nullptr or 0).
Changes:
- Adds the TypeSystemFortran class.
- Provides stub implementations for all inherited pure virtual
functions.
Part of the Add Fortran support to LLDB GSoC 2026 project.
Relates to #109119.
[mlir][Tensor] Split out the dialect declaration to improve build time (NFC) (#222781)
Move TensorDialect to a self-contained declaration header and use it in
the two consumers that only need the dialect class.
Across three controlled rebuilds of the affected TUs, median
instructions fell from 25.499B to 21.072B (-17.363%) and median wall
time fell from 3.55s to 2.81s (-20.845%).
Assisted-by: Codex
[mlir][Tosa] Optimize compliance initialization for size (NFC)
The compliance-map constructor includes a 4,920-line generated initializer.
Mark it minsize because it runs only when creating the validation pass and
optimizing this single large function at -O3 is expensive.
Across five controlled rebuilds of the affected TU, median instructions fell
from 205.087B to 66.157B (-67.742%) and median wall time fell from 19.83s to
7.95s (-59.909%).
Assisted-by: Codex
[SSAF][PointerFlow] Drop unused TUSummaryExtractor param from translateDeclPointerLevel
TUSummaryExtractor is only needed to mint EntityIds when building an
EntityPointerLevel; translateDeclPointerLevel just walks the Expr and
returns raw DeclPointerLevels, so it never touched Extractor.
This is the second patch the radar below depends on:
rdar://187125348
[AMDGPU] Add getLocalMemorySize to TargetParser
Add getLocalMemorySize and getAddressableLocalMemorySize, both taking a
GPUKind or a Triple::SubArchType, so the LDS a work-group gets can be
queried from a GPU name alone without an MCSubtargetInfo. The first
returns the physical block available in the current mode, the second
caps it at what one work-group can address, mirroring the IsaInfo pair.
The number of SIMDs a work-group runs on is a per-kernel mode rather
than a property of the GPU, so it stays a parameter. GCNSubtarget
initializes its cached sizes from the new entry points. There is no
functional change.
Change-Id: Ib71428b66032a231ed491d6294122b359abfe7e2
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
[mlir][NVGPU] Split out the dialect declaration to improve build time (NFC) (#222767)
Move NVGPUDialect to a self-contained declaration header and use it in
three consumers that do not need generated NVGPU operations.
Median instructions fell from 221.225B to 166.874B (-24.568%) and wall
time from 34.31s to 25.61s (-25.357%).
Assisted-by: Codex
[mlir][Affine] Split out the dialect declaration (NFC)
Move AffineDialect to a self-contained declaration header and narrow 23
callers that only register or reference the dialect class.
Across three controlled -j16 rebuilds of the affected TUs, median
instructions fell from 523.531B to 507.200B (-3.119%) and median wall time
fell from 12.81s to 12.42s (-3.044%).
Assisted-by: Codex
[mlir][Tensor] Split out the dialect declaration (NFC)
Move TensorDialect to a self-contained declaration header and use it in the
two consumers that only need the dialect class.
Across three controlled rebuilds of the affected TUs, median instructions
fell from 25.499B to 21.072B (-17.363%) and median wall time fell from 3.55s
to 2.81s (-20.845%).
Assisted-by: Codex
[mlir][Arith] Split dialect and support declarations (NFC)
Expose the Arith dialect, attributes, and interfaces without importing
generated operation classes. This lets registration and support-only users
avoid parsing the operation umbrella and its dependencies.
Across three controlled serial rebuilds of five dialect-only TUs, median
instructions fell from 49.429B to 39.665B (-19.755%) and wall time fell from
7.40s to 5.85s (-20.946%). Across three -j16 rebuilds of 97 support users,
instructions fell from 1,686.265B to 1,531.867B (-9.156%) and wall time fell
from 29.17s to 28.07s (-3.771%).
Assisted-by: Codex
[libc] Parameterize printf_core::Writer test to cover wchar_t. (#222744)
This is a follow-up to #220669, which did the initial refactor of
`printf_core::Writer` enabling the `CharT` template parameter.
Move the helper for selecting character literals added in #203355 out of
stringview_test into a util header library.
Assisted-by: Automated tooling, human reviewed.
[mlir][NVVM] Split out the dialect declaration (NFC)
Move NVVMDialect to a self-contained declaration header and use it in five
consumers that do not need generated NVVM operations.
Across three controlled rebuilds of the affected TUs, median instructions
fell from 215.791B to 161.538B (-25.141%) and median wall time fell from
33.40s to 24.66s (-26.168%).
Assisted-by: Codex
[libc] Fix Darwin aarch64 fenv and sigsetjmp build support (#192079)
This patch fixes Darwin aarch64 build failures in libc around fenv and
sigsetjmp support.
Before this change, the Darwin aarch64 fenv implementation did not match
the public fenv_t layout and referenced several Darwin-specific
exception/control bits that were not defined in llvm-libc. This caused
libc builds to fail in fenv_darwin_impl.h with a sizeof(fenv_t) vs.
internal-state mismatch and multiple undeclared-identifier errors for
FE_FLUSHTOZERO and the FPCR trap/flush bits.
This patch fixes that by updating the internal Darwin aarch64
floating-point state layout to match fenv_t, defining the missing Darwin
FPCR bit values used by the implementation, and handling the
flush-to-zero exception bit consistently.
The patch also fixes the Darwin sigsetjmp path by enabling sigjmp_buf
support on Apple targets, adding the Darwin signal pieces needed by that
[4 lines not shown]
[mlir][NVGPU] Split out the dialect declaration (NFC)
Move NVGPUDialect to a self-contained declaration header and use it in three
consumers that do not need generated NVGPU operations.
Across three controlled rebuilds of the affected TUs, median instructions
fell from 162.958B to 126.072B (-22.635%) and median wall time fell from
25.38s to 19.34s (-23.798%).
Assisted-by: Codex
[Offloading] Add support for compressed OffloadBinary types
Summary:
Offload binaries are used to store many heterogenous architectures into
a singel offloading blob. These lists can get very large so this PR adds
the option to compress them with the LLVM provided compression
libraries.
The implementation is quite simple, we simply compress all the buffers
after the header into a single compressed blob, then re-construct the
header. Extracting is the reverse.
The biggest change is that the offload binary now **owns** the memory,
whereas before we simply took a reference to it. This is necessary
because the decompression must create new memory compared to what the
user provided. This adds an extra copy internally, but it also
simplifies the V2 additions.
This does not wire up any clang/HIP support, just providing the
functionality.
[SSAF][PointerFlow] Factor out and make the pointer-flow matching reusable
The PointerFlowExtractor matches AST nodes representing pointer-flows
and converts them to entity-based data structures directly. This
commit divides this procedure into two steps: 1) match and represent
AST nodes as PointerFlowPairs; 2) convert PointerFlowPairs to
entity-based edges. Therefore, other SSAF tools may use
PointerFlowPairs.
The refactoring also improves coverage: it separates pointer-type
checking from structural matching, so structural matching alone now
discovers cases that were previously missed due to overly aggressive
type checking (e.g. a record-typed call argument or return value
initialized with a braced-init-list).
Along the way, this also fixes a bug for unnamed bit-fields.
First patch for
rdar://187125348
[mlir][bufferization] Expose checkPreBufferizationAssumptions helper (#221302)
Downstream users of bufferization may want to run this check without
invoking the entire one-shot module analysis. If the check is not run
and invalid IR is encountered, OneShotBufferize tends to crash rather
than emitting a nice error message.
This patch simply exposes `checkPreBufferizationAssumptions` to the
header file so it is accessible to other users.
[mlir][LLVM] Split out the dialect declaration (NFC)
Move LLVMDialect to a declaration header that retains its attribute and type
API but excludes generated operation classes. This narrows 12 dialect-only
consumers.
Across three controlled rebuilds of the affected TUs, median instructions
fell from 207.570B to 176.073B (-15.174%) and median wall time fell from
30.72s to 25.52s (-16.927%).
Assisted-by: Codex