[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, append MLIR to the
effective LLVM_ENABLE_PROJECTS list. The common project setup compares that
list with the cached user selection, so an explicit MLIR selection retains its
normal behavior while an implicit selection is configured with EXCLUDE_FROM_ALL.
This makes MLIR targets available for CIR dependency resolution without adding
MLIR's aggregate targets. Keep the existing standalone ClangIR restriction and
do not configure MLIR when CIR is disabled.
Validation:
- Configured Clang with CIR and implicit MLIR test support.
- Configured Clang and MLIR explicitly with CIR and tests enabled.
- Configured Clang without CIR and verified that MLIR remains disabled.
[4 lines not shown]
[CMake] Infer dependency-only projects from the cache
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
implicit projects attach their complete build, install, and test suites to
LLVM's aggregate targets.
Keep the cache entry as the user-requested project roots and use the normal
LLVM_ENABLE_PROJECTS variable as the effective dependency closure. Projects in
the effective list but not the cache entry are configured with EXCLUDE_FROM_ALL.
Normalize the special all value before comparing the two sets.
This makes Flang's MLIR and Clang dependencies dependency-only without a second
project collection. It also applies the same rule to Clang when it is added for
LLDB. Forward the cached roots to cross-compilation and bootstrap configurations
so implicit projects do not become explicit in nested builds.
Let MLIR own its dependency-only test policy: configure test support libraries
for downstream consumers without creating MLIR unit tests or registering its
[10 lines not shown]
[AMDGPU] Fix FDOT2 fold for non-constant lane indices (#217646)
The fold only checked that the two lane index nodes were not the same
SDValue, but distinct nodes can still be equal at runtime, silently
picking the wrong lanes
Require both indices to be constant and distinct
www/py-bootstrap-flask: Update to 2.6.0
Upstream now declares the license as an SPDX expression (PEP 639),
which devel/py-setuptools 63.1.0 does not understand yet, so patch
pyproject.toml back to the legacy table form.
Changes: https://github.com/helloflask/bootstrap-flask/blob/2.6.0/CHANGES.rst
mlx5ib: use the hardware Toeplitz id when creating an RSS TIR
create_rss_raw_qp_tir() wrote MLX5_RX_HASH_FUNC_TOEPLITZ (the
userspace ABI flag, value 1) into tirc.rx_hash_fn. That field takes
the hardware encoding from mlx5_ifc.h, where 1 is INVERTED_XOR8 and
Toeplitz is MLX5_TIRC_RX_HASH_FN_HASH_TOEPLITZ (2).
Reviewed by: kib, slavash
Sponsored by: Nvidia Networking
MFC after: 1 week
[offload][omp] Route RPC callback registration through liboffload
Replace __tgt_register_rpc_callback's direct iteration over plugins
with olIteratePlatforms + olPlatformRegisterRPCCallback, and drop the
now-unused RPCServerTy::registerCallback export. Move the
initialized/has-devices guard that used to live in libomptarget into
olPlatformRegisterRPCCallback_impl.
[mlir][PDLL] Reject overflowing unregistered result indices (#221834)
Unregistered operation result access accepts numeric member names, but
code generation emits a nonnegative I32 attribute. Reject values outside
the signed 32-bit range before building the AST and use the matching
type in codegen.
Found by Coverity.
Assisted-by: Codex
[mlir][LLVM] Remove dead constant verifier return (NFC) (#221833)
Every arm of the constant attribute-kind chain returns directly, leaving
the final success return unreachable. Remove the dead statement.
Found by Coverity.
Assisted-by: Codex
[offload][omp] Query device info directly through liboffload
Route DeviceTy::getInfo through olGetDeviceInfo instead of the
plugin's obtain_device_info, and drop the now-unused
GenericPluginTy::obtain_device_info wrapper and its liboffload
export.
[clang][Sema] Crash due to asm labeled incomplete global register decls (#219746)
CheckAsmLabel fails to check for an incomplete type before attempting to
get the type layout. Short circuit on an incomplete type as Sema will
already reject a global with an incomplete type.
[CIR] Implement PromotableRegionOpInterface for cir.scope
Same treatment as cir.if: a slot read inside a cir.scope no longer needs
the CFG flattened before mem2reg can promote it. The scope region is
entered directly from before the operation, so it sees the reaching
definition unchanged.
cir.scope yields at most one value and may already be using it for the
scope's own result, so regions that store to the slot are refused.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
[CIR] Implement PromotableRegionOpInterface for cir.if
mem2reg gives up on a memory slot as soon as one of its uses lives in a
nested region whose parent op does not implement
PromotableRegionOpInterface. Since no CIR op implements it, promoting a
slot read inside a cir.if required running cir-flatten-cfg first, which
is why clang/test/CIR/Transforms/mem2reg.cir has to flatten before it can
promote anything.
Implement the interface for cir.if. Both regions are entered directly
from before the operation, so both see the same reaching definition.
A definition created inside a region has to leave the operation through
one of its results, and cir.if has none, so isRegionPromotable refuses
regions that store to the slot. Supporting those requires giving cir.if
results and is left for later.
Co-Authored-By: Claude Opus 5 <noreply at anthropic.com>
libc - Remove optimization that breaks malloc_usable_size() use cases
* The malloc implementation had an optimization meant to aid realloc()s
whereby unused portions of large memory blocks could be munmap()d.
However, lots of code uses the space returned by malloc_usable_size()
without calling realloc() to notify libc that additional space is being
used. Leading to segmentation faults.
* Original proposed solution to make malloc_usable_size() aware of a
prior munmap optimization does not completely fix the problem as excess
space may be unmapped after such calls as well as before.
* Removing the optimization and letting the pager deal with any actually-dead
excess space is the only option. So that is what we do.
Reported-by: Several people
[CIR] Reject willreturn on __declspec(noalias) attribute groups
Classic codegen never adds willreturn for NoAliasAttr. Bracket the
definition and call-site groups so a wildcard cannot hide it.