[VectorCombine] Fold deinterleave2 with smaller element size on big-endian (#243356)
The fold bailed out on big-endian targets because the vector bitcast
puts element 0 of the narrow vector in the high half of each wide
element there. The merge pattern that can be folded is therefore
mirrored: the low half of each merged element comes from the second
deinterleaved field. Swap the roles of the two fields when matching the
merge and swap the field indices of the newly created deinterleave
accordingly, so the fold applies to that mirrored pattern instead of
being disabled.
Fix comment:
https://github.com/llvm/llvm-project/pull/238626#discussion_r4483976228
[BoundsSafety][NFC] Hold LateParsedTypeAttrInfo in declarator late-attribute lists (#239050)
Make DeclSpec, Declarator and DeclaratorChunk hold a SmallVector of
LateParsedTypeAttrInfo * instead of a LateParsedAttrList.
LateParsedAttrList has inline storage for two pointers plus flags, which
makes DeclaratorChunk larger. That may have caused the compile-time
regression in #238909. The new list has no inline storage.
Sema also only has the definition of LateParsedTypeAttrInfo, not of
LateParsedAttribute. Holding the former lets Sema build the type
directly, without a callback into the parser.
No functional change: nothing populates or reads these lists yet.
Assisted-by: Sonnet 5.5
elf_common.h: Correct R_X86_64_JUMP_SLOT name
x86-64 ABI dated March 12, 2025 lists this relocation type as
R_X86_64_JUMP_SLOT. Update the name, and add R_X86_64_JMP_SLOT (without
a "U") as an alias.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61776
[CMake] Apply LLVM warning policy per target instead of via CMAKE_<LANG>_FLAGS
HandleLLVMOptions.cmake appends LLVM's warning, suppression and `-Werror`
options to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. Those are language-wide, so
every target in the build tree inherits LLVM's diagnostic policy, including
unrelated projects embedded next to LLVM (`LLVM_EXTERNAL_PROJECTS`,
`add_subdirectory`) and third-party code, even if they only link an LLVM
library. LLVM's policy prefers, for example, exhaustive enum switches without
`default` and enables `-Wcovered-switch-default` accordingly; a project with
a different style should not have that imposed on it just because it shares a
build tree.
The policy is now collected in `LLVM_WARNING_OPTIONS_C/CXX` lists and attached
as `PRIVATE` compile options by `llvm_update_compile_flags()`, so it applies to
targets made with `llvm_add_library`, `add_llvm_executable`, tablegen tools,
plugins and unit tests, but is not exported and does not reach consumers.
`llvm_apply_warning_options(<target>)` lets other LLVM-owned targets opt in.
Subprojects that adjust the policy should use `llvm_add_warning_options()`
rather than append to `CMAKE_<LANG>_FLAGS`, which now precedes LLVM's options
[25 lines not shown]
[libc] Major docs refresh (#241609)
This was made as an attempt to write down as much of what I know about
LLVM-libc as possible. The process involved using an LLM agent to
interview me about what wasn't clear from the codebase and then write
docs based on my answers. After that were several rounds of revisions
where I tweaked phrasing and corrected more issues. The final documents
are an accurate reflection of my understanding of the state of
LLVM-libc.
Assisted-by: Automated tooling, human reviewed.
[Offload][AMDGPU] Set SDMA for AMDGPU (#241577)
Following https://github.com/llvm/llvm-project/pull/239816, apply the
SDMA value that we current used downstream. It will make the
configuration more consistent between upstream/downstream.
RuntimeLibcalls: Drop errno effects on targets without math errno
Teach the triple about targets which never support writing errno from
math functions. This is distinct from clang's -fno-math-errno default,
which is also enabled on some targets whose libm can set errno, such
as NetBSD. In the future we could add a no-math-errno module flag, but
that would exacerbate an existing bug where linking a -fno-math-errno
TU into a -fmath-errno TU will implicitly take the first linked
module's setting.
To do this make math errno a separate libcall property instead of
directly encoding it in the memory effects. This is necessary because
of non-math errno users.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
bhyve/riscv: fix PCIe FDT interrupt-map entry stride
In bhyve arm64, each PCIe interrupt-map entry spans 10 cells because the
ARM GIC specifies #interrupt-cells = 3. On RISC-V, the APLIC uses
#interrupt-cells = 2, so each entry spans only 9 cells.
When the PCIe FDT code was originally adapted from arm64, the property
allocation size and cell assignments were reduced to 9 cells per entry,
but the loop multiplier retained the 10-cell stride. This caused the
interrupt-map array to be packed incorrectly with gaps, breaking PCI
interrupt routing in guest operating systems and overflowing the
allocation by 16 cells.
Correct the loop stride to 9 cells so the interrupt map is properly
formed.
Approved by: re (cperciva)
Reviewed by: jrtc27
Fixes: 7ab1a32cd43c ("bhyve/riscv: Initial import")
[28 lines not shown]
RuntimeLibcalls: Mark noreturn and pure helper libcalls (#241627)
Mark the functions which never return as noreturn. Add some nounwind
and cold, mostly following inferLibFuncAttributes. Mark
misc. functions as pure.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
contrib/kyua: update config.h for 0.15.1 -> 0.15.2
This was accidentally missed in the prior commit.
This commit addresses a largely cosmetic issue.
MFC after: 6 days
MFC with: c16da33701d0
Fixes: c16da33701d0 contrib/kyua: update to 0.15.2