llvm-project/mlir/test/Transforms
Diego Caballero c8fc5c0385 [mlir][Affine] Add support for multi-store producer fusion
This patch adds support for producer-consumer fusion scenarios with
multiple producer stores to the AffineLoopFusion pass. The patch
introduces some changes to the producer-consumer algorithm, including:

* For a given consumer loop, producer-consumer fusion iterates over its
producer candidates until a fixed point is reached.

* Producer candidates are gathered beforehand for each iteration of the
consumer loop and visited in reverse program order (not strictly guaranteed)
to maximize the number of loops fused per iteration.

In general, these changes were needed to simplify the multi-store producer
support and remove some of the workarounds that were introduced in the past
to support more fusion cases under the single-store producer limitation.

This patch also preserves the existing functionality of AffineLoopFusion with
one minor change in behavior. Producer-consumer fusion didn't fuse scenarios
with escaping memrefs and multiple outgoing edges (from a single store).
Multi-store producer scenarios will usually (always?) have multiple outgoing
edges so we couldn't fuse any with escaping memrefs, which would greatly limit
the applicability of this new feature. Therefore, the patch enables fusion for
these scenarios. Please, see modified tests for specific details.

Reviewed By: andydavis1, bondhugula

Differential Revision: https://reviews.llvm.org/D92876
2021-01-25 20:31:17 +02:00
..
buffer-deallocation.mlir Added check if there are regions that do not implement the RegionBranchOpInterface. 2021-01-20 12:15:28 +01:00
buffer-hoisting.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
buffer-loop-hoisting.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
buffer-results-to-out-params.mlir [MLIR] Extend Symbol verification to reject public symbol declarations. 2020-11-16 16:05:32 -08:00
canonicalize-block-merge.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
canonicalize-dce.mlir Enable FileCheck -enable-var-scope by default in MLIR test 2020-06-12 00:43:09 +00:00
canonicalize.mlir [mlir][splitting std] move 2 more ops to `tensor` 2021-01-19 13:49:25 -08:00
constant-fold.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
copy-removal.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
cse.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
decompose-call-graph-types.mlir [MLIR] Extend Symbol verification to reject public symbol declarations. 2020-11-16 16:05:32 -08:00
finalizing-bufferize.mlir [mlir] Small cleanups to func-bufferize/finalizing-bufferize 2020-11-30 17:04:14 -08:00
inlining-dce.mlir [MLIR] Change FuncOp assembly syntax to print visibility inline instead of in attrib dict. 2020-11-09 11:08:08 -08:00
inlining.mlir [mlir][Inliner] Refactor the inliner to use nested pass pipelines instead of just canonicalization 2020-12-14 18:09:47 -08:00
location-snapshot.mlir [mlir][Asm] Add support for using an alias for trailing operation locations 2020-11-09 21:54:47 -08:00
loop-coalescing.mlir [mlir] Change dialect namespace loop->scf 2020-05-13 19:20:21 +02:00
loop-fusion-dependence-check.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
loop-fusion-slice-computation.mlir [mlir] Change dialect namespace loop->scf 2020-05-13 19:20:21 +02:00
loop-fusion-transformation.mlir [MLIR] Give AffineStoreOp and AffineLoadOp Memory SideEffects. 2020-04-28 15:45:25 +02:00
loop-fusion.mlir [mlir][Affine] Add support for multi-store producer fusion 2021-01-25 20:31:17 +02:00
loop-invariant-code-motion.mlir [mlir][AsmPrinter] Refactor printing to only print aliases for attributes/types that will exist in the output. 2020-11-09 21:54:47 -08:00
memref-bound-check.mlir [MLIR] Fix memref region compute for 0-d memref accesses 2020-06-16 13:59:53 +05:30
memref-dataflow-opt.mlir [MLIR] Vector store to load forwarding 2020-07-28 11:30:54 -07:00
memref-dependence-check.mlir [MLIR] Fixed missing constraint append when adding an AffineIfOp domain 2020-08-28 00:34:23 +05:30
normalize-memrefs-ops.mlir [mlir] NFC: fix trivial typos 2021-01-07 02:36:02 +09:00
normalize-memrefs.mlir [MLIR] Extend Symbol verification to reject public symbol declarations. 2020-11-16 16:05:32 -08:00
parallel-loop-collapsing.mlir [mlir] fix off-by-one error in collapseParallelLoops 2020-06-26 15:39:46 +02:00
parametric-mapping.mlir [mlir] Change dialect namespace loop->scf 2020-05-13 19:20:21 +02:00
parametric-tiling.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
pipeline-data-transfer.mlir Enable FileCheck -enable-var-scope by default in MLIR test 2020-06-12 00:43:09 +00:00
promote-buffers-to-stack.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
sccp-callgraph.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
sccp-structured.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
sccp.mlir [mlir][OpFormatGen] Format enum attribute cases as keywords when possible 2021-01-14 11:35:49 -08:00
scf-if-utils.mlir [mlir][SCF] Add utility to outline the then and else branches of an scf.IfOp 2020-08-07 14:49:49 -04:00
scf-loop-unroll.mlir [mlir][scf] Fix a bug in scf::ForOp loop unroll with an epilogue 2020-10-10 14:18:25 +05:30
scf-loop-utils.mlir [mlir][SCF] Add utility to outline the then and else branches of an scf.IfOp 2020-08-07 14:49:49 -04:00
single-parallel-loop-collapsing.mlir [mlir] fix off-by-one error in collapseParallelLoops 2020-06-26 15:39:46 +02:00
strip-debuginfo.mlir [mlir][Asm] Add support for using an alias for trailing operation locations 2020-11-09 21:54:47 -08:00
test-canonicalize.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
test-convert-call-op.mlir [mlir] replace LLVMIntegerType with built-in integer type 2021-01-07 19:48:31 +01:00
test-inlining.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
test-legalize-erased-op-with-uses.mlir [mlir][DialectConversion] Emit an error if an operation marked as erased has live users after conversion 2020-07-14 13:06:08 -07:00
test-legalize-remapped-value.mlir Add getRemappedValue to ConversionPatternRewriter 2019-11-19 11:09:39 -08:00
test-legalize-type-conversion.mlir [mlir][DialectConversion] Enable deeper integration of type conversions 2020-07-23 19:40:31 -07:00
test-legalize-unknown-root.mlir [mlir] Allow for patterns to match any root kind. 2020-06-18 13:58:47 -07:00
test-legalizer-analysis.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
test-legalizer-full.mlir Fix rollback of first block erasure in a region. 2020-11-19 21:24:10 +01:00
test-legalizer.mlir [mlir][DialectConversion] Do not prematurely drop unused cast operations 2020-11-26 17:39:14 +01:00
test-merge-blocks.mlir [mlir] NFC: fix trivial typo under test and tools 2020-08-27 15:37:42 +09:00
test-operation-folder.mlir [mlir] Add a test for OperationFolder 2020-05-07 12:39:24 +02:00
test-pattern-selective-replacement.mlir [mlir][PatternRewriter] Add a new hook to selectively replace uses of an operation 2021-01-14 11:58:21 -08:00
test-symbol-dce.mlir [MLIR] Extend Symbol verification to reject public symbol declarations. 2020-11-16 16:05:32 -08:00