[Mlir-commits] [mlir] [mlir][Interfaces] Use `areTypesCompatible` instead of `mayForwardTypeToSuccessor` (PR #216471)

Matthias Springer llvmlistbot at llvm.org
Wed Aug 19 00:07:14 PDT 2026


================
@@ -769,8 +769,8 @@ def LLVM_InvokeOp
     LLVMFunctionType getCalleeFunctionType();
 
     /// Successor operands are restricted to LLVM-compatible types.
-    bool mayForwardTypeToSuccessor(unsigned index, Type type) {
-      return isCompatibleType(type);
+    bool areTypesCompatible(Type lhs, Type rhs) {
----------------
matthias-springer wrote:

`areTypesCompatible` is an existing interface method. It can be used to check if a caller operand type is compatible with a callee argument type. (E.g. some custom `call` op may support passing an `f32` ("lhs") to a function with argument type `tensor<f32>` ("rhs").)

We can query this interface method instead of `mayForwardTypeToSuccessor` when checking if a type can be forwarded through a call op.

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


More information about the Mlir-commits mailing list