[Mlir-commits] [mlir] 5a9c91b - [mlir][linalg] Cleanup LinalgOp usage in capi.
Tobias Gysi
llvmlistbot at llvm.org
Thu Jun 3 08:33:51 PDT 2021
Author: Tobias Gysi
Date: 2021-06-03T15:32:28Z
New Revision: 5a9c91b2231dda50c66265abc1e840ff7c72ca12
URL: https://github.com/llvm/llvm-project/commit/5a9c91b2231dda50c66265abc1e840ff7c72ca12
DIFF: https://github.com/llvm/llvm-project/commit/5a9c91b2231dda50c66265abc1e840ff7c72ca12.diff
LOG: [mlir][linalg] Cleanup LinalgOp usage in capi.
Replace the uses of deprecated Structured Op Interface methods in Linalg.cpp. This patch is based on https://reviews.llvm.org/D103394.
Differential Revision: https://reviews.llvm.org/D103619
Added:
Modified:
mlir/lib/CAPI/Dialect/Linalg.cpp
Removed:
################################################################################
diff --git a/mlir/lib/CAPI/Dialect/Linalg.cpp b/mlir/lib/CAPI/Dialect/Linalg.cpp
index 21e4e2ce816d5..be0d5448819d9 100644
--- a/mlir/lib/CAPI/Dialect/Linalg.cpp
+++ b/mlir/lib/CAPI/Dialect/Linalg.cpp
@@ -34,8 +34,8 @@ void mlirLinalgFillBuiltinNamedOpRegion(MlirDialect linalgDialect,
SmallVector<Type, 8> argTypes;
auto linalgOp = cast<LinalgOp>(op);
- for (auto t : linalgOp.getShapedOperandTypes())
- argTypes.push_back(getElementTypeOrSelf(t));
+ for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands())
+ argTypes.push_back(getElementTypeOrSelf(opOperand->get().getType()));
ImplicitLocOpBuilder b(op->getLoc(), op->getContext());
Region ®ion = op->getRegion(0);
More information about the Mlir-commits
mailing list