[Mlir-commits] [mlir] [mlir][emitc] Restrict integer and float types (PR #85788)

Marius Brehler llvmlistbot at llvm.org
Wed Mar 20 01:45:48 PDT 2024


================
@@ -22,6 +22,12 @@ include "mlir/IR/BuiltinTypeInterfaces.td"
 // EmitC type definitions
 //===----------------------------------------------------------------------===//
 
+def Valid_EmitC_Integer_Type : Type<CPred<"emitc::isValidEmitCIntegerType($_self)">,
----------------
marbre wrote:

Well those types, to be precise `EmitC_ArrayType`, `EmitC_OpaqueType` and `EmitC_PointerType`, are EmitC specific and we have our own implementations for it. In contrast to that, `EmitCIntegerType` as wells as `EmitCFloatType`just refer to a collection of (bultin) types without implementing a new type, similar to

https://github.com/llvm/llvm-project/blob/4462bb58be7d68274fb9b443b7bf4803306df87d/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td#L54-L55

Therefore, I am fine with the slightly differing name scheme. @simon-camp your thoughts?

https://github.com/llvm/llvm-project/pull/85788


More information about the Mlir-commits mailing list