Read ACLs directly in the SMB client mount tests
filesystem.getacl takes the ACL type from statx since #20073, and the
kernel SMB client sets no ACL type bit although it serves
system.nfs4_acl_xdr from the share's security descriptor, so the mount
came back ACL-less and every compare_acls() test failed. Read both paths
through filesystem.getacl_nfs4, as getacl did before.
[acc] Make acc.compute_region an AutomaticAllocationScope (#236277)
`acc.compute_region` is isolated from above and becomes a GPU kernel, so
stack allocations made inside it end with the region. Unlike
`acc.parallel`, `acc.kernels`, `acc.serial` and `acc.loop`, it did not
carry AutomaticAllocationScope. AliasAnalysis therefore treated the
enclosing function as the allocation scope of an alloca inside the
region, could not relate it to the region's entry block arguments, and
answered `MayAlias` between that alloca and any value captured through
ins. With the trait, the region is the allocation scope and the entry
block arguments are known not to alias allocas created inside it.
[MLGO] Check the eviction model width before allocating (#236421)
Report the required -mlregalloc-num-allocatable-regs up front instead of
failing mid-allocation, which on AMDGPU happens after decisions were
already exchanged with the host
[Offload][Omp] Remove references to InfoTreeNode and DeviceInfo (#236407)
Change DeviceInfo enum to liboffload ones.
Remove unused InfoTreeNode reference.
Assisted by Claude.
[libc] Fix the type of pthread_barrier_init's count argument (#236178)
POSIX declares it as `unsigned`, which is also what our implementation
uses, but pthread.yaml (and hence the generated header) said `int`.
Nothing caught the mismatch because the entrypoint never sees the public
declaration.
While in there, add the missing `__restrict` to the first argument of
the internal declaration.
Assisted-by: Claude
[libc] Fix the values of GRND_NONBLOCK and GRND_RANDOM (#235760)
The two flags were swapped. getrandom passes its flags to the kernel
unchanged, so a caller asking not to block got the blocking random pool,
and a caller asking for that pool was told not to block. The kernel's
values, in include/uapi/linux/random.h, are 0x0001 for GRND_NONBLOCK and
0x0002 for GRND_RANDOM.
The test relies on the kernel rejecting GRND_INSECURE together with
GRND_RANDOM and accepting it together with GRND_NONBLOCK.
AI disclosure: this patch was written with Claude Code. I reviewed the
change and ran the new test; it fails without the fix and passes with
it.
Assisted-by: Claude
[CIR] Store nsw/nuw as an OverflowFlags bit enum and split out saturated add/sub
cir.add, cir.sub and cir.mul carried nsw and nuw as two separate unit
properties, and lowering mapped them to LLVM with an early return that
picked nuw over nsw, so an op with both flags lowered to `overflow<nuw>`
and lost nsw. cir.add and cir.sub also carried a `sat` flag that changed
the operation's result rather than adding a poison condition.
Store the flags as one OverflowFlags bit-enum property whose layout
matches mlir::LLVM::IntegerOverflowFlags, so lowering casts it directly
and keeps both flags. The property owns its syntax: bare `nuw` and `nsw`
keywords, accepted in either order and printed in LLVM IR order as
`nuw nsw`. cir.mul now shares the add/sub base class and so becomes Pure.
Saturating arithmetic moves to new cir.add.sat and cir.sub.sat ops, which
lower to the signed or unsigned saturation intrinsics by element type.
That leaves cir::OverflowBehavior only describing nsw/nuw, so the builder
takes cir::OverflowFlags instead.
[6 lines not shown]
[CIR] Fix cir.try successor regions
`TryOp::getSuccessorRegions` sent every exit from the try region back to the
parent, so nothing led from the try region to the handlers. A `cir.resume`
ending the try region, left there once FlattenCFG has flattened an inner
cleanup scope, unwinds into a handler, and `CIRTryOpFlattening` branches it
to the handler dispatch block. Now every exit from the try region can enter
the handlers, and a `cir.resume` leaves the op only when there are none. The
parent keeps its edges to the handlers. An unwind out of a call in the try
region is not a region branch point, so these edges stand in for it, and
without them -remove-dead-values empties a handler that is reached only that
way.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Keep cir.cleanup.scope cleanup regions reachable
RegionBranchOpInterface::getSuccessorRegions must return every region that
may run next, but an unwind out of a call in the body, or a cir.return,
cir.break, cir.continue or cir.goto out of it, runs the cleanup without
passing a region branch point. A cleanup reached only that way had no
predecessor, so generic passes treated it as dead, and -remove-dead-values
erased an EH cleanup that stores to memory. Now the cleanup region is a
successor of the parent and of every body exit, and a body exit that the
cleanup kind does not cover can also leave the op.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][Toy] Include generated interface declarations outside of namespaces
The `cppNamespace` field is the conventional name to place an interface inside of a namespace. The ShapeInference interface in Toy chapters 4-7 now specifies its cppNamespace, rather than an include into a namespace. The tutorial docs are updated accordingly.
[libc] Return 0 from uname on success (#235758)
uname returned 1 on success. POSIX only requires a non-negative value,
but glibc, musl and bionic all return 0, and callers compare the result
against 0: lvm2, for example, treats 1 as a failure.
Tighten the test to expect 0.
AI disclosure: this patch was written with Claude Code. I reviewed the
change and ran the new test; it fails without the fix and passes with
it.
Assisted-by: Claude
devel/llvm19: fix build on 15.1, 14.4
This patch only works on systems with the libc++ from LLVM 21 so bound
its application appropriatly.
PR: 299993, 296203
Fixes: 6a0f728d9cd8 ("devel/llvm19: fix build with flang and libc++ 21")
[flang] Avoid a quadratic walk in FIR LICM's nested-region hoisting (#236138)
With `hoist-from-nested-regions=aggressive`, `flang-licm` considers
every operation in a loop's nested regions as a candidate, and for each
candidate `canMoveOutOfOp` is called once per intermediate ancestor up
to the loop. `canMoveOutOfOp` walks the candidate's whole subtree and
calls `fir::canMoveOutOf` on each nested operation. So an
`scf.if`/`fir.if` that holds a large part of the loop body is walked
again for every enclosing level and again for every `if` nested in it.
On routines with deeply nested IF blocks inside loops this takes minutes
of compile time.
`fir::canMoveOutOf` consults only the region owner's
`OperationMoveOpInterface` and returns true when the owner does not
implement it, so in that case the result of the walk is known in
advance. This patch returns early instead of walking. The pass result
does not change.
The new test checks that hoisting through operations without the
[3 lines not shown]