[Mlir-commits] [mlir] [mlir][Interfaces] `CallOpInterface`: Model forwarded result + improve verification (PR #214724)
Mehdi Amini
llvmlistbot at llvm.org
Mon Aug 10 04:53:25 PDT 2026
================
@@ -129,6 +168,16 @@ def CallOpInterface : OpInterface<"CallOpInterface",
/*methodBody=*/[{}], /*defaultImplementation=*/[{
return ::mlir::call_interface_impl::resolveCallable($_op);
}]
+ >,
+ InterfaceMethod<[{
+ Compares types across the call boundary for compatibility: the type of
+ a forwarded operand against the type of the corresponding callee
+ argument, and the type of a forwarded result against the type of the
+ corresponding callee result.
+ }],
+ "bool", "areTypesCompatible",
+ (ins "::mlir::Type":$callerType, "::mlir::Type":$calleeType),
+ /*methodBody=*/[{}], /*defaultImplementation=*/[{ return true; }]
----------------
joker-eph wrote:
Why do we need to add this method right now?
Also why not default to `callerType == calleeType` ?
https://github.com/llvm/llvm-project/pull/214724
More information about the Mlir-commits
mailing list