[Mlir-commits] [mlir] [MLIR][Func] Enable strict property assembly format (PR #217300)
Krzysztof Drewniak
llvmlistbot at llvm.org
Tue Sep 8 15:49:51 PDT 2026
================
@@ -90,10 +90,16 @@ LogicalResult CallIndirectOp::canonicalize(CallIndirectOp indirectCall,
if (!matchPattern(indirectCall.getCallee(), m_Constant(&calledFn)))
return failure();
- // Replace with a direct call.
- rewriter.replaceOpWithNewOp<CallOp>(indirectCall, calledFn,
- indirectCall.getResultTypes(),
- indirectCall.getArgOperands());
+ // Replace with a direct call, preserving the call-site attributes.
+ auto directCall = CallOp::create(rewriter, indirectCall.getLoc(), calledFn,
+ indirectCall.getResultTypes(),
+ indirectCall.getArgOperands());
+ if (ArrayAttr argAttrs = indirectCall.getArgAttrsAttr())
----------------
krzysz00 wrote:
Can't these be an argument to the `create`?
https://github.com/llvm/llvm-project/pull/217300
More information about the Mlir-commits
mailing list