The SimplifyExtractStridedMetadata pass features a pattern that forward statically known information (offset, sizes, strides) to their respective users.
This patch moves this pattern from this pass to the extract_strided_metadata folding patterns.
Paths
| Differential D135797
[mlir][MemRef] Move the forwarding patterns for `extract_strided_metadata` ClosedPublic Authored by qcolombet on Oct 12 2022, 10:49 AM.
Details Summary The SimplifyExtractStridedMetadata pass features a pattern that forward statically known information (offset, sizes, strides) to their respective users. This patch moves this pattern from this pass to the extract_strided_metadata folding patterns.
Diff Detail
Event Timelineqcolombet added a child revision: D135839: [mlir][MemRef] Change the anchor point of a subview pattern.Oct 12 2022, 6:05 PM This revision is now accepted and ready to land.Oct 13 2022, 3:01 AM This revision was landed with ongoing or failed builds.Oct 18 2022, 3:35 PM Closed by commit rG98c529652af4: [mlir][MemRef] Move the forwarding patterns for `extract_strided_metadata` (authored by qcolombet). · Explain Why This revision was automatically updated to reflect the committed changes. Hardcode84 added inline comments.
qcolombet added inline comments.
Revision Contents
Diff 468723 mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
mlir/lib/Dialect/MemRef/Transforms/SimplifyExtractStridedMetadata.cpp
mlir/test/Dialect/MemRef/canonicalize.mlir
mlir/test/Dialect/MemRef/simplify-extract-strided-metadata.mlir
|
Here replaceConstantUsesOf creates new ops and replaces uses of op being folded. Is this even legal to do this from the folder? How it will interoperate with greedy rewriter which has no way to know new ops were created or uses were changed?
This should probably be an canonicalization pattern and not folder.