LLVM/project 70eba39clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVMOpenCLMetadata.h LowerToLLVM.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Lower OpenCL language version metadata to LLVM dialect

Propagate CIR OpenCL language version module attributes as LLVM dialect named metadata before LLVM IR translation.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+43-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.cpp
+16-0clang/test/CIR/CodeGenOpenCL/version.cl
+16-0clang/test/CIR/Lowering/opencl-version-metadata.cir
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.h
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+79-05 files

LLVM/project 0cb5106clang/test/CIR/CodeGenHIP amdgcnspirv-kernel.hip

fix: Check HIP SPIR-V version metadata after lowering
DeltaFile
+3-0clang/test/CIR/CodeGenHIP/amdgcnspirv-kernel.hip
+3-01 files

LLVM/project b37e6dbclang/lib/CIR/CodeGen CIRGenModule.h CIRGenModule.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Emit OpenCL language version metadata in CIR

Emit OpenCL and C++ for OpenCL language version attributes from CIRGen. Preserve the compatible OpenCL version and the C++ for OpenCL version separately so later lowering does not infer one from the other.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+15-0clang/test/CIR/CodeGenOpenCL/version.cl
+13-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+4-0clang/test/CodeGenCUDASPIRV/kernel-cc.cu
+1-0clang/lib/CIR/CodeGen/CIRGenModule.h
+33-04 files

LLVM/project 871a42dclang/lib/CIR/CodeGen CIRGenModule.cpp, clang/lib/CodeGen CodeGenModule.cpp

fix: Supply the HIP SPIR-V version only for metadata emission

Fix the assertion exposed by PR #214246 under the version invariant from PR #219687. Supply OpenCL 2.0 in classic CodeGen and CIRGen without changing HIP language options or enabling OpenCL-only Sema restrictions.

Assisted-by: Codex / GPT-6
DeltaFile
+8-0clang/test/CodeGenHIP/hipspv-kernel.cpp
+8-0clang/test/SemaHIP/atomic-init.hip
+4-2clang/lib/CIR/CodeGen/CIRGenModule.cpp
+3-1clang/lib/CodeGen/CodeGenModule.cpp
+2-0clang/test/CIR/CodeGenHIP/amdgcnspirv-kernel.hip
+25-35 files

LLVM/project 64a6af1clang/include/clang/CIR/Dialect/IR CIROpenCLAttrs.td, clang/lib/CIR/Dialect/IR CIROpenCLAttrs.cpp CIRDialect.cpp

[CIR][OpenCL] Add OpenCL language version module attributes (#219687)

Add structured CIR module attributes for OpenCL and C++ for OpenCL
language versions. Verify their module-level placement and version
components so lowering can consume explicit source-language version
state.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+85-3clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+73-0clang/test/CIR/IR/invalid-version.cir
+34-0clang/include/clang/CIR/Dialect/IR/CIROpenCLAttrs.td
+19-0clang/test/CIR/IR/version.cir
+15-0clang/lib/CIR/Dialect/IR/CIROpenCLAttrs.cpp
+3-1clang/test/CIR/Transforms/cxx-abi-lowering-attrs.cir
+229-41 files not shown
+233-47 files

LLVM/project 25fe99bllvm/include/llvm/ExecutionEngine/Orc/Shared OrcRTBridge.h, llvm/lib/ExecutionEngine/Orc EPCGenericRTDyldMemoryManager.cpp

[ORC] Retire rt::SimpleExecutorMemoryManager* for sps_ci (#223113)

Move all clients to the sps_ci SimpleNativeMemoryMap / MemMgr
counterparts and retire the old rt::SimpleExecutorMemoryManager*
interface names.
DeltaFile
+7-25llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp
+8-11llvm/lib/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.cpp
+9-10llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
+0-17llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
+0-11llvm/lib/ExecutionEngine/Orc/Shared/OrcRTBridge.cpp
+24-745 files

LLVM/project bb962e7orc-rt/include/orc-rt/bedrock SocketHandle.h, orc-rt/lib/bedrock/sys/posix SocketHandle.cpp

[orc-rt] Add SocketHandle, NativeSocketHandle APIs (#223114)

SocketHandle is an owning wrapper for a NativeSocketHandle value, and
closes the native socket on destruction.

NativeSocketHandle is a typedef for the platform's native socket handle
type.

Only POSIX is implemented in this patch (in sys/posix/SocketHandle.cpp).
Windows support will be added later.

This will be used for an upcoming SimpleRemote-based ControllerAccess
implementation that uses sockets for transport (SocketSimpleRemoteCA).
DeltaFile
+116-0orc-rt/test/unit/bedrock/SocketHandleTest.cpp
+90-0orc-rt/include/orc-rt/bedrock/SocketHandle.h
+37-0orc-rt/lib/bedrock/sys/posix/SocketHandle.cpp
+36-0orc-rt/test/unit/bedrock/sys/posix/SocketTestUtils.cpp
+35-0orc-rt/test/unit/bedrock/SocketTestUtils.h
+17-0orc-rt/test/unit/CMakeLists.txt
+331-02 files not shown
+335-18 files

LLVM/project fe36473clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp, clang/lib/CodeGen/TargetBuiltins AMDGPU.cpp

[CIR][AMDGPU] Let amdgcn_lerp and ds_swizzle use the generic codegen path (#222204)

__builtin_amdgcn_lerp and __builtin_amdgcn_ds_swizzle both map 1:1 onto
concrete (non-overloaded) intrinsics and carry the ClangBuiltin<> marker
in IntrinsicsAMDGPU.td, so EmitBuiltinExpr already lowers them
automatically by forwarding the arguments to the intrinsic.
DeltaFile
+9-0clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip
+0-6clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+0-3clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+9-93 files

LLVM/project 29de2a7llvm/lib/Target/AMDGPU AMDGPU.td

[AMDGPU] Fix placement of FeatureSupportsXNACK

This can't be put into 12_50_Common because of conflict in downstream code.
DeltaFile
+4-1llvm/lib/Target/AMDGPU/AMDGPU.td
+4-11 files

LLVM/project e471938llvm/test/Transforms/AggressiveInstCombine/RISCV lit.local.cfg

[AggressiveInstCombine] Add lit.local.cfg to RISCV test directory. NFC (#223067)

To fix buildbot failures after #220310.
DeltaFile
+2-0llvm/test/Transforms/AggressiveInstCombine/RISCV/lit.local.cfg
+2-01 files

LLVM/project 5b1d741flang/include/flang/Optimizer/Builder/Runtime/CUDA Support.h, flang/lib/Lower Bridge.cpp

[flang][cuda] Synchronize context before finalization (#223058)
DeltaFile
+35-0flang/lib/Optimizer/Builder/Runtime/CUDA/Support.cpp
+27-0flang/include/flang/Optimizer/Builder/Runtime/CUDA/Support.h
+5-1flang/lib/Lower/Bridge.cpp
+3-0flang/test/Lower/CUDA/cuda-return02.cuf
+1-0flang/test/Lower/CUDA/cuda-return01.cuf
+1-0flang/lib/Optimizer/Builder/CMakeLists.txt
+72-16 files

LLVM/project 4945b98llvm/docs GwpAsan.md ConvergenceAndUniformity.md

[LLVM][docs] Convert remaining batch 10 tables to MyST
DeltaFile
+328-94llvm/docs/ConvergenceAndUniformity.md
+33-27llvm/docs/GwpAsan.md
+361-1212 files

LLVM/project eda12aallvm/docs ConvergenceAndUniformity.rst ConvergenceAndUniformity.md

[LLVM][docs] Rename reST docs to Markdown (batch 10)
DeltaFile
+0-1,607llvm/docs/ConvergentOperations.rst
+1,607-0llvm/docs/ConvergentOperations.md
+0-743llvm/docs/MLGO.rst
+743-0llvm/docs/MLGO.md
+0-713llvm/docs/ConvergenceAndUniformity.rst
+713-0llvm/docs/ConvergenceAndUniformity.md
+3,063-3,06345 files not shown
+8,680-8,68051 files

LLVM/project 64b9d8dllvm/docs FuzzingLLVM.md ConvergenceAndUniformity.md, llvm/docs/DependenceGraphs index.md

[LLVM][docs] Finish MyST migration for remaining docs (batch 10)
DeltaFile
+62-59llvm/docs/ConvergentOperations.md
+43-44llvm/docs/HowToAddABuilder.md
+35-31llvm/docs/ConvergenceAndUniformity.md
+35-31llvm/docs/BugLifeCycle.md
+26-27llvm/docs/DependenceGraphs/index.md
+22-22llvm/docs/FuzzingLLVM.md
+223-21412 files not shown
+277-28018 files

LLVM/project c2142e5llvm/docs HowToAddABuilder.md InterfaceExportAnnotations.md

[LLVM][docs] Convert remaining reST docs with rst2myst (batch 10)
DeltaFile
+810-847llvm/docs/ConvergentOperations.md
+403-415llvm/docs/HowToSetUpLLVMStyleRTTI.md
+343-372llvm/docs/MLGO.md
+340-341llvm/docs/ConvergenceAndUniformity.md
+232-235llvm/docs/InterfaceExportAnnotations.md
+221-221llvm/docs/HowToAddABuilder.md
+2,349-2,43119 files not shown
+3,948-4,32925 files

LLVM/project b7e0dafclang/lib/ScalableStaticAnalysis/SourceTransformation CMakeLists.txt, clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.cpp

[SSAF][clang-reforge] Retrofit expressions after CppBoundedBuffers decl rewrites

PR #210457 introduces declaration rewriting.  When CppBoundedBuffers
rewrites a declaration or return type to a bounded_ptr/bounded_array,
some of the existing uses of that entity needs retrofit.

This commit creates expression rewrites for the following patterns:

- Append '.data()' to call arguments when necessary parameter is not
  transformed but argument is transformed.
- Append '.as_bounded<T>()' to call arguments when both parameter and
  argument are transformed but element types are not identical.
- Rewrite '&e[i]' to '(e + i)' and '&*e'/'&(*e)' to 'e', if 'e' is
  transformed.
- Rewrite '(T*)e', 'static_cast<T*>(e)', and 'reinterpret_cast<T*>(e)'
  to 'e.as_bounded<T>()', if 'e' is transformed.

The 3rd step of
rdar://187125348
DeltaFile
+417-7clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+246-0clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+9-0clang/lib/ScalableStaticAnalysis/SourceTransformation/CMakeLists.txt
+7-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/SourceTransformation/BUILD.gn
+679-74 files

LLVM/project f0fe1afclang/include/clang/ScalableStaticAnalysis/Analyses/EntityPointerLevel EntityPointerLevel.h, clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.h

[SSAF][PointerFlow] Drop unused TUSummaryExtractor param from translateDeclPointerLevel

TUSummaryExtractor is only needed to mint EntityIds when building an
EntityPointerLevel; translateDeclPointerLevel just walks the Expr and
returns raw DeclPointerLevels, so it never touched Extractor.

This is the second patch the radar below depends on:
rdar://187125348
DeltaFile
+24-20clang/lib/ScalableStaticAnalysis/Analyses/EntityPointerLevel/EntityPointerLevel.cpp
+2-3clang/include/clang/ScalableStaticAnalysis/Analyses/EntityPointerLevel/EntityPointerLevel.h
+2-2clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowExtractor.cpp
+2-0clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.h
+30-254 files

LLVM/project 9e04b61clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.h, clang/lib/ScalableStaticAnalysis/Analyses SSAFAnalysesCommon.h

[SSAF][PointerFlow] Factor out and make the pointer-flow matching reusable

The PointerFlowExtractor matches AST nodes representing pointer-flows
and converts them to entity-based data structures directly. This
commit divides this procedure into two steps: 1) match and represent
AST nodes as PointerFlowPairs; 2) convert PointerFlowPairs to
entity-based edges. Therefore, other SSAF tools may use
PointerFlowPairs.

The refactoring also improves coverage: it separates pointer-type
checking from structural matching, so structural matching alone now
discovers cases that were previously missed due to overly aggressive
type checking (e.g. a record-typed call argument or return value
initialized with a braced-init-list).

Along the way, this also fixes a bug for unnamed bit-fields.

First patch for
rdar://187125348
DeltaFile
+433-0clang/unittests/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairsTest.cpp
+300-0clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.cpp
+67-232clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowExtractor.cpp
+122-0clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.h
+7-1clang/lib/ScalableStaticAnalysis/Analyses/SSAFAnalysesCommon.h
+1-0llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysis/BUILD.gn
+930-2333 files not shown
+933-2339 files

LLVM/project d5c1b52clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowExtractor.cpp

fix clang-format
DeltaFile
+1-2clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowExtractor.cpp
+1-21 files

LLVM/project 2ef8f52clang/lib/ScalableStaticAnalysis/SourceTransformation CMakeLists.txt, clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.cpp

[SSAF][clang-reforge] Retrofit expressions after CppBoundedBuffers decl rewrites

PR #210457 introduces declaration rewriting.  When CppBoundedBuffers
rewrites a declaration or return type to a bounded_ptr/bounded_array,
some of the existing uses of that entity needs retrofit.

This commit creates expression rewrites for the following patterns:

- Append '.data()' to call arguments when necessary parameter is not
  transformed but argument is transformed.
- Append '.as_bounded<T>()' to call arguments when both parameter and
  argument are transformed but element types are not identical.
- Rewrite '&e[i]' to '(e + i)' and '&*e'/'&(*e)' to 'e', if 'e' is
  transformed.
- Rewrite '(T*)e', 'static_cast<T*>(e)', and 'reinterpret_cast<T*>(e)'
  to 'e.as_bounded<T>()', if 'e' is transformed.

The 3rd step of
rdar://187125348
DeltaFile
+417-7clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+246-0clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+9-0clang/lib/ScalableStaticAnalysis/SourceTransformation/CMakeLists.txt
+7-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/SourceTransformation/BUILD.gn
+679-74 files

LLVM/project f471750clang/docs/CIR CleanupAndEHDesign.md

[CIR] Document dynamic exception specification design (#222451)

This change adds documentation for the CIR handling of dynamic exception
specification handling in pre-C++17 code. This is not yet implemented.
The implementation will follow in a series of changes based on this
design.

This documentation was generated by Claude Opus 5, based on an
interactive planning session in which I worked out the details of how I
want to implement this feature. I have carefully read the entire
document to verify that it correctly matches my intended implementation.
DeltaFile
+451-0clang/docs/CIR/CleanupAndEHDesign.md
+451-01 files

LLVM/project 23cd975libc/test/UnitTest BazelFilePath.cpp, utils/bazel/llvm-project-overlay/libc/test libc_test_rules.bzl

[libc][bazel] Use LLVM-libc startup objects in full-build tests
DeltaFile
+91-59utils/bazel/llvm-project-overlay/libc/test/include/BUILD.bazel
+58-20utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
+48-3utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
+37-4utils/bazel/llvm-project-overlay/libc/test/src/stdio/BUILD.bazel
+25-0utils/bazel/llvm-project-overlay/libc/test/IntegrationTest/BUILD.bazel
+13-3libc/test/UnitTest/BazelFilePath.cpp
+272-895 files not shown
+291-9611 files

LLVM/project 2c30f74llvm/include/llvm/CodeGen BasicTTIImpl.h, llvm/lib/Transforms/Utils RelLookupTableConverter.cpp

[llvm] Avoid PREL32 overflow to .data.rel.ro on AArch64 and re-enable (#222809)

Under the [AArch64 Small Code
Model](https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst#code-models),
the text segment (containing .text and .rodata) is limited to 2GB, but
the combined span of text and data segments can be up to 4GB.

When a relative lookup table is emitted in .rodata but references target
operands that require dynamic relocations (placed in .data.rel.ro in the
data segment), the distance between .rodata and .data.rel.ro can legally
exceed the 2GB range of signed 32-bit R_AARCH64_PREL32 relocations.

In this PR:
1. Ensure that on AArch64, lookup table operands do not need dynamic
relocations. If the lookup table were in `.rodata` (text segment), then
any of the target components would need to be in the data segment, so
the dynamic reloc check would suffice.
2. Re-enable RelLookupTableConverter for AArch64 (while keeping Darwin
disabled as before).

    [10 lines not shown]
DeltaFile
+435-0llvm/test/Transforms/RelLookupTableConverter/relative_lookup_table.ll
+0-434llvm/test/Transforms/RelLookupTableConverter/X86/relative_lookup_table.ll
+101-0llvm/test/Transforms/RelLookupTableConverter/AArch64/dynamic_relocs.ll
+9-0llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp
+3-4llvm/include/llvm/CodeGen/BasicTTIImpl.h
+1-1llvm/test/Transforms/RelLookupTableConverter/AArch64/no_relative_lookup_table.ll
+549-4396 files

LLVM/project 4e86502llvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp, llvm/test/CodeGen/AArch64 cmpbr-ccmp.ll cmpbr-ccmp.mir

[AArch64] Form CCMP for CBB and CBH (#221113)

AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as

                 Head                        Head
                 / |                         CmpBB
                /  |                         / |
               |  CmpBB        =>           /  |
               |  / |                    Tail  |
               | /  |                      |   |
              Tail  |                      |   |
                |   |                      |   |
               ... ...                    ... ...

where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.

We usually try to split any fused conditional branches to be able to

    [7 lines not shown]
DeltaFile
+406-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.mir
+232-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.ll
+41-2llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+679-23 files

LLVM/project e4365f9llvm/test/Transforms/LoopVectorize/VPlan compress-idioms.ll

Remove AArch64 flags
DeltaFile
+1-1llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+1-11 files

LLVM/project 5b26451llvm/lib/Transforms/Utils LoopUtils.cpp

Fixups
DeltaFile
+1-1llvm/lib/Transforms/Utils/LoopUtils.cpp
+1-11 files

LLVM/project eb8a3bellvm/lib/Transforms/Vectorize LoopVectorizationLegality.cpp, llvm/test/Transforms/LoopVectorize compress-idioms-negative-tests.ll

Add out-of-loop use check
DeltaFile
+32-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+10-2llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+42-22 files

LLVM/project bceac9cllvm/lib/Transforms/Utils LoopUtils.cpp, llvm/lib/Transforms/Vectorize LoopVectorize.cpp VPlanTransforms.cpp

Tests, fixes, and design rework
DeltaFile
+603-175llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+174-0llvm/test/Transforms/LoopVectorize/compress-idioms-negative-tests.ll
+87-49llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+58-74llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+98-0llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+66-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+1,086-29812 files not shown
+1,212-38518 files

LLVM/project 359d47allvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlan.h, llvm/test/Transforms/LoopVectorize compress-idioms.ll

[LoopVectorize] Support vectorization of compressing patterns in VPlan

RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442

This adds loop vectorizer support for "compressing" patterns,
for example:

```
int dst_idx = 0;
for (int i = 0; i < n; i++) {
  if (cond[i])
    dst[dst_idx++] = src[i];
}
```

Can be vectorized with a `llvm.masked.compressstore` as:

```
int dst_idx = 0;

    [52 lines not shown]
DeltaFile
+424-0llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+157-0llvm/test/Transforms/LoopVectorize/VPlan/compress-idioms.ll
+132-0llvm/test/Transforms/LoopVectorize/AArch64/compress-idioms.ll
+112-15llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+60-4llvm/lib/Transforms/Vectorize/VPlan.h
+49-0llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+934-1915 files not shown
+1,117-2721 files

LLVM/project 4d8f369llvm/lib/Transforms/Utils LoopUtils.cpp, llvm/test/Transforms/LoopVectorize compress-idioms.ll compress-store-vec-epilogue.ll

Fixups
DeltaFile
+37-40llvm/test/Transforms/LoopVectorize/compress-store-vec-epilogue.ll
+3-3llvm/lib/Transforms/Utils/LoopUtils.cpp
+0-2llvm/test/Transforms/LoopVectorize/compress-idioms.ll
+40-453 files