[Mlir-commits] [mlir] [mlir][IR] Add `VectorTypeElementInterface` with `!llvm.ptr` (PR #133455)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Apr 8 07:02:30 PDT 2025
================
@@ -16,7 +16,36 @@
include "mlir/IR/OpBase.td"
-def FloatTypeInterface : TypeInterface<"FloatType"> {
+//===----------------------------------------------------------------------===//
+// VectorElementTypeInterface
+//===----------------------------------------------------------------------===//
+
+def VectorElementTypeInterface : TypeInterface<"VectorElementTypeInterface"> {
+ let cppNamespace = "::mlir";
+ let description = [{
+ Implementing this interface establishes a contract between this type and the
+ vector type, indicating that this type can be used as element of vectors.
+
+ Vector element types are treated as a bag of bits without any assumed
+ structure. The size of an element type must be constant, but it does not
+ necessarily have to be a compile-time constant.
----------------
banach-space wrote:
How about:
```cpp
The size of an element type must be a compile-time constant. However, the bit-width may remain opaque or unavailable during transformations that do not depend on the element type.
```
https://github.com/llvm/llvm-project/pull/133455
More information about the Mlir-commits
mailing list