[ELF] Add VersionNode lexer state for better version script parsing
... so that `local:*;` will be lexed as three tokens instead of a single
one in a version node. This is used by both version scripts and dynamic
lists. Fix #174363
In addition, clean up special code for space-separated `local :` and `global :`.
This patch brings our lexer behavior closer to GNU ld. While GNU ld
additionally rejects more characters like `~/+,=`, we don't implement
this additional validation.
Pull Request: https://github.com/llvm/llvm-project/pull/174530
[RISC-V][Mach-O] Implement and select the RISCVMachOTargetObjectFile. (#174677)
The RISCVTargetMachine was still selecting RISCVELFTargetObjectFile,
which was making llc crash when running the test at
llvm/test/CodeGen/RISCV/riscv-macho.ll
[RISCV][llvm-readobj,llvm-objdump] Use getRISCVVendorRelocationTypeName for RISCV vendor relocations (#172811)
Use getRISCVVendorRelocationTypeName to resolve RISCV vendor-specific
relocation names (R_RISCV_CUSTOM192-255) when preceded by
R_RISCV_VENDOR.
This improves the output of llvm-readobj and llvm-objdump to show
vendor-specific names like R_RISCV_QC_ABS20_U, R_RISCV_QC_E_BRANCH
(QUALCOMM) and R_RISCV_NDS_BRANCH_10 (ANDES) instead of generic
R_RISCV_CUSTOM* names.
Per RISC-V psABI, R_RISCV_VENDOR must be placed immediately before its
associated vendor-specific relocation, so the vendor symbol is consumed
after one use. Unknown vendors fall back to R_RISCV_CUSTOM*.
[libc++][NFC] Refactor `[[nodiscard]]` tests (#173451)
Originally some `[[nodiscard]]` tests were implemented in
`*/test/libcxx/diagnostics`. The Standard has a library `Diagnostics`
and this folder should be reserved for it by convention. Most newer
tests were added to their respective sub-folders. This patch moves
around the already implemented `[[nodiscard]]` tests to their respective
folders where they belong and standardizes the name to
`nodiscard.verify.cpp` wherever possible.
N.B. This refactors only tests, which were merged. The remaining
(in-progress) ones will be moved in a future patch to reduce merge
conflicts.
[clang-doc] Add a border box to comments in HTML (#174541)
Comments weren't very visually distinctive in HTML. They immediately
proceeded the declaration header and didn't have spacing between them.
To visually organize them, they now have a thin border around them.
Different comment types are also now separated by a small gap. This also
allows them to be easily changed in the future. Some extraneous `<div>`
tags are also removed or merged.
[LV] Conservatively predicate SDiv/SRem (#170818)
Conservatively predicate sdiv/srem:
- RHS may carry poison in masked‑off lanes.
- RHS could be −1 while LHS has masked‑off lanes (risking INT_MIN/−1
overflow).
We’ll relax this once we can prove non‑wrap/non‑poison conditions.
Fixes #170775.
chunk forgotten for previous commit by chris:
KVA TLB entries can exist under PCID_TEMP after pmap_map_ptes() + interrupts
so KVA shootdowns must invalidate PCID_TEMP too
ok deraadt, mlarkin discussion and approval guenther
[AMDGPU] Handle `s_setreg_imm32_b32` targeting `MODE` register
On certain hardware, this instruction clobbers VGPR MSB `bits[12:19]`, so we need to restore the current mode.
KVA TLB entries can exist under PCID_TEMP after pmap_map_ptes() + interrupts
so KVA shootdowns must invalidate PCID_TEMP too
ok deraadt, mlarkin discussion and approval guenther
[RISCV] Improve load/store pairing for Xqcilsm instructions in RISCVLoadStoreOptimizer (#174612)
If we did not pair two viable `Xqcilsm` load/store instructions in
`RISCVLoadStoreOptimizer` we iterated over the second instruction when
looking for other pairs to merge. This leads to us missing out on
opportunities where the second instruction could have been the start of
another potential pair that could have been merged.
stdbool.h: Update for C23
When a compiler with C23 or higher is detected, builtin bool, true,
and false are used to conform the C23 standard.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D44664
[libclc] Add support for `nvptx64-nvidia-cuda` triple (#174611)
Summary:
The OS here is the standard CUDA support target, which is the ABI used
for all of the same intrinsics the `nvidiacl` target uses. These can be
aliases asn `cuda` in the triple is the canonical form for most all GPU
compute.