LLVM/project 8c2d7ccmlir/include/mlir/IR SymbolInterfaces.td, mlir/lib/IR SymbolTable.cpp

[mlir][IR] Add SymbolUserTypeInterface (#198435)

This change adds SymbolUserTypeInterface, analogous to
SymbolUserAttrInterface, and extends SymbolTable verification to check
participating types.

Verification visits the types owned by an operation, (operand/result
types, block argument types, attribute-contained types, nested type
parameters) and checks each distinct type at most once, interrupting on
the first failure. Deduplication spans the whole symbol-table walk, so a
type used by multiple operations is checked only once.

Attribute (SymbolUserAttrInterface) verification also gets deduped the
same way.

Assisted-by: Codex (OpenAI)
Assisted-by: Claude (Anthropic)
DeltaFile
+95-0mlir/test/IR/test-verifiers-symbol-user-type.mlir
+57-0mlir/lib/IR/SymbolTable.cpp
+27-18utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+20-1mlir/include/mlir/IR/SymbolInterfaces.td
+13-0mlir/test/lib/Dialect/Test/TestTypes.cpp
+9-0mlir/test/lib/Dialect/Test/TestTypeDefs.td
+221-193 files not shown
+225-199 files

LLVM/project ccd0e98lldb/source/Plugins/SymbolFile/NativePDB UdtRecordCompleter.cpp, lldb/test/API/lang/cpp/enum-limits TestCPPEnumLimits.py main.cpp

[lldb][NativePDB] Fix width and signedness of enum constants (#210338)

Enumerator values aren't always encoded in the correct bit width and
signedness. This happens with both MSVC and Clang.

On MSVC, unsigned 64bit enumerators can be encoded as signed. For
example `ULONGLONG_MAX` will be encoded as `-1`.
Clang/LLVM will always encode the values as unsigned.

Example: https://godbolt.org/z/96YjGW48W.

I fixed this by setting the expected width and signedness when creating
the enumerator constant. We can't use a shell test like for the other
PDB tests, because no output shows the enum values.
DeltaFile
+91-0lldb/test/API/lang/cpp/enum-limits/TestCPPEnumLimits.py
+48-0lldb/test/API/lang/cpp/enum-limits/main.cpp
+17-1lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
+3-0lldb/test/API/lang/cpp/enum-limits/Makefile
+159-14 files

LLVM/project 2730fc8llvm/lib/Target/SPIRV SPIRVInstructionSelector.cpp, llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bfloat16 bfloat16.ll

[SPIR-V] Handle bfloat in getZeroFP/getOneFP (#202859)

Related spirv-val change:
https://github.com/KhronosGroup/SPIRV-Tools/pull/6734

---------

Co-authored-by: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
DeltaFile
+57-8llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bfloat16/bfloat16.ll
+4-0llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+61-82 files

LLVM/project 3fc4fcaclang/lib/StaticAnalyzer/Checkers/WebKit RawPtrRefCallArgsChecker.cpp, clang/test/Analysis/Checkers/WebKit call-args.cpp

[alpha.webkit.UncountedCallArgsChecker] Crash in printArgument (#210411)

The crash was caused by missing nullptr check for Decl used to get
printing policy. Fixed the bug by replacing the use of Decl with
BugManager to get the policy.
DeltaFile
+5-6clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefCallArgsChecker.cpp
+10-0clang/test/Analysis/Checkers/WebKit/call-args.cpp
+15-62 files

LLVM/project ea50c8c.github/workflows premerge.yaml

Fix macOS casing in premerge workflow (#210477)
DeltaFile
+1-1.github/workflows/premerge.yaml
+1-11 files

LLVM/project acdf320cmake/Modules LLVMVersion.cmake

Fix bumping of version to 23.1.0-rc1.
DeltaFile
+1-1cmake/Modules/LLVMVersion.cmake
+1-11 files

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