[flang][OpenMP] Support lowering of metadirective (part 1) (#193664)
Add lowering support for OpenMP metadirective variants that can be
selected statically. Selection is performed during lowering with
`llvm::omp::OMPContext`, and only the selected directive variant is
lowered.
For example:
```fortran
subroutine static_vendor()
!$omp metadirective &
!$omp & when(implementation={vendor(llvm)}: barrier) &
!$omp & otherwise(nothing)
end subroutine
```
is lowered to a function containing `omp.barrier`, because `vendor(llvm)` is statically applicable when compiling with Flang.
Applicable variants are represented with `llvm::omp::VariantMatchInfo` and ranked using OpenMP context matching and selector scores from the LLVM frontend.
[20 lines not shown]
Merge tag 'soc-fixes-7.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull SoC fixes from Arnd Bergmann:
"Following the previous set of fixes, this addresses another
significant number of small issues found in firmware drivers (tee,
optee, qcomtee, qcom ice, exynos acpm) drivers through various tools.
This is about error handling, resource leaks, concurrency and a
use-after-free bug.
The fixes for the Qualcomm ICE driver also introduce interface changes
in the UFS and MMC drivers using it.
Outside of firmware drivers, there are a few fixes across the tree:
- Minor driver code mistakes in the Atmel EBI memory controller, the
i.MX soc ID driver and socfpga boot logic
- A defconfig change to avoid a boot time regression on multiple
[27 lines not shown]
[flang] Support -ffunction-sections and -fdata-sections. (#199731)
Wire the flags through the driver, frontend, and TargetMachine, and add
driver and codegen lit tests.
Fixes https://github.com/llvm/llvm-project/issues/163550
---------
Co-authored-by: Cursor <cursoragent at cursor.com>
[libc] Add definition of struct in6_addr to netinet/in.h (#201057)
This patch implements the struct in6_addr definition for netinet/in.h,
mapping it from netinet/in.yaml to the generated public header.
I've defined struct in6_addr under include/llvm-libc-types/ using an
anonymous union containing s6_addr, s6_addr16, and s6_addr32 (only the
first one is mandated by POSIX). Other implementations achieve this by
using a named union and defining the members as macros. This approach is
cleaner, but could potentially run into compatibility problems with code
which expects s6_addr is a macro. If we do, we may have to re-evaluate
this approach, but I'd like to avoid uglyfying this preemptively.
I added a simple test to check the memory layout of the address.
Assisted by Gemini.
[lldb] Skip TestQemuLaunch.py on arm64e (#200969)
This test is set up to use a python-based qemu-like stub instead of the
actual qemu (which makes it far more portable). When trying to run the
test as arm64e, LLDB will attempt to launch an arm64e-based qemu.
Because the fake qemu is a python script, LLDB will try to launch python
as arm64e. Neither the python that ships with Xcode nor the python from
python.org have an arm64e slice, so this test will not work for arm64e.
[clang] Treat unnamed bitfields as padding in `__builtin_clear_padding` (#201102)
Currently Clang's implementation of `__builtin_clear_padding` diverges
from GCC in its treatment of unnamed bitfields.
GCC treats them as padding (which seems correct since they can't be
named and wouldn't be part of the value representation of an object,
though I'm not sure what the standard has to say about this).
[Gobdolt](https://godbolt.org/z/e9Mo91dhh)
GCC trunk:
```
pre-clear bytes: ff ff ff ff
post-clear bytes: 01 00 00 80
```
Clang trunk:
```
[7 lines not shown]
[SystemZ][z/OS] Add XPLink ABI on z/OS (#188501)
This patch introduces full support for the XPLINK calling convention on
z/OS within LLVM. XPLINK is documented in the Language Environment
Vendor Interface ([Chapter
22](https://www.ibm.com/docs/en/zos/3.2.0?topic=applications-call-linkage-convention-amode-64))
and in the IBM Redbook [XPLink: OS/390 Extra Performance
Linkage](http://www.redbooks.ibm.com/abstracts/sg245991.html?Open
). It defines a high‑performance linkage model used by the z/OS Language
Environment (LE) and by the XL C/C++ compiler.
This work succeeds and replaces the earlier effort in [PR
101024](https://github.com/llvm/llvm-project/pull/101024). The present
implementation restructures the original approach, significantly expands
test coverage, and aligns more closely with both the architectural
requirements of XPLINK and the de‑facto ABI behaviour of XL C/C++.