[Mlir-commits] [mlir] [mlir][memref] Add a `ViewOp::getMixedSizes` (PR #176561)

Jakub Kuderski llvmlistbot at llvm.org
Sat Jan 17 07:33:27 PST 2026


================
@@ -1107,12 +1107,14 @@ Value EmptyOp::getDynamicSize(unsigned idx) {
 SmallVector<OpFoldResult> EmptyOp::getMixedSizes() {
   SmallVector<OpFoldResult> result;
   unsigned ctr = 0;
-  OpBuilder b(getContext());
-  for (int64_t i = 0; i < getType().getRank(); ++i) {
-    if (getType().isDynamicDim(i)) {
+  Builder b(getContext());
+  RankedTensorType type = getType();
+  auto shape = type.getShape();
----------------
kuhar wrote:

nit: spell out the type

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


More information about the Mlir-commits mailing list