7 Commits

Author SHA1 Message Date
Maksim Levental
4ae9fdca8a
[mlir][NFC] update Conversion create APIs (6/n) (#149888)
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-22 08:16:53 -04:00
Matthias Springer
206fad0e21
[mlir][NFC] Mark type converter in populate... functions as const (#111250)
This commit marks the type converter in `populate...` functions as
`const`. This is useful for debugging.

Patterns already take a `const` type converter. However, some
`populate...` functions do not only add new patterns, but also add
additional type conversion rules. That makes it difficult to find the
place where a type conversion was added in the code base. With this
change, all `populate...` functions that only populate pattern now have
a `const` type converter. Programmers can then conclude from the
function signature that these functions do not register any new type
conversion rules.

Also some minor cleanups around the 1:N dialect conversion
infrastructure, which did not always pass the type converter as a
`const` object internally.
2024-10-05 21:32:40 +02:00
Matthias Springer
bfdc47232c [mlir][Conversion] Implement ConvertToLLVMPatternInterface (2)
Implement ConvertToLLVMPatternInterface for more dialects: index, math,
ub.

Differential Revision: https://reviews.llvm.org/D157478
2023-08-09 10:28:15 +02:00
Krzysztof Drewniak
8cdb4f9f66 [mlir][Index] Add index.mins and index.minu
Signed and unsigned minimum operations were missing from the Index
dialect and are needed to test integer range inference.

Reviewed By: Mogball

Differential Revision: https://reviews.llvm.org/D141299
2023-01-10 21:41:59 +00:00
Luca Boasso
4f9c9295a6 [mlir][index] Add and, or, and xor ops
This patch adds the and, or, and xor bitwise operations to
the index dialects with folders and LLVM lowerings.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D138590
2022-11-23 13:26:02 -06:00
Jeff Niu
9ef3146511 [mlir][index] Add shl, shrs, and shru ops
This patch adds the left shift, signed right shift, and unsigned right
shift operations to the index dialects with folders and LLVM lowerings.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D137349
2022-11-03 16:29:04 -07:00
Jeff Niu
cae746d9c4 [mlir][index] Add convert-index-to-llvm pass
This patch adds a lowering pass to convert `index` dialect ops to LLVM.

Depends on D135694

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D135697
2022-10-21 09:46:19 -07:00