LLVM/project 08c860bllvm/include/llvm/Analysis TypeMetadataUtils.h, llvm/include/llvm/Transforms/IPO LowerTypeTests.h

[NFC][LowerTypeTests] Move CFI metadata creation and helpers to LowerTypeTests (#223581)

Move enum CfiFunctionLinkage from llvm/Analysis/TypeMetadataUtils.h into
llvm/Transforms/IPO/LowerTypeTests.h (in namespace lowertypetests).

Move hasTypeMetadata and findCfiFunctions from ThinLTOBitcodeWriter into
LowerTypeTests.

Encapsulate cfi.functions, aliases, and symvers metadata creation into
lowertypetests::createCfiMetadata in LowerTypeTests.cpp, removing the
manual metadata generation from ThinLTOBitcodeWriter.

PR Stack:
* ➤ https://github.com/llvm/llvm-project/pull/223581
* https://github.com/llvm/llvm-project/pull/223582

Assisted-by: Gemini
DeltaFile
+124-5llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+5-94llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+24-5llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+0-7llvm/include/llvm/Analysis/TypeMetadataUtils.h
+153-1114 files

LLVM/project d13e4a1llvm/include/llvm/IR IntrinsicsNVVM.td, llvm/lib/IR AutoUpgrade.cpp

[NVPTX] Add default value to collector_b ImmArg in tcgen05.mma intrinsics (#220237)

This patch adds default value for the `collector_b` flag in
`tcgen05.mma` intrinsics.
Also adds lit tests to verify that calls without explicit `collector_b`
operands correctly materialized with default value.

---------

Signed-off-by: DharuniRAcharya <dharunira at nvidia.com>
DeltaFile
+123-0llvm/test/CodeGen/NVPTX/tcgen05-mma.ll
+0-88llvm/lib/IR/AutoUpgrade.cpp
+75-0llvm/test/CodeGen/NVPTX/tcgen05-mma-block-scale.ll
+26-7llvm/include/llvm/IR/IntrinsicsNVVM.td
+29-0llvm/test/CodeGen/NVPTX/tcgen05-mma-collector-b.ll
+253-955 files

LLVM/project b41b19cllvm/test/CodeGen/AMDGPU minimumnum.bf16.ll amdgcn.bitcast.128bit.ll

[AMDGPU] Fix for GFX11 VOPD interlock hazard
DeltaFile
+4,377-4,141llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+2,597-2,593llvm/test/CodeGen/AMDGPU/bf16.ll
+2,633-2,496llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+1,272-1,259llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.256bit.ll
+698-692llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.128bit.ll
+422-427llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+11,999-11,60887 files not shown
+15,761-15,14793 files

LLVM/project 498ad94llvm/docs MemTagSanitizer.rst TypeMetadata.rst

[docs] Use intersphinx for LLVM cross-project links

Configure the LLVM documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.

Part of #214861
DeltaFile
+18-17llvm/docs/LangRef.md
+7-7llvm/docs/AMDGPUUsage.rst
+6-7llvm/docs/LibFuzzer.md
+5-6llvm/docs/CMake.md
+4-6llvm/docs/TypeMetadata.rst
+5-4llvm/docs/MemTagSanitizer.rst
+45-4717 files not shown
+70-7323 files

LLVM/project aca8ce1utils/docs/llvm_sphinx __init__.py, utils/docs/llvm_sphinx/ext absolute_links.py

[docs] Check absolute cross-project documentation links

Extend the absolute documentation link check to recognize documents from
configured intersphinx inventories. Diagnose absolute links to those documents
so authors use validated, project-qualified intersphinx roles instead.

Part of #214861
DeltaFile
+131-17utils/docs/llvm_sphinx/ext/absolute_links.py
+20-1utils/docs/llvm_sphinx/__init__.py
+6-1utils/docs/llvm_sphinx/ext/absolute_links_test/markdown.md
+5-0utils/docs/llvm_sphinx/ext/absolute_links_test/external/target.md
+5-0utils/docs/llvm_sphinx/ext/absolute_links_test/external/index.md
+4-0utils/docs/llvm_sphinx/ext/absolute_links_test/external/conf.py
+171-192 files not shown
+173-208 files

LLVM/project acdeb63clang/docs ClangOffloadBundler.md ThinLTO.md, clang/include/clang/Basic AttrDocs.td

[docs] Use intersphinx for Clang cross-project links

Configure the Clang documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.

Part of #214861
DeltaFile
+11-11clang/docs/LanguageExtensions.md
+6-6clang/docs/InternalsManual.md
+5-6clang/docs/ClangTools.md
+5-5clang/docs/ThinLTO.md
+4-5clang/docs/ClangOffloadBundler.md
+4-4clang/include/clang/Basic/AttrDocs.td
+35-3730 files not shown
+79-8336 files

LLVM/project fb94e63clang/docs conf.py, llvm/docs conf.py

[docs] Enable absolute documentation link checks

Configure the LLVM and Clang documentation URL prefixes so their Sphinx
builds reject absolute links to documents in the same project or a configured
intersphinx project.

Part of #214861
DeltaFile
+11-1llvm/docs/conf.py
+3-0clang/docs/conf.py
+14-12 files

LLVM/project 5f4f2ebllvm/docs/CommandGuide llvm-ir2vec.md, llvm/docs/tutorial BuildingAJIT4.md

[docs] Repair stale LLVM documentation links

Use the Sphinx ref role for the IR2Vec section label so clean Sphinx
builds resolve it correctly. Remove the dangling BuildingAJIT Chapter 5
navigation text because that chapter no longer exists.

Fixes follow-up issues in #222506.
DeltaFile
+0-2llvm/docs/tutorial/BuildingAJIT4.md
+1-1llvm/docs/CommandGuide/llvm-ir2vec.md
+1-32 files

LLVM/project 80d4d47llvm/docs ProgrammersManual.md GettingInvolved.md, llvm/docs/AMDGPU DeveloperGuideline.rst

[docs] Replace llvm.org/docs links with project links

Use Sphinx document and reference roles or project-relative links for
links within the LLVM documentation. This lets Sphinx validate the
targets and keeps local documentation builds and archived release
documentation self-contained.

Part of #214861
DeltaFile
+8-8llvm/docs/AMDGPU/DeveloperGuideline.rst
+7-7llvm/docs/SecurityTransparencyReports.rst
+6-6llvm/docs/MergeFunctions.md
+5-6llvm/docs/CommandGuide/llvm-remarkutil.md
+5-3llvm/docs/GettingInvolved.md
+3-3llvm/docs/ProgrammersManual.md
+34-3339 files not shown
+94-8545 files

LLVM/project 2fc4314clang/docs conf.py LibASTImporter.md, clang/docs/analyzer/user-docs Annotations.md

[docs] Repair Clang documentation cross-references

Restore a stable target for the OSObject retain-behavior attributes and
reference it with the Sphinx ref role. Mark links to the generated AST
matcher reference as external so MyST preserves their project-relative
HTML destinations instead of treating the file as a download.

Fixes follow-up issues in #222507.
DeltaFile
+1-1clang/docs/conf.py
+1-1clang/docs/analyzer/user-docs/Annotations.md
+1-1clang/docs/LibASTImporter.md
+1-1clang/docs/ClangTransformerTutorial.md
+2-0clang/include/clang/Basic/AttrDocs.td
+6-45 files

LLVM/project 392fc35clang/docs AllocToken.md SafeBuffers.md, clang/docs/analyzer checkers.md

[docs] Replace clang.llvm.org/docs links with Sphinx links

Use Sphinx document and option roles or project-relative links for links
within the Clang documentation. Repair stale generated-document
fragments found while validating the replacements. This ensures that
standalone documentation builds are self-contained, although
cross-project links (Clang->LLVM) typically go via absolute llvm.org
hrefs.

Part of #214861

Assisted-by: Codex
DeltaFile
+6-6clang/docs/LifetimeSafety.md
+5-5clang/docs/LanguageExtensions.md
+4-4clang/docs/analyzer/checkers.md
+3-4clang/docs/SafeBuffers.md
+3-3clang/docs/analyzer/user-docs/Annotations.md
+2-2clang/docs/AllocToken.md
+23-2410 files not shown
+33-3716 files

LLVM/project 2e572b0llvm/docs/CommandGuide llvm-ir2vec.md

revert whitespace change
DeltaFile
+1-0llvm/docs/CommandGuide/llvm-ir2vec.md
+1-01 files

LLVM/project d041ef4utils/docs __main__.py, utils/docs/llvm_sphinx/ext absolute_links.py

[docs] Check for absolute self-documentation links (#222504)

Add an opt-in llvm_sphinx check that diagnoses absolute links to
documents in the current Sphinx project. Operate on the parsed doctree
so the check works for both reStructuredText and MyST without flagging
examples in literal blocks.

For example, restoring one absolute link in the LLVM documentation makes
a warnings-as-errors build report:

llvm/docs/ReleaseNotes.md:321: WARNING: absolute URL points to document
    'index' in this Sphinx project; use an internal 'doc' or 'ref' role
    instead: https://llvm.org/docs/ [llvm_sphinx.absolute-doc-link]

Part of #214861

Assisted-by: codex
DeltaFile
+154-0utils/docs/llvm_sphinx/ext/absolute_links.py
+33-10utils/docs/__main__.py
+12-0utils/docs/llvm_sphinx/ext/absolute_links_test/rest.rst
+11-0utils/docs/llvm_sphinx/ext/absolute_links_test/conf.py
+10-0utils/docs/llvm_sphinx/ext/absolute_links_test/markdown.md
+8-0utils/docs/llvm_sphinx/ext/absolute_links_test/index.rst
+228-102 files not shown
+235-128 files

LLVM/project 6a06062llvm/include/llvm/Transforms/IPO LowerTypeTests.h, llvm/lib/Transforms/IPO ThinLTOBitcodeWriter.cpp LowerTypeTests.cpp

feedback

Created using spr 1.3.7
DeltaFile
+29-17llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+1-8llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+3-3llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+33-283 files

LLVM/project 7d9bbe8llvm/include/llvm/Transforms/IPO LowerTypeTests.h, llvm/lib/Transforms/IPO ThinLTOBitcodeWriter.cpp LowerTypeTests.cpp

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+29-17llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+1-8llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+3-3llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+33-283 files

LLVM/project 51d4aa8llvm/include/llvm/Transforms/IPO LowerTypeTests.h, llvm/lib/Transforms/IPO ThinLTOBitcodeWriter.cpp LowerTypeTests.cpp

feedback

Created using spr 1.3.7
DeltaFile
+29-17llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+1-8llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+3-3llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
+33-283 files

LLVM/project ac2fb41llvm/include/llvm/Support LEB128.h, llvm/lib/ProfileData SampleProfReader.cpp

[ProfileData] Bound binary sample profile primitive reads (#215476)

Fix pre-existing latent memory-safety issues that could cause
out-of-bounds reads or invalid pointer arithmetic on malformed,
truncated, or non-null-terminated buffers:

* unbounded ULEB128 decoding in readNumber() and Raw/Ext format probes;
* unbounded terminator searches in readString() and GCC format
detection;
* unsafe bounds checking in readUnencodedNumber().

Use bounded decoding, memchr, overflow-safe size checks, and typed
ULEB128 errors. Preserve the existing decodeULEB128 interface and avoid
test-only ABI exports.

Add functional and guard-page tests that detect boundary regressions
without requiring sanitizers.

Assisted by GPT-5
DeltaFile
+326-0llvm/unittests/ProfileData/SampleProfTest.cpp
+54-32llvm/lib/ProfileData/SampleProfReader.cpp
+40-6llvm/include/llvm/Support/LEB128.h
+23-0llvm/unittests/Support/LEB128Test.cpp
+443-384 files

LLVM/project 8a933e5llvm/cmake config-ix.cmake, llvm/include/llvm/Config config.h.cmake

[CMake] Remove unused configuration probes

Several config-ix checks either have no consumer or can be performed directly
by the source that needs the feature. Remove six compiler invocations from a
typical Linux configure:

* HAVE_PTHREAD_MUTEX_LOCK has been unused since LLVM switched its mutex
  implementation to std::recursive_mutex in 2019.
* The Linux magic-header results have never been propagated to config.h, so
  CMake builds already use Path.inc's fallback constants.
* FE_ALL_EXCEPT and FE_INEXACT can be tested directly after including cfenv.
* The Valgrind and CrashReporter headers can be detected with __has_include in
  their only consuming translation units.

Also remove the obsolete definitions from the GN and Bazel configurations.

In a fresh minimal LLVM configure, CMake profiling attributed 2067.1 ms to 45
config-ix probes before this change and 1846.9 ms to 39 probes after it.


    [6 lines not shown]
DeltaFile
+0-17utils/bazel/llvm_configs/config.h.cmake
+0-17utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
+0-17llvm/include/llvm/Config/config.h.cmake
+0-15llvm/cmake/config-ix.cmake
+6-8llvm/lib/Support/Valgrind.cpp
+4-9utils/bazel/llvm-project-overlay/llvm/config.bzl
+10-834 files not shown
+16-10410 files

LLVM/project 712ec9ellvm/unittests/ExecutionEngine/Orc OrcCAPITest.cpp

[ORC] Fix OrcCAPITestBase.ExecutionTest on Darwin/arm64e (#223577)

Switch to ExecutorAddr::toPtr to sign the function pointer. We'll need a
C API solution for this eventually, but this will do for now to get the
test passing.

rdar://186687669
DeltaFile
+3-1llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
+3-11 files

LLVM/project b557f07mlir/lib/Dialect/Tosa/Transforms TosaProfileCompliance.cpp

[mlir][tosa] Use optnone for compliance initialization under MSan (NFC) (#223586)

The compliance-map constructor includes a ~5,000-line generated
initializer.
Under MemorySanitizer, shadow and origin tracking instrumentation on
this single mega-function causes extreme compilation times (>3.5
minutes),
dominated by InstCombine (~68s) and greedy register allocation (~71s).

Recently, LLVM_ATTRIBUTE_MINSIZE was added to optimize for size, but
MSan
instrumentation still inflates the function enough to trigger severe
slowdowns in the backend.

Mark the constructor with optnone under LLVM_MEMORY_SANITIZER_BUILD to
skip
expensive optimization and register allocation passes, bringing
compilation
time under MSan down from 3m38s to ~30s.

    [5 lines not shown]
DeltaFile
+10-1mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
+10-11 files

LLVM/project d9ccd8dllvm/test/CodeGen/AMDGPU int_to_fp_narrow_i64.ll amdgcn.bitcast.512bit.ll

rebase now that dependencies have landed

Created using spr 1.3.8-beta.1
DeltaFile
+6,151-6,581llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,692-4,496llvm/test/CodeGen/AMDGPU/bf16.ll
+2,809-3,010llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+2,809-3,010llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,754-2,970llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+3,957-0llvm/test/CodeGen/AMDGPU/int_to_fp_narrow_i64.ll
+23,172-20,067956 files not shown
+65,988-58,570962 files

LLVM/project c77f51allvm/test/CodeGen/AMDGPU int_to_fp_narrow_i64.ll amdgcn.bitcast.512bit.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.8-beta.1

[skip ci]
DeltaFile
+6,151-6,581llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+4,692-4,496llvm/test/CodeGen/AMDGPU/bf16.ll
+2,809-3,010llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+2,809-3,010llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+2,754-2,970llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+3,957-0llvm/test/CodeGen/AMDGPU/int_to_fp_narrow_i64.ll
+23,172-20,067956 files not shown
+65,988-58,570962 files

LLVM/project cecd28dllvm/lib/Target/RISCV/MCTargetDesc RISCVBaseInfo.cpp, llvm/lib/TargetParser RISCVISAInfo.cpp

[RISCV] Select the capability ABI by default when the Y extension is enabled

computeDefaultABI() previously had no knowledge of the RVY (CHERI) base,
so a target with Y enabled and no explicit -target-abi
would fall back to the plain integer ABI instead of il32pc64(d)/
l64pc128(d).

This adds explicit non-RVY ABIs to two tests since otherwise those would
hit the assertion that the ABI is not supported yet. As the ABI does not
matter for these tests, we can safely use the non-RVY ones.

This change was created with the help of AI tools

Reviewed By: lenary

Pull Request: https://github.com/llvm/llvm-project/pull/213411
DeltaFile
+31-0llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+9-7llvm/lib/TargetParser/RISCVISAInfo.cpp
+13-0llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+9-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+2-2llvm/test/CodeGen/RISCV/rvy/rvy-invalid-operands.mir
+1-1llvm/test/CodeGen/RISCV/attributes.ll
+65-126 files

LLVM/project b355ea4clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/CodeGen call-conv-lowering-x86_64-non-byval.cpp call-conv-lowering-x86_64-union-tail-padding.c

[CIR] Accept a union whose members do not cover its declared size

Past two eightbytes the x86_64 classifier never reads a union's members
to pick a coerce type.  It either classifies the record as memory, which
needs no coerce type at all, or it classifies SSE followed by SSEUP, and
then the coerce type is a vector as wide as the whole record.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+162-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-union-tail-padding.c
+64-0clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+44-12clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+41-0clang/test/CIR/Transforms/abi-lowering/x86_64-union.cir
+24-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval.cpp
+335-125 files

LLVM/project a9c42a7llvm/lib/Target/AMDGPU AMDGPUMemoryUtils.h AMDGPUMemoryUtils.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-promote.ll

Promote private objects into the VGPR address space via flag
DeltaFile
+279-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-promote.ll
+138-3llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+1-27llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+19-0llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
+16-1llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.h
+453-315 files

LLVM/project 2763527llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-promote.ll

Refuse promotion only when the object is live across a call
DeltaFile
+183-4llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-promote.ll
+117-15llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+300-192 files

LLVM/project 28dce21llvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-promote.ll

Count the intrinsics that really become calls when refusing promotion
DeltaFile
+81-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-promote.ll
+43-36llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+124-362 files

LLVM/project af902eallvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-promote.ll

Carry null operands and intrinsic names across when promoting to VGPRs
DeltaFile
+145-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-promote.ll
+42-2llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+187-22 files

LLVM/project c02ba15llvm/lib/Target/AMDGPU AMDGPUMachineInstrs.h SIInstructions.td, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-private-object-vgprs.mir

Propagate object liveness to every changed successor, not only back edges
DeltaFile
+30-44llvm/lib/Target/AMDGPU/AMDGPUPrivateObjectVGPRs.cpp
+25-34llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+56-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-private-object-vgprs.mir
+7-12llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+4-8llvm/lib/Target/AMDGPU/SIInstructions.td
+3-4llvm/lib/Target/AMDGPU/AMDGPUMachineInstrs.h
+125-1026 files

LLVM/project ff12bfdllvm/lib/Target/AMDGPU AMDGPUPromoteAlloca.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-budget.ll

Diagnose an object that does not fit the function's register budget
DeltaFile
+82-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-budget.ll
+36-13llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+118-132 files