LLVM/project 3f92be2llvm/lib/Analysis AssumptionCache.cpp, llvm/test/Analysis/AssumptionCache remove-from-stale-cache.ll

[AssumptionCache] Remove incorrect assertion from `removeAffectedValues()` (#214524)

The assertion in `removeAffectedValues()` is trying to enforce that,
when we come to remove the affected values of a live assume call, each
affected value has a corresponding line in the cache. This may not be
the case if the assume call has been modified via a call to
`Use::set()`, as our value handles are only notified on deletion and
RAUW. We're not worried about this, though, as the cache is
conservative.

Remove this assertion and add a comment explaining why we may fail to
find.
DeltaFile
+9-36llvm/lib/Analysis/AssumptionCache.cpp
+42-0llvm/test/Analysis/AssumptionCache/remove-from-stale-cache.ll
+51-362 files

LLVM/project b8004ddllvm/lib/Transforms/IPO WholeProgramDevirt.cpp LowerTypeTests.cpp, llvm/test/ThinLTO/X86 devirt_function_alias2.ll

[CFI] Create an external linkage alias instead of promoting internals
DeltaFile
+19-32llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+35-0llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+29-0llvm/test/Transforms/LowerTypeTests/promoted-internal.ll
+20-5llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+10-7llvm/test/Transforms/ThinLTOBitcodeWriter/comdat.ll
+6-4llvm/test/ThinLTO/X86/devirt_function_alias2.ll
+119-484 files not shown
+130-5610 files

LLVM/project bef86c3libcxx/include/__optional optional_ref.h

[libc++] Collapse `optional<T&>` inheritance hierarchy (#215286)

Resolves #215185

- Since `optional<T>` and `optional<T&>` are decoupled, there wasn't
much reason to have a base class for `optional<T&>`, so we can simplify
it by inlining all of the base members and private functions into it
directly.
- This leaves us with the iterator base which now only exposes the
`iterator` type, since we can also directly inline `begin()` and
`end()`.

---------

Co-authored-by: Nikolas Klauser <nikolasklauser at berlin.de>
DeltaFile
+60-85libcxx/include/__optional/optional_ref.h
+60-851 files

LLVM/project 942ed07clang/lib/Driver/ToolChains Clang.cpp, clang/test/Driver hip-device-libs-llvm-env.hip

[Clang] Include libc wrappers for LLVM environment CUDA / HIP (#208084)

Summary:
These wrappers (although they are empty right now) are used to inform
the offloading runtime of the supported libc / libm functions available
on the device. We do not include these for the standard HIP path because
they conflict with the alreaedy present utilities, but with the
LLVM-only route we should be able to use them.
DeltaFile
+8-6clang/lib/Driver/ToolChains/Clang.cpp
+2-0clang/test/Driver/hip-device-libs-llvm-env.hip
+10-62 files

LLVM/project fae0fc7llvm/include module.modulemap

[modulemap] Exclude the z/OS string.h wrapper from LLVM_Utils (#215800)

8fce476c8122 (https://github.com/llvm/llvm-project/pull/167703) replaced
`llvm/Support/SystemZ/zOSSupport.h` with
`llvm/Support/SystemZ/zos_wrappers/string.h`, a wrapper that pulls in
the system header via `#include_next` and then redeclares `strsignal`
and `strnlen` with `asm` labels. It is only meant to be reachable on
z/OS, and `llvm/CMakeLists.txt` adds the directory to the include path
solely when `CMAKE_SYSTEM_NAME` matches OS390.

The header was never excluded from the module map, though.
`LLVM_Utils.Support` is an umbrella over `llvm/Support`, so building
that module textually includes the wrapper on every host. This surfaced
building the Swift compiler on Windows, where `<string.h>` resolves to
the UCRT header that already declares `strnlen` as `_ACRTIMP`, i.e.
`__declspec(dllimport)`:

```
error: cannot apply asm label to function after its first use

    [11 lines not shown]
DeltaFile
+3-0llvm/include/module.modulemap
+3-01 files

LLVM/project a713c17llvm/lib/Target/AMDGPU GCNSubtarget.cpp AMDGPUTargetParser.td, llvm/test/TableGen AMDGPUTargetDefErrors.td

incorporate comments

Change-Id: If727a9eb8459825d555c8784b5d23771312d51ed
DeltaFile
+65-18llvm/lib/Target/AMDGPU/AMDGPU.td
+0-71llvm/lib/Target/AMDGPU/GCNProcessors.td
+34-3llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+0-18llvm/test/TableGen/AMDGPUTargetDefErrors.td
+0-11llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+7-3llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+106-1246 files not shown
+125-14012 files

LLVM/project 6748b36mlir/lib/ExecutionEngine RocmRuntimeWrappers.cpp

[MLIR][ROCm] Export runtime wrappers on Windows (#213046)

Export the ROCm runtime wrapper entry points when building
`mlir_rocm_runtime` as a Windows DLL.

Use `__attribute__((visibility("default")))` on other platforms.

## Motivation

`extern "C"` prevents C++ name mangling, but it does not add symbols to
a
Windows DLL export table. Consequently, `mlir-runner` can load
`mlir_rocm_runtime.dll`, but ORC cannot resolve its `mgpu*` entry
points.

CUDA, SYCL, Vulkan, and SPIR-V runtime wrappers already use explicit
Windows
export annotations. This applies the same approach to the ROCm runtime.


    [24 lines not shown]
DeltaFile
+51-37mlir/lib/ExecutionEngine/RocmRuntimeWrappers.cpp
+51-371 files

LLVM/project 61f2d6cclang/test/CodeGen/LoongArch/lasx builtin.c builtin-alias.c, llvm/test/tools/llvm-mca/AArch64/Cortex C1Nano-basic-instructions.s C1Nano-neon-instructions.s

Rebase

Created using spr 1.3.7
DeltaFile
+13,767-6,856llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-sve-instructions.s
+6,347-3,146llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-neon-instructions.s
+5,067-2,506llvm/test/tools/llvm-mca/AArch64/Cortex/C1Nano-basic-instructions.s
+6,869-0llvm/test/tools/llvm-mca/AArch64/HiSilicon/hip12-sve-instructions.s
+2,728-2,728clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+2,724-2,724clang/test/CodeGen/LoongArch/lasx/builtin.c
+37,502-17,9603,084 files not shown
+178,677-78,2383,090 files

LLVM/project 8fda9eeclang/lib/CodeGen CGHLSLRuntime.h CGHLSLRuntime.cpp, clang/test/CodeGenHLSL/semantics semantic.output.hlsl semantic.input.hlsl

Revert "[HLSL] Generate semantic signature metadata" (#215844)

Reverts llvm/llvm-project#212892

Build dependency for `DXILResource.h` was not updated. I will reland
with the corrected dependency.
DeltaFile
+43-145clang/lib/CodeGen/CGHLSLRuntime.cpp
+44-17llvm/unittests/Frontend/HLSLSemanticSignatureMetadataTest.cpp
+18-28clang/lib/CodeGen/CGHLSLRuntime.h
+0-11clang/test/CodeGenHLSL/semantics/semantic.output.hlsl
+0-11clang/test/CodeGenHLSL/semantics/semantic.input.hlsl
+0-10llvm/include/llvm/Frontend/HLSL/SemanticSignatures.h
+105-2223 files not shown
+106-2339 files

LLVM/project e48e4e9libcxx/test/benchmarks/containers string.bench.cpp, libcxx/test/benchmarks/containers/associative associative_container_benchmarks.h

[libc++] Guard container benchmarks on library availability (#215408)

Instead of using TEST_STD_VER, use FTMs or requires clauses to enable
benchmarks for some recent features like `append_range`. This is needed
since older versions of the library don't provide these features, so the
container benchmarks as a whole would fail to compile instead of just a
few methods being disabled.
DeltaFile
+1-1libcxx/test/benchmarks/containers/string.bench.cpp
+1-1libcxx/test/benchmarks/containers/sequence/sequence_container_benchmarks.h
+1-1libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h
+3-33 files

LLVM/project 5eac6bcclang/lib/CodeGen CGHLSLRuntime.h CGHLSLRuntime.cpp, clang/test/CodeGenHLSL/semantics semantic.output.hlsl semantic.input.hlsl

Revert "[HLSL] Generate semantic signature metadata (#212892)"

This reverts commit 1026c71c22bda8c1d0cb6a15c63ae1cf5c401240.
DeltaFile
+43-145clang/lib/CodeGen/CGHLSLRuntime.cpp
+44-17llvm/unittests/Frontend/HLSLSemanticSignatureMetadataTest.cpp
+18-28clang/lib/CodeGen/CGHLSLRuntime.h
+0-11clang/test/CodeGenHLSL/semantics/semantic.output.hlsl
+0-11clang/test/CodeGenHLSL/semantics/semantic.input.hlsl
+0-10llvm/include/llvm/Frontend/HLSL/SemanticSignatures.h
+105-2223 files not shown
+106-2339 files

LLVM/project 7811d76llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 many-uses-fma-candidate.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+487-222llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+24-67llvm/test/Transforms/SLPVectorizer/X86/horizontal-fadd-with-sub.ll
+1-1llvm/test/Transforms/SLPVectorizer/X86/reduction-fadd-reassoc.ll
+1-1llvm/test/Transforms/SLPVectorizer/X86/ordered-reduction-replaced.ll
+1-1llvm/test/Transforms/SLPVectorizer/AArch64/many-uses-fma-candidate.ll
+514-2925 files

LLVM/project bf6872fllvm/include/llvm/Support Format.h

[Support] Fix format_object streaming ambiguity in Objective-C++ mode (#215826)

Upstreams https://github.com/swiftlang/llvm-project/pull/13625.

Streaming a format_object writes it through a temporary lambda. Swift's
C++ interoperability enables block pointer conversions, which makes
`raw_ostream::operator<<(const void *)` a viable candidate alongside
`operator<<(function_ref<size_t(char *, size_t)>)`, so overload
resolution is ambiguous. This breaks the Swift compiler because it
contains Swift code that interoperates with C++ code that instantiates
this template.

Bind the lambda to an explicit function_ref before streaming so the
intended overload is selected unambiguously in every language mode.

Assisted-by: Claude Code
DeltaFile
+10-2llvm/include/llvm/Support/Format.h
+10-21 files

LLVM/project 1026c71clang/lib/CodeGen CGHLSLRuntime.h CGHLSLRuntime.cpp, clang/test/CodeGenHLSL/semantics semantic.output.hlsl semantic.input.hlsl

[HLSL] Generate semantic signature metadata (#212892)

This pr adds support to collect the signature element metadata as they are emitted and outputs them to a named metadata node.

Updates the constructor of a `SemanticSignature` to reflect the required values and touches up its corresponding unit tests.

Adds a lit test of the metadata creation.

Resolves https://github.com/llvm/llvm-project/issues/57928
DeltaFile
+145-43clang/lib/CodeGen/CGHLSLRuntime.cpp
+17-44llvm/unittests/Frontend/HLSLSemanticSignatureMetadataTest.cpp
+28-18clang/lib/CodeGen/CGHLSLRuntime.h
+11-0clang/test/CodeGenHLSL/semantics/semantic.output.hlsl
+11-0clang/test/CodeGenHLSL/semantics/semantic.input.hlsl
+10-0llvm/include/llvm/Frontend/HLSL/SemanticSignatures.h
+222-1053 files not shown
+233-1069 files

LLVM/project df49291lldb/packages/Python/lldbsuite/test/make Makefile.rules

[LLDB] Track tool dependencies in Makefile.rules (#215701)

Before b9225e860769 (Allow tests to share a single build)
lldbtest.makeBuildDir() would delete the build dir before building a
test, but the shared test builds no longer have that behavior. Neither
does the check-lldb target delete the entire test build dir before
running, so tests don't get rebuilt when one of the tools (for example,
clang) change.

This patch is one way to solve this, by adding all tools as explicit
dependencies to each rule in the shared Makefile.rules.

Assisted-by: claude
DeltaFile
+17-6lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+17-61 files

LLVM/project 21a0095clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp CIRGenExpr.cpp, clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Support load/store for Vector of bools (#212146)

Implement load and store support for a vector of bools 

Issue #161233
DeltaFile
+64-0clang/test/CIR/CodeGen/vector-bool.cpp
+31-31clang/test/CIR/CodeGenBuiltins/X86/avx512vlvp2intersect-builtins.c
+31-3clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+5-21clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+10-10clang/test/CIR/CodeGenBuiltins/X86/avx512vp2intersect-builtins.c
+1-1clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+142-666 files

LLVM/project e4bb0acopenmp/runtime/src kmp_traits.cpp kmp_traits.h, openmp/runtime/unittests/Traits MockOMP.cpp TestOMPTraitLexer.cpp

[libomp] OpenMP 6.0: Add device trait parser (#176164)

OpenMP 6.0 introduced a device trait specification language for the
environment variables OMP_AVAILABLE_DEVICES (4.3.7) and
OMP_DEFAULT_DEVICE (4.3.8).

This commit defines a grammar for that language and implements a parser
for a large part of this grammar.
DeltaFile
+1,151-0openmp/runtime/unittests/Traits/TestOMPTraits.cpp
+1,072-0openmp/runtime/unittests/Traits/TestOMPTraitParser.cpp
+497-0openmp/runtime/src/kmp_traits.h
+423-0openmp/runtime/src/kmp_traits.cpp
+350-0openmp/runtime/unittests/Traits/TestOMPTraitLexer.cpp
+24-0openmp/runtime/unittests/Traits/MockOMP.cpp
+3,517-04 files not shown
+3,530-010 files

LLVM/project 4eea911llvm/lib/Target/AMDGPU SIISelLowering.h SIISelLowering.cpp, llvm/test/Analysis/CostModel/AMDGPU minimum.ll maximum.ll

[AMDGPU] Utilize Promote action for FMINIMUM/MAX f16 (#215678)

Utilize Promote action to convert f16 FMINIMUM/FMAXIMUM to use v2f16.
Custom lowering is no longer needed.

Support for Promote from scalar to vector was added in
https://github.com/llvm/llvm-project/pull/215042.

---------

Signed-off-by: John Lu <John.Lu at amd.com>
DeltaFile
+4-33llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-2llvm/test/Analysis/CostModel/AMDGPU/minimum.ll
+2-2llvm/test/Analysis/CostModel/AMDGPU/maximum.ll
+0-1llvm/lib/Target/AMDGPU/SIISelLowering.h
+8-384 files

LLVM/project 3a382b0llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-function-definition-call-before-alloca.ll debug-function-definition-calls.ll

Add support for NSDI DebugLine and DebugNoLine.
DeltaFile
+153-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+82-0llvm/test/CodeGen/SPIRV/debug-info/debug-line.ll
+79-0llvm/test/CodeGen/SPIRV/debug-info/debug-no-line.ll
+32-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+15-1llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition-calls.ll
+2-0llvm/test/CodeGen/SPIRV/debug-info/debug-function-definition-call-before-alloca.ll
+363-11 files not shown
+364-17 files

LLVM/project 5d4f1f2llvm/test/CodeGen/X86 debug-spilled-snippet.mir, llvm/test/DebugInfo/AArch64 dbg-value-i8.ll

[DebugInfo] Do not stop after livedebugvars (#215169)

livedebugvars is an analysis. We can only -stop-after it inside the
LegacyPM due to how the LegacyPM schedules analyses. We cannot
stop-after it inside of the NewPM given analyses are dynamically
requested within each pass. Instead, just stop before the asm printer
given we're after the last livedebugvars analysis which happens pretty
late in the pipeline and it doesn't seem like there's a vastly better
spot.
DeltaFile
+2-2llvm/test/DebugInfo/X86/sdag-combine.ll
+2-2llvm/test/DebugInfo/X86/pr34545.ll
+2-2llvm/test/DebugInfo/X86/live-debug-vars-nodebug.ll
+1-1llvm/test/DebugInfo/MSP430/sdagsplit-1.ll
+1-1llvm/test/DebugInfo/AArch64/dbg-value-i8.ll
+1-1llvm/test/CodeGen/X86/debug-spilled-snippet.mir
+9-93 files not shown
+12-129 files

LLVM/project 4c54d8eclang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp

[CIR] Require every record member to specify its kind

The member kind list was optional, and an all-data list was canonicalized
to an absent one, so "nobody computed this" and "everything is data" had
the same spelling.  A producer that forgot to specify was assumed
correct.

The list is now required on both record types and the verifier demands
one kind per member.  Normalization is no longer needed and is removed.
A producer whose members all hold data says so with getAllDataKinds.
CIRGen has to compute a list too, so record lowering funnels every
appended field through addField and marks inserted padding as pad.

A data member still prints without a mark, and `data` is now accepted on
input so every kind can be written out.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+70-35clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+47-45clang/unittests/CIR/RecordMemberKindTest.cpp
+28-37clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+19-22clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+34-1clang/test/CIR/CodeGen/no-unique-address.cpp
+23-9clang/unittests/CIR/UnionTypeSizeTest.cpp
+221-14934 files not shown
+398-25140 files

LLVM/project 30e26d3clang/lib/CIR/CodeGen CMakeLists.txt TargetInfo.h, clang/lib/CIR/CodeGen/Targets AArch64.cpp

[CIR] Add AArch64TargetCIRGenInfo (#215424)

This adds an AArch64-specific implementation of TargetCIRGenInfo and
adds handlers for the functions that require AArch64-specific handling.
I've implemented the wouldInliningViolateFunctionCallABI function
(because that seemed easier than deciding when to report NYI), generated
an NYI error for isScalarizableAsmOperand in the one case where it needs
to do something other than forward the call to the based class, and
added MissingFeatures asserts for setTargetAttributes (because CIR
doesn't support the features it wants to add attributes for yet).

Assisted-by: Cursor / various models
DeltaFile
+119-0clang/lib/CIR/CodeGen/Targets/AArch64.cpp
+56-8clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c
+16-0clang/test/CIR/CodeGen/aarch64-ls64-inline-asm-nyi.c
+6-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+3-0clang/lib/CIR/CodeGen/TargetInfo.h
+1-0clang/lib/CIR/CodeGen/CMakeLists.txt
+201-81 files not shown
+202-87 files

LLVM/project b37fffdclang/test/CIR/CodeGen atomic.c

[CIR][NFC] Add atomic compare-exchange runtime order test (#215722)

Add a test for `__atomic_compare_exchange_n` when both success and
failure memory orders are runtime values. Check the nested CIR switches
across every generated memory-order combination.

Partially addresses #156747.
DeltaFile
+198-0clang/test/CIR/CodeGen/atomic.c
+198-01 files

LLVM/project 26286e7lld/MachO ICF.cpp

[lld][MachO][NFC] Move config->icfLevel dereference out of loops (#215407)
DeltaFile
+6-7lld/MachO/ICF.cpp
+6-71 files

LLVM/project d9b55cblld/MachO ICF.cpp

[lld][MachO][NFC] Remove redundant size checks (#215411)
DeltaFile
+0-4lld/MachO/ICF.cpp
+0-41 files

LLVM/project be9db1amlir/include/mlir/Dialect/Affine LoopUtils.h

[mlir] Remove dead declaration promoteSingleIterationLoops (#215738)

The corresponding function definition was removed on January 24, 2022
in a70aa7bb0d9a6066831b339e0a09a2c1bc74fe2b.
DeltaFile
+0-4mlir/include/mlir/Dialect/Affine/LoopUtils.h
+0-41 files

LLVM/project b9ca983clang/lib/CodeGen CGBuiltin.cpp

Fix comment formatting to adhere to the Coding Standards
DeltaFile
+5-3clang/lib/CodeGen/CGBuiltin.cpp
+5-31 files

LLVM/project 976b6d0flang/include/flang/Evaluate char.h

Reformat
DeltaFile
+13-7flang/include/flang/Evaluate/char.h
+13-71 files

LLVM/project c5c4f80llvm Maintainers.md

[LLVM][Maintainers] Volunteer for LoadStoreVectorizer (#214025)

I have been contributing to and reviewing changes to the
LoadStoreVectorizer for over a year now, figured I should formalize
this.
DeltaFile
+5-0llvm/Maintainers.md
+5-01 files

LLVM/project e75890fclang/lib/CodeGen CGBuiltin.cpp, clang/test/CodeGen builtin-clear-padding-codegen.c

[Clang] Fix BitInt padding clearing on big-endian targets

This patch fixes the padding clearing logic of `_BitInt`s.

Before this patch, the clearing logic assumed little endian. But the
memory layout of BitInts differs between little and big endian:

 - In LE, the occupied bits start from the lowest address and go on
   contiguously up until the BitInt's declared size. The padding bits
   then start from that point and go contiguously until the end of the
   storage unit.
 - In BE, since the byte order is reversed, the occupied bit interval
   is not contiguous if the storage unit is larger than the BitInt's
   size.

Therefore, the logic must tell the two cases apart and perform the
calculations accordingly.
DeltaFile
+81-0clang/test/CodeGenCXX/builtin-clear-padding-codegen.cpp
+81-0clang/test/CodeGen/builtin-clear-padding-codegen.c
+43-0clang/lib/CodeGen/CGBuiltin.cpp
+205-03 files