LLVM/project fb02433clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

 [Clang][AST] Introduce `ExplicitInstantiationDecl` to preserve source info and fix diagnostic locations  (#191658)

This is the initial fix of
https://github.com/llvm/llvm-project/issues/191442. Following the
discussion here
https://github.com/llvm/llvm-project/issues/115418#issuecomment-2467017012.

- Fix #21040
- Fix #52659
- Fix #115418
- Fix #14230
- Fix #21133

### Description

This PR introduces a new AST node, `ExplicitInstantiationDecl`, to
systematically fix the long-standing issue of missing or incorrect
source location information for explicit template instantiations.


    [53 lines not shown]
DeltaFile
+214-0clang/test/AST/explicit-instantiation-source-info.cpp
+133-0clang/include/clang/AST/DeclTemplate.h
+129-0clang/lib/AST/DeclTemplate.cpp
+100-17clang/lib/Sema/SemaTemplate.cpp
+67-0clang/test/SemaTemplate/explicit-instantiation-diag-location.cpp
+50-12clang/test/AST/ast-dump-templates.cpp
+693-2933 files not shown
+1,200-8939 files

FreeBSD/src 81f60a9sys/amd64/linux linux_systrace_args.c linux_proto.h, sys/amd64/linux32 linux32_systrace_args.c

linux: make sysent for membarrier

Regenerate linux syscall prototypes for membarrier(2).

Signed-off-by:  Ricardo Branco <rbranco at suse.de>
PR:             281691
Reviewed by:    kib, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2147
DeltaFile
+6-2sys/amd64/linux/linux_systrace_args.c
+6-2sys/amd64/linux32/linux32_systrace_args.c
+6-2sys/arm64/linux/linux_systrace_args.c
+6-2sys/i386/linux/linux_systrace_args.c
+2-1sys/amd64/linux/linux_proto.h
+2-1sys/arm64/linux/linux_proto.h
+28-102 files not shown
+32-128 files

FreeBSD/src 1594fe0sys/amd64/linux syscalls.master, sys/amd64/linux32 syscalls.master

linux: Add support for membarrier(2)

FreeBSD has a native membarrier(2) syscall which is mostly compatible
with Linux. This is a thin wrapper around kern_membarrier() that
translates all available commands and flags.

Also update the syscalls.master prototypes to match the Linux 5.10+
three-argument form.  Pre-5.10 binaries using the two-argument form
continue to work: cpu_id is only consulted for RSEQ commands, which
FreeBSD does not support and which kern_membarrier() rejects with
EINVAL, matching Linux semantics.

Signed-off-by:  Ricardo Branco <rbranco at suse.de>
PR:             281691
Reviewed by:    kib, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2147
DeltaFile
+64-0sys/compat/linux/linux_misc.c
+16-0sys/compat/linux/linux_misc.h
+2-1sys/amd64/linux32/syscalls.master
+2-1sys/arm64/linux/syscalls.master
+2-1sys/amd64/linux/syscalls.master
+2-1sys/i386/linux/syscalls.master
+88-41 files not shown
+88-67 files

LLVM/project 50d7c99flang/lib/Lower/OpenMP OpenMP.cpp, flang/lib/Lower/Support ReductionProcessor.cpp

[flang][OpenMP] Support user-defined declare reduction with derived types (#190288)

Fix lowering of `!$omp declare reduction` for intrinsic operators
applied
to user-defined derived types (e.g., `+` on `type(t)`). Previously, this
hit a TODO in `ReductionProcessor::getReductionInitValue` because the
code
tried to compute an init value for a non-predefined type, when it should
instead use the initializer region from the `DeclareReductionOp`.

This fixes the issue #176278: [Flang][OpenMP] Compilation error when
type-list in declare reduction directive is derived type name.

The root cause was a naming mismatch: `genOMP` for
`OpenMPDeclareReductionConstruct` used a raw operator string (e.g.,
"Add")
as the reduction name, while `processReductionArguments` at the use site
computed a canonical name via `getReductionName` (e.g.,
"add_reduction_byref_rec__QFTt"). The `lookupSymbol` in

    [76 lines not shown]
DeltaFile
+151-30flang/lib/Lower/OpenMP/OpenMP.cpp
+56-50llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+86-0flang/test/Lower/OpenMP/declare-reduction-finalizer.f90
+18-22flang/test/Lower/OpenMP/omp-declare-reduction-derivedtype.f90
+25-10flang/lib/Lower/Support/ReductionProcessor.cpp
+25-2flang/test/Lower/OpenMP/declare-reduction-intrinsic-op.f90
+361-1145 files not shown
+419-13111 files

LLVM/project 9343e8bclang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.h

fix clang-format
DeltaFile
+1-1clang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.h
+1-11 files

FreeNAS/freenas 2bcea89src/freenas/usr/lib/systemd/network 10-vseries-internode.link, src/middlewared/middlewared/alert/source vseries_unstamped_spd.py

NAS-140741 / 27.0.0-BETA.1 / V-Series: DMI-gated X710 internode bond for v2.0 (NTG) controllers
DeltaFile
+152-3src/middlewared/middlewared/plugins/failover_/internal_interface.py
+51-0src/middlewared/middlewared/alert/source/vseries_unstamped_spd.py
+49-0tests/unit/test_vseries_hw_rev.py
+47-2src/middlewared/middlewared/plugins/failover_/detect_utils.py
+12-2src/freenas/usr/lib/systemd/network/10-vseries-internode.link
+6-2src/middlewared/middlewared/plugins/enclosure_/enclosure_class.py
+317-96 files

LLVM/project c2ba462llvm/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU rsq.f64.ll fdiv.f64.ll

AMDGPU: Skip last corrections in afn f64 reciprocal

Device libs has a fast reciprocal macro that is close
to the fast division expansion, but skips the last terms
compared to the full division.

The basic reciprocal handling has identical output to this
macro. The negative reciprocal case has different fneg placement
and smaller code size, but I believe should be the same.
DeltaFile
+32-116llvm/test/CodeGen/AMDGPU/rsq.f64.ll
+37-7llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f64.ll
+17-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+16-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+12-2llvm/test/CodeGen/AMDGPU/fdiv.f64.ll
+0-4llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
+114-1311 files not shown
+114-1337 files

LLVM/project ebf14edclang/lib/CIR/Dialect/Transforms CXXABILowering.cpp, clang/test/CIR/CodeGen cxx-abi-lowering-string-array.cpp

[CIR] Fix lowering of strings in constant array attributes (#193553)

There was code in the CIR CXXABILowering pass that was assuming
ConstArrayAttr::getElts() would return an ArrayAttr. This isn't true in
the case of string constants with trailing zeros, so we had a crash in a
mlir::cast<> call. The problem only appeared when a string array
appeared in the same initializer as a type that required CXXABI-specific
lowering, such as a member pointer.

This change fixes the CXXABILowering to simply keep the existing string
attribute, which is known to be legal for the purposes of that pass.

Assisted-by: Cursor / claude-4.7-opus-high
DeltaFile
+29-0clang/test/CIR/CodeGen/cxx-abi-lowering-string-array.cpp
+11-0clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+40-02 files

FreeBSD/ports afd7ee6games/kodi-addon-game.libretro Makefile

games/kodi-addon-game.libretro: mark broken

Does not build on any architecture or branch anymore for multiple months.

First error:
/wrkdirs/usr/ports/games/kodi-addon-game.libretro/work/game.libretro-2cb1ed77d3a31d73301447c60f600eaebccd2f07/src/libretro/LibretroEnvironment.cpp:216:17: error: no member named 'context_type' in 'game_stream_hw_framebuffer_properties'
  216 |         hw_info.context_type       = LibretroTranslator::GetHWContextType(typedData->context_type);
      |         ~~~~~~~ ^

PR:     294242
Reported-by:    https://portsfallout.com/fallout?port=games%2Fkodi-addon-game.libretro%24
Approved-by:    maintainer timeout (rozhuk.im)
DeltaFile
+4-0games/kodi-addon-game.libretro/Makefile
+4-01 files

LLVM/project 0dbf737llvm/docs LangRef.rst

[LangRef] inline asm: the instructions are treated opaquely (#157080)

This wasn't true until recently, but
https://github.com/llvm/llvm-project/issues/156571 got fixed to make it
true.

I was not entirely sure where to put this; for now I made it a new
paragraph fairly early on in the inline asm docs.
DeltaFile
+8-0llvm/docs/LangRef.rst
+8-01 files

LLVM/project 55762f3llvm/lib/IR Verifier.cpp, llvm/test/Assembler fpmath.ll

IR: Allow !fpmath metadata on homogeneous float structs (#193537)

This matches the logic for fast math flags / nofpclass, and allows
marking llvm.sincos calls with !fpmath.
DeltaFile
+19-0llvm/test/Assembler/fpmath.ll
+1-1llvm/lib/IR/Verifier.cpp
+20-12 files

LLVM/project b307eb0llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Merge remote-tracking branch 'origin/users/ziqingluo/PR-174874942-1' into users/ziqingluo/PR-174874942-2

 Conflicts:
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+57,682-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/double-nested-loops-complex-cfg.mir
+41,844-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills2.mir
+40,613-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills1.mir
+37,209-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills3.mir
+597,128-03,180 files not shown
+976,534-61,1103,186 files

LLVM/project e5e4df2clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.cpp

fix clang-format
DeltaFile
+4-4clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
+4-41 files

FreeBSD/ports 7004c16java/openjdk25 distinfo Makefile

java/openjdk25: Update to OpenJDK 25.0.3

Approved by:    jrm, fuz, pkubaj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56522
DeltaFile
+3-3java/openjdk25/distinfo
+2-3java/openjdk25/Makefile
+5-62 files

LLVM/project be529fcllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 commutative-copyable-external-phi-use.ll copyable-used-outside-with-immediate-op.ll

[SLP]Fix scheduling of copyable bundle with commutative op used outside parent PHI

The previous (V, Op) pair insert was a no-op since V is unique per iteration.
Replace it with a hasOneUse() fast path plus a check that bails only when I
has a user outside the grandparent PHI's Scalars. Uses within the same
vectorized PHI are tracked by the existing dep machinery; an external user
(e.g. a scalar PHI in a different block) is what trips scheduleBlock's
"must be scheduled at this point" assertion.

Fixes #193315.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/193566
DeltaFile
+55-0llvm/test/Transforms/SLPVectorizer/X86/commutative-copyable-external-phi-use.ll
+13-4llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+6-4llvm/test/Transforms/SLPVectorizer/X86/copyable-used-outside-with-immediate-op.ll
+74-83 files

LLVM/project 80efad5clang/lib/CIR/Dialect/Transforms LoweringPrepare.cpp, clang/test/CIR/CodeGen static-local.cpp

[CIR] Support guard COMDAT for weak linkage in LoweringPrepare (#193274)

Static locals inside inline functions get `linkonce_odr` linkage, and
their guard variables need their own COMDAT groups so the linker can
deduplicate them across TUs. We were hitting an NYI error for this case
in `LoweringPrepare`.

The fix is straightforward: set `guard.setComdat(true)`, which makes
`LowerToLLVM` create a per-symbol COMDAT selector — the same thing
classic codegen does at `ItaniumCXXABI.cpp:2798`.

I ran into this while trying to compile the Bullet physics engine
through CIR. Functions like `btMatrix3x3::getIdentity()` use this
pattern (return a reference to a function-local static from an inline
member function), and 6 of the 121 source files were failing because of
it. With this fix, all 121 compile cleanly.

Made with [Cursor](https://cursor.com)
DeltaFile
+56-2clang/test/CIR/CodeGen/static-local.cpp
+1-2clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+57-42 files

LLVM/project 37be084llvm/lib/Transforms/Instrumentation MemProfUse.cpp, llvm/test/Transforms/PGOProfile memprof-inline-call-stacks.ll

Reland: [MemProf] Dump inline call stacks as optimization remarks (#193545)

This iteration limits the test case to x86_64-linux to prevent bot
failures.

---

This patch teaches the MemProf matching pass to dump inline call
stacks as analysis remarks like so:

frame: 704e4117e6a62739 main:10:5
frame: 273929e54b9f1234 foo:2:12
inline call stack: 704e4117e6a62739,273929e54b9f1234

The output consists of two types of remarks:

- "frame": Acts as a dictionary mapping a unique MD5-based FrameID
  to source information (function name, line offset, and column).


    [5 lines not shown]
DeltaFile
+65-2llvm/lib/Transforms/Instrumentation/MemProfUse.cpp
+39-0llvm/test/Transforms/PGOProfile/memprof-inline-call-stacks.ll
+104-22 files

LLVM/project 54759dfclang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow PointerFlowAnalysis.cpp, clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp

Change 'result()' to 'getResult()'
DeltaFile
+1-1clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.cpp
+1-1clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+2-22 files

LLVM/project a07fb84clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage UnsafeBufferUsageAnalysis.cpp

fix clang-format
DeltaFile
+6-5clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
+6-51 files

FreeBSD/ports c580eb0databases/cassandra3 Makefile

databases/cassandra3: deprecate

no longer maintained upstream

PR:     294688
DeltaFile
+4-1databases/cassandra3/Makefile
+4-11 files

LLVM/project 5b754b6llvm/test/CodeGen/AMDGPU/NextUseAnalysis spill-vreg-many-lanes.mir acyclic-770bb.mir

Merge remote-tracking branch 'origin/users/ziqingluo/PR-172429193-3' into users/ziqingluo/PR-174874942-1

 Conflicts:
        clang/lib/ScalableStaticAnalysisFramework/Analyses/CMakeLists.txt
        clang/lib/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlow.cpp
        clang/lib/ScalableStaticAnalysisFramework/Analyses/SSAFAnalysesCommon.h
DeltaFile
+275,101-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/spill-vreg-many-lanes.mir
+144,679-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/acyclic-770bb.mir
+57,682-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/double-nested-loops-complex-cfg.mir
+41,844-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills2.mir
+40,613-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills1.mir
+37,209-0llvm/test/CodeGen/AMDGPU/NextUseAnalysis/test_ers_multiple_spills3.mir
+597,128-03,178 files not shown
+976,528-61,1043,184 files

LLVM/project da7ee36clang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateDeductionGuide.cpp

Revert "[clang] fix matching constrained out-of-line definitions of class specialization member function templates" (#193558)

Reverts llvm/llvm-project#192806 , which is causing the compiler to
reject some valid code.
DeltaFile
+50-48clang/lib/Sema/SemaTemplateInstantiate.cpp
+2-76clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+45-6clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+0-1clang/docs/ReleaseNotes.rst
+97-1314 files

LLVM/project 8f2935cclang/bindings/python/tests/cindex test_version.py

Loosen check for clang version string in test to work when setting CLANG_VENDOR. (#192961)

We are trying to update our buildbot to use the `-DCLANG_VENDOR` and
`-DCLANG_VENDOR_UTI` options, but need to fix some tests first. This is
one of them.

---------

Co-authored-by: Jannick Kremer <jannick.kremer at mailbox.org>
Co-authored-by: Vlad Serebrennikov <serebrennikov.vladislav at gmail.com>
DeltaFile
+1-1clang/bindings/python/tests/cindex/test_version.py
+1-11 files

LLVM/project 8433d92llvm/lib/IR Verifier.cpp, llvm/test/Assembler fpmath.ll

IR: Allow !fpmath metadata on homogeneous float structs

This matches the logic for fast math flags / nofpclass, and allows
marking llvm.sincos calls with !fpmath.
DeltaFile
+19-0llvm/test/Assembler/fpmath.ll
+1-1llvm/lib/IR/Verifier.cpp
+20-12 files

LLVM/project 38874e1llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel ssubsat.ll subo.ll

[GlobalISel] Change SSUBO to do (LHS < RHS) XOR (RESULT < 0) (#191744)

Refactor lowerSADDO_SSUBO in LegalizerHelper so addition and subtraction
use separate, clearly named paths.

SADDO: unchanged meaning: overflow when (result < LHS) disagrees with
(RHS < 0) (signed compares).

SSUBO: use the equivalent formulation: overflow when (LHS < RHS)
disagrees with (result < 0) instead of (result < LHS) vs (RHS > 0).
DeltaFile
+785-891llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
+156-156llvm/test/CodeGen/AMDGPU/GlobalISel/subo.ll
+76-76llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubo.mir
+27-27llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-ssubsat.mir
+18-12llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+10-10llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-addo-subo-rv32.mir
+1,072-1,1724 files not shown
+1,094-1,19410 files

LLVM/project 9e64907libc/test CMakeLists.txt, libc/test/include CMakeLists.txt

[libc] Replace check-libc with lit-based test execution (#184163)

Now that check-libc-lit has been validated alongside check-libc, make
lit the default test runner by renaming check-libc-lit to check-libc.
Remove the old CMake-driven check-libc custom target.
DeltaFile
+7-10libc/test/CMakeLists.txt
+1-2libc/test/integration/CMakeLists.txt
+1-2libc/test/include/CMakeLists.txt
+1-1libc/utils/libctest/format.py
+10-154 files

LLVM/project 6e4fb52llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/AArch64 partial-reduce-dot-product.ll partial-reduce-sub.ll

[VPlan] Use MaxRuntimeStep in materializeVectorTC to simplify middle br. (#193067)

For scalable vectors, pass the maximum runtime step to
materializeVectorTripCount. Use it to simplify the vector trip count to
the original trip count directly, if MaxRuntimeSteps divides the
original trip count without remainder.

In those cases, all lower power-of-2 vscales will divide the rip count
without remainder.

PR: https://github.com/llvm/llvm-project/pull/193067
DeltaFile
+32-56llvm/test/Transforms/LoopVectorize/RISCV/fminimumnum.ll
+23-50llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll
+8-17llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-sub.ll
+8-15llvm/test/Transforms/LoopVectorize/AArch64/sve-epilog-vect.ll
+8-12llvm/test/Transforms/LoopVectorize/AArch64/simple_early_exit.ll
+14-5llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+93-1559 files not shown
+129-20815 files

LLVM/project d2f66a3flang/test/Lower enumeration-type.f90

Adding lowering test.
DeltaFile
+261-0flang/test/Lower/enumeration-type.f90
+261-01 files

LLVM/project 4f1be83compiler-rt/cmake config-ix.cmake, compiler-rt/cmake/Modules CompilerRTDarwinUtils.cmake

[compiler-rt] [Darwin] Enable arm64e tests on macOS (#193391)

This enables compiler-rt tests on Darwin arm64e (when supported by the
linker).

Note that arm64e is not enabled for sanitizers yet, but this does add
test coverage for builtins.

rdar://175303507
DeltaFile
+17-18compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+4-0compiler-rt/cmake/config-ix.cmake
+21-182 files

LLVM/project 4408722llvm/lib/CodeGen MachineBlockHashInfo.cpp

[NFC][MachineBlockHashInfo] Add static asserts to guard agains hash_16_bytes changes (#192862)

`hashing::detail::hash_16_bytes` is not guaranteed to be stable across
different versions of LLVM, it can change any time.

We put asserts here, so if it changed, author don't forget to work
around them here.
DeltaFile
+7-2llvm/lib/CodeGen/MachineBlockHashInfo.cpp
+7-21 files