Skip to content
Commit 0ebb0503 authored by Matthias Gehre's avatar Matthias Gehre
Browse files

[MLIR] [TOSA]: Move reshape(reshape(x)) -> reshape(x) from canonicalization to fold

reshape(reshape(x)) -> reshape(x) can be directly written as a fold instead of a canonicalization,
to help other passes cleanup while they work.

This initially broke ReshapeConverterExpand/Collapse, which relies on creating foldable reshapes and a carefully crafted
benefit priority of patterns.
I turned this into a single pattern on reshapes, which does expand and/or collapse as needed in one go.

Differential Revision: https://reviews.llvm.org/D155266
parent fdf36c3d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment