<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/mlir/lib/Conversion/LLVMCommon/Pattern.cpp, 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>Add 'exact' flag to arith.shrui/shrsi/divsi/divui operations (#165923)</title>
<updated>2025-11-17T17:46:39+00:00</updated>
<author>
<name>Jeremy Furtek</name>
<email>jfurtek@nvidia.com</email>
</author>
<published>2025-11-17T17:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a770d2b439ec246002cd77ce33e52f6efa577849'/>
<id>a770d2b439ec246002cd77ce33e52f6efa577849</id>
<content type='text'>
This MR adds support for the `exact` flag to the
`arith.shrui/shrsi/divsi/divui` operations. The semantics are identical
to those of the LLVM dialect and the LLVM language reference.

This MR also modifies the mechanism for converting `arith` dialect
**attributes** to corresponding **properties** in the `LLVM` dialect.
(As a specific example, the integer overflow flags `nsw/nuw` are
**properties** in the `LLVM` dialect, as opposed to attributes.)

Previously, attribute converter classes were required to have a specific
method to support integer overflow flags:
```C++
template &lt;typename SourceOp, typename TargetOp&gt;
class AttrConvertPassThrough {
public:
  ...
  LLVM::IntegerOverflowFlags getOverflowFlags() const {
    return LLVM::IntegerOverflowFlags::none;
  }
};
```
This method was required, even for `arith` source operations that did
not use integer overflow flags (e.g. `AttrConvertFastMathToLLVM`).

This MR modifies the interface required by `arith` dialect attribute
converters to instead provide a (possibly NULL) properties attribute:
```C++
template &lt;typename SourceOp, typename TargetOp&gt;
class AttrConvertPassThrough {
public:
  ...
  Attribute getPropAttr() const { return {}; }
};
```
For `arith` operations with attributes that map to `LLVM` dialect
**properties**, the attribute converter can create a `DictionaryAttr`
containing target properties and return that attribute from the
attribute converter's `getPropAttr()` method. The `arith` attribute
conversion framework will set the `propertiesAttr` of an
`OperationState`, and the target operation's `setPropertiesFromAttr()`
method will be invoked to set the properties when the target operation
is created. The `AttrConvertOverflowToLLVM` class in this MR uses the
new approach.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This MR adds support for the `exact` flag to the
`arith.shrui/shrsi/divsi/divui` operations. The semantics are identical
to those of the LLVM dialect and the LLVM language reference.

This MR also modifies the mechanism for converting `arith` dialect
**attributes** to corresponding **properties** in the `LLVM` dialect.
(As a specific example, the integer overflow flags `nsw/nuw` are
**properties** in the `LLVM` dialect, as opposed to attributes.)

Previously, attribute converter classes were required to have a specific
method to support integer overflow flags:
```C++
template &lt;typename SourceOp, typename TargetOp&gt;
class AttrConvertPassThrough {
public:
  ...
  LLVM::IntegerOverflowFlags getOverflowFlags() const {
    return LLVM::IntegerOverflowFlags::none;
  }
};
```
This method was required, even for `arith` source operations that did
not use integer overflow flags (e.g. `AttrConvertFastMathToLLVM`).

This MR modifies the interface required by `arith` dialect attribute
converters to instead provide a (possibly NULL) properties attribute:
```C++
template &lt;typename SourceOp, typename TargetOp&gt;
class AttrConvertPassThrough {
public:
  ...
  Attribute getPropAttr() const { return {}; }
};
```
For `arith` operations with attributes that map to `LLVM` dialect
**properties**, the attribute converter can create a `DictionaryAttr`
containing target properties and return that attribute from the
attribute converter's `getPropAttr()` method. The `arith` attribute
conversion framework will set the `propertiesAttr` of an
`OperationState`, and the target operation's `setPropertiesFromAttr()`
method will be invoked to set the properties when the target operation
is created. The `AttrConvertOverflowToLLVM` class in this MR uses the
new approach.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][LLVM][NFC] Simplify `copyUnrankedDescriptors` (#153597)</title>
<updated>2025-08-14T16:25:19+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-08-14T16:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2ae634cc1cf0c52993478053f248fa82aade3ec'/>
<id>e2ae634cc1cf0c52993478053f248fa82aade3ec</id>
<content type='text'>
Split the function into two: one that copies a single unranked
descriptor and one that copies multiple unranked descriptors. This is in
preparation of adding 1:N support to the Func-&gt;LLVM lowering patterns.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split the function into two: one that copies a single unranked
descriptor and one that copies multiple unranked descriptors. This is in
preparation of adding 1:N support to the Func-&gt;LLVM lowering patterns.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][LLVM][NFC] Simplify `computeSizes` function (#153588)</title>
<updated>2025-08-14T15:00:03+00:00</updated>
<author>
<name>Matthias Springer</name>
<email>me@m-sp.org</email>
</author>
<published>2025-08-14T15:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0ff92fe2f08d376b45f4c84fd1e8392c79f7feca'/>
<id>0ff92fe2f08d376b45f4c84fd1e8392c79f7feca</id>
<content type='text'>
Rename `computeSizes` to `computeSize` and make it compute just a single
size. This is in preparation of adding 1:N support to the Func-&gt;LLVM
lowering patterns.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename `computeSizes` to `computeSize` and make it compute just a single
size. This is in preparation of adding 1:N support to the Func-&gt;LLVM
lowering patterns.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] update `mlir` create APIs (34/n) (#150660)</title>
<updated>2025-07-25T17:36:54+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-25T17:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=258daf539583b80e0217d1d87941412d65cf16aa'/>
<id>258daf539583b80e0217d1d87941412d65cf16aa</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][NFC] update `Conversion` create APIs (6/n) (#149888)</title>
<updated>2025-07-22T12:16:53+00:00</updated>
<author>
<name>Maksim Levental</name>
<email>maksim.levental@gmail.com</email>
</author>
<published>2025-07-22T12:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4ae9fdca8af095afd91705f8dd143e93b304b6fb'/>
<id>4ae9fdca8af095afd91705f8dd143e93b304b6fb</id>
<content type='text'>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/pull/147168 for more info.</pre>
</div>
</content>
</entry>
<entry>
<title>[MLIR] Replace getVoidPtrType with getPtrType in ConvertToLLVMPattern (#145657)</title>
<updated>2025-06-27T10:31:53+00:00</updated>
<author>
<name>Twice</name>
<email>twice@apache.org</email>
</author>
<published>2025-06-27T10:31:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c3e08c9b893bcfb2f27491b5cd5320f8e75c6a2e'/>
<id>c3e08c9b893bcfb2f27491b5cd5320f8e75c6a2e</id>
<content type='text'>
`ConversionPattern::getVoidPtrType` looks a little confusion since the
opaque pointer migration is already done. Also we cannot specify address
space in this method.

Maybe we can mark them as deprecated and add new method `getPtrType()`,
as this PR did : )</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`ConversionPattern::getVoidPtrType` looks a little confusion since the
opaque pointer migration is already done. Also we cannot specify address
space in this method.

Maybe we can mark them as deprecated and add new method `getPtrType()`,
as this PR did : )</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][amx] Simplify intrinsic generation (#140559)</title>
<updated>2025-05-23T12:16:09+00:00</updated>
<author>
<name>Adam Siemieniuk</name>
<email>adam.siemieniuk@intel.com</email>
</author>
<published>2025-05-23T12:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0fa3ba7c395a859f3c0120d4e82763c692d6712b'/>
<id>0fa3ba7c395a859f3c0120d4e82763c692d6712b</id>
<content type='text'>
Replaces separate amx named intrinsic operations with direct calls to
LLVM intrinsic functions.
The existing amx tests are updated and expanded.

The separate conversion step translating amx intrinsics into LLVM IR is
eliminated. Instead, this step is now performed by the existing llvm
dialect infrastructure.

Related RFC:
https://discourse.llvm.org/t/rfc-simplify-x86-intrinsic-generation/85581/7</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaces separate amx named intrinsic operations with direct calls to
LLVM intrinsic functions.
The existing amx tests are updated and expanded.

The separate conversion step translating amx intrinsics into LLVM IR is
eliminated. Instead, this step is now performed by the existing llvm
dialect infrastructure.

Related RFC:
https://discourse.llvm.org/t/rfc-simplify-x86-intrinsic-generation/85581/7</pre>
</div>
</content>
</entry>
<entry>
<title>Emit nuw and nsw for mul and add when lowering to llvm.getelementptr (#140966)</title>
<updated>2025-05-22T20:40:26+00:00</updated>
<author>
<name>Peiyong Lin</name>
<email>linpyong@gmail.com</email>
</author>
<published>2025-05-22T20:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=45d8759cbed0f216786729718608a8be72a505c6'/>
<id>45d8759cbed0f216786729718608a8be72a505c6</id>
<content type='text'>
Now that the GEP no wrap flags are known when lowering to
llvm.getelementptr, we can also emit nuw and nsw for the generated
llvm.mul and llvm.add when no unsigned wrap and no signed wrap are used
respectively.

fixes: iree-org/iree#20483

Signed-off-by: Lin, Peiyong &lt;linpyong@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the GEP no wrap flags are known when lowering to
llvm.getelementptr, we can also emit nuw and nsw for the generated
llvm.mul and llvm.add when no unsigned wrap and no signed wrap are used
respectively.

fixes: iree-org/iree#20483

Signed-off-by: Lin, Peiyong &lt;linpyong@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Emit inbounds and nuw attributes in memref. (#138984)</title>
<updated>2025-05-20T21:16:22+00:00</updated>
<author>
<name>Peiyong Lin</name>
<email>linpyong@gmail.com</email>
</author>
<published>2025-05-20T21:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04ad8d4900fb4534a2120335e26d1a1a310ef256'/>
<id>04ad8d4900fb4534a2120335e26d1a1a310ef256</id>
<content type='text'>
Now that MLIR accepts nuw and nusw in getelementptr, this patch emits
the inbounds and nuw attributes when lower memref to LLVM in load and
store operators.

This patch also strengthens the memref.load and memref.store spec about
undefined behaviour during lowering.

This patch also lifts the |rewriter| parameter in getStridedElementPtr
ahead so that LLVM::GEPNoWrapFlags can be added at the end with a
default value and grouped together with other operators' parameters.

Signed-off-by: Lin, Peiyong &lt;linpyong@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that MLIR accepts nuw and nusw in getelementptr, this patch emits
the inbounds and nuw attributes when lower memref to LLVM in load and
store operators.

This patch also strengthens the memref.load and memref.store spec about
undefined behaviour during lowering.

This patch also lifts the |rewriter| parameter in getStridedElementPtr
ahead so that LLVM::GEPNoWrapFlags can be added at the end with a
default value and grouped together with other operators' parameters.

Signed-off-by: Lin, Peiyong &lt;linpyong@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][llvm][x86vector] One-to-one intrinsic op interface (#140055)</title>
<updated>2025-05-19T05:42:25+00:00</updated>
<author>
<name>Adam Siemieniuk</name>
<email>adam.siemieniuk@intel.com</email>
</author>
<published>2025-05-19T05:42:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c798e195409a2d6fabbb166285d9dfe8ca7599a7'/>
<id>c798e195409a2d6fabbb166285d9dfe8ca7599a7</id>
<content type='text'>
Adds an LLVMIR op interface that can used by external operations to
model LLVM intrinsics. Related 'op to llvm.call_intrinsic' rewriter
helper is moved into common LLVM conversion patterns. The x86vector
dialect is refactored to use the new common abstraction.

The one-to-one intrinsic op is tied to LLVM intrinsic call semantics.
Thus, the op interface, previously defined as a part of x86vector
dialect, is moved into the LLVMIR interfaces to allow other low-level
dialects to define operations abstracting specific intrinsic semantics
while minimizing infrastructure duplication.

Related RFC:
https://discourse.llvm.org/t/rfc-simplify-x86-intrinsic-generation/85581/6</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds an LLVMIR op interface that can used by external operations to
model LLVM intrinsics. Related 'op to llvm.call_intrinsic' rewriter
helper is moved into common LLVM conversion patterns. The x86vector
dialect is refactored to use the new common abstraction.

The one-to-one intrinsic op is tied to LLVM intrinsic call semantics.
Thus, the op interface, previously defined as a part of x86vector
dialect, is moved into the LLVMIR interfaces to allow other low-level
dialects to define operations abstracting specific intrinsic semantics
while minimizing infrastructure duplication.

Related RFC:
https://discourse.llvm.org/t/rfc-simplify-x86-intrinsic-generation/85581/6</pre>
</div>
</content>
</entry>
</feed>
