LLVM/project 028efc4 — clang/test/CIR/CodeGen trivial-abi.cpp vector-ext-element.cpp, clang/test/CIR/CodeGenCXX x86_64-arguments.cpp new-array-init.cpp

[CIR] Add inbounds and nuw flags to cir.ptr_stride (#249016)

[CIR] Add inbounds and nuw flags to cir.ptr_stride
    
CIR lowered pointer arithmetic and strides to a `getelementptr` with no
no-wrap flags, where classic codegen marks most of them `inbounds`, and
also `nuw` for an unsigned index that is added.
    
`cir.ptr_stride` now has the same optional inbounds and `nuw` flags as
`cir.get_element`, and LowerToLLVM maps them to the GEP's no-wrap flags.

NOTE: Most changes are missing inbounds in our tests, and were added by
claude
all of those make sense to me.
DeltaFile
+77-82clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+70-70clang/test/CIR/CodeGenCXX/new-array-init.cpp
+138-0clang/test/CIR/CodeGen/pointer-arith-inbounds.c
+5-118clang/test/CIR/CodeGen/vector-ext-element.cpp
+32-68clang/test/CIR/CodeGenCXX/x86_64-arguments.cpp
+35-63clang/test/CIR/CodeGen/trivial-abi.cpp
+357-401103 files not shown
+1,526-1,467109 files

LLVM/project c1a0b47 — llvm/lib/Transforms/InstCombine InstCombineCompares.cpp, llvm/test/Transforms/InstCombine load-cmp.ll

[InstCombine] Skip vector loads in foldCmpLoadFromIndexedGlobal (#248330)

This patch fixes https://github.com/llvm/llvm-project/issues/248279.
This fold tracks one boolean per index and produces a scalar i1. When
the constant offset equals the size of the global, there are no elements
to scan, so the fold tries to replace a vector comparison with scalar
false. So just bail out early for vector loads. By the way, this crash
was exposed by https://github.com/llvm/llvm-project/pull/222574.

Assisted-by: OpenAI Codex
DeltaFile
+18-0llvm/test/Transforms/InstCombine/load-cmp.ll
+4-0llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+22-02 files

LLVM/project 665907b — llvm/lib/Support/Unix Path.inc

[Support][Haiku] Use the app image path in getMainExecutable() (#246810)

On Haiku getMainExecutable() only searched for argv[0]. Callers such
as LibTooling pass a placeholder ("clang_tool"), so the lookup failed
and tools like clang-tidy could not find the Clang resource directory.

Get the path of the app image from get_next_image_info() instead.

https://github.com/haikuports/haikuports/issues/15124
DeltaFile
+15-6llvm/lib/Support/Unix/Path.inc
+15-61 files

LLVM/project 1a2ae20 — clang/include/clang/Basic BuiltinsAMDGPU.td, clang/test/SemaOpenCL builtins-amdgcn-error-gfx12-ids.cl

review feedback
DeltaFile
+1-2clang/include/clang/Basic/BuiltinsAMDGPU.td
+2-1clang/test/SemaOpenCL/builtins-amdgcn-error-gfx12-ids.cl
+1-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+5-54 files

LLVM/project d161385 — mlir/include/mlir/Dialect/LLVMIR ROCDLOps.td

Move the new op to a partition since we just landed those
DeltaFile
+1-0mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+1-01 files

LLVM/project 6753c99 — clang/include/clang/Basic BuiltinsAMDGPU.td

Feature declaration in clang
DeltaFile
+2-1clang/include/clang/Basic/BuiltinsAMDGPU.td
+2-11 files

LLVM/project 6ab0143 — clang/include/clang/Basic BuiltinsAMDGPU.td BuiltinsAMDGPUDocs.td, clang/test/CodeGenOpenCL builtins-amdgcn-gfx12.cl

[AMDGPU] Add an intrinsic and builtin to access the dispatch index

This PR adds an intrinsic (and corresponding builtin and MLIR
operation) for accessing the dispatch index on gfx12+, since it can be
needed in some low-level contexts.

AI disclosure: None, I did this by hand
DeltaFile
+106-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.dispatch.index.ll
+19-0mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
+14-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12.cl
+9-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+6-0llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+4-0clang/include/clang/Basic/BuiltinsAMDGPU.td
+158-04 files not shown
+167-010 files

LLVM/project cca8362 — clang/include/clang/Basic BuiltinsAMDGPUDocs.td, clang/test/CodeGenOpenCL builtins-amdgcn-gfx12.cl

[AMDGPU] Refactor wave ID intrinsic handling and expose a Clang builtin (#247799)

This PR refactors how the architecture-provided wave ID on gfx12 is
exposed, including by generalizing its lowering in preparation for
adding a dispatch.index intrinsic.

This PR also annotates the wave-id intrinsic with `TargetFeatures`,
meaning that it no longer is a selection failure to use it on a target
without the architected SGPRs feature, but a failure earlier in the
pipeline.

In addition, this PR exposes this id as __builtin_amdgcn_wave_id() in
Clang, matching MLIR, and adds documentation that clarifies the
properties of the ID.

AI disclosure: None, I did this by hand
DeltaFile
+10-8llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+9-6llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+14-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx12.cl
+12-0clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+8-2llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+8-0clang/test/SemaOpenCL/builtins-amdgcn-error-gfx12-ids.cl
+61-166 files not shown
+77-2612 files

LLVM/project 2e14f22 — .ci monolithic-linux.sh

[CI] Check Linux premerge build dependencies with Ninja

Run missingdeps at the end of monolithic-linux.sh, after project checks
and both runtime reconfigurations, so compiler dependencies have been
recorded. Include the selected check targets alongside all.

Use start-group to give the check a named log section, and capture its
output in ninja_missingdeps.log for artifact collection. Keep the check
in the shared Linux build script rather than a GitHub-only workflow
step.

Validated shell syntax, workflow YAML, and a whole-script harness with
real Ninja dependency checks. The check runs after all build phases,
records diagnostics, fails for a missing generator dependency, and
passes when that dependency is declared.

Assisted-by: Codex
DeltaFile
+8-0.ci/monolithic-linux.sh
+8-01 files

LLVM/project e2ba26a — llvm/examples/Bye CMakeLists.txt, llvm/examples/IRTransforms CMakeLists.txt

[LLVM][CMake] Order generated analysis headers for pass plugins

The example and unit-test pass plugins include TargetLibraryInfo.inc
through LLVM analysis headers. They rely on the host process for LLVM
symbols, so their compile steps need an explicit analysis_gen
prerequisite.

Add analysis_gen alongside intrinsics_gen and express the unit plugins'
prerequisites on their library declarations. With the machine pass
manager include pruning in the preceding commit, these plugins no longer
include GenVT.inc and do not need vt_gen.

Validated a fresh build of all six plugin objects with precompiled
headers disabled and GenVT.inc absent. Their recorded dependencies still
include TargetLibraryInfo.inc, and ninja -t missingdeps is clean.

Assisted-by: Codex
DeltaFile
+4-3llvm/unittests/Passes/Plugins/TestPlugin/CMakeLists.txt
+4-3llvm/unittests/Passes/Plugins/DoublerPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
+1-0llvm/examples/IRTransforms/CMakeLists.txt
+1-0llvm/examples/Bye/CMakeLists.txt
+18-126 files

LLVM/project b801719 — llvm/include/llvm/CodeGen MachinePassManager.h MFPropsModifier.h, llvm/include/llvm/Passes StandardInstrumentations.h

[LLVM] Prune machine IR includes from pass manager interfaces (#249025)

Move MFPropsModifier into its own header and include it at its use
sites,
So MachinePassManager.h no longer needs to include MachineFunction.h.
This removes many dependencies on vt_gen which was needed for a
transitive tablegen generated header from codegen.

Assisted-by: Codex
DeltaFile
+160-0llvm/include/llvm/CodeGen/MachineFunctionProperties.h
+1-140llvm/include/llvm/CodeGen/MachineFunction.h
+93-0llvm/include/llvm/CodeGen/MFPropsModifier.h
+0-68llvm/include/llvm/CodeGen/MachinePassManager.h
+19-19llvm/include/llvm/Passes/StandardInstrumentations.h
+10-0llvm/lib/Passes/StandardInstrumentations.cpp
+283-22786 files not shown
+367-23192 files

LLVM/project 8d1e8aa — mlir/lib/Conversion/LLVMCommon TypeConverter.cpp, mlir/lib/Conversion/MemRefToLLVM MemRefToLLVM.cpp

[mlir][MemRefToLLVM] Don't assert on non-integer memory spaces of unranked memrefs (#247338)

The lowerings of memref.dealloc and
memref.extract_aligned_pointer_as_index build the element pointer type
of an unranked memref with getMemorySpaceAsInt(). That accessor asserts
on any memory space that is not a plain integer, for example
#spirv.storage_class<StorageBuffer>, and --finalize-memref-to-llvm
aborts. Ranked memrefs don't get this far because their type conversion
already fails on such a memory space, but an unranked memref always
converted to {index, ptr} and nobody looked at its memory space.

Make convertUnrankedMemRefType fail when the memory space has no integer
address space, with the same error as for ranked memrefs, so the
patterns don't run on such operands at all. structFuncArgTypeConverter
returned the descriptor fields of an unranked memref without converting
the type, so it needs the same check, otherwise the function signature
still converts and packing the argument crashes on the null type. This
also fixes that crash for an unranked memref whose element type does not
convert.

    [17 lines not shown]
DeltaFile
+23-0mlir/test/Conversion/GPUToNVVM/unranked-memref-address-space.mlir
+21-0mlir/test/Conversion/MemRefToLLVM/invalid.mlir
+17-0mlir/test/Conversion/FuncToLLVM/invalid.mlir
+10-4mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
+12-0mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
+83-45 files

LLVM/project abf0807 — llvm/test/CodeGen/MLRegAlloc dev-mode-prio-logging.ll, llvm/test/CodeGen/MLRegAlloc/Inputs reference-log-noml.txt reference-prio-log-noml.txt

[MLGO] Update test expectations after 1048ab9 (#249129)

Assisted-By: LLM
DeltaFile
+41-41llvm/test/CodeGen/MLRegAlloc/Inputs/reference-prio-log-noml.txt
+32-32llvm/test/CodeGen/MLRegAlloc/Inputs/reference-log-noml.txt
+2-2llvm/test/CodeGen/MLRegAlloc/dev-mode-prio-logging.ll
+75-753 files

LLVM/project ca474e6 — llvm/lib/Target/SPIRV SPIRVLegalizerInfo.cpp SPIRVInstructionSelector.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector scmp-ucmp-bool.ll

[SPIR-V] Use generic lowering for G_SCMP and G_UCMP (#248911)

Extend bool operands first, since SPIR-V has no relational compares on
bools
DeltaFile
+107-26llvm/test/CodeGen/SPIRV/llvm-intrinsics/ucmp.ll
+107-26llvm/test/CodeGen/SPIRV/llvm-intrinsics/scmp.ll
+0-61llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+44-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_long_vector/scmp-ucmp-bool.ll
+21-1llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+279-1145 files

LLVM/project 8aa7819 — compiler-rt/lib/sanitizer_common sanitizer_stoptheworld_linux_libcdep.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+6-5compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+6-51 files

LLVM/project f934488 — clang/docs ReleaseNotes.md, clang/lib/Driver/ToolChains Cuda.cpp

[Clang][Object][SYCL][CUDA] Add --[no-]offload-embed-virtual-arch (#242407)

Add `--[no-]offload-embed-virtual-arch` for SYCL and CUDA.

A SYCL device image compiled ahead of time for Intel GPUs keeps the
SPIR-V by default, so it can still run on other GPUs of the same IGCA
target. `--no-offload-embed-virtual-arch` drops it. `-Xarch_<IGCA
target>`, e.g. `-Xarch_igca_40r --no-offload-embed-virtual-arch`,
applies it to one IGCA target only. If `--offload-arch` also names the
IGCA target itself, e.g. `--offload-arch=xe-mtl-u,igca_30r`, the SPIR-V
for that target is kept. If nothing is compiled ahead of time for an
Intel GPU, clang warns that the option is unused.

The driver records `embed-virtual-arch=0` on the device image.
clang-linker-wrapper passes `--no-embed-virtual-arch` to
clang-sycl-linker when every non-generic device image asks for it, and
otherwise keeps the virtual architecture code and warns.
clang-sycl-linker then passes `-exclude_ir` to ocloc.


    [2 lines not shown]
DeltaFile
+56-0clang/test/Driver/sycl-embed-virtual-arch.cpp
+37-0clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+24-12clang/lib/Driver/ToolChains/Cuda.cpp
+30-0clang/test/Driver/cuda-options.cu
+21-0clang/test/OffloadTools/clang-linker-wrapper/linker-wrapper.c
+19-0clang/docs/ReleaseNotes.md
+187-1212 files not shown
+294-1518 files

LLVM/project 4ee1a05 — compiler-rt/lib/sanitizer_common/tests sanitizer_stoptheworld_test.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+0-24compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cpp
+0-241 files

LLVM/project e533a57 — utils/bazel/llvm-project-overlay/flang/lib/Optimizer/OpenACC/Support BUILD.bazel, utils/bazel/llvm-project-overlay/flang/unittests BUILD.bazel

[Bazel] Fixes 30b9765 (#249123)

This fixes 30b97651169c0c28af0d67a5faf0612429595a38 (#247798).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=30b97651169c0c28af0d67a5faf0612429595a38

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+3-0utils/bazel/llvm-project-overlay/flang/lib/Optimizer/OpenACC/Support/BUILD.bazel
+2-0utils/bazel/llvm-project-overlay/flang/unittests/BUILD.bazel
+5-02 files

LLVM/project 1877216 — compiler-rt/lib/sanitizer_common sanitizer_stoptheworld_linux_libcdep.cpp, compiler-rt/lib/sanitizer_common/tests sanitizer_stoptheworld_test.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+24-0compiler-rt/lib/sanitizer_common/tests/sanitizer_stoptheworld_test.cpp
+7-11compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+31-112 files

LLVM/project 2deb8c2 — .ci monolithic-linux.sh

[CI] Check Linux premerge build dependencies with Ninja

Run missingdeps at the end of monolithic-linux.sh, after project checks
and both runtime reconfigurations, so compiler dependencies have been
recorded. Include the selected check targets alongside all.

Use start-group to give the check a named log section, and capture its
output in ninja_missingdeps.log for artifact collection. Keep the check
in the shared Linux build script rather than a GitHub-only workflow
step.

Validated shell syntax, workflow YAML, and a whole-script harness with
real Ninja dependency checks. The check runs after all build phases,
records diagnostics, fails for a missing generator dependency, and
passes when that dependency is declared.

Assisted-by: Codex
DeltaFile
+8-0.ci/monolithic-linux.sh
+8-01 files

LLVM/project 0f6919e — llvm/examples/Bye CMakeLists.txt, llvm/examples/IRTransforms CMakeLists.txt

[LLVM][CMake] Order generated analysis headers for pass plugins

The example and unit-test pass plugins include TargetLibraryInfo.inc
through LLVM analysis headers. They rely on the host process for LLVM
symbols, so their compile steps need an explicit analysis_gen
prerequisite.

Add analysis_gen alongside intrinsics_gen and express the unit plugins'
prerequisites on their library declarations. With the machine pass
manager include pruning in the preceding commit, these plugins no longer
include GenVT.inc and do not need vt_gen.

Validated a fresh build of all six plugin objects with precompiled
headers disabled and GenVT.inc absent. Their recorded dependencies still
include TargetLibraryInfo.inc, and ninja -t missingdeps is clean.

Assisted-by: Codex
DeltaFile
+4-3llvm/unittests/Passes/Plugins/TestPlugin/CMakeLists.txt
+4-3llvm/unittests/Passes/Plugins/DoublerPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
+4-3llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
+1-0llvm/examples/IRTransforms/CMakeLists.txt
+1-0llvm/examples/Bye/CMakeLists.txt
+18-126 files

LLVM/project 30b9765 — flang/include/flang/Optimizer/OpenACC/Support FIROpenACCOpsInterfaces.h, flang/lib/Optimizer/OpenACC/Support RegisterOpenACCExtensions.cpp CMakeLists.txt

[acc][flang] Add acc::CallLikeOpInterface for whether a call captures an address (#247798)

`acc::CallLikeOpInterface::isAddressNotCaptured(tracked, address)` is
true when this call receives address and cannot use the storage of
tracked after it returns. The default is false, so the address may be
kept.

This replaces `OpenACCSupport::isAddressNotCapturedByCalls`. That method
stays for now and will be removed in a later MR, when the callers switch
to this interface.

`fir.call` implements it when address is an argument, the callee is a
Fortran source procedure (bind(c), a procedure symbol, or a callee whose
fir.internal_name is a procedure), and tracked is a Fortran user
variable that is not TARGET or POINTER, not host-associated, not
captured by an internal procedure, and not asynchronous or volatile. An
indirect call does not qualify.

`fir.dispatch` implements it for its object and its arguments. A
dispatch is a type-bound procedure, so it has no callee check. The
variable check is the same.
DeltaFile
+218-0flang/unittests/Optimizer/OpenACC/FIROpenACCCallLikeOpInterfaceTest.cpp
+95-0flang/lib/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.cpp
+24-0mlir/include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td
+17-0flang/include/flang/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.h
+2-0flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp
+2-0flang/lib/Optimizer/OpenACC/Support/CMakeLists.txt
+358-02 files not shown
+360-08 files

LLVM/project 0a3c31d — flang CMakeLists.txt, flang/cmake/modules AddFlang.cmake

[Flang][CMake] Fix header dependencies and binding header copies (#249115)

Add missing dependencies, caught by #248842

ISO_Fortran_binding.h was copied at cmake configued, with logic to add a
.phony target to represent the header, and re-trigger cmake
configuration when the header changed.
Unfortunately this phony target makes it look like materializing the
header happens as part of the build, which is then flagged by `ninja -t
missingdeps` as missing an explicit dependency from the users of the
header.
We can perform the copy at build time instead, removing the requirement
to configure cmake on changes to the header, and making the build graph
more "correct" by making the materialization of the header part of the
"flang-headers".

Assisted-by: Codex
DeltaFile
+18-10flang/CMakeLists.txt
+13-0flang/cmake/modules/AddFlang.cmake
+1-1flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+0-1flang/lib/Optimizer/Builder/Runtime/Intrinsics.cpp
+32-124 files

LLVM/project a6acba6 — llvm/include/llvm/CodeGen MachinePassManager.h MFPropsModifier.h, llvm/include/llvm/Passes StandardInstrumentations.h

[LLVM] Prune machine IR includes from pass manager interfaces

Move MFPropsModifier into its own header so MachinePassManager.h no
longer needs MachineFunction.h. Extract MachineFunctionProperties into
a lightweight header for pass declarations that only need properties,
and add direct machine-function and machine-instruction includes at
the implementation sites that relied on the old transitive includes.

Move block labels and printed text into a non-template BlockData base
with out-of-line constructors. Keep BlockDataT<T> constructors inline,
so StandardInstrumentations.h does not need MachineBasicBlock.h and
arbitrary data types do not depend on an outlined template constructor.

Remove an unused MachineFunction.h include from Clang's AMDGPU builtin
emitter. Drop the now-unnecessary vt_gen dependencies from clangCodeGen,
clangHandleLLVM and Polly, and include <variant> directly in Polly's
pass registration code.

Validate the rebased integration with CodeGen, AMDGPU, SPIR-V and Passes

    [5 lines not shown]
DeltaFile
+160-0llvm/include/llvm/CodeGen/MachineFunctionProperties.h
+1-140llvm/include/llvm/CodeGen/MachineFunction.h
+93-0llvm/include/llvm/CodeGen/MFPropsModifier.h
+0-68llvm/include/llvm/CodeGen/MachinePassManager.h
+19-19llvm/include/llvm/Passes/StandardInstrumentations.h
+10-0llvm/lib/Passes/StandardInstrumentations.cpp
+283-22786 files not shown
+367-23192 files

LLVM/project c875c77 — llvm/lib/Target/AArch64 AArch64Options.td AArch64FrameLowering.cpp

[AArch64] Remove broken `-stack-tagging-merge-settag` option (NFC) (#248963)
DeltaFile
+2-7llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+0-2llvm/lib/Target/AArch64/AArch64Options.td
+2-92 files

LLVM/project c62fac2 — libc/src/string string_utils.h, libc/src/wchar CMakeLists.txt wcsnlen.cpp

[libc] Bound destination scan and use size_t limits in wcslcat (#247909)

`wcslcat` computed `dstlen` with `internal::string_length(dst)` without
stopping at `dstsize`, and cast `dstsize - dstlen - 1` to `int` before
bounding the copy loop. Scan `dst` up to `dstsize` so calls with
`dstsize == 0` or no null wide character in the first `dstsize` elements
return `dstsize + wcslen(src)` directly, keep `copy_limit` and the loop
index in `size_t` for `dstsize` values above `INT_MAX`, and add
`wcslcat_test` coverage for those cases.

Assisted-By: Gemini
DeltaFile
+48-1libc/test/src/wchar/wcslcat_test.cpp
+20-9libc/src/string/string_utils.h
+13-15libc/src/wchar/wcslcat.cpp
+8-5libc/src/wchar/wcsnlen.cpp
+3-1libc/test/src/wchar/CMakeLists.txt
+2-1libc/src/wchar/CMakeLists.txt
+94-326 files

LLVM/project bde3916 — llvm/cmake/modules HandleLLVMOptions.cmake, llvm/docs CMake.md

[CMake] Add CFI support to LLVM_USE_SANITIZER

For libc++ CFI CI, we need a way to build the runtimes with Control Flow Integrity enabled via `LLVM_USE_SANITIZER`. Add a `CFI` option on non-Apple Unix platforms that requires `LLVM_ENABLE_LTO` and enables cross-DSO CFI in diagnostic mode, and document it in `llvm/docs/CMake.md`.

Link: https://github.com/llvm/llvm-project/issues/245696
Assisted-by: Gemini
DeltaFile
+9-0llvm/cmake/modules/HandleLLVMOptions.cmake
+2-2llvm/docs/CMake.md
+11-22 files

LLVM/project 02d4e82 — libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create allocate_shared.lwg2070.pass.cpp

Fix code formatting
DeltaFile
+1-3libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
+1-31 files

LLVM/project f19f06e — libcxx/test/std/algorithms/alg.nonmodifying/alg.find find_if.pass.cpp, libcxx/test/std/containers/sequences/vector/vector.capacity reserve.pass.cpp

[libc++] Fix CFI test failures and add new tests for past CFI issues

Running the libc++ test suite with cross-DSO CFI found four test failures, so resolve them before CFI CI is added. In `allocate_shared.lwg2070.pass.cpp`, change `std::ptrdiff_t` to `std::size_t` so Clang recognizes it as `allocate` and exempts it from CFI checks. In the other three tests, disable `cfi-unrelated-cast` with the `-fno-sanitize=cfi-unrelated-cast` compiler flag to avoid changing these old tests.

In addition, add tests for `vector::reserve` and `std::find_if` to make sure we catch past CFI issues (https://github.com/llvm/llvm-project/pull/248258, https://github.com/llvm/llvm-project/issues/219306) in the future.

Link: https://github.com/llvm/llvm-project/issues/245696
Assisted-by: Gemini
DeltaFile
+22-0libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
+13-0libcxx/test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp
+2-2libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.lwg2070.pass.cpp
+4-0libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf_streambuf.pass.cpp
+4-0libcxx/test/std/input.output/iostreams.base/ios/basic.ios.members/rdbuf.pass.cpp
+4-0libcxx/test/std/input.output/iostreams.base/ios/basic.ios.cons/ctor_streambuf.pass.cpp
+49-26 files

LLVM/project e8b39ff — libunwind/src libunwind.cpp UnwindCursor.hpp

[libunwind] Avoid cfi-unrelated-cast errors when casting to UnwindCursor

While working on CFI CI, building libunwind with CFI hit `cfi-unrelated-cast` failures when casting to `UnwindCursor*` before the `UnwindCursor` object has been constructed. Change `UnwindCursor`'s placement `operator new` to take `void*` and pass `static_cast<void *>(cursor)` instead so placement new constructs `UnwindCursor` directly in that storage. We also make the same change on the Windows SEH `UnwindCursor` definition and call sites so both implementations stay consistent.

Link: https://github.com/llvm/llvm-project/issues/245696
Assisted-by: Gemini
DeltaFile
+3-3libunwind/src/Unwind-seh.cpp
+2-2libunwind/src/UnwindCursor.hpp
+1-1libunwind/src/libunwind.cpp
+6-63 files