LLVM/project 8f7a36fllvm/lib/Target/AMDGPU AMDGPUISelDAGToDAG.cpp, llvm/test/CodeGen/AMDGPU packed-u64.ll pk-lshl-add-u64.ll

[AMDGPU] Re-implement splat scalar handling for packed 64-bit ops (#216896)

In instruction selection, we identify the splat scalar pattern and set opsel to 0.
The legalizer is responsible for moving SGPRs to VGPRs if opsel is not 0.
A future optimization could save SGPR copies for upper lanes since hardware
only reads the first SGPR.

This new implementation fixes the issue when an uniform value has to be
computed by a VALU-only instruction, and thus the result is in a VGPR. This will
lead to the missing data in the upper lane with the previous approach.
DeltaFile
+123-0llvm/test/CodeGen/AMDGPU/packed-fp64-uniform-vgpr-splat-operand.ll
+25-15llvm/test/CodeGen/AMDGPU/packed-fp64.ll
+5-2llvm/test/CodeGen/AMDGPU/pk-lshl-add-u64.ll
+5-1llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+1-0llvm/test/CodeGen/AMDGPU/packed-u64.ll
+159-185 files

LLVM/project 806dddallvm/cmake/modules AddSphinxTarget.cmake

[docs] Parallelize Sphinx builds by default

Sphinx supports building documents in parallel with -j. Default LLVM_PARALLEL_SPHINX_JOBS to half the logical cores, rounded up, using CMake's native host system information query, and pass it to sphinx-build. If LLVM_PARALLEL_SPHINX_JOBS is explicitly set empty, omit the -j flag.

3-run hyperfine comparison for clean docs-llvm-html builds, removing the html output and doctree cache before each timing run:

  before (no sphinx -j): 97.897 s +/- 1.231 s
  after (-j 8):          52.334 s +/- 15.348 s
  speedup:               1.87x +/- 0.55x

Validation:
- cmake -S llvm -B build-docs-preview-all
- ninja -C build-docs-preview-all docs-llvm-html
- hyperfine --runs 3 comparing docs-llvm-html before/after
- git diff --check
- scanned touched file for internal-only markers
DeltaFile
+13-0llvm/cmake/modules/AddSphinxTarget.cmake
+13-01 files

LLVM/project b1f7419llvm/include/llvm/CodeGen/GlobalISel Legalizer.h, llvm/lib/CodeGen/GlobalISel Legalizer.cpp

[GISel][NewPM] Port Legalizer

Standard NewPM pass porting.

Reviewers: arsenm, vikramRH

Pull Request: https://github.com/llvm/llvm-project/pull/217046
DeltaFile
+71-28llvm/lib/CodeGen/GlobalISel/Legalizer.cpp
+35-17llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h
+3-3llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp
+2-2llvm/test/CodeGen/MIR/AArch64/deactivation-symbols.mir
+1-1llvm/lib/Target/X86/X86TargetMachine.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+113-5212 files not shown
+125-6318 files

LLVM/project 0b519d6llvm/test/CodeGen/AArch64 saturating-vec-smull.ll, llvm/test/Transforms/PGOProfile memprof.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+208-58llvm/test/CodeGen/AArch64/saturating-vec-smull.ll
+206-48llvm/test/Transforms/PGOProfile/memprof.ll
+128-0orc-rt/test/unit/StringExtrasTest.cpp
+0-96llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh
+89-0orc-rt/include/orc-rt/StringExtras.h
+0-60llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.proftext
+631-2627 files not shown
+643-26813 files

LLVM/project 9444c2dllvm/lib/CodeGen/GlobalISel IRTranslator.cpp

[GISel][NewPM] Note we always modify MIR in IRTranslator

It turns out IRTranslatorImpl::runOnMachineFunction always returns
false, so we would fail to invalidate some analyses (like
GISelCSEAnalysis) that we should have.

Test coverage will be in a future commit that also ports the Legalizer,
which asserts that we correctly preserve/invalidate GISelCSEAnalysis.

Reviewers: vikramRH, arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/217045
DeltaFile
+2-3llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+2-31 files

LLVM/project c78aef4llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 opaque-ptr.ll

[SLP] Support vectorizing ptrtoaddr (#216902)

Currently, SLP Vectorizer handles ptrtoint but not ptrtoaddr (as
observed in an ASan test:
https://github.com/llvm/llvm-project/pull/216827#issuecomment-5322231318).

ptrtoaddr “is different from ptrtoint in that it only operates on the
index bits of the pointer and ignores all other bits, and does not
capture the provenance of the pointer"
(https://llvm.org/docs/LangRef.html#i-ptrtoaddr), which is immaterial to
its vectorizability.

This patch handles ptrtoaddr in a similar way to ptrtoint.
DeltaFile
+5-6llvm/test/Transforms/SLPVectorizer/X86/opaque-ptr.ll
+6-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+11-62 files

LLVM/project c44a17eutils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes e297b4f (#217114)
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project b4b8421llvm/test/CodeGen/AArch64 saturating-vec-smull.ll

[AArch64][GlobalISel] Add test coverage for saturating mul. NFC (#217154)
DeltaFile
+208-58llvm/test/CodeGen/AArch64/saturating-vec-smull.ll
+208-581 files

LLVM/project 3e225eellvm/docs/DirectX DXILArchitecture.md DXContainer.md, llvm/docs/GlobalISel GenericOpcode.md

[docs] Finish MyST migration for PDB, DirectX, and GlobalISel docs
DeltaFile
+73-54llvm/docs/DirectX/DXContainer.md
+50-53llvm/docs/PDB/CodeViewTypes.md
+19-19llvm/docs/DirectX/DXILArchitecture.md
+20-15llvm/docs/PDB/PdbStream.md
+7-18llvm/docs/GlobalISel/GenericOpcode.md
+10-11llvm/docs/PDB/DbiStream.md
+179-1707 files not shown
+207-20413 files

LLVM/project 15c5bb0orc-rt/include/orc-rt StringExtras.h, orc-rt/test/unit StringExtrasTest.cpp

[orc-rt] Add StringOutputStream for <sstream>-free messages (#217022)

Add orc_rt::StringOutputStream to StringExtras.h: a minimal, output-only
stream that appends formatted values to a std::string via operator<<,
for building diagnostic/error strings without <sstream>.

<sstream> pulls in the iostreams + locale machinery, which is not in the
freestanding subset and is undesirable in the executor (which runs
on-target, including bare-metal). It is also locale-sensitive and built
around exceptions. StringOutputStream formats integers and pointers with
std::to_chars, so it has no locale dependence, allocates only to grow
the result string, and needs neither <sstream> nor <iostream>.

Integers and pointers are formatted with std::to_chars, so there is no
locale dependence and allocation only to grow the result string.

- Overloads for char, bool, const char*, std::string_view, const void*
(hex), and any built-in integer (decimal via to_chars).
- A free hex() helper prints an integer as "0x"-prefixed lowercase hex

    [7 lines not shown]
DeltaFile
+128-0orc-rt/test/unit/StringExtrasTest.cpp
+89-0orc-rt/include/orc-rt/StringExtras.h
+217-02 files

LLVM/project 3f4c0d8llvm/docs/tutorial BuildingAJIT1.md, llvm/docs/tutorial/MyFirstLanguageFrontend LangImpl10.md LangImpl04.md

[docs] Finish MyST migration for tutorial docs
DeltaFile
+25-26llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.md
+11-12llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.md
+10-10llvm/docs/tutorial/MyFirstLanguageFrontend/index.md
+9-9llvm/docs/tutorial/BuildingAJIT1.md
+8-9llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.md
+6-7llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl10.md
+69-739 files not shown
+106-11015 files

LLVM/project 49d5774bolt/include/bolt/Utils Utils.h, bolt/lib/Core BinaryContext.cpp

[BOLT] Page out .dwo files

Split-DWARF inputs at big binaries scale ship 100+ GiB of .dwo
files. BOLT opened a fair number of them during readDebugInfo, putting
a lot of pressure on the OS memory management: mmap'd reads always
populate the page cache; with every .dwo mapped at once those pages
accumulated, refaulted, and registered as memory pressure that got the
process oomd-killed.

Now, .dwo page-cache pages are reclaimed as soon as BOLT is done with
each file: madvise(MADV_PAGEOUT) on the live mapping, then
posix_fadvise(POSIX_FADV_DONTNEED) once it is unmapped. Controlled by
-drop-dwo-page-cache, OFF by default, as it is unlikely upstream
will be processing gigantic sets of dwo files.
DeltaFile
+68-2bolt/lib/Core/BinaryContext.cpp
+37-0bolt/lib/Utils/Utils.cpp
+11-0bolt/include/bolt/Utils/Utils.h
+116-23 files

LLVM/project 17a1bd2bolt/include/bolt/Core BinaryContext.h, bolt/lib/Core BinaryContext.cpp

[BOLT] Create and release .dwo DWARF contexts incrementally

BOLT opened a DWARFContext for every .dwo during
readDebugInfo and kept them all alive until teardown. On large
split-DWARF targets that is tens of GiB held resident through
emission, the point of peak RSS.

Make the DWOCUs map a lazily-populated cache instead:

 * Use the newly added DWARFUnit::clearDWO()/hasDWO() to directly
   manage DWARFUnit's DIE caching mechanism.
 * BinaryContext::getDWOCU() opens a context on demand (keyed off a
   stable DWOId -> skeleton CU map).
 * Release contexts as soon as they are done with: all of them at the
   end of readDebugInfo, and per-bucket at the DWARF rewrite merge
   point.
 * Remove DWOCUs map, which became redundant and whose purpose can
   now be served by the new id-to-skeleton map, and then fetching
   the split CU from the skeleton via getNonSkeletonUnitDIE().

    [5 lines not shown]
DeltaFile
+110-52bolt/lib/Core/BinaryContext.cpp
+31-10bolt/include/bolt/Core/BinaryContext.h
+9-14bolt/lib/Rewrite/DWARFRewriter.cpp
+2-0bolt/lib/Rewrite/RewriteInstance.cpp
+152-764 files

LLVM/project e4a3350llvm/lib/DebugInfo/DWARF DWARFContext.cpp, llvm/tools/llvm-dwarfdump llvm-dwarfdump.cpp

Add use case for clearDWO in llvm-dwarfdump
DeltaFile
+17-5llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+9-0llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+26-52 files

LLVM/project fc99b5bllvm/lib/DebugInfo/DWARF DWARFContext.cpp

Drop const in local
DeltaFile
+1-1llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+1-11 files

LLVM/project 898798fllvm/include/llvm/DebugInfo/DWARF DWARFUnit.h

[DebugInfo] Add DWARFUnit::clearDWO()

Add DWARFUnit::clearDWO() so a skeleton unit can drop the DWO context
it owns without being destroyed itself. Also add DWARFUnit::hasDWO()
to answer if that skeleton CU is currently caching a DWO context, so
users can easily look it up.

For example, BOLT opened a DWARFContext for every .dwo during
readDebugInfo and kept them all alive until teardown. On large
split-DWARF targets that is tens of GiB held
resident. clearDWO()/hasDWO() expose to users DWARFUnit's caching
capacity, allowing them to spontaneously drop the cache/look it
up/re-load it for memory management.
DeltaFile
+10-0llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
+10-01 files

LLVM/project 889e253llvm/test/CodeGen/AMDGPU flat-saddr-atomics.ll llvm.amdgcn.wmma.imm.gfx1250.w32.ll

[AMDGPU] Improve the sequence for initial unclaused VMEM

Fixes LCOMPILER-2619.
DeltaFile
+250-250llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.gfx1250.w32.ll
+232-232llvm/test/CodeGen/AMDGPU/flat-saddr-load.ll
+196-196llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.imod.gfx1250.w32.ll
+183-183llvm/test/CodeGen/AMDGPU/fcanonicalize.ll
+174-174llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wmma.imm.gfx1250.w32.ll
+166-166llvm/test/CodeGen/AMDGPU/flat-saddr-atomics.ll
+1,201-1,201200 files not shown
+6,433-6,355206 files

LLVM/project b8efb88llvm/include/llvm/ProfileData InstrProfWriter.h, llvm/lib/ProfileData InstrProfWriter.cpp

[InstrProf] Rename --memprof-random-hotness-seed to --random-seed
DeltaFile
+57-0llvm/test/tools/llvm-profdata/merge-traces-seed.proftext
+5-13llvm/lib/ProfileData/InstrProfWriter.cpp
+10-5llvm/tools/llvm-profdata/llvm-profdata.cpp
+5-9llvm/test/Transforms/PGOProfile/memprof.ll
+2-4llvm/include/llvm/ProfileData/InstrProfWriter.h
+79-315 files

LLVM/project e9042fellvm/test/Transforms/PGOProfile memprof.ll

simplify test
DeltaFile
+6-12llvm/test/Transforms/PGOProfile/memprof.ll
+6-121 files

LLVM/project 208ae3bllvm/test/Transforms/PGOProfile memprof.ll, llvm/test/Transforms/PGOProfile/Inputs memprof.nocolinfo.memprofraw memprof.nocolinfo.exe

[NFC][MemProf] Replace memprofraw with YAML in memprof.ll test (#216878)

Replace `.memprofraw` with a `.yaml` file using `split-file`. This
allows us to delete `update_memprof_inputs.sh‎` and the binary blobs
that it generates.
DeltaFile
+206-48llvm/test/Transforms/PGOProfile/memprof.ll
+0-96llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh
+0-60llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.proftext
+0-0llvm/test/Transforms/PGOProfile/Inputs/memprof.nocolinfo.memprofraw
+0-0llvm/test/Transforms/PGOProfile/Inputs/memprof.nocolinfo.exe
+0-0llvm/test/Transforms/PGOProfile/Inputs/memprof.memprofraw
+206-2041 files not shown
+206-2047 files

LLVM/project a1ccf3dllvm/include/llvm/DebugInfo/DWARF DWARFDebugFrame.h, llvm/lib/DebugInfo/DWARF DWARFDebugFrame.cpp

Make Data optional
DeltaFile
+6-5llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
+1-1llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
+7-62 files

LLVM/project d4be1eallvm/docs/tutorial/MyFirstLanguageFrontend LangImpl03.md LangImpl04.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+512-520llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.md
+495-505llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.md
+411-426llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.md
+384-396llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl02.md
+372-382llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.md
+298-305llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.md
+2,472-2,53419 files not shown
+3,459-3,58725 files

LLVM/project fc503b5llvm/docs/tutorial/MyFirstLanguageFrontend LangImpl06.rst LangImpl06.md

[docs] Rename tutorial docs to Markdown
DeltaFile
+0-884llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst
+884-0llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.md
+0-812llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
+812-0llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.md
+0-766llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst
+766-0llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.md
+2,462-2,46244 files not shown
+6,557-6,55750 files

LLVM/project 9a1a227llvm/test/CodeGen/AMDGPU llvm.sin.bf16.ll llvm.cos.bf16.ll, llvm/test/Transforms/InstCombine cos-sin-intrinsic.ll

[AMDGPU] Allow constant folding of bfloat
DeltaFile
+43-26llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.sin.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.cos.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sin.bf16.ll
+39-8llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cos.bf16.ll
+36-0llvm/test/Transforms/InstCombine/cos-sin-intrinsic.ll
+235-582 files not shown
+243-668 files

LLVM/project 9851599llvm/docs/DirectX DXILOpTableGenDesign.md DXILResources.md, llvm/docs/GlobalISel MIRPatterns.md GenericOpcode.md

[docs] Convert selected rst docs with rst2myst
DeltaFile
+532-548llvm/docs/DirectX/DXContainer.md
+448-596llvm/docs/GlobalISel/GenericOpcode.md
+444-452llvm/docs/GlobalISel/MIRPatterns.md
+372-359llvm/docs/DirectX/DXILResources.md
+308-308llvm/docs/DirectX/DXILOpTableGenDesign.md
+279-311llvm/docs/PDB/DbiStream.md
+2,383-2,57421 files not shown
+3,997-4,47027 files

LLVM/project 1e3553dllvm/docs/DirectX DXILResources.rst DXILResources.md, llvm/docs/GlobalISel GenericOpcode.rst GenericOpcode.md

[docs] Rename selected PDB, DirectX, and GlobalISel docs to Markdown
DeltaFile
+0-1,275llvm/docs/GlobalISel/GenericOpcode.rst
+1,275-0llvm/docs/GlobalISel/GenericOpcode.md
+0-1,061llvm/docs/DirectX/DXContainer.rst
+1,061-0llvm/docs/DirectX/DXContainer.md
+0-885llvm/docs/DirectX/DXILResources.rst
+885-0llvm/docs/DirectX/DXILResources.md
+3,221-3,22148 files not shown
+8,117-8,11754 files

LLVM/project a966e74clang/include/clang/CIR/Dialect/IR CIRTypes.h, clang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp

[CIR][NFC] Say "access unit" where the code says "unit"

`makeMemberKind` took a bool called `isUnit`, which does not say what the
member is a unit of, and the `isBitFieldUnit` predicate feeding it had the same
gap. Both become `isBitFieldAccessUnit`, matching the term classic uses, and
the helper picks up a short comment adapted from `CGRecordLayoutBuilder.cpp` so
a reader meets the definition where the parameter is read.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+11-4clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+5-5clang/include/clang/CIR/Dialect/IR/CIRTypes.h
+16-92 files

LLVM/project 7b09cd4clang/docs/analyzer checkers.md checkers.rst, clang/docs/analyzer/developer-docs IPA.rst

rebase

Created using spr 1.3.7
DeltaFile
+0-4,248clang/docs/analyzer/checkers.rst
+4,182-0clang/docs/analyzer/checkers.md
+0-735clang/docs/analyzer/user-docs/Annotations.rst
+720-0clang/docs/analyzer/user-docs/Annotations.md
+362-151llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll
+0-396clang/docs/analyzer/developer-docs/IPA.rst
+5,264-5,530398 files not shown
+17,233-10,171404 files

LLVM/project 55c17f2clang/docs/analyzer checkers.md checkers.rst, clang/docs/analyzer/developer-docs IPA.rst

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-4,248clang/docs/analyzer/checkers.rst
+4,182-0clang/docs/analyzer/checkers.md
+0-735clang/docs/analyzer/user-docs/Annotations.rst
+720-0clang/docs/analyzer/user-docs/Annotations.md
+362-151llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll
+0-396clang/docs/analyzer/developer-docs/IPA.rst
+5,264-5,530398 files not shown
+17,233-10,171404 files

LLVM/project d43053aclang/docs/analyzer checkers.md checkers.rst, clang/docs/analyzer/developer-docs IPA.rst

rebase

Created using spr 1.3.7
DeltaFile
+0-4,248clang/docs/analyzer/checkers.rst
+4,182-0clang/docs/analyzer/checkers.md
+0-735clang/docs/analyzer/user-docs/Annotations.rst
+720-0clang/docs/analyzer/user-docs/Annotations.md
+362-151llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll
+0-396clang/docs/analyzer/developer-docs/IPA.rst
+5,264-5,530398 files not shown
+17,233-10,171404 files