[libc] Fix OS when using `-llvm` OS in the triple (#181908)
Summary:
We spoof the OS name for the GPU targets and used to get it form the
'end' of the triple list. Adding `-llvm` makes that now point to `-llvm`
which is not recognized so it fails. Just use the direct index, we
already guard that the triple is the correct size
[mlir][vector] add ApplyReorderMultiReductionDimsPatternsOp tests (#180977)
With the new finer grained populate methods introduced in
8dde3051504cb9ae42e654bbce39001f3946beea (#180750), there was a
discussion about refactoring tests such that only one of the patterns
applies at a time. This commit starts this process by adding the
structure for one of these populate methods. The goal is for the
populate methods to have their own file (each showing inner and outer
reduction); deprecating populateVectorMultiReductionLoweringPatterns and
ApplyLowerMultiReduction; and removing the test file for
mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
Essentially an NFC. It also adds a new transform op for testing the
dialect and which downstream projects may choose to use.
Assisted-By: claude-4.5-sonnet
[Clang][CMake] Fix header target creation (#180609)
The `add_header_target` function was using a `file_list` parameter that
was supposed to capture all the header files that should be added to the
interface library target. However, the parameter was only capturing the
first header file, and the rest of the header files were not being added
to the target properties. I.e. the `get_target_properties` command was
only returning the first header file instead of all the header files.
The commit removes the `file_list` parameter and replaces it with
`ARGN`,
which captures all the header files passed to the function. This ensures
that all the header files are added to the interface library target and
can be accessed through the target properties.
[NFC] `CfiFunctions` are relevant when promoting from the original module only (#181080)
`CfiFunctions` contains only pointers to IR objects in the original
`Module`. When we `promoteInternals`, we try to find such pointers from
the first (exporting) module in the `CfiFunctions` set. That will always
fail (as in, no values will be found) in the first case, when the
exporting module is the merged module. This PR makes it more obvious
that the `CfiFunctions` set is only relevant for the second promotion.
Linux 6.19 compat: in-tree build: fix duplicate GCM assembly functions
Linux 6.19 added an AES-GCM VAES-AVX2 assembly implementation. It's
basically a translation from the BoringSSL perlasm syntax to macro
assembly. We're using the same source but the perlasm generated flat
assembly which shares some global function names with the former.
When building in-tree this results in the linker failing due to the
duplicate symbols.
To avoid the error we prepend `icp_` via a macro to our function
names.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Moch <mail at alexmoch.com>
Signed-off-by: Attila Fülöp <attila at fueloep.org>
Closes #18204
Closes #18224
[clang][tests] Fix cross-build test failures on Darwin. (#181805)
Test failures started after
https://github.com/llvm/llvm-project/pull/178077 which introduced
Darwin-specific system checks in several tests, including checks for the
presence of SDKSettings.json.
These tests are intended to validate features in Clang’s driver that
require Clang to target a Darwin platform while running on a Darwin
host. Currently, their execution is gated by the REQUIRES: system-darwin
annotation.
This approach breaks down when running the tests on a cross-compiling
build of Clang on a Darwin host.
If the build does not include any Darwin targets, the tests will still
run (because the host is Darwin) but will fail spuriously due to the
absence of a Darwin target in the build.
[4 lines not shown]
[RISCV] Remove VMConstraint from ri.vzero.v (#181895)
This instruction doesn't have a VM operand.
It only has 1 operand, VD. The way the VMConstraint check is
implemented, if VD is V0 it would compare the last operand to V0. Since
the last operand is VD, this would always match and generate an error.
While I was here, move the encoding related let statements into the
class body for consistency with RISCVInstrInfoV.td.
[mlir][test-ir-visitors] Fix noSkipBlockErasure for blocks providing global context (#181320)
The pass checks if something is pointing to the current block in testNoSkipErasureCallbacks() inside noSkipBlockErasure() callback and erases it if no one is pointing to it. However, it doesn't consider the
case where the current block might be providing global context to other blocks in the same parent region even if no one is pointing to it (see the attached test for an example of this). Erasing this block would then lead to invalid IR. We solve this by dropping intra-block op uses from ops within the same parent region.
Fixes https://github.com/llvm/llvm-project/issues/178099
[SystemZ][z/OS] Remove temporary gnu as output on z/OS
On z/OS, there is only HLASM as system assembler available. Since
all LIT tests are migrated, the temporary option ca now be removed.
[OFFLOAD] Add headers to support complex math for spirv (#179846)
This is to add support for complex operations for OpenMP kernels when
compiled with spirv.
This is the first PR to add support for spirv in OpenMP wrapper headers
to reduce the size of PRs
[OFFLOAD] Extend olMemRegister API to handle cases when a memory block may have been mapped outside of liboffload. (#172226)
This PR adds extends liboffload olMemRegister API to handle a case when
a memory block may have been mapped before calling olMemRegister to
support some use cases in libomptarget
sdt: Disable SDT probes in kernel modules for GCC on aarch64
For PIC code, the existing assembly constraints do compile on aarch64.
Some kernel modules build ok using the 'p' constraint with the 'a'
operand modifier, but not all.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55166
vchiq: Fix return type of vchiq_copy_from_user
Change the function definition to map the declaration and consistently
return an enum value. This fixes the following error reported by GCC:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:322:1: error: conflicting types for 'vchiq_copy_from_user' due to enum/integer mismatch; have 'int(void *, const void *, int)' [-Werror=enum-int-mismatch]
322 | vchiq_copy_from_user(void *dst, const void *src, int size)
| ^~~~~~~~~~~~~~~~~~~~
In file included from sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h:38,
from sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:61:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:647:1: note: previous declaration of 'vchiq_copy_from_user' with type 'VCHIQ_STATUS_T(void *, const void *, int)'
647 | vchiq_copy_from_user(void *dst, const void *src, int size);
| ^~~~~~~~~~~~~~~~~~~~
Differential Revision: https://reviews.freebsd.org/D55163
arm bcm2835: Appease a warning from GCC
No code currently uses the vc_audio_msg_type_names array of strings.
Reported by: -Wunused-variable
Differential Revision: https://reviews.freebsd.org/D55162
arm64: Explicitly use movz
This appeases GNU as which doesn't map the mov alias to movz.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D55160
Tor Browser: update to 15.0.6
And MFC "also install @sample pledge and unveil files in /etc"
and
"apply unveil.* changes from firefox-esr that I missed some time ago".
bus: Renumber global IVAR ranges
Use a more consistent scheme for allocating shared IVAR index ranges.
Differential Revision: https://reviews.freebsd.org/D54161
bus: Drop a couple of unused IVAR indices
This changes the in-kernel ABI, but that is permitted across major
versions and is cleaner than leaving these around forever.
Differential Revision: https://reviews.freebsd.org/D54160
bus: Change a few bus drivers to use consistent IVAR ranges
A few bus drivers used 1 instead of 0 as the starting index of their
private IVARs. Fix those drivers to start at BUS_IVARS_PRIVATE for
consistency.
Differential Revision: https://reviews.freebsd.org/D54934
bus: Document special ranges of IVARs
Some IVAR indices are special in that they have global meaning across
multiple buses where as other IVARs are always private to the local bus.
Try to document this a bit and add constants for the various ranges to
avoid future conflicts.
This is a no-op, but IVAR indices are now generally defined as enums
as that makes it easier to define them in terms of ranges.
Reviewed by: imp, royger, andrew
Differential Revision: https://reviews.freebsd.org/D54159
acpi_gpiobus: Reuse the existing IVAR index for an ACPI handle
ACPI_IVAR_HANDLE is a global index shared across multiple busses,
there is no need for a unique constant here.
Reviewed by: vexeduxr, imp
Differential Revision: https://reviews.freebsd.org/D54155
[SystemZ][z/OS] Show instruction encoding in HLASM output
This change adds the support to show instruction encoding as a comment
when emitting HLASM text. With this, the last 2 LIT tests migrate to
HLASM syntax.
evdev: Drop comments from input-event-codes.h
They were copied intact from the Linux GPL-only file.
Requested by: imp, glebius
MFC after: 1 week
(cherry picked from commit 89aa8a94053fdd22ed716fdf424a2d10e70b3188)