[clang] Disambiguate lambdas from Microsoft attributes (#214247)
With -fms-extensions, a CUDA/HIP lambda capture list can be consumed as
a Microsoft attribute list. This causes attributed lambdas used in
direct initialization to be misparsed as function declarators.
Tentatively inspect the tokens following the capture list and any
trailing attributes to identify lambdas before parsing Microsoft
attributes.
Assisted by: Cursor / Claude Opus 4.8
[libc] Implement clone(2) and use it in thread spawning (#224257)
This patch implements an internal clone syscall wrapper and uses it both
to implement the public clone(2) entry point and to spawn new threads in
libc's thread implementation.
Previously, thread creation in thread.cpp invoked the raw SYS_clone
syscall directly, requiring target-specific inline assembly or register
variables and subtle tricks with __builtin_frame_address to pass
arguments to start_thread in the newly spawned thread.
By introducing an inline assembly clone wrapper that sets up func and
arg on the child stack and jumps to the entry function upon clone
returning in the child, we can simplify start_thread to a normal
function taking a single void * argument and eliminate the frame pointer
hacks as well as the need to compile thread.cpp with
-fno-omit-frame-pointer or optimizations.
The public clone(2) entrypoint delegates to this wrapper after unpacking
[16 lines not shown]
[SystemZ][z/OS] Extend systemz-features.cpp and zvector.c with z/OS RUN lines (#224733)
Add `s390x-ibm-zos` RUN lines to
`clang/test/Driver/systemz-features.cpp`
covering the default, `-mhtm`/`-mno-htm`, and `-mvx`/`-mno-vx` cases.
The `-mvx` z/OS lines require `-march=arch11` because the default z/OS
CPU (zEC12) pre-dates vector support.
Add a second RUN in `clang/test/Sema/zvector.c` using triple
`s390x-ibm-zos` with `-target-cpu z13` so the file is exercised under
the z/OS code path.
These test extensions were carved out from
https://github.com/llvm/llvm-project/pull/223026 per reviewer request
(@uweigand): the extra test runs are good additions but are not related
to the i128 XPLINK64 change.
[flang][OpenMP] ORDERED clause is allowed on DO in 4.5+
Several compound directives containing DO were missing the ORDERED
clause in the set of allowed (once) clauses.
[orc-rt] Implement Windows CPU feature detection (#224516)
Adds Windows CPU feature detection for ORC-RT.
Currently supports x86-64 using the Windows/MSVC CPU feature interfaces.
Additional architectures can be added as needed.
NAS-144015 / 26.0.0 / Remove source attribute from license features (by sonicaj) (#19827)
This commit adds changes to drop the per-feature source attribute from
FeatureInfo and both license API models, since it was only ever carried
through to the wire payload and nothing ever branched on it.
Original PR: https://github.com/truenas/middleware/pull/19826
Co-authored-by: sonicaj <waqarahmedjoyia at live.com>
NAS-144015 / 26.0.0-RC.1 / Remove source attribute from license features (by sonicaj) (#19828)
This commit adds changes to drop the per-feature source attribute from
FeatureInfo and both license API models, since it was only ever carried
through to the wire payload and nothing ever branched on it.
Original PR: https://github.com/truenas/middleware/pull/19826
Co-authored-by: sonicaj <waqarahmedjoyia at live.com>
[Flang][FIR] Handle SequenceTypes in isRecordWithAllocatableMember (#224048)
Currently isRecordWithAllocatableMember does not handle sequence types,
either at the top level on the input type or in subsequent nestings, it
will effectively skip them. This is quite different to how
isRecordWithDescriptorMember handles these cases, as it does in fact
unwrap sequence types to correctly dictate if there are descriptor
members inside of a record type.
This PR simply aims to align the behaviour with
isRecordWithDescriptorMember, as there are several locations where
isRecordWithAllocatableMember is being used and the expectation is that
it will indicate if there's an allocatable member inside of the record
type irrespective of sequence types being part of the equation.
NAS-144015 / 27.0.0-BETA.1 / Remove source attribute from license features (#19826)
This commit adds changes to drop the per-feature source attribute from
FeatureInfo and both license API models, since it was only ever carried
through to the wire payload and nothing ever branched on it.
[AMDGPU] Do not fold clamp when only one max source has modifiers (#224517)
Fix isClamp to bail if either max source has a modifier, not only when
both do. Previously `max(x, |x|)` was wrongly folded as if it were x
[clang][Driver] Use --no-rosegment for LoongArch Linux
Pass --no-rosegment when linking LoongArch Linux targets so that read-only
code remains in the first LOAD segment, matching the GNU ld layout.
This allows Linux to make more effective use of file-backed PMD mappings and
reduces iTLB misses.
[AMDGPU][MC] Upstream gfx11/gfx12 true16 assembler test coverage
Upstream new assembler test cases, covering true16 .l/.h operands and op_sel
handling that had no upstream coverage.
[AMDGPU][MC] Upstream gfx12 true16 disassembler test coverage
Upstream new gfx12 disassembler test cases, covering true16 operand (.l/.h)
and op_sel decoding for f16 opcodes that had no upstream coverage:
[AMDGPU][MC] Upstream gfx11 true16 disassembler test coverage (#223823)
Upstream new gfx11 disassembler test cases, mostly covering true16
operand
(.l/.h) and op_sel decoding that had no upstream coverage.
lockf: Truncate the active lock list earlier in lf_purgelocks()
Otherwise vfs_report_lockf() can race with lf_purgelocks() while the
latter is freeing active lock entries without any locks held.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59768
[offload][omp] Move OpenMP KLE to libomptarget
Move preparations related to OpenMP KLE and
dynamicCGroupMem fallback out of the plugins and
into libomptarget.
Resructure Device::launch as it grew too large.