[MLIR][LLVMIR] Handle MDTuple-of-MDStrings module flags (e.g. riscv-isa) (#188741)
The "riscv-isa" LLVM module flag stores its value as an MDTuple
containing MDStrings (e.g. `\!{\!"rv64i2p1", \!"m2p0"}`). Previously,
this fell through the unrecognized-key path in
`convertModuleFlagValueFromMDTuple`, which emitted a warning and dropped
the flag during import.
This patch adds generic handling for MDTuples whose operands are all
MDStrings:
- Import: convert to `ArrayAttr<StringAttr>` in
`convertModuleFlagValueFromMDTuple`
- Export: convert `ArrayAttr<StringAttr>` back to an MDTuple of
MDStrings in `convertModuleFlagValue`, enabling a lossless round-trip
- Verifier: allow `ArrayAttr<StringAttr>` as a valid `ModuleFlagAttr`
value for keys not otherwise handled by specific verifier branches
Fixes #188122
Assisted-by: Claude Code
[lldb] Add binary multiplication, division, remainder to DIL (#187281)
Add binary arithmetic multiplication, division, remainder to DIL.
This patch also passes DILMode to the parser to check if binary
multiplication is allowed by the mode. This cannot be done in the lexer
alone, because it allows token `*` as a dereference operator for legacy
mode, but that token could also be a binary multiplication allowed only
in full mode.
[MLIR][ODS] Error on optional attribute used outside optional group in assemblyFormat (#188726)
Using an optional attribute directly in assemblyFormat (e.g., `$attr
attr-dict`) without wrapping it in an optional group causes the
generated printer to call `printAttribute` with a null `Attribute` when
the attribute is absent. This leads to a crash in the alias initializer
when it calls `getAlias` on a null attribute.
Add a validation check in `OpFormatParser::verifyAttributes` that
detects this pattern and emits a diagnostic error with a helpful note
pointing users to the correct `($attr^)?` syntax.
Fixes #58064
Assisted-by: Claude Code
[lldb][Process/FreeBSDKernelCore] Improve error handling (#191423)
Improve error handling with the following changes:
- If `kvm_open2()` fails in `DoLoadCore()`, log error with a message
obtained from the function.
- Return false or continue for loop if memory read fails.
- Rename `!error.Success()` to `error.Fail()` for readability (NFC).
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[compiler-rt] clang-cl: skip MSVC external-header probe; -std=c++ for unit-test compiles (#191564)
1. `check_cxx_compiler_flag` marked `COMPILER_RT_HAS_EXTERNAL_FLAG` true
for clang-cl, so `/experimental:external` and `/external:anglebrackets`
were passed and clang-cl warned they were unused. Now only probe with
real MSVC (not Clang); set the flag false otherwise; rely on that in
asan/interception/ubsan.
2. Custom compile lines for unit tests didn’t get C++17, so headers hit
`-Wc++17-extensions` (e.g. `constexpr if` / message-less `static_assert`
in FuzzedDataProvider / asan_fake_stack). Now append
`-std=c++${CMAKE_CXX_STANDARD}` or `-std=c++17` for C++ sources in
`clang_compile()` for both standalone and non-standalone builds.
net-im/vesktop: New port
Vesktop is a custom Discord App aiming to give you better performance
and improved Unix-like support.
PR: 294195
Co-authored-by: Kenneth Raplee <kenrap at FreeBSD.org>
Reviewed by: makc (mentor)
Approved by: arrowd (co-mentor)
[MLIR][SPIRV] Deduce Shader capability for DescriptorSet/Binding decorations (#188743)
UpdateVCEPass only queried capabilities via QueryCapabilityInterface and
SPIRV type capabilities, but did not check capabilities implied by
decoration attributes on ops. Specifically, the DescriptorSet and
Binding decorations—represented by the `binding` and `descriptor_set`
attributes on `spirv.GlobalVariable`—require the `Shader` capability per
the SPIR-V spec Decoration table, but this was not deduced.
Add an explicit check in UpdateVCEPass: when a `spirv.GlobalVariable`
has a `binding` or `descriptor_set` attribute, require the `Shader`
capability.
Part of #168357
Assisted-by: Claude Code
[clang][test] Fix 32-bit bot failures after cc419f185e13 (#191551)
Use `{{.*}}` instead of `i64` for `memset` size type, as 32-bit
platforms use `i32`.
[LangRef] Correct description of predicate.enable MD (#191496)
The documentation incorrectly stated that this metadata enables/disables
vectorization, but it actually controls predication.
Also clarify that enabling predication implicitly enables vectorization.
[SPIR-V] Add Int64ImageEXT capability for OpTypeImage with 64-bit integer sampled type (#190742)
Fix spirv-val failure:
```
error: line 20: Capability Int64ImageEXT is required when using Sampled Type of 64-bit int
%spirv_Image = OpTypeImage %ulong 3D 0 0 0 0 Unknown ReadOnly
```
Detect when OpTypeImage uses a 64-bit integer as its sampled type and
automatically add the Int64ImageEXT capability and
SPV_EXT_shader_image_int64 extension
related to https://github.com/llvm/llvm-project/issues/190736
vm_fault: Reset m_needs_zeroing properly
- When allocating a page, we should only consider the PG_ZERO flag when
handling the top-level page.
- Unconditionally reset the flag when restarting the fault handler.
Previously, vm_fault_busy_sleep() would fail to reset it.
PR: 294039
Reviewed by: kib
Tested by: Peter Much <pmc at citylink.dinoex.sub.org>
MFC after: 3 days
Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated")
Differential Revision: https://reviews.freebsd.org/D56234
(cherry picked from commit 04132e01004316ddd0e0cde6ef15b100b7b1844d)
[NFC][SPIR-V] Use PatternMatch combinators in SPIRVEmitIntrinsics (#189554)
Replace `dyn_cast<IntrinsicInst> + getIntrinsicID()` chains with
PatternMatch combinators where applicable
[AArch64][GISel] Clamp bitcast to v2i64 (#191360)
This helps to not lower, improving the number of nodes that we expand
into and improving the quality of the generated code.
Originally a part of #177158 by Ryan Cowan