LLVM/project 6a33b69llvm/include/llvm/ProfileData SampleProf.h SampleProfReader.h, llvm/lib/ProfileData SampleProfWriter.cpp SampleProfReader.cpp

[SampleProfile] Support MD5-based ProfileSymbolList (#210235)

This patch speeds up sample profile loading by introducing an
MD5-based ProfileSymbolList (cold symbol list) in extensible binary
profiles.

The sample profile loader spends about a third of its time on loading
and decoding the symbol names in the Profile Symbol List section, yet
we use them only for membership checking purposes via
ProfileSymbolList::contains.

This patch teaches the writer to emit the section as an array of
64-bit GUIDs in the Eytzinger layout.  The reader checks the
SecFlagMD5 section flag and sets up an EytzingerTableSpan
pointing into the mmap memory.  This achieves both space efficiency
and runtime efficiency.

The new flag, md5-prof-sym-list, is off by default for now.


    [6 lines not shown]
DeltaFile
+40-2llvm/include/llvm/ProfileData/SampleProf.h
+36-0llvm/lib/ProfileData/SampleProfWriter.cpp
+29-2llvm/lib/ProfileData/SampleProfReader.cpp
+28-0llvm/unittests/ProfileData/SampleProfTest.cpp
+6-0llvm/test/tools/llvm-profdata/profile-symbol-list.test
+3-1llvm/include/llvm/ProfileData/SampleProfReader.h
+142-51 files not shown
+145-57 files

LLVM/project 982040dflang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP metadirective-implementation.f90

Fix metadirective loop variant safety checks

Classify candidate and fallback association from raw directive IDs so clauses are only converted for the selected variant.

Recognize data environments selected by enclosing metadirectives from the emitted OpenMP operation ancestry. Add regressions for unselected clauses and nested selected parallel regions.

Assisted with codex.
DeltaFile
+30-0flang/test/Lower/OpenMP/metadirective-implementation.f90
+21-6flang/lib/Lower/OpenMP/OpenMP.cpp
+18-0flang/test/Lower/OpenMP/Todo/metadirective-loop-enclosing-data-environment.f90
+69-63 files

LLVM/project 3be5663llvm/utils/gn/secondary/lldb/source/API BUILD.gn

[gn build] Port 9b096bb7abf7 (#210486)
DeltaFile
+1-0llvm/utils/gn/secondary/lldb/source/API/BUILD.gn
+1-01 files

LLVM/project 2e1c934llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Analyses BUILD.gn, llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysis BUILD.gn

[gn build] Port a12cbbcc94a8 (#210487)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Analyses/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysis/BUILD.gn
+2-02 files

LLVM/project 56fc7bfllvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Frontend BUILD.gn

[gn build] Port c1c278e74840 (#210488)
DeltaFile
+4-1llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Frontend/BUILD.gn
+4-11 files

LLVM/project 605b6d7llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize BUILD.gn

[gn build] Port 986cdd8618e3 (#210485)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
+1-01 files

LLVM/project a623e8dllvm/utils/gn/secondary/clang/unittests/CIR BUILD.gn

[gn build] Port 2dbcd7d10f94 (#210484)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/CIR/BUILD.gn
+1-01 files

LLVM/project cddf206llvm/docs NVPTXUsage.md JITLink.md

[docs] Rewrite 19 LLVM docs from reST to markdown (#208798)

Tracking issue: #201242
[Migration
guide](https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines)

This is a stacked PR based on #208800, which does the file rename to
preserve history.

This was prepared with rst2myst plus LLM-assisted cleanup. I paged
through all the generated HTML looking for migration artifacts, and all
of the differences I could find appear to be formatting error
corrections.
DeltaFile
+2,453-2,967llvm/docs/NVPTXUsage.md
+516-583llvm/docs/JITLink.md
+466-488llvm/docs/Instrumentor.md
+426-457llvm/docs/ORCv2.md
+369-301llvm/docs/AMDGPUExecutionSynchronization.md
+312-346llvm/docs/HowToUpdateDebugInfo.md
+4,542-5,14213 files not shown
+6,791-7,47119 files

LLVM/project 85657e5flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP metadirective-implementation.f90

Avoid lowering clauses for inapplicable metadirective variants

Classify raw directive specifications from their leaf directive IDs when
checking for loop association. This keeps clause conversion after applicability
filtering, so unsupported clauses in discarded variants cannot reach lowering.

Add a regression for an inapplicable ASSUME HOLDS variant with a NOTHING fallback.

Assisted with codex.
DeltaFile
+16-0flang/test/Lower/OpenMP/metadirective-implementation.f90
+9-1flang/lib/Lower/OpenMP/OpenMP.cpp
+25-12 files

LLVM/project cf11eefllvm/docs NVPTXUsage.md NVPTXUsage.rst

[docs] Rename selected LLVM docs to Markdown (#208800)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This is the initial straight rename commit. It will probably break the
docs build, but it has to be a separate PR for blame preservation
purposes.
DeltaFile
+4,767-0llvm/docs/NVPTXUsage.md
+0-4,767llvm/docs/NVPTXUsage.rst
+0-1,177llvm/docs/JITLink.rst
+1,177-0llvm/docs/JITLink.md
+974-0llvm/docs/ORCv2.md
+0-974llvm/docs/ORCv2.rst
+6,918-6,91832 files not shown
+13,451-13,45138 files

LLVM/project ed5d141llvm/lib/Target/WebAssembly WebAssemblyCodeGenPassBuilder.cpp, llvm/tools/llc llc.cpp

fix

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
+1-1llvm/tools/llc/llc.cpp
+3-32 files

LLVM/project 1ef8ba9mlir/lib/Target/Wasm TranslateFromWasm.cpp

[MLIR][WasmSSA] Instruction parser refactoring of WasmSSA importer (#195500)

Refactored WasmSSA importer mechanism to dispatch control flow to
relevant parser based on op code.
This is to prepare for instructions with multi-bytes opcodes (e.g.
vector instruction and some scalar instructions extensions) which will
be able to reuse the same mechanism.

It also replaces the bit tree to find the address by a jump table.

---------

Co-authored-by: Luc Forget <lforg37 at users.noreply.github.com>
Co-authored-by: Ferdinand Lemaire <ferdinand.lemaire at woven-planet.global>
Co-authored-by: Ferdinand Lemaire <flscminecraft at gmail.com>
DeltaFile
+232-150mlir/lib/Target/Wasm/TranslateFromWasm.cpp
+232-1501 files

LLVM/project 22b7e11flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP metadirective-loop.f90

Restrict metadirective loop lowering to safe cases

Defer loop variants nested in an existing OpenMP data environment until lowering
can create a variant-local loop induction variable binding. This prevents variant
DSA from affecting the enclosing construct, including for statically inapplicable
variants.

Limit core lowering to DO, SIMD, and DO SIMD. Emit focused TODOs for other
loop-associated directives and add coverage for both boundaries.

Assisted with codex.
DeltaFile
+50-2flang/lib/Lower/OpenMP/OpenMP.cpp
+37-0flang/test/Lower/OpenMP/Todo/metadirective-loop-enclosing-data-environment.f90
+0-21flang/test/Lower/OpenMP/metadirective-loop.f90
+15-0flang/test/Lower/OpenMP/Todo/metadirective-loop-unsupported-directive.f90
+102-234 files

LLVM/project 03c1f18cmake/Modules LLVMVersion.cmake

Bump version to 23.1.0-rc1
DeltaFile
+1-1cmake/Modules/LLVMVersion.cmake
+1-11 files

LLVM/project ee5d6f5utils/bazel/llvm-project-overlay/clang BUILD.bazel

[Bazel] Fixes c1c278e (#210451)

This fixes c1c278e7484038f1d14314f38736532975fafd20.

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=c1c278e7484038f1d14314f38736532975fafd20

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+2-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+2-01 files

LLVM/project b0440cbllvm/include/llvm/ADT GenericCycleImpl.h GenericCycleInfo.h

[CycleInfo] Reference cycles by preorder index, not pointer. NFC (#210271)

The block-to-innermost-cycle map (BlockMap) and each cycle's parent link
hold a GenericCycle pointer. Store the cycle's preorder index instead,
so no raw cycle pointer remains in the stored representation: BlockMap
becomes a SmallVector<unsigned>, four bytes per block rather than eight,
and the parent link becomes ParentIndex.

The flat Cycles array does not exist during construction, so both hold
creation-order indices into the temporary forest until flatten()
resolves them to preorder indices.

Aided by Claude Opus 4.8
DeltaFile
+48-27llvm/include/llvm/ADT/GenericCycleImpl.h
+30-22llvm/include/llvm/ADT/GenericCycleInfo.h
+78-492 files

LLVM/project fb2fa0bclang/lib/CIR/CodeGen CIRGenBuiltinX86.cpp, clang/test/CIR/CodeGenBuiltins/X86 sse-builtins.c avx512bw-builtins.c

[clang][clangIR]: X86 upstream avx psrldqi/pslldqi (#208025)

This PR upstreams the implementation and corresponding test suites for
X86 byte-shift intrinsics (pslldqi / psrldqi) spanning 128, 256, and
512-bit vector variants from the incubator.

I consolidated both left and right shifts into a single code path since
the underlying lane topology is identical, extracting the
direction-specific index arithmetic into clean variables at the top. Let
me know if you prefer this unified data-driven approach or if explicit
split functions for left/right shifts would be preferred for local
readability.

All integrated tests from the incubator have been upstreamed and are
currently passing.

Minimal compile case
```cpp
#include <emmintrin.h>

    [32 lines not shown]
DeltaFile
+120-0clang/test/CIR/CodeGenBuiltins/X86/sse-builtins.c
+66-6clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+28-0clang/test/CIR/CodeGenBuiltins/X86/avx512bw-builtins.c
+28-0clang/test/CIR/CodeGenBuiltins/X86/avx2-builtins.c
+242-64 files

LLVM/project d007100lldb/packages/Python/lldbsuite/test/tools/lldb-dap dap_server.py

[lldb-dap][test] Avoid a hang on a test failure (#209988)

Tests in `TestDAP_server.py` create `DebugAdapterServer`, passing a
connection string. `DebugAdapterServer.__init__()` creates a socket and
passes the associated input and output streams to its parent class,
`DebugCommunication`. `DAPTestCaseBase.launch()`, which is called from
`TestDAP_server.run_debug_session()`, adds a teardown hook that
eventually calls `DebugCommunication.terminate()`. If the socket is not
closed when this hook executes, it waits indefinitely for the receiving
thread to join.

In the normal case, when a test passes, the connection is closed by
calling `self.dap_server.request_disconnect()` at the end of
`TestDAP_server.run_debug_session()`. If a test fails, the cleanup hook
is called while the connection is still active, which results in a hang.
This can be reproduced by removing the call to `request_disconnect()` or
by changing the condition in the `assertEqual()` on the previous line.

The fix passes the opened socket to 'DebugCommunication' and closes the
socket explicitly in 'DebugCommunication.terminate()'.
DeltaFile
+9-0lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
+9-01 files

LLVM/project 42eb7dbclang/cmake/modules ClangConfig.cmake.in, compiler-rt/cmake/Modules CompilerRTUtils.cmake

Revert "Skipping host target exports during cross-compilation" (#210468)

Reverts llvm/llvm-project#209922
It broke runtimes build on amdgpu-amd-amdhsa
DeltaFile
+2-7clang/cmake/modules/ClangConfig.cmake.in
+0-6runtimes/CMakeLists.txt
+0-5compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+1-1llvm/cmake/modules/LLVMConfig.cmake.in
+3-194 files

LLVM/project 03b9039llvm/docs AdminTasks.md

[docs] Update the commit review admin task with process details (#210420)

As discussed in the infra area team meeting. Mostly this serves as a
place to stash helpful links.

I picked an arbitrary two week timeout for requests. We can re-evaluate at any time.
It seems less than ideal that one needs issue tracker labelling
privileges to reopen the issue, but I think that's accurate.
DeltaFile
+17-10llvm/docs/AdminTasks.md
+17-101 files

LLVM/project d29ab26llvm/docs AdminTasks.md

Extend duration to two weeks
DeltaFile
+1-1llvm/docs/AdminTasks.md
+1-11 files

LLVM/project ab6ef56lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp ProcessGDBRemote.h, lldb/unittests/Process/gdb-remote ProcessGDBRemoteTest.cpp CMakeLists.txt

[lldb] Contribute the GDB-remote packet history to diagnostics bundles (#210418)

Register a Diagnostics artifact provider from ProcessGDBRemote so a
diagnostics bundle captures the GDB-remote packet history, the same data
"process plugin packet history" prints.
DeltaFile
+106-0lldb/unittests/Process/gdb-remote/ProcessGDBRemoteTest.cpp
+21-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+4-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+1-0lldb/unittests/Process/gdb-remote/CMakeLists.txt
+132-04 files

LLVM/project 4f2b5acclang/docs ReleaseNotes.md

Fix release notes
DeltaFile
+1-1clang/docs/ReleaseNotes.md
+1-11 files

LLVM/project ccd75bbclang/include/clang/CIR/Dialect/IR CIROps.td, clang/lib/CIR/Dialect/IR CIRDialect.cpp

[CIR] Introduce loop cleanup regions (#210212)

For loops and while loops can create variables in their condition
regions that require per-iteration cleanup. The CIR dialect previously
had no clean way to represent these cleanups while maintaining a
separate condition region for the loop operation.

This change introduces an optional cleanup region to these loop ops and
updates the relevant region successor handling to reflect the insertion
of the cleanup region in the control flow when a non-empty cleanup
region is present.

The CFG flattening pass will handle routing the control flow through the
cleanup region in both the normal and EH unwind cases, but this is not
yet implemented. That will be added in a follow-up change, as will
creation of the cleanup region when it is needed during IR generation.

Assisted-by: Cursor / various models
DeltaFile
+109-0clang/test/CIR/IR/invalid-loop-cleanup.cir
+99-0clang/test/CIR/IR/loop-cleanup.cir
+84-8clang/include/clang/CIR/Dialect/IR/CIROps.td
+69-0clang/unittests/CIR/ControlFlowTest.cpp
+33-18clang/lib/CIR/Interfaces/CIRLoopOpInterface.cpp
+34-2clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+428-282 files not shown
+466-288 files

LLVM/project c4962f5lldb/source/Commands CommandObjectScripting.cpp Options.td, lldb/source/Core PluginManager.cpp

[lldb/script] Add scripting extension template generator (#209647)

This patch adds a `scripting extension generate <ExtensionType>...`
command that introspects a Python extension base class and emits a
skeleton subclass with `# TODO: Implement` stubs for its abstract
methods (or, with `-a`, every method), then opens the result in an
editor.

Generated imports use `from <module> import <class>`, and the generated
`__init__` forwards its arguments to `super().__init__(...)` since every
base class relies on its constructor to set up attributes
(`self.target`, `self.process`, ...) that inherited, non-overridden
methods depend on. When the host can't open an external editor (e.g.
non-macOS), the command reports that as a message rather than an error,
since the file is already written.

To catch regressions in the generator itself instead of just checking
that a file was produced, this patch adds
`TestScriptingExtensionGenerate.py`, which generates a template for

    [4 lines not shown]
DeltaFile
+359-0lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+188-0lldb/source/Commands/CommandObjectScripting.cpp
+167-0lldb/test/API/functionalities/scripting_extension_generate/TestScriptingExtensionGenerate.py
+125-0lldb/source/Interpreter/embedded_interpreter.py
+21-9lldb/source/Core/PluginManager.cpp
+28-0lldb/source/Commands/Options.td
+888-97 files not shown
+961-1213 files

LLVM/project 2066a3fllvm/docs NVPTXUsage.md ExtendingLLVM.md

Fix issues caught during review
DeltaFile
+59-59llvm/docs/NVPTXUsage.md
+22-22llvm/docs/ExtendingLLVM.md
+5-5llvm/docs/HowToCrossCompileBuiltinsOnArm.md
+3-3llvm/docs/BigEndianNEON.md
+1-1llvm/docs/CompileCudaWithLLVM.md
+1-1llvm/docs/AArch64SME.md
+91-916 files

LLVM/project dbab045llvm/lib/Transforms/Scalar TailRecursionElimination.cpp, llvm/test/Transforms/TailCallElim disable-tail-call-elim-for-cold-calls.ll

[TailCallElim] Optionally suppress tail call elim for cold calls (#209642)

Since eliminated tail calls result in missing frames when collecting
various types of profiles, provide an option for disabling the
elimination for cold non-musttail calls. By default the new handling is
disabled.

Since the new checks require BFI to be built in more cases, I have moved
UpdateFunctionEntryCount and ForceDisableBFI (renamed to
DisableEntryCountRecompute to match the flag and description), to
actually guard the function entry count update.
DeltaFile
+105-0llvm/test/Transforms/TailCallElim/disable-tail-call-elim-for-cold-calls.ll
+73-25llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+178-252 files

LLVM/project 3fbb037clang/cmake/modules ClangConfig.cmake.in, compiler-rt/cmake/Modules CompilerRTUtils.cmake

Adding an option to Skip LLVM and Clang exports (#209922)

Under CMake 4+, calling add_library(... SHARED IMPORTED) on a
target platform that lacks dynamic linking support triggers a fatal
error. This becomes an issue when building LLVM and runtimes for
baremetal targets like armv6m-none-eabi. This patch
adds the option "LLVM_OMIT_EXPORTS_FROM_CONFIG" in LLVM.
When used in sub builds like LLVM runtimes, it makes CMake to skip
including the LLVM and Clang exports. This mitigates the CMake 4
errors on baremetal runtimes.
DeltaFile
+7-2clang/cmake/modules/ClangConfig.cmake.in
+6-0runtimes/CMakeLists.txt
+5-0compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+1-1llvm/cmake/modules/LLVMConfig.cmake.in
+19-34 files

LLVM/project 372cd15flang/include/flang/Optimizer/OpenACC/Support FIROpenACCOpsInterfaces.h, flang/lib/Optimizer/OpenACC/Support FIROpenACCOpsInterfaces.cpp

[openacc] Implicitly map external constant globals (#210408)

Hoist initializer-less constant globals out of OpenACC compute regions
so implicit data mapping handles them. This avoids unresolved device
symbols for PARAMETER arrays defined in separately compiled modules,
while retaining implicit declare for initialized constants. Add
regression coverage and a global initializer query to the OpenACC
interface.
DeltaFile
+20-12mlir/lib/Dialect/OpenACC/Transforms/ACCImplicitDeclare.cpp
+24-0mlir/test/Dialect/OpenACC/acc-implicit-declare.mlir
+5-0flang/lib/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.cpp
+5-0mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+4-0mlir/include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td
+1-0flang/include/flang/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.h
+59-126 files

LLVM/project 7be5d35llvm/unittests/ADT SequenceTest.cpp

format
DeltaFile
+2-2llvm/unittests/ADT/SequenceTest.cpp
+2-21 files