Skip to content

Commit 41f5cee

Browse files
committed
Added TODOs for more canonicalization.
1 parent 5cf9754 commit 41f5cee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flang/lib/Optimizer/Dialect/FIROps.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4700,6 +4700,9 @@ mlir::LogicalResult SimplifyIsContiguousBoxOp::matchAndRewrite(
47004700
return mlir::success();
47014701
}
47024702

4703+
// TODO: support more patterns, e.g. a result of fir.embox without
4704+
// the slice is contiguous. We can add fir::isSimplyContiguous(box)
4705+
// that walks def-use to figure it out.
47034706
return mlir::failure();
47044707
}
47054708

@@ -4736,6 +4739,7 @@ mlir::LogicalResult SimplifyBoxTotalElementsOp::matchAndRewrite(
47364739
return mlir::success();
47374740
}
47384741

4742+
// TODO: support more cases, e.g. !fir.box<!fir.array<10xi32>>.
47394743
return mlir::failure();
47404744
}
47414745

0 commit comments

Comments
 (0)