LLVM/project c2409b4llvm/include/llvm/Analysis TargetTransformInfoImpl.h, llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Remove masked/gather-scatter/strided/expand-compress costing from TTIImpl (#169885)

Following #165532, this patch moves scalarization‑cost computation into
BaseT::getMemIntrinsicCost and lets backends override it via their
getMemIntrinsicCost.
It also removes the masked/gather‑scatter/strided/expand‑compress
costing interfaces from TTIImpl.
Targets may keep them locally if needed.

Stacked on #170426 and #170436.
DeltaFile
+42-66llvm/include/llvm/CodeGen/BasicTTIImpl.h
+13-25llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+21-5llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+16-2llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+16-2llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+7-10llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
+115-1104 files not shown
+150-12610 files

LLVM/project b8a5888libclc/opencl/include/clc/opencl/synchronization utils.h

[libclc] Fix memory fence scope mapping for OpenCL (#170542)

The function `__opencl_get_memory_scope` incorrectly assumed that the
Clang built-in `__MEMORY_SCOPE_*` macros defined as bitmasks, while they
are actually defined as distinct integer values. This led to incorrect
mapping of OpenCL memory fence flags to LLVM memory scopes, causing
issues in generated code.

The fix involves updating the `__opencl_get_memory_scope` function to
return the correct `__MEMORY_SCOPE_*` values based on the provided
`cl_mem_fence_flags`. Additionally, the `__opencl_get_memory_semantics`
and the `__opencl_get_memory_scope` functions are marked as `static`
to avoid potential multiple definition issues during linking.
DeltaFile
+5-6libclc/opencl/include/clc/opencl/synchronization/utils.h
+5-61 files

LLVM/project e60a69aclang/include/clang/Frontend CompilerInvocation.h, clang/lib/Driver/ToolChains CommonArgs.cpp

[Clang] Reuse the function getOptimizationLevel in tools::addLTOOptions. (#169762)

DeltaFile
+8-20clang/lib/Driver/ToolChains/CommonArgs.cpp
+2-2clang/include/clang/Frontend/CompilerInvocation.h
+2-2clang/lib/Frontend/CompilerInvocation.cpp
+12-243 files

LLVM/project 1952c1cutils/bazel/llvm-project-overlay/clang BUILD.bazel, utils/bazel/llvm-project-overlay/llvm BUILD.bazel

Fix bazel build for 6e479668ba746ee3778b7ab59b7c415976719c93
DeltaFile
+12-1utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+1-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+13-12 files

LLVM/project bf139dallvm/include/llvm/CodeGen SelectionDAG.h, llvm/lib/CodeGen/SelectionDAG LegalizeDAG.cpp TargetLowering.cpp

DAG: Add overload of getExternalSymbol using RTLIB::LibcallImpl
DeltaFile
+7-8llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+4-4llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+5-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+1-2llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+1-0llvm/include/llvm/CodeGen/SelectionDAG.h
+18-145 files

LLVM/project 8d43197mlir/test/Dialect/XeGPU xegpu-wg-to-sg-unify-ops.mlir

[MLIR][XeGPU] Change index arithmetic ops to arith op (#170581)

This PR fixes the failure caused in the post-merge of PR #169571
DeltaFile
+10-10mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+10-101 files

LLVM/project ba5d29eclang/test/CodeGenCXX aggregate-lifetime-invoke.cpp

Update invoke test for tighter lifetimes
DeltaFile
+12-15clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+12-151 files

LLVM/project efbbca6llvm/include/llvm/IR DebugInfoMetadata.h, llvm/lib/CodeGen/AsmPrinter DwarfUnit.cpp

[llvm][DebugInfo] Allow DIDerivedType as a bound in DISubrangeType (#165880)

Consider this Ada type:

```
   type Array_Type is array (Natural range <>) of Integer;
   type Record_Type (L1, L2 : Natural) is record
      I1 : Integer;
      A1 : Array_Type (1 .. L1);
      I2 : Integer;
      A2 : Array_Type (1 .. L2);
      I3 : Integer;
   end record;
```

Here, the array fields have lengths that depend on the discriminants of
the record type. However, in this case the array lengths cannot be
expressed as DWARF location expressions, with the issue being that "A2"
has a non-constant offset, but an expression involving

    [24 lines not shown]
DeltaFile
+88-0llvm/test/DebugInfo/X86/derived-in-subrange.ll
+8-4llvm/lib/IR/Verifier.cpp
+4-1llvm/lib/IR/DebugInfoMetadata.cpp
+3-1llvm/include/llvm/IR/DebugInfoMetadata.h
+3-0llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+106-65 files

LLVM/project 5a47ed2llvm/lib/CodeGen/SelectionDAG LegalizeIntegerTypes.cpp

DAG: Avoid asserting on libcall action if function is unavailable

Eventually the set of available functions will be a program
dependent property, which could diverge from the static table of
functions for the subtarget. In that case, fall back to the usual
expansion.
DeltaFile
+13-7llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+13-71 files

LLVM/project 1142c93llvm/test/CodeGen/PowerPC amo-enable.ll

Remove redundant tests from amo-enable.ll
DeltaFile
+0-40llvm/test/CodeGen/PowerPC/amo-enable.ll
+0-401 files

LLVM/project bd03b46clang/lib/CodeGen/TargetBuiltins PPC.cpp, clang/lib/Sema SemaPPC.cpp

[PowerPC] Add AMO load builtins for conditional increment/decrement
DeltaFile
+78-0llvm/test/CodeGen/PowerPC/amo-enable.ll
+76-1clang/test/CodeGen/PowerPC/builtins-ppc-amo.c
+26-0llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+24-0clang/test/CodeGen/PowerPC/builtins-amo-err.c
+19-0clang/lib/Sema/SemaPPC.cpp
+12-0clang/lib/CodeGen/TargetBuiltins/PPC.cpp
+235-14 files not shown
+259-110 files

LLVM/project d2f526dclang/include/clang/AST OpenMPClause.h, clang/include/clang/Sema SemaOpenMP.h

Minor formatting changes.
DeltaFile
+6-5clang/include/clang/AST/OpenMPClause.h
+4-2clang/lib/Sema/SemaOpenMP.cpp
+4-2clang/include/clang/Sema/SemaOpenMP.h
+2-3clang/lib/Parse/ParseOpenMP.cpp
+1-1clang/test/OpenMP/target_data_use_device_ptr_fallback_messages.cpp
+17-135 files

LLVM/project ecbdeddllvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp, llvm/test/CodeGen/AMDGPU llvm.exp10.ll

AMDGPU: Fix broken exp10 lowering for f16

This was calling the exp handling, so multiplying by the wrong
constant.

GlobalISel is still broken, but missing the fast exp10 path.
This is tracked in https://github.com/llvm/llvm-project/issues/170576
DeltaFile
+385-126llvm/test/CodeGen/AMDGPU/llvm.exp10.ll
+7-3llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+392-1292 files

LLVM/project f914b1fclang/lib/CodeGen CGCall.h CGCall.cpp, clang/test/CodeGen stack-usage-lifetimes.c

[clang] Use tighter lifetime bounds for C temporary arguments

In C, consecutive statements in the same scope are under
CompoundStmt/CallExpr, while in C++ they typically fall under
CompoundStmt/ExprWithCleanup. This leads to different behavior with
respect to where pushFullExprCleanUp inserts the lifetime end markers
(e.g., at the end of scope).

For these cases, we can track and insert the lifetime end markers right
after the call completes. Allowing the stack space to be reused
immediately. This partially addresses #109204 and #43598 for improving
stack usage.
DeltaFile
+19-0clang/lib/CodeGen/CGCall.h
+14-4clang/lib/CodeGen/CGCall.cpp
+6-6clang/test/CodeGen/stack-usage-lifetimes.c
+1-1clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
+40-114 files

LLVM/project a17f2d1clang/lib/CodeGen CGCall.cpp

Update comment to be more accurate
DeltaFile
+3-5clang/lib/CodeGen/CGCall.cpp
+3-51 files

LLVM/project 08189adclang/test/CodeGenCXX aggregate-lifetime-invoke.cpp

Add test for invoke instructions
DeltaFile
+45-0clang/test/CodeGenCXX/aggregate-lifetime-invoke.cpp
+45-01 files

LLVM/project a92d090clang/lib/Sema SemaChecking.cpp, clang/test/Sema warn-nontrivial-struct-memaccess-ptrauth.c

[clang] warn_cstruct_memaccess and warn_cxxstruct_memaccess are too agressive about initializers

These warnings are triggered for zeroing initializers of non-trivially
initializable and non-trivially copyable types.

This results in significant numbers of warnings in idiomatic object
initialization code, where memset and similar are used to ensure no
stale data is present in fields or padding bytes.

Addresses #156996
DeltaFile
+44-5clang/test/SemaCXX/warn-memaccess.cpp
+30-15clang/test/Sema/warn-nontrivial-struct-memaccess-ptrauth.c
+31-8clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m
+12-3clang/lib/Sema/SemaChecking.cpp
+117-314 files

LLVM/project 1a09ac5llvm/include/llvm/ExecutionEngine/Orc CallViaEPC.h CallSPSViaEPC.h, llvm/unittests/ExecutionEngine/Orc CallSPSViaEPCTest.cpp CMakeLists.txt

[ORC] Add CallViaEPC and CallSPSViaEPC utilities. (#170464)

These utilities simplify making typed async calls via
ExecutorProcessControl::callWrapperAsync.

CallViaEPC.h provides utilities for making typed async calls using a
given Serializer to serialize arguments and deserialize results.

callViaEPC takes a result handler function object (accepting
Expected<T>), an EPC reference, a Serializer, a target function address,
and arguments. The return type T is inferred from the handler's argument
type using CallableTraitsHelper.

EPCCaller wraps an ExecutorProcessControl& and Serializer, simplifying
repeated calls with the same serialization.

EPCCall wraps an EPCCaller and target function address, simplifying
repeated calls to a specific wrapper function.


    [9 lines not shown]
DeltaFile
+102-0llvm/include/llvm/ExecutionEngine/Orc/CallViaEPC.h
+90-0llvm/unittests/ExecutionEngine/Orc/CallSPSViaEPCTest.cpp
+79-0llvm/include/llvm/ExecutionEngine/Orc/CallSPSViaEPC.h
+1-0llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
+272-04 files

LLVM/project d7fb086lldb/include/lldb/Core Module.h, lldb/source/Breakpoint BreakpointResolverName.cpp

[lldb] Refactor LookupInfo object to be per-language (#168797)

Some months ago, the LookupInfo constructor logic was refactored to not
depend on language specific logic, and use languages plugins instead. In
this refactor, when the language type is unknown, a single LookupInfo
object will handle multiple languages. This doesn't work well, as
multiple languages might want to configure the LookupInfo object in
different ways. For example, different languages might want to set the
m_lookup_name differently from each other, but the previous
implementation would pick the first name a language provided, and
effectively ignored every other language. Other fields of the LookupInfo
object are also configured in incompatible ways.

This approach doesn't seem to be a problem upstream, since only the
C++/Objective-C language plugins are available, but it broke downstream
on the Swift fork, as adding Swift to the list of default languages when
the language type is unknown breaks C++ tests.

This patch makes it so instead of building a single LookupInfo object

    [3 lines not shown]
DeltaFile
+125-0lldb/unittests/Core/ModuleTest.cpp
+58-32lldb/source/Core/Module.cpp
+27-23lldb/source/Core/ModuleList.cpp
+36-2lldb/include/lldb/Core/Module.h
+22-11lldb/source/Breakpoint/BreakpointResolverName.cpp
+26-3lldb/source/Symbol/SymbolContext.cpp
+294-7110 files not shown
+351-8216 files

LLVM/project e71717cclang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 avx2-builtins.c avx512f-builtins.c

[CIR][X86] Implement lowering for pmuldq / pmuludq builtins (#169853)

part of [#167765](https://github.com/llvm/llvm-project/issues/167765)

This patch adds CIR codegen support for X86 pmuldq and pmuludq
operations, covering the signed and unsigned variants across all
supported vector widths. The builtins now lower to the expected CIR
representation matching the semantics of the corresponding LLVM
intrinsics.
DeltaFile
+50-2clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+52-0clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
+52-0clang/test/CIR/CodeGenBuiltins/X86/avx512f-builtins.c
+45-0clang/test/CIR/CodeGenBuiltins/X86/sse41-builtins.c
+23-0clang/test/CIR/CodeGenBuiltins/X86/sse2-builtins.c
+222-25 files

LLVM/project 25017e6clang/test/OpenMP target_data_use_device_ptr_fallback_ast_print.cpp target_data_use_device_ptr_fallback_messages.cpp

Add tests.
DeltaFile
+36-0clang/test/OpenMP/target_data_use_device_ptr_fallback_ast_print.cpp
+28-0clang/test/OpenMP/target_data_use_device_ptr_fallback_messages.cpp
+64-02 files

LLVM/project 4707b4cclang/lib/Sema SemaChecking.cpp, clang/test/Sema warn-nontrivial-struct-memaccess-ptrauth.c

[clang] warn_cstruct_memaccess and warn_cxxstruct_memaccess are too agressive about initializers

These warnings are triggered for zeroing initializers of non-trivially
initializable and non-trivially copyable types.

This results in significant numbers of warnings in idiomatic object
initialization code, where memset and similar are used to ensure no
stale data is present in fields or padding bytes.

Addresses #156996
DeltaFile
+44-5clang/test/SemaCXX/warn-memaccess.cpp
+30-15clang/test/Sema/warn-nontrivial-struct-memaccess-ptrauth.c
+31-8clang/test/SemaObjC/warn-nontrivial-struct-memaccess.m
+10-4clang/lib/Sema/SemaChecking.cpp
+115-324 files

LLVM/project 5a84093clang/include/clang/AST OpenMPClause.h, clang/lib/AST OpenMPClause.cpp

[OpenMP][Clang] Parsing/Sema support for `use_device_ptr(fb_preserve/fb_nullify)`.

Depends on #169603.

This is the `use_device_ptr` counterpart of #168905.

With OpenMP 6.1, a `fallback` modifier can be specified on the
`use_device_ptr` clause to control the behavior when a pointer lookup
fails, i.e. there is no device pointer to translate into.

The default is `fb_preserve` (i.e. retain the original pointer), while
`fb_nullify` means: use `nullptr` as the translated pointer.
DeltaFile
+35-4clang/include/clang/AST/OpenMPClause.h
+20-2clang/lib/Basic/OpenMPKinds.cpp
+18-0clang/lib/Parse/ParseOpenMP.cpp
+14-3clang/lib/AST/OpenMPClause.cpp
+9-5clang/lib/Sema/SemaOpenMP.cpp
+8-4clang/lib/Sema/TreeTransform.h
+104-185 files not shown
+130-2011 files

LLVM/project c8d3b0cmlir/lib/Dialect/XeGPU/Transforms XeGPUWgToSgDistribute.cpp, mlir/test/Dialect/XeGPU xegpu-wg-to-sg-unify-ops.mlir xegpu-wg-to-sg-unify-ops-rr.mlir

[MLIR][XeGPU] Add distribution for vector.create_mask from Wg to Sg (#169571)

DeltaFile
+28-19mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp
+37-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops.mlir
+8-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg-unify-ops-rr.mlir
+73-193 files

LLVM/project b70be3dclang/include/clang/DependencyScanning DependencyScanningFilesystem.h, clang/include/clang/Tooling/DependencyScanning DependencyScanningFilesystem.h

[clang][DependencyScanning] Separate clangDependencyScanning and DependencyScanningTool (NFC) (#169962)

This patch is the first of two in refactoring Clang's dependency
scanning tooling to remove its dependency on clangDriver.

It separates Tooling/DependencyScanningTool.cpp from the rest of
clangDependencyScanning and moves clangDependencyScanning out of
clangTooling into its own library. No functional changes are
introduced.

The follow-up patch (#169964) will restrict clangDependencyScanning to
handling only -cc1 command line inputs and will move all functionality
related to handling driver commands into clangTooling.
(Tooling/DependencyScanningTool.cpp).

This is part of a broader effort to support driver-managed builds for
compilations using C++ named modules and/or Clang modules. It is
required for linking the dependency scanning tooling against the driver
without introducing cyclic dependencies, which would otherwise cause

    [4 lines not shown]
DeltaFile
+0-977clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
+976-0clang/lib/DependencyScanning/ModuleDepCollector.cpp
+0-887clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp
+886-0clang/lib/DependencyScanning/DependencyScannerImpl.cpp
+0-527clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
+525-0clang/include/clang/DependencyScanning/DependencyScanningFilesystem.h
+2,387-2,39138 files not shown
+5,553-5,47944 files

LLVM/project 21f98f9lldb/tools/lldb-dap/Handler AttachRequestHandler.cpp

[lldb-dap] Fix format string on Mac OS (#169933)

On Mac `unsigned long long` corresponds to `uint64_t` so `%llu` is
needed.

Simply always using `%llu` and upcasting to `unsigned long long` should
make it work fine.
DeltaFile
+4-2lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp
+4-21 files

LLVM/project d86891dllvm/test/CodeGen/PowerPC amo-enable.ll

Remove redundant tests from amo-enable.ll
DeltaFile
+6-46llvm/test/CodeGen/PowerPC/amo-enable.ll
+6-461 files

LLVM/project 277e516clang/lib/Sema SemaPPC.cpp

Use unsigned literals for FC value checking
DeltaFile
+3-2clang/lib/Sema/SemaPPC.cpp
+3-21 files

LLVM/project eed716dclang/lib/CodeGen/TargetBuiltins PPC.cpp, clang/lib/Headers amo.h

[PowerPC] Add AMO load signed builtins

This commit adds two Clang builtins for AMO load signed operations:

__builtin_amo_lwat_st for 32-bit signed operations
__builtin_amo_ldat_s for 64-bit signed operations
DeltaFile
+48-0clang/test/CodeGen/PowerPC/ppc-amo-header.c
+40-1llvm/test/CodeGen/PowerPC/amo-enable.ll
+40-0clang/test/CodeGen/PowerPC/builtins-ppc-amo.c
+34-0clang/lib/Headers/amo.h
+14-4clang/lib/Sema/SemaPPC.cpp
+15-0clang/lib/CodeGen/TargetBuiltins/PPC.cpp
+191-52 files not shown
+205-58 files

LLVM/project 73254edclang/lib/Sema SemaPPC.cpp, clang/test/CodeGen/PowerPC builtins-amo-err.c

Add 64-bit target check for signed AMO builtins
DeltaFile
+6-6clang/test/CodeGen/PowerPC/builtins-amo-err.c
+2-0clang/lib/Sema/SemaPPC.cpp
+8-62 files