[libc++] Introduce implicit and explicit ABI annotations (#193045)
This patch introduces `_LIBCPP_{BEGIN/END}_EXPLICIT_ABI_ANNOTATIONS` and
marks everything within an
`_LIBCPP_{BEGIN,END}_UNVERSIONED_NAMESPACE_STD` (and any derivatives
like `_LIBCPP_{BEGIN,END}_NAMESPACE_STD`) implicitly by default. This
allows us to drop `_LIBCPP_HIDE_FROM_ABI` in most of the code base,
except for functions which shouldn't be `_LIBCPP_HIDE_FROM_ABI`.
This patch doesn't remove any `_LIBCPP_HIDE_FROM_ABI`s, since we have
over 13k of them in the code base. Actually dropping them will happen
over some time to avoid too many merge conflicts.
Revert "[lldb] Real-time console pane for output in lldb tui" (#196507)
Reverts llvm/llvm-project#177160
The new test is timing out on the AArch64 Linux buildbot
(https://lab.llvm.org/buildbot/#/builders/59/builds/34166) and on my own
machine.
I suspect something to do with the requested terminal size. If what we
get is smaller than requested, it could time out waiting for expected
program output.
[llvm][OpenMP][SPIRV] Fix assertion for GPU reductions (#194879)
Currenty compiling a `target reduction` results in the following assert
for spirv64-intel target:
> Assertion `New->getType() == getType() && "replaceUses of value with
new value of different type!"' failed.
This patch fixes it by adding an addrespace cast where necessary to make
the types of the expressions match.
Assisted-by: claude-sonnet-4-5
clang: Add BoundArch argument to addClangTargetOptions
addClangTargetOptions already has an OffloadKind argument,
but it kind of doesn't make sense for any function to know the
OffloadKind, but not the associated BoundArch.
The current process is kind of convoluted. TranslateArgs
synthesizes a -mcpu argument from BoundArch, and later
addClangTargetOptions re-parses that -mcpu argument each
time it wants the architecture. Add this argument so this
can be cleaned up in a future change.
Co-authored-by: Claude Sonnet 4 <noreply at anthropic.com>
[AArch64] Use EXT for byte shuffles with leading zeros (#193466)
Fixes: https://github.com/llvm/llvm-project/issues/191735
Teach AArch64 LowerVECTOR_SHUFFLE to recognize byte shuffles that are a
zero fill right shift and lower them to EXT with a zero vector. Adds a
regression test too.
Change-Id: Iffe97ff7e35cfaff790f537b4f1f5ba9aded4f92
Do sleeping malloc() and copyin() before checks within sys_semop().
Otherwise the semaphore id referenced by `semaptr' could be destroyed
or replaced during context switch.
ok cludwig
[lldb][test] Move DAP processes to own group to avoid random SIGHUPs (#195816)
On macOS, LLDB's test suite randomly receives SIGHUP signals that stop
the test suite early. The source of these SIGHUP's seems to be a bug in
the kernel (most likely job control).
The exact steps for reproducing this are not clear, but I have a set of
three tests of which two need to run concurrently for this to trigger:
* TestDAP_runInTerminal
* TestDAP_launch_io_integratedTerminal
* TestDAP_launch_stdio_redirection_and_console
I was also running UBSan on this build which may or may not be necessary
to make this random failure more persistent.
When these tests run, macOS job control will send SIGHUP to the process
group of the spawned subprocesses in that test. As LIT is in the same
process group, it also receives the SIGHUP and shuts down.
[8 lines not shown]
[llvm][tools] Extend llvm-objdump to support nested OffloadBinaries (#185425)
Extends llvm-objdump to print the information of images contained in
nested OffloadBinaries. For example, for a binary compiled with #185413
it shows
```
$llvm-objdump --offloading ./a.out
./a.out: file format elf64-x86-64
OFFLOADING IMAGE [0]:
kind elf
arch
triple spirv64-intel
producer openmp
image size 43104 bytes
[Nested OffloadBinary format detected]
Number of inner images: 1
kind spir-v
[13 lines not shown]
[X86][GlobalISel] Support globals in pic mode (#170038)
Introduce G_WRAPPER_RIP it is the same node as in DAG. It is required to
make legalization possible when a load from stub is required to obtain a
pointer to a global value. It allows to avoid manual selection in
X86InstructionSelector.
Also added a missing check on X86SelectAddress failure.
[DAG] canCreateUndefOrPoison - poison generating flags / out of range shift amounts only generate poison (#196489)
Matches ValueTracking / GISel implementations - although testing options are limited until DAG has actual uses of UndefPoisonKind::UndefOnly
[lldb-dap] Fix build when using precompiled header and Xcode generator. (#196366)
When building with precompiled headers and Xcode as a generator, It adds
`obj.lldbDAP.dir/${BUILD_TYPE}/cmake_pch.xxx` but does not generate one
causing the build to fail.
This might have to do with `add_llvm_library` adding a source file
`Dummy.c` to any object it creates if using Xcode as a generator and
`lldbDAP` object not declaring it's LINK_LIBS and LINK_COMPONENTS.
[libclc] Use spirv[64]-mesa-mesa3d triple in README.md (#196483)
Now that #194607 landed we use a normalized triple in the README for the
SPIRV targets. Before `spirv-mesa3d-` and `spirv64-mesa3d-` were being
used and those will be normalized to `spirv-unknown-mesa3d` and
`spirv64-unknown-mesa3d` by the following command in
`runtimes/CMakeLists.txt` with this command:
```console
$ clang --target=spirv-mesa3d- -print-target-triple
spirv-unknown-mesa3d
```
This is because in `llvm/lib/TargetParser/Triple.cpp` the term `mesa3d`
is recognized as an OS and placed in third position. The install path
for `libclc.spv` there ends up in `spirv-unknown-mesa3d/libclc.spv`.
With this change we suggest to use triples that "survive" the
normalization:
[7 lines not shown]
filesystems/mergerfs: Fix build with newer Clang/libc++
The vendored fmt header uses malloc/free without including the
appropriate declarations, causing builds to fail on recent
FreeBSD -CURRENT toolchains.
Add the missing <cstdlib> include to libfuse/include/fmt/format.h.
Notified by: pkg-fallout
(cherry picked from commit e60f6672636217373c1f86a19ccd168ac18c721a)
filesystems/mergerfs: Fix build with newer Clang/libc++
The vendored fmt header uses malloc/free without including the
appropriate declarations, causing builds to fail on recent
FreeBSD -CURRENT toolchains.
Add the missing <cstdlib> include to libfuse/include/fmt/format.h.
Notified by: pkg-fallout