[Mlir-commits] [mlir] [MLIR][LLVMIR] Import calls with mismatching signature as indirect call (PR #135895)
Tobias Gysi
llvmlistbot at llvm.org
Thu May 1 22:52:36 PDT 2025
================
@@ -362,9 +362,12 @@ class ModuleImport {
/// Converts the callee's function type. For direct calls, it converts the
/// actual function type, which may differ from the called operand type in
/// variadic functions. For indirect calls, it converts the function type
- /// associated with the call instruction. Returns failure when the call and
- /// the callee are not compatible or when nested type conversions failed.
- FailureOr<LLVMFunctionType> convertFunctionType(llvm::CallBase *callInst);
+ /// associated with the call instruction. When the call and the callee are not
+ /// compatible (or when nested type conversions failed), emit a warning but
+ /// attempt translation using a bitcast and an indirect call (in order
+ /// represent valid and verified LLVM IR).
+ FailureOr<LLVMFunctionType> convertFunctionType(llvm::CallBase *callInst,
+ Value &castResult);
----------------
gysit wrote:
Nice, ready to go I would say.
https://github.com/llvm/llvm-project/pull/135895
More information about the Mlir-commits
mailing list