[mlir][ROCDL] Enable useStrictPropertiesInAssemblyFormat
**Migration note:** Separate out inherent and discardable attributes
on your `rocdl.*` operations and put a `<>` around the inherent ones.
This commit adds `prop-dict` clauses to all the ROCDL-dialect
operations that have inherent attributes but don't have better syntax
for them.
I looked at creating better syntaxes here, but these are fairly
low-level operations and it was hard to put together comma-separated
lists of optional arguments in tablegen. So I've gone with the rather
straightforward and consistent fix of adding in `prop-dict`s.
AI note: Claude did the changes here, I reviewed the designs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
[mlir][AMDGPU] Enable useStrictPropertiesInAssemblyFormat (#216812)
This is part of the migration to keeping inherent and discardable
attributes separate touched.
**Migration note:** this'll change the syntax of a bunch of `amdgpu`
dialect ops to keep inherent attributes out of the `attr-dict`.
Syntax changes:
1. Operations like the dpp operations have had their inherent operands
turned into oilists that use `name(value)` syntax, such as
`bound_ctrl(false)`, which also leads to the elision of default
values.
2. Buffer operations now use `boundsCheck(true/false)` before the main
operation (keeping the visibility from the old attr-dict) and have
moved to `sgprOffset(%offset)` and `indexOffset(constant)` as optional
syntax alements after the main specification.
3. WMMA operations also now have the same `attribute[(value)]` element
[24 lines not shown]
[Bazel] Configure ARMv7 as the native target (#218185)
Configure the Linux ARMv7 platform to use LLVM’s ARM native target and
the toolchain’s ARMv7 triple, matching CMake and avoiding x86-64
fallback for the default target.
[Bazel] Enable LLVM threading on Windows (#218183)
LLVM_ENABLE_THREADS defaults to ON in CMake and is disabled only on
non-Windows systems without pthread support.
The Bazel overlay omitted the macro on Windows, causing Support, ORC,
JITLink, and parallel algorithms to compile their disabled paths.
[Bazel] Match LLVM MSVC conformance flags (#218187)
Port the MSVC conformance flags from CMake to Bazel, preserving the same
split between MSVC and clang-cl. This keeps both build systems aligned
and ensures LLVM uses consistent C++ language and preprocessor behavior
on Windows.
[lldb] Fix SBStructuredData::GetStringValue method (#216875)
In python the method's signature is
```py
class SBStructuredData:
def GetStringValue(self, dst_len: int) -> str:
# returns the str up to the `dst_len`
```
There is no way from python to get the total data from GetStringValue
regardless of how many times you call GetStringValue.
Update the implementation
```py
def GetStringValue(self, len: int = 0) -> str:
# always returns everything regardless of the value of `len` (for api compatibility).
```
Fixes crash when input is None in `SBStructuredData.SetStringValue`
Don't trim the result when called with the `dynamic` property.
[Bazel] Use .dylib for macOS configured library suffixes (#218184)
Use .dylib for macOS library and plugin suffixes, matching CMake, GN,
and Bazel’s existing macOS plugin output while leaving other platforms
unchanged.
[Bazel] Prefer forward slashes for MinGW builds (#218181)
Match CMake by enabling forward-slash paths for MinGW while preserving
the existing behavior for MSVC, clang-cl, and non-Windows platforms.
[Bazel] Fix the PPC64LE platform constraint (#218180)
Use Bazel’s dedicated ppc64le constraint for the Linux PPC64LE platform,
preventing it from incorrectly matching 32-bit PPC configurations.
[Android][Driver] Enable PAC/BTI for Android by Default (#218066)
We enabled PAC and BTI by default in the Android Ecosystem so it makes
sense to set it as the default for Android in the Clang driver. This
change will make sure anyone compiling for Android (like through NDK)
automatically gets PAC/BTI. It should not cause issues with older
Android devices since they become nops.
Fixes: https://github.com/android/ndk/issues/1914
[mlir][vector] Fix multi-reduction unroll test after #217288 (#218523)
This fixes a buildbot break. Test-only change.
`mlir/test/Dialect/Vector/vector-unroll-options.mlir` is failing on
main:
```
check:878'1 error: no match found in search range
check:878'2 pattern attempts to capture variables: "E0"
```
#217288 switched `vector.extract_strided_slice` and
`vector.insert_strided_slice` to the strict property assembly format,
which
prints `offsets`/`sizes`/`strides` without enclosing braces:
```
- vector.extract_strided_slice %v {offsets = [0, 0, 0], sizes = [1, 2, 2], strides = [1, 1, 1]} : ...
[18 lines not shown]
[clang][NFC] Improve TemplateName traversal in RecursiveASTVisitor. (#218425)
Use a `TraverseQualifier` bool like we do for type, instead of doing the
decomposition ad-hoc in call sites.
This is (yet another PR) in preparation for P3670
Assisted-By: Opus 5
[AArch64][GlobalISel] Clamp TruncSat num elements. (#217248)
Just like v2i32, we can clamp v8i8 and v4i16 vectors to make use of
truncsat in more places and split larger vectors with fewerElements.
[lldb] Fix null object file deref in ModuleList::AppendImpl (#218448)
`AppendImpl` reads the object file type of the module already at index 0
without checking that it is non-null:
```cpp
const bool elem_zero_is_executable =
m_modules[0]->GetObjectFile()->GetType() == ObjectFile::Type::eTypeExecutable;
```
A module with no object file can already sit in the list.
`DynamicLoader::LoadBinaryInTarget` appends whatever a symbol locator
finds, without checking that it parses. Appending another module after
such a module makes a member call on that null pointer:
```
lldb/source/Core/ModuleList.cpp:244:42: runtime error: member call on null
pointer of type 'lldb_private::ObjectFile'
```
[21 lines not shown]
[LLVMABI] Skip data-free members when reducing a union
While implementing union support for ClangIR, I found that
`reduceUnionForX8664` can choose a member holding no data as the type
representing the union. It chooses by alignment and then by size, and an
over-aligned empty class or an array of empty records wins either
comparison, so the coercion comes out wider than Clang's.
Clang does not need this skip because it compares lowered types, where an
empty class is a byte array it can narrow the coercion through. A record
reaching this library has no fields, so there is nothing to narrow
through.
This change skips members holding no data, using `bitsContainNoUserData`
to identify them.
Assisted-by: Cursor / claude-opus-5
[gsymutil] Add CommandGuide page (#214850)
I often reference the CommandGuide page online when looking at how to
use an LLVM tool rather than --help. This patch adds a barebones page
with most of the information similar to --help along with a summary and
an example.
Assisted by LLM.
[gsymutil] Report errors on failed lookup with --merged-functions (#214620)
Otherwise we never check the error of the Expected and we get an
assertion failure. We also never report any error messages.
[NFC][AMDGPU] Remove redundant CodeGen test coverage
This PR removes duplicate test files, cases, and RUN commands while preserving all effective coverage.
Deleted files:
- `unexpected-reg-unit-state.mir` duplicates the bar case in `fast-ra-kills-vcc.mir`.
- `schedule-fs-loop.ll` produces the same bitcode and output as `schedule-fs-loop-nested-if.ll`.
- `regbankselect-add.s16.mir` duplicates the first four cases in `regbankselect-add.mir`.
- The dynamic-indirect-access LDS tests duplicate the static-dynamic versions, including their ASAN variants.
- The two removed NextUseAnalysis tests duplicate `sequence_2_loops.mir` and `triple-nested-loops.mir`.
Trimmed test cases:
- Remove generic OR cases from `atomicrmw-xor.ll`; `atomicrmw-or.ll` contains them.
- Remove the fcmp ord case from `fmax_legacy.ll`; `fmin_legacy.ll` contains it.
- Remove `variable_memcpy_caller1` from `lower-mem-intrinsics.ll`; `caller0` provides identical coverage.
Deduplicated test commands:
[4 lines not shown]
[flang][OpenMP] Remove OmpVerifyModifiers
Verification of clause modifiers is now done in a single place.
The OmpVerifyModifiers function was left in place, but was reduced
to always return "true".
Remove the definition and all calls to it.
The large amount of apparent changes is mostly due to unindenting
and reformatting previously indented code.
[flang][OpenMP] Implement verification of modifier sets
Modifier sets and modifier groups are the modifier analogues of clause
sets and clause groups. In the OpenMP specification, modifier groups
have properties that are independent of the clause on which a member of
the group is specified, whereas modifier sets are local to clauses.
The implementation of modifier groups is identical to that of groups,
the only exception is that modifier sets don't have names that are
usable in diagnostic messages.
[flang][OpenMP] Move modifier verification out of header file
Since modifiers now have enum ids, verifying syntactical properties
of them no longer has to be type-based. Move the modifier verification
code out of a header file with some changes to use the numeric ids.
Some form of a connection between AST nodes for modifiers and the enum
ids is still required, now it's a static member of the modifier AST node.
[HLSL][NFC] Generalize and consolidate the texture tests
Many of the texture tests were parameterized specifically for Texture2D
and Texture2DArray, therefore retaining several 2D-specific literals,
including: the `hlsl::dimension` spelling, the width of the offset / ddx
/ ddy / LOD-location vectors, the operator[] index type and the
`spirv.Image` Dim operand.
Furthermore, the macro names used for parameterization was inconsistent
among test files.
This commit re-parameterizes the texture tests to generalize to more than
only 2D textures, and keeps the macro names consistent across test files.
Each test file now also has a comment describing each macro used in the
test.
This commit also moves 3 misplaced texture tests under
clang/test/SemaHLSL into clang/test/SemaHLSL/Resources.
[2 lines not shown]
[flang][OpenMP] Remove OmpVerifyModifiers
Verification of clause modifiers is now done in a single place.
The OmpVerifyModifiers function was left in place, but was reduced
to always return "true".
Remove the definition and all calls to it.
The large amount of apparent changes is mostly due to unindenting
and reformatting previously indented code.
[flang][OpenMP] Implement verification of modifier sets
Modifier sets and modifier groups are the modifier analogues of clause
sets and clause groups. In the OpenMP specification, modifier groups
have properties that are independent of the clause on which a member of
the group is specified, whereas modifier sets are local to clauses.
The implementation of modifier groups is identical to that of groups,
the only exception is that modifier sets don't have names that are
usable in diagnostic messages.
[flang][OpenMP] Move modifier verification out of header file
Since modifiers now have enum ids, verifying syntactical properties
of them no longer has to be type-based. Move the modifier verification
code out of a header file with some changes to use the numeric ids.
Some form of a connection between AST nodes for modifiers and the enum
ids is still required, now it's a static member of the modifier AST node.