[CIR][flang][CMake] Migrate generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with actual library dependencies. Declare public header ownership
and keep source shards, bytecode and lowering tables private. Scope
accumulated TableGen variables before public header generators.
CIRLowering.inc is no longer generated by install-clang-headers; only
transform/lowering sources include it and each consumer lists
CIRLowering. Keep the bytecode block and remove the unnecessary lowering
block. clangFrontendTool links CIR libraries privately, reducing
obj.clangInterpreter's prerequisite edges from 579 at the base to 535
while obj.clangFrontendTool stays at 888.
InitFIR.h no longer includes mlir/InitAllDialects.h or
mlir/Conversion/Passes.h. Include the dialect and pass headers actually
registered and call mlir::registerPass directly for six conversions,
preserving the registration set. LowerWorkdistribute.cpp includes the
OpenMP pass header instead of the general optimizer pass header. Test
[16 lines not shown]
[SLP][NFC] Correct the definition of getVectorInstrCost (#247206)
Fix a couple of problems with the definition of the variant of
getVectorInstrCost that's used by the SLP vectorizer:
* The Idx part of ScalarUserAndIdx should be unsigned, as it's
initialized from ExternalUses where the lane value is unsigned, and a
negative lane value makes no sense.
* The Index value is always known, as every time getVectorInstrCost is
called it's for an element of ExternalUses, so remove the comment about
-1 meaning the index is unknown.
* Add a comment noting that Scalar and Index must appear in
ScalarUserAndIdx.
Mk/Uses/npm.mk: Introduce NPM_PREFETCH_REVISION variable
The prefetch function of USES=npm automatically generates an archive
of node modules needed for a port. The versioning for the archive only
include DISTVERSION and not PORTREVISION to avoid generating duplicate
node modules archive on each port revision bump.
There is a case that a porter wants to update the contents of the node
modules archive (without port version bump) due to some changes to
package.json and/or lockfile. The prefetch function cannot overwrite a
pre-existing node modules archive with one with updated distinfo due
to a limitation of the ports framework.
In such a case, a porter can set NPM_PREFETCH_REVISION to a non-zero
value to produce a new name for node modules archive to work around
the limitation.
NPM_PREFETCH_REVISION should be left undefined unless absolutely
necessary.
[3 lines not shown]
[CI] Check Linux premerge build dependencies with Ninja
Run missingdeps after the Linux build and tests to detect missing
dependency paths to generated files. Include the selected check targets
alongside all.
Assisted-by: Codex
[Flang][CMake] Fix generated-header ordering and binding header copies
FIRBuilder's Runtime/Intrinsics.cpp needs the OpenACC generated headers,
and LowerWorkdistribute.cpp includes the FIR transform pass
declarations. Add acc_gen and FIROptTransformsPassIncGen to their
consuming libraries.
ISO_Fortran_binding.h is a checked-in header. Copying it with
configure_file makes CMake emit a phony rule for the input, which
Ninja's missingdeps mistakes for a generated file without a dependency
path to its consumers. Move both copies to build rules with an explicit
source dependency. Build them by default and before the Flang driver and
flang-headers target. Header edits update both copies without requiring
CMake reconfiguration.
Rebuilt all reported Flang objects and verified ninja -t missingdeps is
clean. Checked header updates and deleted-copy recovery with Ninja, Unix
Makefiles, and Ninja Multi-Config.
Assisted-by: Codex
[LLVM][CMake] Add generated-header dependencies to pass plugins
The example and unit-test plugins include PassBuilder.h, which pulls in
TargetLibraryInfo.inc and GenVT.inc. They rely on the host process for
LLVM symbols, so linking LLVM component libraries does not order these
headers.
Declare analysis_gen and vt_gen alongside intrinsics_gen. Keep the unit
plugins' prerequisites on their library declarations, so they also apply
to any object libraries created for those targets.
Validated by rebuilding all six reported plugin objects and running
ninja -t missingdeps on them.
Assisted-by: Codex
[CI] Check Linux premerge build dependencies with Ninja
Run missingdeps after the Linux build and tests to detect missing
dependency paths to generated files. Include the selected check targets
alongside all.
Assisted-by: Codex
[Flang][CMake] Fix generated-header ordering and binding header copies
FIRBuilder's Runtime/Intrinsics.cpp needs the OpenACC generated headers,
and LowerWorkdistribute.cpp includes the FIR transform pass
declarations. Add acc_gen and FIROptTransformsPassIncGen to their
consuming libraries.
ISO_Fortran_binding.h is a checked-in header. Copying it with
configure_file makes CMake emit a phony rule for the input, which
Ninja's missingdeps mistakes for a generated file without a dependency
path to its consumers. Move both copies to build rules with an explicit
source dependency. Build them by default and before the Flang driver and
flang-headers target. Header edits update both copies without requiring
CMake reconfiguration.
Rebuilt all reported Flang objects and verified ninja -t missingdeps is
clean. Checked header updates and deleted-copy recovery with Ninja, Unix
Makefiles, and Ninja Multi-Config.
Assisted-by: Codex
[MLIR][CMake] Add missing LLVM header generation prerequisites
OptUtils.cpp includes TargetLibraryInfo.inc through LLVM analysis
headers. LLVMRemarkImport.cpp includes Attributes.inc through LLVM IR
headers. Their object libraries do not inherit ordering from
LINK_COMPONENTS.
Add analysis_gen to MLIRExecutionEngineUtils and intrinsics_gen to
MLIRRemarkStreamer so each header is generated before its consumer
builds.
Rebuilt both reported objects and verified ninja -t missingdeps is
clean.
Assisted-by: Codex
[LLVM][CMake] Add generated-header dependencies to pass plugins
The example and unit-test plugins include PassBuilder.h, which pulls in
TargetLibraryInfo.inc and GenVT.inc. They rely on the host process for
LLVM symbols, so linking LLVM component libraries does not order these
headers.
Declare analysis_gen and vt_gen alongside intrinsics_gen. Keep the unit
plugins' prerequisites on their library declarations, so they also apply
to any object libraries created for those targets.
Validated by rebuilding all six reported plugin objects and running
ninja -t missingdeps on them.
Assisted-by: Codex
[VectorCombine] Fix crash on bitcasts of pointer vectors (#246660)
foldBitcastShuffle divides by the scalar sizes of the source and
destination element types, which are zero for pointers. A bitcast of a
shuffled pointer vector, or one between a byte vector and a pointer
vector, then crashes with a division by zero. Take the sizes from the
DataLayout, so these bitcasts are folded too.
The fold also looks through the bitcasts of the shuffle operands, and
some sources can't be bitcast to the new shuffle type, e.g. an integer
vector to a pointer vector ("Invalid cast!"). For such a source,
bitcast the operand itself. Don't fold if that leaves no operand looked
through, which is always the case for a unary shuffle: the new bitcast
of a bitcast can be turned back into the original form by
foldShuffleToIdentity, which loops for repeat and extract masks.
Fixes #246659
Assisted-by: Claude Code (Claude Opus 5.5)
llama.cpp: update to 1.1.1.
llama.cpp v1.1.1 adds Qwen4-35B-A3B, Amazon-FMR/Ergo (1.1T MoE),
clef-omni, Apertus v1.5 text support and MiniCPM5 MoE, reworks the
decision-model batch API into pool spans and attention scopes, and
brings background tasks for the built-in shell tool in llama-server
together with the matching task list in Llama Chat. It also fixes
a long list of core and server issues (shared SWA cell reuse, the
KV cache rotation node budget, checkpoint replay at temp 0, CORS
with multiple origins), extends chat/Jinja parsing and the conversion
pipeline, adds Hugging Face dataset sharing and a shared image
slideshow to the UI, and updates ggml to v1.2.0.
[CIR][flang][CMake] Migrate generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with actual library dependencies. Declare public header ownership
and keep source shards, bytecode and lowering tables private. Scope
accumulated TableGen variables before public header generators.
CIRLowering.inc is no longer generated by install-clang-headers; only
transform/lowering sources include it and each consumer lists
CIRLowering. Keep the bytecode block and remove the unnecessary lowering
block. clangFrontendTool links CIR libraries privately, reducing
obj.clangInterpreter's prerequisite edges from 579 at the base to 535
while obj.clangFrontendTool stays at 888.
InitFIR.h no longer includes mlir/InitAllDialects.h or
mlir/Conversion/Passes.h. Include the dialect and pass headers actually
registered and call mlir::registerPass directly for six conversions,
preserving the registration set. LowerWorkdistribute.cpp includes the
OpenMP pass header instead of the general optimizer pass header. Test
[16 lines not shown]
[MLIR][CMake] Stop depending on mlir-generic-headers by default
Remove the default mlir-generic-headers dependency from ordinary and
example libraries. Migrate generated-interface requirements to library
owners, including the 17 requirements deferred from the previous commit.
Keep the compatibility aggregate and registrations.
MLIRIR owns MLIRInferIntRangeInterfaceIncGen for Matchers.h. Add the
Transform/Interfaces generator ordering. MLIRDialectUtils uses the
ArithDialect owner for ReshapeOpsUtils.h. Forward MaskableOpInterface's
compile-only MaskingOpInterface dependency through the local helper so
directly compiled libraries receive a bridge too.
MLIRCAPIIR links MLIRInferTypeOpInterface privately. MLIRPass,
MLIRRewrite and MLIRRewritePDL drop their explicit DEPENDS
mlir-generic-headers.
Extend the release note, guide and aggregate-independence regression to
the generic aggregate and example libraries.
[2 lines not shown]
[MLIR][CMake] Stop depending on mlir-headers by default
Remove the default mlir-headers dependency from the dialect, conversion,
extension and translation library helpers. Keep the aggregate, its
registrations and explicit compatibility dependencies available;
mlir-generic-headers remains a default until the next commit.
Replace redundant foreign generator edges with library links or
compile-only header owners. Add generator-to-generator ordering where
one generated header includes another. Keep 17 requirements already
covered by generic headers or existing links for the next commit; clean
object-library builds pass without them here. GPUBase requirements
remain necessary at this stage.
Keep Rewrite's original PDL library links and remove redundant C API
pass-generator dependencies. Test aggregate independence for the
dialect, conversion, extension and translation helpers.
Add downstream migration guidance, the temporary DEPENDS mlir-headers
[5 lines not shown]
[MLIR][docs] Document the CMake infrastructure
Describe MLIR's TableGen, library, visibility, aggregation, installation
and generated-header conventions in one infrastructure guide. Explain
library owners, explicit generators, compile-only requirements and the
timing of the source-only generator opt-out.
Document raw-link bridge usage, the dependency-optimization caveat and
aggregate defaults at this point in the stack. Link the guide from
CreatingADialect.md.
Assisted-by: Codex
[CMake] Propagate generated headers through link dependencies
llvm_add_library made object libraries wait for whole PUBLIC link
providers to obtain generated headers. Publish marked DEPENDS generators
through the LLVM_GENERATED_HEADERS transitive compile property instead,
and order obj.<name> after the evaluated closure through <name>.headers.
PRIVATE and transitive compile requirements participate without
compiling provider objects.
Use COMPILE_ONLY for another library's headers without its
implementation. Keep these items build-local, and create a bridge for
directly compiled libraries only when such an item is present.
llvm_add_generated_header_bridge covers items added later. Existing
Windows PCH variants also wait for the owner's bridge.
Shared libraries republish the interfaces of unkeyed links and
components hidden by shared mode. Explicit PRIVATE component
requirements stay private. Ignore paths, flags and generator expressions
before constructing TARGET_EXISTS. libLLVM, libMLIR and MLIR aggregates
[28 lines not shown]
ggml: update to 1.2.0.
ggml v1.2.0 adds quantization-scale support for FP8 and NVFP4
through extended matrix-multiplication APIs, introduces internal
ops, and cleans up the FlashAttention sinks/bias API. It adds the
experimental HRX backend, lets the meta/TP backend place a tensor
entirely on a single device, adds an RPC SUPPORTS_OP command with
graph preprocessing, and adds a CONCAT backward pass plus a BF16
src1 path for matrix multiplications. Backend work includes a CUDA
fusion refactor with new fused chains, Vulkan FP8/scaled matmul
and FlashAttention KV-row support, Metal Neural Accelerator detection,
SYCL GDN replay, WebGPU scaled matmul, Hexagon HMX W8A8 tuning,
and an OpenVINO 2026.5 update.
[ValueTracking] Migrate significant-bits API to SQ (NFC) (#248632)
Migrate the ComputeMaxSignificantBits API to SimplifyQuery for
uniformity with most other APIs. There is a pending TODO around using
the SimplifyQuery API of ComputeNumSignBits, but the question of
safeCtxI is not yet resolved. There is one call-site where functional
changes could be introduced, but llm-based fuzzing was not able to find
a test.
Assisted-by: llm
kern.post.mk: Really fix ports module build
The package target was never needed; we install directly from the
staging directory.
Fixes: b393df657811 ("kern.post.mk: Fix unprivileged ports module build")