llvm-project/mlir/test/lib/Dialect/Affine
Uday Bondhugula 7932d21f5d [MLIR] Introduce a new rewrite driver to simplify supplied list of ops
Introduce a new rewrite driver (MultiOpPatternRewriteDriver) to rewrite
a supplied list of ops and other ops. Provide a knob to restrict
rewrites strictly to those ops or also to affected ops (but still not to
completely related ops).

This rewrite driver is commonly needed to run any simplification and
cleanup at the end of a transforms pass or transforms utility in a way
that only simplifies relevant IR. This makes it easy to write test cases
while not performing unrelated whole IR simplification that may
invalidate other state at the caller.

The introduced utility provides more freedom to developers of transforms
and transform utilities to perform focussed and local simplification. In
several cases, it provides greater efficiency as well as more
simplification when compared to repeatedly calling
`applyOpPatternsAndFold`; in other cases, it avoids the need to
undesirably call `applyPatternsAndFoldGreedily` to do unrelated
simplification in a FuncOp.

Update a few transformations that were earlier using
applyOpPatternsAndFold (SimplifyAffineStructures,
affineDataCopyGenerate, a linalg transform).

TODO:
- OpPatternRewriteDriver can be removed as it's a special case of
  MultiOpPatternRewriteDriver, i.e., both can be merged.

Differential Revision: https://reviews.llvm.org/D106232
2021-07-21 20:25:16 +05:30
..
CMakeLists.txt [mlir][NFC] Move passes in test/lib/Transforms/ to a directory that mirrors what they test 2021-05-14 10:28:11 -07:00
TestAffineDataCopy.cpp [MLIR] Introduce a new rewrite driver to simplify supplied list of ops 2021-07-21 20:25:16 +05:30
TestAffineLoopParametricTiling.cpp Migrate MLIR test passes to the new registration API 2021-06-16 23:42:17 +00:00
TestAffineLoopUnswitching.cpp Migrate MLIR test passes to the new registration API 2021-06-16 23:42:17 +00:00
TestLoopPermutation.cpp Migrate MLIR test passes to the new registration API 2021-06-16 23:42:17 +00:00
TestVectorizationUtils.cpp Migrate MLIR test passes to the new registration API 2021-06-16 23:42:17 +00:00