llvm-project/mlir/test/Transforms
Vladislav Vinogradov ec03bbe8a7 [mlir] Fix bug in partial dialect conversion
The discussion on forum:
https://llvm.discourse.group/t/bug-in-partial-dialect-conversion/4115

The `applyPartialConversion` didn't handle the operations, that were
marked as illegal inside dynamic legality callback.
Instead of reporting error, if such operation was not converted to legal set,
the method just added it to `unconvertedSet` in the same way as unknown operations.

This patch fixes that and handle dynamically illegal operations as well.

The patch includes 2 fixes for existing passes:

* `tensor-bufferize` - explicitly mark `std.return` as legal.
* `convert-parallel-loops-to-gpu` - ugly fix with marking visited operations
  to avoid recursive legality checks.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D108505
2021-09-20 10:39:10 +03:00
..
buffer-deallocation.mlir [MLIR][NFC] Minor cleanup for BufferDeallocation pass. 2021-07-20 09:43:22 -07:00
buffer-hoisting.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
buffer-loop-hoisting.mlir [mlir] Support buffer hoisting on allocas 2021-05-25 14:50:01 +02:00
buffer-results-to-out-params.mlir [MLIR] Use memref.copy ops in BufferResultsToOutParams pass. 2021-09-15 02:59:30 +00:00
canonicalize-block-merge.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
canonicalize-dce.mlir Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00:00
canonicalize-td.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
canonicalize.mlir Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00:00
compose-subview.mlir Add a pattern to combine composed subview ops 2021-04-01 10:56:57 -07:00
constant-fold.mlir Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00:00
cse.mlir Add a new interface allowing to set a default dialect to be used for printing/parsing regions 2021-08-31 17:52:40 +00: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] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01: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 Add hook for dialect specializing processing blocks post inlining calls 2021-06-16 12:53:21 -07: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] Add loop coalesce utility for affine.for 2021-09-08 18:02:23 +05:30
loop-fusion-2.mlir [MLIR][Affine] Simplify nested modulo operations when able 2021-09-17 19:06:00 +00:00
loop-fusion-3.mlir [NFC][MLIR] Split large fusion test file into 4 test files 2021-08-03 20:08:33 +03:00
loop-fusion-4.mlir [NFC][MLIR] Split large fusion test file into 4 test files 2021-08-03 20:08:33 +03:00
loop-fusion-dependence-check.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
loop-fusion-slice-computation.mlir [MLIR][Affine] Add utility to check if the slice is valid 2021-04-01 14:52:22 +05:30
loop-fusion-transformation.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
loop-fusion.mlir [MLIR][Affine] Simplify nested modulo operations when able 2021-09-17 19:06:00 +00:00
loop-invariant-code-motion.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
memref-bound-check.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
memref-dependence-check.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
normalize-memrefs-ops-dynamic.mlir [mlir] Normalize dynamic memrefs with a map of tiled-layout. 2021-05-24 08:39:36 +05:30
normalize-memrefs-ops.mlir [mlir] Support normalizing memrefs with MemRef_ReinterpretCastOp 2021-08-11 01:15:18 +05:30
normalize-memrefs.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
parallel-loop-collapsing.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
parametric-mapping.mlir [mlir] Use affine.apply when distributing to processors 2021-03-09 08:37:20 -05:00
parametric-tiling.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
pipeline-data-transfer.mlir [mlir][tensor] Add tensor.dim operation 2021-07-01 10:00:19 +09:00
print-op-graph.mlir [mlir] Support drawing control-flow graphs in ViewOpGraph.cpp 2021-08-04 20:45:15 +09:00
promote-buffers-to-stack.mlir [MLIR] Create memref dialect and move dialect-specific ops from std. 2021-03-15 11:14:09 +01:00
sccp-callgraph.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
sccp-structured.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
sccp.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00: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 [Canonicalize] Switch the default setting to "top down". 2021-05-25 13:42:11 -07:00
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] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
strip-debuginfo.mlir [mlir] Make StripDebugInfo strip out block arguments locs 2021-05-26 11:05:38 -07:00
test-canonicalize-filter.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
test-canonicalize.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +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
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
test-legalize-type-conversion.mlir [IR] Add a Location to BlockArgument 2021-05-23 14:10:00 -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 [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00
test-legalizer-full.mlir [mlir] Fix bug in partial dialect conversion 2021-09-20 10:39:10 +03:00
test-legalizer.mlir [mlir] Fix bug in partial dialect conversion 2021-09-20 10:39:10 +03: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][FoldUtils] Ensure the created constant dominates the replaced op 2021-08-23 18:48:24 +00: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] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00