[Mlir-commits] [mlir] [mlir][emitc] Add EmitC index types (PR #93155)
Corentin Ferry
llvmlistbot at llvm.org
Mon May 27 06:48:28 PDT 2024
================
@@ -51,7 +51,8 @@ class EmitC_BinaryOp<string mnemonic, list<Trait> traits = []> :
def CExpression : NativeOpTrait<"emitc::CExpression">;
// Types only used in binary arithmetic operations.
-def IntegerIndexOrOpaqueType : AnyTypeOf<[EmitCIntegerType, Index, EmitC_OpaqueType]>;
+def IntegerIndexOrOpaqueType : AnyTypeOf<[EmitCIntegerType, Index,
+ EmitC_SignedSizeT, EmitC_SizeT, EmitC_OpaqueType]>;
----------------
cferry-AMD wrote:
I went ahead and replaced this with the predicate. It looks like it was added in [https://github.com/llvm/llvm-project/commit/1f268092c7af20c21d4a594678b647cab050602a] and used in the `verify()` functions, where the `.td` type specifications are not available. I didn't find updates using `emitc::isIntegerIndexOrOpaqueType` and mentioning not updating the `.td` at the same time. If there was a more fundamental reason the predicate wasn't used, I'll revert this.
https://github.com/llvm/llvm-project/pull/93155
More information about the Mlir-commits
mailing list