[llvm][test] Small fixes around CGTestPlugin (NFC) (#225362)
We use `LLVM_ENABLE_PLUGINS` as condition to run the unit-tests in
CGPluginTest, but we used to built the required plugin under `NOT WIN32
AND NOT CYGWIN`. These only happened to be equivalent. This patch guards
the entire folder under `LLVM_ENABLE_PLUGINS`. It also moves the related
LIT test to Feature/codegen-plugin-legacy.ll and adds REQUIRES plugin.
[VectorCombine] foldShuffleOfIntrinsics - don't use I variable name for Index iteration. NFC. (#225394)
Shadows the Instruction &I argument.
Noticed in #182768
Fix recursive DI variant part (#225373)
`mlir::translateModuleToLLVMIR` could leave recursive `DICompositeType`
metadata unresolved when the composite used `DW_TAG_variant_part`.
`DW_TAG_variant_part` was not emitted as a distinct `DICompositeType`,
unlike other recursive composite type tags. This change adds it to the
distinct path and adds a regression test covering the recursive
variant-part case.
Testing:
* `mlir/test/Target/LLVMIR/llvmir-debug.mlir`
* `ninja -C build check-mlir`
Fixes: #225151
Co-authored-by: Purnima Shrivastava <purnimashrivastava05@.com>
[offload] add context to olMemAlloc* (#224930)
This is the last part of the context refactor. This patch:
- Adds context param to all memory allocation functions.
- Routes ptr info through the plugins instead of a global map.
- Removes allocation tracking from liboffload.
- olGetMemInfo(OL_MEM_INFO_DEVICE) now returns INVALID_ARGUMENT for host
allocations, which have no per-device affinity.
Re-land of #222677 + #224622, which were reverted together in #224703.
Assisted-by: Claude Opus 4.7
[clang-tidy] Fix infinite loop in misc-multiple-inheritance (#220223)
This PR contains the fix for the infinite loop in
`misc-multiple-inheritance`. The checker was getting stuck in an
infinite cycle when it encountered circular inheritance. I fixed this by
adding a visited map (`InterfaceMap.try_emplace(Node, false)`) to break
the cycle during the DFS traversal.
Part of #213948.
[lldb-dap][NFC] Simplify using var_ref_t directly. (#225187)
Make var_ref_t printable, update functions that requires var_ref_t to
use var_ref_t instead of integers.
[orc-rt] Add ConnectorRegistry and the socket:adopt connector (#225398)
Maps the transport named by a ConnectionSpec to the connector that
establishes it. Connectors are registered manually, so they are only
available -- and for static archive builds, only linked -- if explicitly
requested.
Clients can connect a Session to a controller by passing a
ConnectionSpec for a registered transport (provided that the
ConnectionSpec is well-formed as defined by that transport).
This commit introduces a "socket:adopt" connector, which takes a stream
socket that this process already holds and attaches a
SocketSimpleRemoteCA for it.
[AArch64] Prevent reuse of retired architecture names (#221782)
Add negative tests preventing reuse of retired feature and system register names.
When system registers or feature names are retired, they should be appended to
this file, to ensure they're never re-used in future. `FEAT_MPAMv2` and `FEAT_TME`
are the two features which have been intentionally retired so far.
[mlir][SPIR-V] Let FConvert cast between same width types (#225349)
The spec requires the component type to differ, not the width, so casts
like f16 to bf16 are legal
Prerequisite for https://github.com/llvm/llvm-project/pull/212817
[orc-rt] Add a SimpleRemote transport over POSIX sockets (#225393)
A ControllerAccess speaking SimpleRemote over a connected stream socket.
The wire format matches LLVM's SimpleRemoteEPC. POSIX only -- Windows
needs a counterpart alongside the other sys/posix sources.
It owns a reactor thread built on poll(2) over the connection and a wake
socket. IO is non-blocking, so reads and writes resume wherever a
partial transfer stopped. The reactor is the only thread that sends;
callers on other threads append to a queue and wake it.
Reached through createSimpleRemoteCAOverSocket; the implementation is
file-local to the POSIX translation unit, so a Windows version needs no
header change.
The unit test drives it over a real socket pair, playing the controller
on the far end: framing, partial transfers, teardown ordering and the
malformed-message paths. The fixture owns the pair and the Session, so a
test body starts at the interesting part. It installs no on-disconnect
[2 lines not shown]
[OpenMP] Support capturing structured bindings in OpenMP regions. (#190832)
This patch adds support for capturing structured bindings (C++20) in
`OpenMP` parallel regions, which previously resulted in an error:
`error: capturing a structured binding is not yet supported in OpenMP`
[Dwarf] Don't crash in dwarf::isC() on vendor-defined languages (#223739)
isC() enumerates SourceLanguage and falls off the end of the switch into
llvm_unreachable("Unknown language kind."). DW_LANG_lo_user and
DW_LANG_hi_user are both explicit cases, but every vendor-defined code
strictly between them is not, so any of them aborts an asserts-enabled
build.
Assisted-by: LLM
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>