[dsymutil] Use more portable way to compare timestamp (NFC) (#204680)
`find` on AIX does not support `-maxpath` option. This patch is
to use python to compare the `mtime` of the file/directory.
[SLP] Don't recognize rotated widened strided stores in analyzeRtStrideCandidate() (#204013)
These cases which are nearly strided stores are being incorrectly
recognized as strided stores. Fixes #204011
[lldb] Fix data race in Module::GetSectionList (#205226)
Module::GetSectionList built the section list (m_sections_up) without a
lock, so parallel module loading (e.g. crashlog.py's thread pool) could
race two builders on the unique_ptr and the SectionList vector, crashing
in AppleObjCRuntime::GetObjCVersion.
Build through ObjectFile::GetSectionList instead of locking the module
mutex and calling CreateSections directly: that path locks the object
file's section mutex before the module mutex, and the build can re-enter
it, so holding the module mutex across the build would invert the order
and risk a deadlock. The Module-level counterpart to a0176fd9dfc5.
rdar://180308581
[CIR] Lower byval/byref args in CallConvLowering
ArgKind::Indirect arguments were hitting an errorNYI in
CIRABIRewriteContext. Add the lowering: in the callee the block argument
type changes to !cir.ptr<T>, a load is inserted at entry so the body sees
the original value type, and llvm.byval or llvm.byref is attached based on
ownership. At call sites, both byval and byref are lowered by allocating a
stack slot, copying the value in, and passing the pointer.
For byval, llvm.noalias and llvm.noundef are also added -- llvm.noalias
because the call-site rewrite always produces a fresh alloca+store
(equivalent to -fpass-by-value-is-noalias), and llvm.noundef because the
copy is always fully defined. byref carries only llvm.byref and llvm.align
since it does not assert exclusive ownership.
Revert "[flang][cuda] Do not emit data transfer for constant read on the rhs" (#205394)
Reverts llvm/llvm-project#205185
this is making couple of downstream tests failing. Another approach is
needed
[llvm][option] Remove bitfield marshalling (#203051)
Marshaling of bitfield options is adding some extra complexity in the
form of extractors and mergers, but is now unused. This PR removes that
feature.
[CIR] Lower bitwise vector reduce builtins
`__builtin_reduce_or`, `__builtin_reduce_and`, and `__builtin_reduce_xor` were caught by the batch `errorBuiltinNYI` switch in CIRGen and rejected with an NYI diagnostic. They now lower to the matching `llvm.vector.reduce.{or,and,xor}` intrinsics on the vector element type, mirroring classic CodeGen in `CGBuiltin.cpp`.
The emission routes through `emitBuiltinWithOneOverloadedType`, extended with an optional result type: a vector reduction returns the element type, and CIR has no intrinsic registry to derive it the way classic's `getIntrinsic(ID, argTy)` does, so the element type is supplied explicitly (the default keeps the existing callers unchanged). The intrinsic name is passed without the `llvm.` prefix, which `LowerToLLVM` prepends, producing LLVM output byte-identical to OGCG.
The `builtin-undef-rvalue` regression test previously pinned `reduce_or` as NYI; it is retargeted to `reduce_add`, which is still NYI, so the undef-rvalue path stays covered.
[TableGen] Use llvm_unreachable in switch guard for all except gcc 8- (#205385)
Follow-up to https://github.com/llvm/llvm-project/pull/194728.
For gccs older than v9 use abort. That seems to make everybody happy.
NAS-139535 / 25.10.5 / Decode CHANGE-without-DELETE_CHILD share ACL mask as CHANGE (#19187)
A customer's `sharing.smb.getacl` crashed with `ValueError: 1245631 is
not a valid SDDLAccessMaskStandard` because the stored share ACL
contained an ACE with access mask 0x1301BF -- the CHANGE preset
(0x1301FF) minus the SEC_DIR_DELETE_CHILD bit (0x40). Such masks are
produced by some Windows versions / older Samba / sharesec shell edits.
`sd_bytes_to_share_acl` looked the mask up directly in the
SDDLAccessMaskStandard enum, which raised for the unrecognized value and
returned a 500 from getacl, so the admin could neither view nor fix the
share ACL.
Normalize this known equivalent mask to CHANGE at the single decode
site. This keeps the returned `ae_perm` within the existing API schema
(Literal['FULL','CHANGE','READ']) so there is no public API surface
change -- appropriate for a hotfix release.
Re-saving such an entry via setacl writes canonical CHANGE (0x1301FF),
healing the malformed mask.
fusefs: fix a race in the pre-init tests
These tests allow the user to customize the INIT response. But it's
necessary to block the daemon's service loop from running until those
expectations have been set. This race has never caused failures before
simply due to luck. But now it's failing on slower platforms.
PR: 296236
Reported by: siva
MFC after: 2 weeks
Sponsored by: ConnectWise
Reviewed by: siva
Differential Revision: https://reviews.freebsd.org/D57781
[Instrumentor] Add comparison instrumentation opportunity (#204069)
This patch adds an instrumentation opportunity for comparison
instructions (`icmp` and `fcmp`).
[lldb][test] Fix TestHiddenIvars rebuild failures in hidden-ivars Makefile (#205114)
Two rebuild-state bugs surfaced when running `./bin/lldb-dotest -p
TestHiddenIvars.py`:
```
FAILED (errors=6, skipped=7, expected failures=2)
```
1. `mkdir: stripped: File exists`, mkdir failed on the second build
because the directory already existed. Switch to `mkdir -p`.
2. `cp -r a.out.dSYM stripped/a.out.dSYM` recurses *into* the existing
destination on rebuild, producing a nested `stripped/a.out.dSYM/
a.out.dSYM/`. The outer dSYM keeps its stale UUID, so lldb cannot
match it to the freshly relinked stripped binary (which gets a new
UUID per link via -Wl,-random_uuid), causing source breakpoints to
fail to resolve. Remove the destination before copying.
[Flang][OpenMP] Support iterator modifiers in map and motion clauses
Support iterated array elements and array sections in map and motion clauses for
target data, target enter data, target exit data, and target update constructs.
Preserve mapper resolution for iterated entries, including explicit mappers,
user-defined default mappers, declare mapper entries, and implicit default
mappers.
This PR stacked on top of #197047 and #197752.
This patch is part of the feature work for #188061.
Assisted with copilot.
Add comment about iterator map bounds
Clarify why iterator map lowering keeps a stable base address while
lowering iterator-dependent subscripts inside the omp.iterator body.
This documents the difference from ordinary map bounds generation.
Resolve feedback about iterator member maps
Reject iterator-dependent derived type member maps for now. These maps
would otherwise bypass the parent/member bookkeeping in processMapObjects,
including parentMemberIndices construction and mapper resolution with
hasParentObj=true.
Without that bookkeeping, lowering map(iterator(...): x%a(i)) could emit
an incomplete parent partial map. Emit a TODO instead of silently generating
incorrect or incomplete mapping IR.
Preserve iterator-dependent locators in shared map lowering
Share the iterated-map handling between map and motion clauses while
preserving iterator-dependent locators on map_iterated and keeping
standard map lowering for other clause objects.
Resolve feedback about createMapInfoOp usage
Build iterator-generated map entries through the shared createMapInfoOp
helper while preserving the FIR `var_ptr` type used to derive the OpenMP
`varPtrType` for `!llvm.ptr` iterator results.
Resolve feedback about MapInfoFinalization
Keep MapInfoFinalization from expanding `omp.map.info` operations nested
in omp.iterator regions. Those maps are yielded through the iterator
result, so rewriting them as outer target operands can violate SSA
dominance.
[RISCV] Remove isCodeGenOnly=0 from PseudoLA_TLSDESC. (#205366)
The default for a Pseudo is isCodeGenOnly=1. With isCodeGenOnly=0 the
'la.tlsdesc' is a valid mnemonic for the assembly parser, but crashes in
the encoder.
I don't think this was meant to be a valid assembly mnemonic so remove
it.
[CIR] Handle non-zero-initializable types in emitNullInitialization (#201654)
Value-initializing an aggregate containing a pointer-to-data-member
(e.g. `new Inner()` where `Inner` has an `int Inner::*` field) crashed
with "type is not zero initializable" because `emitNullInitialization`
unconditionally called `errorNYI` for types where `isZeroInitializable`
returns false.
Member pointers use -1 as the null sentinel, so a plain zero store is
incorrect. Replace the `errorNYI` with `emitNullConstant`, which already
builds the correct per-field pattern (-1 for member-pointer fields, zero
elsewhere), and store the result. Types with virtual bases are still
guarded with `errorNYI` since `emitNullConstant` does not yet handle
them.