Transforms/ should only contain transformations that are dialect-independent and
this pass interacts with MemRef operations (making it a better fit for living in that
dialect).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This will make MLIRMemrefTransforms depend on MLIRAffine -- although the library already depends on it, that's a spurious one and can be removed. (I'll clean it up.) Looks like the test cases haven't been moved:
test/Transforms/normalize-memrefs-ops-dynamic.mlir:// RUN: mlir-opt -normalize-memrefs %s -split-input-file| FileCheck %s test/Transforms/normalize-memrefs-ops.mlir:// RUN: mlir-opt -normalize-memrefs %s | FileCheck %s test/Transforms/normalize-memrefs.mlir:// RUN: mlir-opt -normalize-memrefs -allow-unregistered-dialect %s | FileCheck %s
This pass should perhaps move to AffineTransforms or to a new directory meant for cross-dialect transformations where there isn't a natural layering relationship between the involved dialects. MemRefTransforms should not depend on Affine. NormalizeMemRefs creates affine.apply ops and so will depend on the Affine dialect.
Comment Actions
Looks like FoldSubViewOps.cpp and ResolveShapedTypeResultDims.cpp would depend on the Affine dialect - so this move should be fine.