[PowerPC] Use the 16-byte stack and vector alignment on OpenBSD (#245115)
The 64-bit PowerPC data layout appends the stack and vector alignment
components only for AIX, Linux and FreeBSD, so powerpc64-openbsd gets a
shorter layout. OpenBSD also uses the ELFv2 ABI on powerpc64, so there
is no ABI reason for the difference. Without them the natural stack
alignment is left unspecified, which can cause unnecessary dynamic
stack realignment.
Follow-up to #232336, which did the same for FreeBSD.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Translate offloading entry attributes to LLVM IR (#241233)
Let -fgpu-rdc reuse llvm::offloading::emitOffloadingEntry instead of
rebuilding the entry layout in CIR
[mlir][SPIR-V] Add spirv.INTEL.FunctionPointerCall op (#245282)
Add OpFunctionPointerCallINTEL from SPV_INTEL_function_pointers for
indirect calls
The verifier checks arguments and result against the pointee function
type
[analyzer] Avoid redundant ProgramState refcounting and copies (#244848)
Every ProgramState retain and release was an out-of-line call, and
creating a state copied it twice: callers build a temporary copy, and
getPersistentState copied that again into the uniqued slot before the
temporary was destroyed. Each copy also retains the store through a
virtual call, and RegionStore's retain/release built a temporary
RegionBindingsRef, adding two more refcount operations.
- Inline the ProgramState retain and the release fast path. The
IntrusiveRefCntPtrInfo members are templates so they are instantiated
only where ProgramState is complete; freeing stays out of line.
- Give ProgramState a move constructor and move the temporary into the
persistent slot.
- Give StoreRef move operations and use them when consuming a StoreRef.
- Retain/release the RegionStore tree root directly.
- Pass ProgramStateRef by const reference along the node creation path
(CheckerContext::addTransition and friends, CoreEngine::makeNode,
ExplodedGraph::getNode).
[10 lines not shown]
[AARCH64] Fix failing builtin tests (#245400)
A recent change to add SVE vector kind information in CIR missed a few
tests in the clang/test/CodeGen/AArch64/sve directory. This change
updates those tests.
[flang][OpenMP] Evaluate composite DISTRIBUTE clauses outside PARALLEL
In composite DISTRIBUTE PARALLEL DO [SIMD], lowering creates omp.parallel
first, nests omp.distribute inside it, and lowers the DISTRIBUTE clauses
inside the parallel region. Take
```
!$omp teams distribute parallel do dist_schedule(static, chunk(n))
```
where chunk has variants for construct={teams} and construct={parallel}.
Flang currently emits
```mlir
omp.teams {
omp.parallel {
%c = fir.call @parallel_chunk(...)
omp.distribute dist_schedule_static dist_schedule_chunk_size(%c) {
```
[23 lines not shown]
[CodeGen] Clarify LiveStacks test comments
Say what to observe in the spill slot test to tell that the slots
were not merged, and make the unit test comment self-contained.
crypto/openssl: correct messages printed out when copying manpages
Prior to this change section 1's message applied to 3/5/7 and vice
versa. Now the right message is printed out by the Makefile with its
respective operation.
MFC after: 1 week
crypto/openssl: sync manpages with current release
The content in the manpages matches 3.5.4 today and we're on 3.5.9.
Update to 3.5.9's content so the manpages reflect the shipped release.
MFC after: 1 week
Only rewrite VPExpandSCEVRecipe users that are dominated by the stride check
This "regresses" the code a bit, including relative to LAA-based side
speculation - see
`@stride_dependent_btc`/`@stride_dependent_btc_non_preventive`. We'd
probably need bigger changes around `VPlan::getTripCount` if we'd want
to optimize that in a safe manner.
[Clang][SYCL][Object] Compile SYCL device code once per IGCA target (#239010)
Compile SYCL device code once per IGCA target.
Several Intel GPUs can share an IGCA target, e.g. `xe-mtl-u` and
`xe-mtl-h` are both `igca_30r`.
Until now, `-fsycl --offload-arch=xe-mtl-u,xe-mtl-h` compiled the device
code once per GPU.
Now it is compiled once for `igca_30r`, and then for both GPUs with a
single `ocloc -device xe-mtl-h,xe-mtl-u` call.
The device image records the GPUs, as
`arch=igca_30r,code=xe-mtl-h,xe-mtl-u`.
`clang-linker-wrapper` links device code with the same `arch` and `code`
together, passes the GPUs to `clang-sycl-linker` with a new hidden
`--code=` option, and merges the results into one offload binary, as the
SYCL runtime loads only one. To decide which device images are linked
together, `OffloadFile::TargetID` is now a struct with `Triple`, `Arch`
and `Code` instead of a `std::pair`, so that `areTargetsEquivalent` and
[13 lines not shown]
tdestroy(3): Take posix_tnode * like the other tsearch(3) functions
tdestroy(3) was originally a glibc extension. glibc does not use
posix_tnode (yet), and when tdestroy(3) was pulled in its signature was
not updated to match the other tsearch(3) functions.
Fixes: b8c99e7d912f ("libc: add glibc-compatible tdestroy(3)")
Sponsored by: Klara, Inc.
[flang][OpenMP] Evaluate composite DISTRIBUTE clauses outside PARALLEL
In composite DISTRIBUTE PARALLEL DO [SIMD], omp.distribute is nested
inside omp.parallel, and the DISTRIBUTE clauses were evaluated after
omp.parallel was created. A DECLARE VARIANT call in the DIST_SCHEDULE
chunk-size expression therefore matched construct={parallel}, although
DISTRIBUTE encloses PARALLEL in the source, and every thread evaluated
the expression.
Evaluate the DISTRIBUTE clauses before creating omp.parallel, as for the
explicit nesting, and destroy their temporaries once, after omp.parallel.
Fixes #244760
Assisted-by: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot at users.noreply.github.com>
fusefs tests: Use memcpy to work around a -Wstrlcpy-strlcast-size warning
tests/sys/fs/fusefs/xattr.cc:572:50: error: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Werror,-Wstrlcpy-strlcat-size]
572 | strlcpy((char*)out.body.bytes, attrs1, sizeof(attrs1));
| ~~~~~~~^~~~~~~
The warning is correct in that the size is the size of the source, but
that is intended in this case. Use memcpy() instead of strlcpy() to
match the same code in the size_only_race_smaller test above.
Differential Revision: https://reviews.freebsd.org/D49786
(cherry picked from commit faae895fec6571242ae05b11bc7eba0dff83fa49)
[flang][OpenMP] Build the variant construct context from source nesting
Currently, METADIRECTIVE and DECLARE VARIANT selection builds the
construct trait set by walking the MLIR operations around the insertion
point, and that nesting doesn't always match the source. For
```fortran
!$omp teams distribute parallel do
do i = 1, n
a(i) = f()
end do
```
lowering creates omp.teams > omp.parallel > omp.distribute > omp.wsloop,
so the walk sees DISTRIBUTE inside PARALLEL. For
```fortran
!$omp atomic update
x = x + f()
[21 lines not shown]
[mlir][openacc] Anchor OffloadLiveInValueCanonicalization on FunctionOpInterface (#245399)
In preparation to use the pass in the CIR/OpenACC pipeline, CIR uses
cir.func that implement the FunctionOpInterface so the pass is better
anchored on it than func.func.