[Mlir-commits] [mlir] [mlir] Allow all shaped types for arith ops. (PR #99028)
Matthias Springer
llvmlistbot at llvm.org
Wed Jul 17 03:36:49 PDT 2024
================
@@ -636,6 +636,10 @@ def AnyScalableVector : ScalableVectorOf<[AnyType]>;
// Shaped types.
+class ShapedTypeOf<list<Type> allowedTypes> :
+ ShapedContainerType<allowedTypes, IsShapedTypePred, "shaped",
+ "::mlir::ShapedType">;
----------------
matthias-springer wrote:
One problem with this is that memrefs could now be passed because they are shaped types. E.g.:
```mlir
// Should arith.addf allocate a new buffer?
%0 = arith.addf %a, %b : memref<?xf32>
```
I'm not quite sure how to phrase it, but I think we should allow only types that have "SSA" semantics. Not sure if "SSA" is the right word... Whether they are shaped types or not may not even be that important.
https://github.com/llvm/llvm-project/pull/99028
More information about the Mlir-commits
mailing list