|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
01eedbc7 |
| 26-Jul-2022 |
River Riddle <[email protected]> |
[mlir] Refactor SubElementInterface replace support
The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomi
[mlir] Refactor SubElementInterface replace support
The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomic and functional):
* Replace crashes if unsupported This makes it really hard to use safely, given that you don't know if you are going to crash or not when using it.
* Types aren't supported This seems like a simple missed addition when the attribute replacement support was originally added.
* The ergonomics are weird It currently uses an index based replacement, which makes the implementations quite clunky.
This commit refactors support to be a bit more ergonomic, and also adds support for types in the process. This was also a great oppurtunity to greatly simplify how replacement is done in the symbol table.
Fixes #56355
Differential Revision: https://reviews.llvm.org/D130589
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
037f0995 |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
[mlir] Don't use Optional::hasValue (NFC)
|
| #
30c67587 |
| 19-Jun-2022 |
Kazu Hirata <[email protected]> |
Use value_or instead of getValueOr (NFC)
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
dccb7331 |
| 02-May-2022 |
Benjamin Kramer <[email protected]> |
[mlir][MemRef] Return `0` for the canonical strided layout expr of a 0d memref
There can't be any strides, and the offset for the canonical expr is always 0. Fixes #55229.
Differential Revision: ht
[mlir][MemRef] Return `0` for the canonical strided layout expr of a 0d memref
There can't be any strides, and the offset for the canonical expr is always 0. Fixes #55229.
Differential Revision: https://reviews.llvm.org/D124795
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
1b2a1f84 |
| 16-Feb-2022 |
William S. Moses <[email protected]> |
[MLIR][Arith] Canonicalize cmpf(int to fp) to cmpi
Given a cmpf of either uitofp or sitofp and a constant, attempt to canonicalize it to a cmpi.
This PR rewrites equivalent code within LLVM to now
[MLIR][Arith] Canonicalize cmpf(int to fp) to cmpi
Given a cmpf of either uitofp or sitofp and a constant, attempt to canonicalize it to a cmpi.
This PR rewrites equivalent code within LLVM to now apply to MLIR arith.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D117257
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
d10d49dc |
| 26-Jan-2022 |
River Riddle <[email protected]> |
[mlir][NFC] Add a using for llvm::BitVector to LLVM.h
BitVector is becoming widespread enough that we should add a proper using.
Differential Revision: https://reviews.llvm.org/D118290
|
| #
e3cd80ea |
| 24-Jan-2022 |
River Riddle <[email protected]> |
[mlir:Function][NFC] Use BitVector instead of ArrayRef for indices when removing arguments/results
We already convert to BitVector internally, and other APIs (namely Operation::eraseOperands) alread
[mlir:Function][NFC] Use BitVector instead of ArrayRef for indices when removing arguments/results
We already convert to BitVector internally, and other APIs (namely Operation::eraseOperands) already use BitVector as well. Switching over provides a common format between API and also reduces the amount of format conversions necessary.
Fixes #53325
Differential Revision: https://reviews.llvm.org/D118083
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
7ceffae1 |
| 14-Jan-2022 |
River Riddle <[email protected]> |
[mlir] Convert OpTrait::FunctionLike to FunctionOpInterface
This commit refactors the FunctionLike trait into an interface (FunctionOpInterface). FunctionLike as it is today is already a pseudo-inte
[mlir] Convert OpTrait::FunctionLike to FunctionOpInterface
This commit refactors the FunctionLike trait into an interface (FunctionOpInterface). FunctionLike as it is today is already a pseudo-interface, with many users checking the presence of the trait and then manually into functionality implemented in the function_like_impl namespace. By transitioning to an interface, these accesses are much cleaner (ideally with no direct calls to the impl namespace outside of the implementation of the derived function operations, e.g. for parsing/printing utilities).
I've tried to maintain as much compatability with the current state as possible, while also trying to clean up as much of the cruft as possible. The general migration plan for current users of FunctionLike is as follows:
* function_like_impl -> function_interface_impl Realistically most user calls should remove references to functions within this namespace outside of a vary narrow set (e.g. parsing/printing utilities). Calls to the attribute name accessors should be migrated to the `FunctionOpInterface::` equivalent, most everything else should be updated to be driven through an instance of the interface.
* OpTrait::FunctionLike -> FunctionOpInterface `hasTrait` checks will need to be moved to isa, along with the other various Trait vs Interface API differences.
* populateFunctionLikeTypeConversionPattern -> populateFunctionOpInterfaceTypeConversionPattern
Fixes #52917
Differential Revision: https://reviews.llvm.org/D117272
show more ...
|
| #
159898d5 |
| 13-Jan-2022 |
Adrian Kuegel <[email protected]> |
[mlir] Add missing const to cloneWith method.
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
676bfb2a |
| 10-Jan-2022 |
River Riddle <[email protected]> |
[mlir] Refactor ShapedType into an interface
ShapedType was created in a time before interfaces, and is one of the earliest type base classes in the ecosystem. This commit refactors ShapedType into
[mlir] Refactor ShapedType into an interface
ShapedType was created in a time before interfaces, and is one of the earliest type base classes in the ecosystem. This commit refactors ShapedType into an interface, which is what it would have been if interfaces had existed at that time. The API of ShapedType and it's derived classes are essentially untouched by this refactor, with the exception being the API surrounding kDynamicIndex (which requires a sole home).
For now, the API of ShapedType and its name have been kept as consistent to the current state of the world as possible (to help with potential migration churn, among other reasons). Moving forward though, we should look into potentially restructuring its API and possible its name as well (it should really have "Interface" at the end like other interfaces at the very least).
One other potentially interesting note is that I've attached the ShapedType::Trait to TensorType/BaseMemRefType to act as mixins for the ShapedType API. This is kind of weird, but allows for sharing the same API (i.e. preventing API loss from the transition from base class -> Interface). This inheritance doesn't affect any of the derived classes, it is just for API mixin.
Differential Revision: https://reviews.llvm.org/D116962
show more ...
|
| #
e4853be2 |
| 02-Jan-2022 |
Mehdi Amini <[email protected]> |
Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC)
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
a4830d14 |
| 12-Oct-2021 |
Javier Setoain <[email protected]> |
[mlir][RFC] Add scalable dimensions to VectorType
With VectorType supporting scalable dimensions, we don't need many of the operations currently present in ArmSVE, like mask generation and basic ari
[mlir][RFC] Add scalable dimensions to VectorType
With VectorType supporting scalable dimensions, we don't need many of the operations currently present in ArmSVE, like mask generation and basic arithmetic instructions. Therefore, this patch also gets rid of those.
Having built-in scalable vector support also simplifies the lowering of scalable vector dialects down to LLVMIR.
Scalable dimensions are indicated with the scalable dimensions between square brackets:
vector<[4]xf32>
Is a scalable vector of 4 single precission floating point elements.
More generally, a VectorType can have a set of fixed-length dimensions followed by a set of scalable dimensions:
vector<2x[4x4]xf32>
Is a vector with 2 scalable 4x4 vectors of single precission floating point elements.
The scale of the scalable dimensions can be obtained with the Vector operation:
%vs = vector.vscale
This change is being discussed in the discourse RFC:
https://llvm.discourse.group/t/rfc-add-built-in-support-for-scalable-vector-types/4484
Differential Revision: https://reviews.llvm.org/D111819
show more ...
|
| #
aba437ce |
| 13-Dec-2021 |
Benoit Jacob <[email protected]> |
[mlir][Vector] Patterns flattening vector transfers to 1D
This is the second part of https://reviews.llvm.org/D114993 after slicing into 2 independent commits.
This is needed at the moment to get g
[mlir][Vector] Patterns flattening vector transfers to 1D
This is the second part of https://reviews.llvm.org/D114993 after slicing into 2 independent commits.
This is needed at the moment to get good codegen from 2d vector.transfer ops that aim to compile to SIMD load/store instructions but that can only do so if the whole 2d transfer shape is handled in one piece, in particular taking advantage of the memref being contiguous rowmajor.
For instance, if the target architecture has 128bit SIMD then we would expect that contiguous row-major transfers of <4x4xi8> map to one SIMD load/store instruction each.
The current generic lowering of multi-dimensional vector.transfer ops can't achieve that because it peels dimensions one by one, so a transfer of <4x4xi8> becomes 4 transfers of <4xi8>.
The new patterns here are only enabled for now by -test-vector-transfer-flatten-patterns.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D114993
show more ...
|
| #
ee090870 |
| 08-Dec-2021 |
Mehdi Amini <[email protected]> |
Change the printing/parsing behavior for Attributes used in declarative assembly format
The new form of printing attribute in the declarative assembly is eliding the `#dialect.mnemonic` prefix to on
Change the printing/parsing behavior for Attributes used in declarative assembly format
The new form of printing attribute in the declarative assembly is eliding the `#dialect.mnemonic` prefix to only keep the `<....>` part.
Differential Revision: https://reviews.llvm.org/D113873
show more ...
|
| #
a08b750c |
| 29-Nov-2021 |
Nicolas Vasilache <[email protected]> |
[mlir][tensor] InsertSliceOp verification.
This revision reintroduces tensor.insert_slice verification which seems to have vanished over time: a verifier was initially introduced in cf9503c1b752062d
[mlir][tensor] InsertSliceOp verification.
This revision reintroduces tensor.insert_slice verification which seems to have vanished over time: a verifier was initially introduced in cf9503c1b752062d9abfb2c7922a50574d9c5de4 but for some reason the invalid.mlir was not properly updated; as time passed the verifier was not called anymore and later the code was deleted.
As a consequence, a non-negligible portion of tests has run astray using invalid tensor.insert_slice semantics and needed to be fixed.
Also, extract isRankReducedType from TensorOps for better reuse Originally, this facility was used by both tensor and memref forms but it got copied around as dialects were split.
Differential Revision: https://reviews.llvm.org/D114715
show more ...
|
| #
ddf2d62c |
| 17-Nov-2021 |
Michal Terepeta <[email protected]> |
[mlir][Vector] First step for 0D vector type
There seems to be a consensus that we should allow 0D vectors: https://llvm.discourse.group/t/should-we-have-0-d-vectors/3097
This commit is only the fi
[mlir][Vector] First step for 0D vector type
There seems to be a consensus that we should allow 0D vectors: https://llvm.discourse.group/t/should-we-have-0-d-vectors/3097
This commit is only the first step: it changes the verifier and the parser to allow vectors like `vector<f32>` (but does not allow explicit 0 dimensions, i.e., `vector<0xf32>` is not allowed).
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D114086
show more ...
|
| #
195730a6 |
| 16-Nov-2021 |
River Riddle <[email protected]> |
[mlir][NFC] Replace references to Identifier with StringAttr
This is part of the replacement of Identifier with StringAttr.
Differential Revision: https://reviews.llvm.org/D113953
|
| #
e41ebbec |
| 11-Oct-2021 |
Vladislav Vinogradov <[email protected]> |
[mlir][RFC] Refactor layout representation in MemRefType
The change is based on the proposal from the following discussion: https://llvm.discourse.group/t/rfc-memreftype-affine-maps-list-vs-single-i
[mlir][RFC] Refactor layout representation in MemRefType
The change is based on the proposal from the following discussion: https://llvm.discourse.group/t/rfc-memreftype-affine-maps-list-vs-single-item/3968
* Introduce `MemRefLayoutAttr` interface to get `AffineMap` from an `Attribute` (`AffineMapAttr` implements this interface). * Store layout as a single generic `MemRefLayoutAttr`.
This change removes the affine map composition feature and related API. Actually, while the `MemRefType` itself supported it, almost none of the upstream can work with more than 1 affine map in `MemRefType`.
The introduced `MemRefLayoutAttr` allows to re-implement this feature in a more stable way - via separate attribute class.
Also the interface allows to use different layout representations rather than affine maps. For example, the described "stride + offset" form, which is currently supported in ASM parser only, can now be expressed as separate attribute.
Reviewed By: ftynse, bondhugula
Differential Revision: https://reviews.llvm.org/D111553
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
b096ac90 |
| 06-Aug-2021 |
Geoffrey Martin-Noble <[email protected]> |
[MLIR] Improve debug messages in BuiltinTypes
It's nice for users to have more information when debugging failures and these are only triggered in a failure path.
Reviewed By: mehdi_amini
Differen
[MLIR] Improve debug messages in BuiltinTypes
It's nice for users to have more information when debugging failures and these are only triggered in a failure path.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D107676
show more ...
|
| #
fab634b4 |
| 01-Oct-2021 |
Nicolas Vasilache <[email protected]> |
[mlir] Tighten strided layout specification.
Clarify that the strided layout specification is represented by a single semi-affine map.
Differential Revision: https://reviews.llvm.org/D110921
|
|
Revision tags: llvmorg-13.0.0-rc1 |
|
| #
f8479d9d |
| 28-Jul-2021 |
River Riddle <[email protected]> |
[mlir] Set the namespace of the BuiltinDialect to 'builtin'
Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities
[mlir] Set the namespace of the BuiltinDialect to 'builtin'
Historically the builtin dialect has had an empty namespace. This has unfortunately created a very awkward situation, where many utilities either have to special case the empty namespace, or just don't work at all right now. This revision adds a namespace to the builtin dialect, and starts to cleanup some of the utilities to no longer handle empty namespaces. For now, the assembly form of builtin operations does not require the `builtin.` prefix. (This should likely be re-evaluated though)
Differential Revision: https://reviews.llvm.org/D105149
show more ...
|
|
Revision tags: llvmorg-14-init |
|
| #
eb6c63cb |
| 07-Jul-2021 |
Vladislav Vinogradov <[email protected]> |
[mlir] Fix RankedTensorType::walkImmediateSubElements method
Add 'enconding' attribute visitor. Without it ASM printer doesn't use attribute aliases for 'enconding'.
Reviewed By: rriddle
Different
[mlir] Fix RankedTensorType::walkImmediateSubElements method
Add 'enconding' attribute visitor. Without it ASM printer doesn't use attribute aliases for 'enconding'.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D105554
show more ...
|
| #
0f9e6451 |
| 15-Jul-2021 |
Mehdi Amini <[email protected]> |
Defend early against operation created without a registered dialect
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D105961
|
| #
3e25ea70 |
| 15-Jul-2021 |
Mehdi Amini <[email protected]> |
Revert "Defend early against operation created without a registered dialect"
This reverts commit 58018858e887320e2432e2e00ace13273b8a1f29.
The Python bindings test are broken.
|
| #
58018858 |
| 15-Jul-2021 |
Mehdi Amini <[email protected]> |
Defend early against operation created without a registered dialect
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D105961
|