[RFC][NFCI][Constants] Add `Constant::isZeroValue`
The old `isZeroValue` was removed because it was functionally identical to
`Constant::isNullValue`. Currently, a "null value" in LLVM means a zero value.
We are moving toward changing the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero-valued pointer. As a result,
the meaning of "null value" will also change in the future.
This PR series is the first step toward renaming the two widely used "null
value" interfaces to "zero value". As the first PR in the series, this change
adds a "new" `isZeroValue` alongside `isNullValue`, and makes `isNullValue` call
`isZeroValue` directly. Then, all uses of `isNullValue` in LLVM are replaced
with `isZeroValue`. Uses in other projects will be updated in separate PRs.
The plan is to eventually remove `isNullValue` after all uses have been
migrated.
[Codegen] Initialize RValue IsVolatile field in constructor (#195556)
Static analysis flagged that in some cases IsVolatile is left
uninitialzed. I adjusted the constructor to initialize IsVolatile.
[clang] Add formal linkage to textual AST dump (#194600)
This PR adds formal linkage (external, module, internal) to the textual
AST dumps. The motivation is to inform users (including ourselves) what
Clang thinks the linkage is, and to prevent situations where `extern` is
mistaken for an indication of external linkage (see #192116 for an
example).
The wording around linkage is known to be defective, but that's the best
we have: [[basic.link]](https://eel.is/c++draft/basic.link) paragraphs 3
through 7.
There are enough changes in this PR, so I decided to defer adding formal
linkage to JSON dumps to another PR.
(Open questions and suggestions for reviewers are in
https://github.com/llvm/llvm-project/pull/194600#issuecomment-4360515791)
---------
Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>
[XeGPU][Transform] Add XeGPU array length optimization patterns. (#194062)
This PR adds array_length optimization patterns and a test pass.
These patterns are used as part of the `XeGPUPeepHoleOptimizerPass`.
These patterns optimize `xegpu.create_nd_desc`, `xegpu.load_nd` and
`xegpu.prefetch_nd`
operations by introducing the array_length attribute when the FCD
(fastest changing
dimension) is larger than the subgroup size (i.e., 16).
The transformation updates:
1. `tensor_desc` type to use array_length and reduced FCD: `shape<32x32>
→ shape<32x16, array_length=2>`
2. `load_nd/prefetch_nd` result vector shape to match register layout:
`vector<32x32> → vector<64x16> (register layout)`
3. `vector.extract_strided_slice` operations to account for memory vs
register layout difference
[9 lines not shown]
List psutil as a dependency in pyproject.toml
Running tests in parallel with `lit` requires psutil, so add it to the dev
dependencies. While at it also set the required fields in the [project] to
make it easy to use `uv`.
Assisted-by: Gemini CLI
Pull Request: https://github.com/llvm/llvm-project/pull/194285