[compiler-rt] Fix undefined AMDGPU variable not set for builtins (#202733)
Summary:
compiler-rt is weird and has multiple config files, make sure this is
set for both libs and builtins.
[flang][OpenMP] Move assumed-size array check to list item verification (#201385)
The presence of whole assumed-size arrays will now be diagnosed in a
single location, together with the verification of list item kinds.
[mlir][affine] emit `in_bounds` on `transfer_read`/`write` when statically provable in `affine-super-vectorize` (#201180)
This patch fixes an issue reported on the MLIR Discourse ([May
2026](https://discourse.llvm.org/t/mlir-affine-affine-super-vectorize-does-not-set-in-bounds-on-transfer-ops-for-statically-divisible-shapes/90785/3)),
that I also came across during a study I reported in [my blog
post](https://federicobruzzone.github.io/posts/mlir-study.html).
`affine-super-vectorize` always creates `vector.transfer_read` and
`vector.transfer_write` without an `in_bounds` attribute, even when it
is statically provable that every access stays within bounds. This
forces downstream lowering to unconditionally emit
`llvm.intr.masked.load`/`llvm.intr.masked.store`: masked intrinsics that
carry $\sim3\times$ overhead on AArch64/NEON and prevent
auto-vectorization (see the MLIR Discourse).
## Root cause
`vectorizeAffineLoad` and `vectorizeAffineStore` in `SuperVectorize.cpp`
forwarded neither the `in_bounds` mask nor any analysis of it when
[55 lines not shown]
[LifetimeSafety] Diagnose UAF for aligned and nothrow new expressions (#202286)
Previously LifetimeSafety skips issuing a heap allocation loan for
replaceable global allocation functions such as aligned and nothrow
operator new. This commit fixes that by modeling those forms as heap
allocations.
Closes https://github.com/llvm/llvm-project/issues/196208
[APINotes] Early return when no apinotes files are loaded
When no APINotes readers are available, let's not spend time trying to determine the current decl's context or do other redundant work.
Resolves https://github.com/llvm/llvm-project/issues/202214
[SPIRV] Let atomic store store pointers (#201251)
SPIRV atomic store permits only integer or floats as per SPIRV spec.
When compiling libc there several places in the code where pointers are
atomically stored causing compilation to break. It can be fixed by using
casting in the libc code but in order to keep the libc code clean it is
preferrable to do it in SPIRV backend. This change will cast pointer
parameters to integers of appropriate size and generate atomic store
instruction that uses integers per SPIRV spec.
[AArch64][NFC] Avoid relocations in LdStNInstrDesc (#202025)
These are small strings, so instead of an 8 byte string pointer that
needs a relocation store the strings directly inline. This avoids 320
relocations in libLLVM.so.
[AMDGPU][NFC] Templatise and roundtrip gfx11_asm_vop3_dpp16.s
I tried to make sure this covers all important cases from asm/disasm
tests here upstream and the true16 branch downstream.
This will resolve ~4k lines of differences vs the true16 branch.
Remove support for the obsolete "_fixup" and "_fixedup" modes of objc_msgSend (#202449)
This was one of a long series of tricks for accelerating ObjC dispatch,
but this one hasn't been used for many years now, and the ObjC
maintainers have no intention of reviving this notion.
[lld][macho] Fix thunks with multiple text sections (#199747)
When there are multiple `__text` sections, LLD might not generate thunks
to stubs sections when they are required, leading to relocation errors.
```
ld64.lld: error: a.o:(symbol _foo+0x0): relocation BRANCH26 is out of range: 134217744 is not in [-134217728, 134217727]; references _extern_sym
```
Create `TextOutputSection::estimateStubsEndVA()` to correctly estimate
the end VA of the last stubs section so we can tell when branches to
stub symbols will be in range.
Technically this could cause lld to generate more thunks in some cases.
If a binary requires thunks (the `__TEXT` segment is >128MiB) and has
multiple `__text` sections like `__text_cold` or `__lcxx_override`, then
all branches to stub symbols will require thunks. Without this change we
could get the relocation errors above. We might be able to workaround
the problem by placing the `__text` section last.
Fixes https://github.com/llvm/llvm-project/issues/195387.
[HIP] Fix `-flto` overriding `--no-lto` not that it is default (#202699)
Summary:
The previous changes to LTO made the flto flag passed by default which
overrode the hack we did to ervert to the old non-LTO pipline. This is a
temporary hack so I'm hacking it even further to fix it.
workflows: Consolidate pr-subscriber and issue-subscriber (#200503)
This consolidates duplicate logic from the pr-subscriber and
issue-subscriber workflows into a single workflow.
[asan] Make exceptions for asan_new_delete.cpp conditional (#202436)
Introduce the COMPILER_RT_ASAN_ENABLE_EXCEPTIONS CMake
option to control whether the ASan C++ runtime
(asan_new_delete.cpp) is compiled with exception
support.
This fixes build failures on platforms with noexcept
toolchains (like Fuchsia's noexcept variant) where
ASan was compiled with exceptions but linked against a
noexcept libc++abi, resulting in undefined symbol
errors for __cxa_begin_catch and __gxx_personality_v0.
The option defaults to ON to preserve the behavior of
#200719, but automatically defaults to OFF if
LIBCXX_ENABLE_EXCEPTIONS or LIBCXXABI_ENABLE_EXCEPTIONS
is set to OFF in the same runtimes build.
[SLP] Recompute copyable operand deps of bundled members in scheduleBlock
An instruction modeled as a copyable element in one node may be used directly
by another node registered only after its deps were last computed. The
deferred recomputation is consumed before that node joins the tree, so the
direct def-use edge is missed and the count stays too low, tripping the
unscheduled-deps assertion. Clear and recompute such bundled members against
the full tree in scheduleBlock.
Fixes #202463
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/202712
[NFC][llvm-exegesis] Disable CFI-icall for JIT-executed function (#202472) (#202682)
Reland of #202472 reverted with #202571.
Here we are going to use LLVM_NO_SANITIZE.
[docs] Release man pages (#201376)
This adds the possibility to generate man pages from the `llvm/utils/release/build-docs.sh` script. Furthermore the `release-documentation` github workflow was modified to build and upload the man pages.
This was done to prevent dependency problems when myst-parser will become a hard dependency to build the documentation in LLVM. See https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840/26?u=kwk
Additionally the `build-docs.sh` script now determines the release from the source directory if no release was given. Otherwise the generated tarballs would be missing the release entirely. To make it clear that something was generated from any git directory, a short git revision will be attached to the release (e.g. `23.0.0-gc823de88d51f58`).
The script generates a total of 67 man pages for the 22.1.7 release (see below).
`lld` has their own man page hardcoded in [`lld/docs/ld.lld.1`](https://github.com/llvm/llvm-project/blob/main/lld/docs/ld.lld.1). It gets packaged manually because of a missing cmake target. To get all projects install their man pages in the same directory to package up, we have to run the install targets rather than just the build targets (e.g. `install-docs-clang-man` instead of just `docs-clang-man`).
Here's what's in the tarball for the `22.1.7` release when you run the script from this change:
```console
$ rm -rf llvm_man_pages-* docs-build llvm-project
$ ./llvm/utils/release/build-docs.sh -no-sphinx -no-doxygen -release 22.1.7
```
[70 lines not shown]
[CIR][NFC] Align emitLValue with classic codegen (#202448)
This reorganizes the `CIRGenFunction::emitLValue` function to align it
with `CodeGenFunction::EmitLValueHelper` in classic codegen. Previously,
the default handler for the switch statement reported an NYI diagnostic
for any l-value class that wasn't handled in the function. This change
adds case handlers for every class that is handled by classic codegen,
giving each their own NYI diagnostic.
The purpose of this is to more explicitly show what is missing and to
make it easier to port the classic codegen implementation to CIR.
The existing CIR handling is not changed, just the order.
[clang] Classify binary op value kinds use ClassifyExprValueKind when it's type-dependent (#202696)
The crash is from an internal inconsistency in Clang’s expression
classification.
Expr::ClassifyImpl computes a classification like CL_LValue or
CL_PRValue, then asserts that this agrees with the AST node’s own value
category:
- clang/lib/AST/ExprClassification.cpp:37
- CL_LValue must satisfy E->isLValue()
- CL_PRValue must satisfy E->isPRValue()
Fixes https://github.com/llvm/llvm-project/issues/202693.
Signed-off-by: yronglin <yronglin777 at gmail.com>