[Mlir-commits] [mlir] [mlir] Fix FunctionOpInterface impl for external func (PR #124693)
River Riddle
llvmlistbot at llvm.org
Mon Feb 3 10:47:29 PST 2025
================
@@ -228,8 +228,11 @@ void function_interface_impl::insertFunctionArguments(
// Update the function type and any entry block arguments.
op.setFunctionTypeAttr(TypeAttr::get(newType));
- for (unsigned i = 0, e = argIndices.size(); i < e; ++i)
- entry.insertArgument(argIndices[i] + i, argTypes[i], argLocs[i]);
+
+ // Update the block arguments of the entry block when it is not external.
+ if (!op.isExternal())
----------------
River707 wrote:
I don't think this is the only necessary change, I would expect line 203 to be moved here as well (I don't think an entry block exists in the external case). Same with the change below.
https://github.com/llvm/llvm-project/pull/124693
More information about the Mlir-commits
mailing list