LLVM/project ea4b78cclang/lib/StaticAnalyzer/Core CheckerManager.cpp

[analyzer] Chain checkers in runCheckersForEndFunction (#220970)

The function `runCheckersForEndFunction` had an unusual behavior that it
invoked the callbacks in parallel (introducing a new execution path for
each checker callback that produced a transition), unlike all other
analogous functions, which "chained" the checkers, executing them after
each other.

This behavior was introduced before 2011, when this callback was called
`check::EndPath`, to ensure that the `EndPath` callbacks are _final_ and
nodes created by them end up at the end of the execution path. When
interprocedural analysis (inlining functions) was introduced in 2013,
the callback was renamed to `EndFunction` (to reflect that it also
activates at the end of inlined functions), but the unusual behavior was
preserved.

There were 8 "real" checkers with `check::EndFunction` callbacks, but
most of them only created error nodes or did "nice to have" cleanup, so
the irregular behavior of this callback did not cause visible trouble.

    [12 lines not shown]
DeltaFile
+35-27clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
+35-271 files

LLVM/project 1af17efllvm/include/llvm/ExecutionEngine/Orc/Shared SimpleRemoteEPCUtils.h, llvm/lib/ExecutionEngine/Orc SimpleRemoteEPC.cpp

[ORC] Carry out-of-band errors in SimpleRemoteEPC results (#223378)

ORC Wrapper functions may produce out-of-band error results (e.g. due to
serialization errors), but SimpleRemoteEPC / SimpleRemoteEPCServer never
handled these cases (they incorrectly asserted that they never
appeared).

Update the SimpleRemote protocol to use the TagAddr field (previously
unused for result messages) to encode Result message kinds: either a
Value, or an OutOfBandError. This allows out-of-band errors to flow
across the wire and be passed as results to their callers.

encodeResultMessage and decodeResultMessage implement the format /
handling: out-of-band errors (or failures to deserialize out-of-band
errors) are now passed to handlers as out-of-band error results. An
invalid Result message kind in the TagAddr field results in an
llvm::Error, ending the session.

SimpleRemoteEPCUtilsTest covers both kinds' round-trips, an unrecognized
kind, and a malformed out-of-band payload.
DeltaFile
+77-0llvm/unittests/ExecutionEngine/Orc/SimpleRemoteEPCUtilsTest.cpp
+48-0llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp
+30-0llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h
+6-9llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
+8-7llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
+1-0llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
+170-166 files

LLVM/project a55e865clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp, clang/test/CIR/CodeGenHIP builtins-amdgcn-gfx1250.hip

[CIR][AMDGPU] Add support for AMDGCN permlane builtins (#223161)

Adds codegen for the following AMDGCN permlane builtins:

- __builtin_amdgcn_permlane_bcast
- __builtin_amdgcn_permlane_up
- __builtin_amdgcn_permlane_down
- __builtin_amdgcn_permlane_xor

These are lowered to the corresponding `llvm.amdgcn.permlane.*`
intrinsics.

Assisted by: Claude Opus 5
DeltaFile
+36-0clang/test/CIR/CodeGenHIP/builtins-amdgcn-gfx1250.hip
+12-0clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+48-02 files

LLVM/project 004d596llvm/test/CodeGen/X86 vector-partial-reduce-fmla-f16.ll vector-partial-reduce-fmla-bf16.ll, llvm/test/Transforms/LoopVectorize/X86/CostModel partial-reduce-dot-product.ll

[X86][CodeGen] Support partial-reduce dot products (#205373)

Part of #187779 

Lower the llvm.vector.partial.reduce dot product shapes onto the X86 dot
product instructions:

    i8 x i8 -> i32:     vpdpbusd (AVX512-VNNI, AVX-VNNI)
                        vpdpbssd / vpdpbuud (AVX-VNNI-INT8, AVX10.2)
    i16 x i16 -> i32:   vpdpwssd (AVX512-VNNI, AVX-VNNI)
                        vpdpwsud / vpdpwuud (AVX-VNNI-INT16, AVX10.2)
    bf16 x bf16 -> f32: vdpbf16ps (AVX512-BF16)
    f16 x f16 -> f32:   vdpphps (AVX10.2)

The 128/256-bit shapes, and the 512-bit shapes on targets using 512-bit
registers, are registered as Custom. 512-bit shapes for which only the
VEX
encoding exists are split into two 256-bit dot products, and the
128/256-bit

    [13 lines not shown]
DeltaFile
+1,523-0llvm/test/CodeGen/X86/vector-partial-reduce-sumla.ll
+1,288-0llvm/test/CodeGen/X86/vector-partial-reduce-smla.ll
+1,077-0llvm/test/CodeGen/X86/vector-partial-reduce-umla.ll
+466-0llvm/test/Transforms/LoopVectorize/X86/CostModel/partial-reduce-dot-product.ll
+385-0llvm/test/CodeGen/X86/vector-partial-reduce-fmla-bf16.ll
+196-0llvm/test/CodeGen/X86/vector-partial-reduce-fmla-f16.ll
+4,935-04 files not shown
+5,140-310 files

LLVM/project 9008f49llvm/test/CodeGen/AMDGPU promote-alloca-byte-ptr-cast.ll barrier-addrspace-dereference.ll

AMDGPU: Use subarch triples in new tests added since all were converted (#223385)
DeltaFile
+8-8llvm/test/CodeGen/AMDGPU/addrspacecast-barrier.ll
+4-4llvm/test/CodeGen/AMDGPU/null-named-barrier-gv.ll
+2-2llvm/test/CodeGen/AMDGPU/barrier-addrspace-dereference.ll
+1-1llvm/test/CodeGen/AMDGPU/promote-alloca-byte-ptr-cast.ll
+15-154 files

LLVM/project fd9e9e7lldb/source/Plugins/TypeSystem/Fortran FortranTypes.cpp TypeSystemFortran.h, lldb/unittests/Symbol CMakeLists.txt TestTypeSystemFortran.cpp

[lldb][Fortran] Added base type support to TypeSystemFortran and Tests for TypeSystemFortran
DeltaFile
+237-0lldb/unittests/Symbol/TestTypeSystemFortran.cpp
+207-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.cpp
+76-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.h
+32-35lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.h
+16-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.cpp
+2-0lldb/unittests/Symbol/CMakeLists.txt
+570-351 files not shown
+571-357 files

LLVM/project 6739701llvm/lib/ExecutionEngine/Orc EPCGenericRTDyldMemoryManager.cpp

[ORC] Use lookupAndApply for EPCGenericRTDyldMemoryManager (#223377)

EPCGenericRTDyldMemoryManager::CreateWithDefaultBootstrapSymbols
resolved its memory-manager and EH-frame symbol addresses with
EPC.getBootstrapSymbols. For consistency, switch to
lookupAndApply/recordAddr on the bootstrap JITDylib instead.
DeltaFile
+12-8llvm/lib/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.cpp
+12-81 files

LLVM/project 26462acbolt/unittests/Core CMakeLists.txt MCPlusBuilder.cpp, bolt/unittests/Profile CMakeLists.txt PerfScripts.cpp

[BOLT][RISCV] Add basic RISC-V initialization support for unit tests (#222883)

This change addresses the uninstantiated test suite failures in
RISC-V-only builds discussed in #217604. That PR proposed a temporary
workaround using GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST.

Add the basic setup needed to instantiate and initialize the existing
test suites for riscv64, including the correct ELF machine type and
subtarget features, and remove the temporary allowances.
DeltaFile
+18-9bolt/unittests/Profile/PerfScripts.cpp
+17-9bolt/unittests/Core/MemoryMaps.cpp
+17-9bolt/unittests/Core/BinaryContext.cpp
+0-4bolt/unittests/Core/MCPlusBuilder.cpp
+1-0bolt/unittests/Profile/CMakeLists.txt
+1-0bolt/unittests/Core/CMakeLists.txt
+54-316 files

LLVM/project 810d7a4clang/include/clang/Basic CodeGenOptions.h, llvm/include/llvm/Support CodeGen.h

Rename enum
DeltaFile
+8-8llvm/include/llvm/Support/CodeGen.h
+3-3llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+2-2llvm/lib/CodeGen/CommandFlags.cpp
+2-2clang/include/clang/Basic/CodeGenOptions.h
+1-1llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+17-175 files not shown
+22-2211 files

LLVM/project b8c7806flang/lib/Optimizer/OpenMP MapInfoFinalization.cpp, flang/test/Lower/OpenMP target-data-use-device-addr-descriptor.f90

[Flang][OpenMP] Fix use_device_addr descriptor types (#222961)

Fix invalid FIR for assumed-shape arrays in use_device_addr by using
matching descriptor-reference types and loading the descriptor inside
the region. Added tests.

Co-authored-by: Codex <codex at openai.com>
DeltaFile
+59-0flang/test/Lower/OpenMP/target-data-use-device-addr-descriptor.f90
+38-0flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp
+97-02 files

LLVM/project f196f6autils/bazel/llvm-project-overlay/libc/test/src/math BUILD.bazel, utils/bazel/llvm-project-overlay/libc/test/src/math/smoke BUILD.bazel

[libc][Bazel] Add missing F16 math targets (#222937)

Addresses #221799 by adding all existing F16 tests that were missing
Bazel targets.
Validated by running all 184 F16 tests with bazel test.
DeltaFile
+93-6utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
+61-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+154-62 files

LLVM/project 178e6ddclang/include/clang/Basic CodeGenOptions.h, llvm/lib/CodeGen CommandFlags.cpp

Rename enum
DeltaFile
+3-3llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+2-2llvm/lib/CodeGen/CommandFlags.cpp
+2-2clang/include/clang/Basic/CodeGenOptions.h
+1-1llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+1-1llvm/lib/Passes/CodeGenPassBuilder.cpp
+10-105 files not shown
+15-1511 files

LLVM/project c90321aclang/include/clang/Basic CodeGenOptions.h, llvm/include/llvm/Support CodeGen.h

WebAssembly: Introduce ExceptionHandling::EmscriptenEH model

Add a dedicated EmscriptenEH exception model so the control uses
the standard exception model control, instead of relying on a backend
specific cl::opt. This will later migrate to a module flag and
remove -enable-emscripten-cxx-exceptions

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+20-12llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+11-6llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+8-7llvm/include/llvm/Support/CodeGen.h
+5-8llvm/test/CodeGen/WebAssembly/eh-option-errors.ll
+12-1clang/include/clang/Basic/CodeGenOptions.h
+6-3llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+62-3714 files not shown
+94-5320 files

LLVM/project 91b335allvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv vreductions-mask.ll

[RISCV] Don't use VL node when lowering scalable mask reductions

Using ISD::XOR gives us the generic not (setcc cc) -> setcc inverse-cc combine.

Restricted to just scalable vectors since some fixed vector patterns break without the VL node.

The VP test doesn't improve because

1) VP reductions get legalized during regular op legalization, not vector legalization
2) so generic DAGCombines don't get a chance to run before the (splat_vector 1) is legalized to vmset_vl.

We can fix this by keeping the (splat_vector 1) legal, but this is left to another PR.
DeltaFile
+4-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+1-2llvm/test/CodeGen/RISCV/rvv/vreductions-mask.ll
+5-62 files

LLVM/project 0e0a1fallvm/lib/Target/ARM Thumb2SizeReduction.cpp, llvm/test/CodeGen/ARM cmse-harden-call-returned-values.ll

ARM: Track CPSR liveness in Thumb2SizeReduction without kill flags

Thumb2SizeReduction narrows a 32-bit instruction to its flag-setting
16-bit form only when CPSR is dead afterwards. It determined this from
kill flags on CPSR operands. Kill flags have been semi-deprecated
for over a decade, so avoid relying on them. Liveness should be evaluated
as a reverse walk over a block.

The existing forward walk over the block is still necessary as a separate
step for the different A9 avoidCPSRPartialUpdate optimization.

Co-Authored-By: Claude claude-opus-4.8 <noreply at anthropic.com>
DeltaFile
+122-0llvm/test/CodeGen/Thumb2/thumb2-reduce-size-cpsr.mir
+40-69llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
+2-2llvm/test/CodeGen/ARM/cmse-harden-call-returned-values.ll
+164-713 files

LLVM/project 0135990clang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 bmi-builtins.c lzcnt-builtins.c

[CIR][X86] Emit cir.clz/cir.ctz for lzcnt/tzcnt builtins (#222669)

These x86 builtins were lowered through cir.call_llvm_intrinsic even
though dedicated CIR bit-count ops already exist.

Assisted-by: grok-4.6

Signed-off-by: Letu Ren <fantasquex at gmail.com>
DeltaFile
+8-12clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+5-5clang/test/CIR/CodeGenBuiltins/X86/lzcnt-builtins.c
+3-3clang/test/CIR/CodeGenBuiltins/X86/bmi-builtins.c
+16-203 files

LLVM/project 97bf780lldb/source/Plugins/SymbolFile/DWARF DWARFASTParserFortran.h DWARFASTParserFortran.cpp, lldb/source/Plugins/TypeSystem/Fortran TypeSystemFortran.h TypeSystemFortran.cpp

[lldb][Fortran] Added base type support to DWARFASTParserFortran, tests and method to get dwarf ast parser from TypeSystemFortran
DeltaFile
+209-0lldb/unittests/SymbolFile/DWARF/DWARFASTParserFortranTests.cpp
+127-4lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserFortran.cpp
+17-1lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserFortran.h
+8-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.cpp
+3-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.h
+2-0lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
+366-56 files

LLVM/project bc437a3clang/lib/Driver/ToolChains CommonArgs.cpp

Update CommonArgs.cpp
DeltaFile
+1-1clang/lib/Driver/ToolChains/CommonArgs.cpp
+1-11 files

LLVM/project b18c59eclang/lib/AST/ByteCode InterpBuiltinObjectSize.cpp Pointer.h, clang/test/AST/ByteCode cxx11.cpp

[clang][bytecode] Improve array index and offset add/sub bounds checks wrt. opaque pointers (#223353)

We were previously causing an assertion since the index had more than 64
bits.
DeltaFile
+57-28clang/lib/AST/ByteCode/Interp.cpp
+17-9clang/lib/AST/ByteCode/Pointer.cpp
+19-0clang/test/AST/ByteCode/cxx11.cpp
+8-7clang/lib/AST/ByteCode/Interp.h
+11-0clang/lib/AST/ByteCode/Pointer.h
+2-1clang/lib/AST/ByteCode/InterpBuiltinObjectSize.cpp
+114-456 files

LLVM/project fe72b96mlir/include/mlir/Analysis DataFlowFramework.h, mlir/lib/Analysis DataFlowFramework.cpp

[mlir][dataflow] Deduplicate data-flow solver worklist items (#221983)

The solver enqueues a work item every time a state it depends on
changes, so the same item can appear in the worklist many times.
A duplicate work item is re-processed even though its inputs have not
changed since the previous processing. For example, a dense analysis can
visit a join point with N predecessors up to N times in a row.

To deduplicate the worklist, pending items are tracked using a
`DenseSet`, and an item that is already pending is not pushed again.
Items are removed from the set when dequeued, before being visited, so
an analysis can still re-enqueue the point it is currently visiting.

Since analyses already have to be monotone to reach a fixed point, this
change does not affect analysis results, only the number of visits until
convergence. The test `FooState` used XOR for the join operation, which
is not monotone; the join operation was switched to OR and dependent
tests were updated.

A test that counts how many times a join block with several predecessors
is visited was added to check the deduplication.
DeltaFile
+41-7mlir/test/Analysis/test-foo-analysis.mlir
+26-12mlir/test/lib/Analysis/TestDataFlowFramework.cpp
+15-15mlir/test/Analysis/DataFlow/test-staged-analyses.mlir
+20-2mlir/include/mlir/Analysis/DataFlowFramework.h
+1-2mlir/lib/Analysis/DataFlowFramework.cpp
+103-385 files

LLVM/project 0948910llvm/test/CodeGen/AMDGPU promote-alloca-byte-ptr-cast.ll barrier-addrspace-dereference.ll

AMDGPU: Use subarch triples in new tests added since all were converted
DeltaFile
+8-8llvm/test/CodeGen/AMDGPU/addrspacecast-barrier.ll
+4-4llvm/test/CodeGen/AMDGPU/null-named-barrier-gv.ll
+2-2llvm/test/CodeGen/AMDGPU/barrier-addrspace-dereference.ll
+1-1llvm/test/CodeGen/AMDGPU/promote-alloca-byte-ptr-cast.ll
+15-154 files

LLVM/project 0aee1c3lldb/source/Plugins/TypeSystem/Fortran FortranTypes.cpp TypeSystemFortran.h, lldb/unittests/Symbol CMakeLists.txt TestTypeSystemFortran.cpp

[lldb][Fortran] Added base type support to TypeSystemFortran and Tests for TypeSystemFortran
DeltaFile
+237-0lldb/unittests/Symbol/TestTypeSystemFortran.cpp
+207-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.cpp
+76-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.h
+34-35lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.h
+16-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.cpp
+2-0lldb/unittests/Symbol/CMakeLists.txt
+572-351 files not shown
+573-357 files

LLVM/project 81f233flldb/source/Plugins/TypeSystem/Fortran FortranTypes.cpp TypeSystemFortran.h, lldb/unittests/Symbol CMakeLists.txt TestTypeSystemFortran.cpp

[lldb][Fortran] Added base type support to TypeSystemFortran and Tests for TypeSystemFortran
DeltaFile
+237-0lldb/unittests/Symbol/TestTypeSystemFortran.cpp
+207-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.cpp
+76-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.h
+34-35lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.h
+16-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.cpp
+2-0lldb/unittests/Symbol/CMakeLists.txt
+572-351 files not shown
+573-357 files

LLVM/project 7421fbabolt/lib/Core Relocation.cpp, bolt/test/RISCV relr.s

[BOLT][RISCV] Support reading RV64 RELR relocations (#222265)

Clang linked with packed relative dynamic relocations aborts when the
RELR reader requests the target relative relocation type. Return
`R_RISCV_RELATIVE` for RV64, preserving the RV32 restriction and other
targets.

Assisted by GPT-6.
DeltaFile
+35-0bolt/test/RISCV/relr.s
+1-0bolt/lib/Core/Relocation.cpp
+36-02 files

LLVM/project bc5c361mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[mlir][NVVM] Add packed EX2 operations (#220501)

Add NVVM dialect operations for the public packed EX2 PTX instructions:
* `nvvm.ex2.f16x2` lowers to `ex2.approx.f16x2`
* `nvvm.ex2.bf16x2` lowers to `ex2.approx.ftz.bf16x2`
The existing scalar `nvvm.ex2` operation is unchanged. Includes LLVM IR
translation tests for both overloads.
DeltaFile
+28-0mlir/test/Target/LLVMIR/nvvm/transcendentals.mlir
+19-4mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+17-0mlir/test/Target/LLVMIR/nvvm/ex2_invalid.mlir
+12-0mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+76-44 files

LLVM/project 87307c6clang/lib/StaticAnalyzer/Core CallEvent.cpp

Add comment to explicit object parameter.
DeltaFile
+2-0clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+2-01 files

LLVM/project efa7e61clang/lib/StaticAnalyzer/Core CallEvent.cpp

[analyzer][NFC] Determine object parameter constness for getExtraInvalidatedValues
DeltaFile
+11-1clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+11-11 files

LLVM/project 526ff92clang/lib/StaticAnalyzer/Checkers SmartPtrModeling.cpp CallAndMessageChecker.cpp

[analyzer][NFC] Index parameter lookups by argument position
DeltaFile
+26-5clang/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp
+4-5clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
+4-0clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
+34-103 files

LLVM/project e09697aclang/lib/StaticAnalyzer/Checkers SmartPtrModeling.cpp CallAndMessageChecker.cpp

Add comment for indexes and FIXME.
DeltaFile
+16-5clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
+2-0clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
+18-52 files

LLVM/project fd50959clang/lib/StaticAnalyzer/Core CallEvent.cpp

Move getDeclaredParameterIndex as param to getParameterLocation.
DeltaFile
+3-5clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+3-51 files