<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/docs/DefiningDialects, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[MLIR][TBLGen] Added compound assignment operator for any BitEnum (#160840)</title>
<updated>2025-09-26T13:22:41+00:00</updated>
<author>
<name>Alexandra Sidorova</name>
<email>asidorov@amd.com</email>
</author>
<published>2025-09-26T13:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=acb826e64e773f65ae58eaa98bc8bbb7d07af8d9'/>
<id>acb826e64e773f65ae58eaa98bc8bbb7d07af8d9</id>
<content type='text'>
## Details:
- Added missing compound assignment operators `|=`, `&amp;=`, `^=` to
`mlir-tblgen`
- Replaced the arithmetic operators with added assignment operators for
`BitEnum` in the transformations
- Updated related documentation


## Tickets:
- Closes https://github.com/llvm/llvm-project/issues/158098</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
## Details:
- Added missing compound assignment operators `|=`, `&amp;=`, `^=` to
`mlir-tblgen`
- Replaced the arithmetic operators with added assignment operators for
`BitEnum` in the transformations
- Updated related documentation


## Tickets:
- Closes https://github.com/llvm/llvm-project/issues/158098</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][docs] Use APIntParameter instead of APInt in AttributesAndTypes.md (#151315)</title>
<updated>2025-07-30T11:48:06+00:00</updated>
<author>
<name>Chaitanya Koparkar</name>
<email>ckoparkar@gmail.com</email>
</author>
<published>2025-07-30T11:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5c87374f2a33015d39b4e2634c2949851e463602'/>
<id>5c87374f2a33015d39b4e2634c2949851e463602</id>
<content type='text'>
Fixes #151314.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #151314.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][docs] Rename OpTrait to Trait in ODS doc (#148276)</title>
<updated>2025-07-17T21:13:28+00:00</updated>
<author>
<name>Jian Cai</name>
<email>jiancai@google.com</email>
</author>
<published>2025-07-17T21:13:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e220630d28741b30bb4423e34e76654c7d9d1f7'/>
<id>7e220630d28741b30bb4423e34e76654c7d9d1f7</id>
<content type='text'>
This makes the doc consistent with the code base.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the doc consistent with the code base.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][vector][memref] Add `alignment` attribute to memory access ops (#144344)</title>
<updated>2025-07-17T17:38:21+00:00</updated>
<author>
<name>tyb0807</name>
<email>sontuan.vu119@gmail.com</email>
</author>
<published>2025-07-17T17:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa3978573e15205b43c6a7e3b4a6f940ccded7a2'/>
<id>aa3978573e15205b43c6a7e3b4a6f940ccded7a2</id>
<content type='text'>
Alignment information is important to allow LLVM backends such as AMDGPU
to select wide memory accesses (e.g., dwordx4 or b128). Since this info
is not always inferable, it's better to inform LLVM backends explicitly
about it. Furthermore, alignment is not necessarily a property of the
element type, but of each individual memory access op (we can have
overaligned and underaligned accesses compared to the natural/preferred
alignment of the element type).

This patch introduces `alignment` attribute to memref/vector.load/store
ops.

Follow-up PRs will

1. Propagate the attribute to LLVM/SPIR-V.

2. Introduce `alignment` attribute to other vector memory access ops:
    vector.gather + vector.scatter
    vector.transfer_read + vector.transfer_write
    vector.compressstore + vector.expandload
    vector.maskedload + vector.maskedstore

3. Replace `--convert-vector-to-llvm='use-vector-alignment=1` with a
   simple pass to populate alignment attributes based on the vector
   types.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alignment information is important to allow LLVM backends such as AMDGPU
to select wide memory accesses (e.g., dwordx4 or b128). Since this info
is not always inferable, it's better to inform LLVM backends explicitly
about it. Furthermore, alignment is not necessarily a property of the
element type, but of each individual memory access op (we can have
overaligned and underaligned accesses compared to the natural/preferred
alignment of the element type).

This patch introduces `alignment` attribute to memref/vector.load/store
ops.

Follow-up PRs will

1. Propagate the attribute to LLVM/SPIR-V.

2. Introduce `alignment` attribute to other vector memory access ops:
    vector.gather + vector.scatter
    vector.transfer_read + vector.transfer_write
    vector.compressstore + vector.expandload
    vector.maskedload + vector.maskedstore

3. Replace `--convert-vector-to-llvm='use-vector-alignment=1` with a
   simple pass to populate alignment attributes based on the vector
   types.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][ODS] Optionally generate public C++ functions for attribute constraints (#144275)</title>
<updated>2025-06-16T07:21:05+00:00</updated>
<author>
<name>Henrich Lauko</name>
<email>xlauko@mail.muni.cz</email>
</author>
<published>2025-06-16T07:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9fcd14d9b013d0c4b8ec245772b3be3d5c31b885'/>
<id>9fcd14d9b013d0c4b8ec245772b3be3d5c31b885</id>
<content type='text'>
Add `gen-attr-constraint-decls` and `gen-attr-constraint-defs`, which
generate public C++ functions for attribute constraints. The name of the C++
function is specified in the `cppFunctionName` field.

This generalize `cppFunctionName` from `TypeConstraint` introduced in
 https://github.com/llvm/llvm-project/pull/104577 to be usable also in `AttrConstraint`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add `gen-attr-constraint-decls` and `gen-attr-constraint-defs`, which
generate public C++ functions for attribute constraints. The name of the C++
function is specified in the `cppFunctionName` field.

This generalize `cppFunctionName` from `TypeConstraint` introduced in
 https://github.com/llvm/llvm-project/pull/104577 to be usable also in `AttrConstraint`.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] Make Property a subclass of PropConstraint (#140848)</title>
<updated>2025-05-30T17:02:07+00:00</updated>
<author>
<name>Krzysztof Drewniak</name>
<email>krzysdrewniak@gmail.com</email>
</author>
<published>2025-05-30T17:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a236dc63bf467edeae07c96a9157cf57570fb5ba'/>
<id>a236dc63bf467edeae07c96a9157cf57570fb5ba</id>
<content type='text'>
In preparation for allowing non-attribute properties in the declaritive
rewrite pattern system, make `Property` a subclass of `PropConstraint`
in tablegen and add a CK_Prop to the Constraint class for tablegen.

Like `TypeConstraint` but unlike other constraints, a `PropConstraint`
has an additional field - the C++ interface type of the property being
constraint (if it's known).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In preparation for allowing non-attribute properties in the declaritive
rewrite pattern system, make `Property` a subclass of `PropConstraint`
in tablegen and add a CK_Prop to the Constraint class for tablegen.

Like `TypeConstraint` but unlike other constraints, a `PropConstraint`
has an additional field - the C++ interface type of the property being
constraint (if it's known).</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][Doc] Add documentation for OpAsmAttr/TypeInterface (#140244)</title>
<updated>2025-05-21T08:58:45+00:00</updated>
<author>
<name>Hongren Zheng</name>
<email>i@zenithal.me</email>
</author>
<published>2025-05-21T08:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b69f7775b3ffc3c2a0de9ac0d0ba99d0cd263ea'/>
<id>1b69f7775b3ffc3c2a0de9ac0d0ba99d0cd263ea</id>
<content type='text'>
After the introduction of OpAsmAttr/TypeInterface in #121187 #124721,
the documentation for them could be updated along side the doc for
OpAsmDialectInterface.

#127993 changed the trailing digit behavior for alias name generation.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After the introduction of OpAsmAttr/TypeInterface in #121187 #124721,
the documentation for them could be updated along side the doc for
OpAsmDialectInterface.

#127993 changed the trailing digit behavior for alias name generation.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR][TableGen] Add genMnemonicAlias field for OpAsm{Type,Attr}Interface (#131504)</title>
<updated>2025-05-10T14:36:55+00:00</updated>
<author>
<name>Hongren Zheng</name>
<email>i@zenithal.me</email>
</author>
<published>2025-05-10T14:36:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3f03f530c7411de8049c40a125b63b2defcdb8c2'/>
<id>3f03f530c7411de8049c40a125b63b2defcdb8c2</id>
<content type='text'>
Since the introduction of `OpAsm{Type,Attr}Interface` (#121187), it is
possible to generate alias in AsmPrinter solely from the type/attribute
itself without consulting the `OpAsmDialectInterface`. This means the
behavior can be put in tablegen file near the type/attribute definition.

A common pattern is to just use the type/attr mnemonic as the alias.
Previously, like #130479/#130481/#130483, this means adding a default
implementation to `extraClassDeclaration` in `LLVM_Attr` base class.
However, as attribute definition may override `extraClassDeclaration`,
it might be preferred to have a new field in tablegen to specify this
behavior.

This commit adds a `genMnemonicAlias` field to `AttrOrTypeDef`, when
enabled, makes `mlir-tblgen` emit a default implementation of `getAlias`
using mnemonic. When `OpAsm{Attr,Type}Interface` is not specified by the
user, `tblgen` will automatically add the interface.

For users wanting other alias behavior, they can ignore such field and
still use `extraClassDeclaration` way.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the introduction of `OpAsm{Type,Attr}Interface` (#121187), it is
possible to generate alias in AsmPrinter solely from the type/attribute
itself without consulting the `OpAsmDialectInterface`. This means the
behavior can be put in tablegen file near the type/attribute definition.

A common pattern is to just use the type/attr mnemonic as the alias.
Previously, like #130479/#130481/#130483, this means adding a default
implementation to `extraClassDeclaration` in `LLVM_Attr` base class.
However, as attribute definition may override `extraClassDeclaration`,
it might be preferred to have a new field in tablegen to specify this
behavior.

This commit adds a `genMnemonicAlias` field to `AttrOrTypeDef`, when
enabled, makes `mlir-tblgen` emit a default implementation of `getAlias`
using mnemonic. When `OpAsm{Attr,Type}Interface` is not specified by the
user, `tblgen` will automatically add the interface.

For users wanting other alias behavior, they can ignore such field and
still use `extraClassDeclaration` way.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][tblgen] Add custom parsing and printing within struct (#133939)</title>
<updated>2025-04-30T12:43:03+00:00</updated>
<author>
<name>Jorn Tuyls</name>
<email>jtuyls@users.noreply.github.com</email>
</author>
<published>2025-04-30T12:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=de6d010f4e3fbfdb54e257c496c16db30c6c0d91'/>
<id>de6d010f4e3fbfdb54e257c496c16db30c6c0d91</id>
<content type='text'>
This PR extends the `struct` directive in tablegen to support nested
`custom` directives. Note that this assumes/verifies that that `custom`
directive has a single parameter.

This enables defining custom field parsing and printing functions if the
`struct` directive doesn't suffice. There is some existing potential
downstream usage for it:
https://github.com/openxla/stablehlo/blob/a3c7de92425e8035437dae67ab2318a82eca79a1/stablehlo/dialect/StablehloOps.cpp#L3102</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR extends the `struct` directive in tablegen to support nested
`custom` directives. Note that this assumes/verifies that that `custom`
directive has a single parameter.

This enables defining custom field parsing and printing functions if the
`struct` directive doesn't suffice. There is some existing potential
downstream usage for it:
https://github.com/openxla/stablehlo/blob/a3c7de92425e8035437dae67ab2318a82eca79a1/stablehlo/dialect/StablehloOps.cpp#L3102</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Documentation updates and typo fixes (#125273)</title>
<updated>2025-04-15T08:27:58+00:00</updated>
<author>
<name>Timothy Hoffman</name>
<email>4001421+tim-hoffman@users.noreply.github.com</email>
</author>
<published>2025-04-15T08:27:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3266f9c3d6ae07289d0253d1efeb3d951830105c'/>
<id>3266f9c3d6ae07289d0253d1efeb3d951830105c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
