llvm-project/mlir/test/Transforms
River Riddle 015192c634 [mlir:DialectConversion] Restructure how argument/target materializations get invoked
The current implementation invokes materializations
whenever an input operand does not have a mapping for the
desired type, i.e. it requires materialization at the earliest possible
point. This conflicts with goal of dialect conversion (and also the
current documentation) which states that a materialization is only
required if the materialization is supposed to persist after the
conversion process has finished.

This revision refactors this such that whenever a target
materialization "might" be necessary, we insert an
unrealized_conversion_cast to act as a temporary materialization.
This allows for deferring the invocation of the user
materialization hooks until the end of the conversion process,
where we actually have a better sense if it's actually
necessary. This has several benefits:

* In some cases a target materialization hook is no longer
   necessary
When performing a full conversion, there are some situations
where a temporary materialization is necessary. Moving forward,
these users won't need to provide any target materializations,
as the temporary materializations do not require the user to
provide materialization hooks.

* getRemappedValue can now handle values that haven't been
   converted yet
Before this commit, it wasn't well supported to get the remapped
value of a value that hadn't been converted yet (making it
difficult/impossible to convert multiple operations in many
situations). This commit updates getRemappedValue to properly
handle this case by inserting temporary materializations when
necessary.

Another code-health related benefit is that with this change we
can move a majority of the complexity related to materializations
to the end of the conversion process, instead of handling adhoc
while conversion is happening.

Differential Revision: https://reviews.llvm.org/D111620
2021-10-27 02:09:04 +00:00
..
buffer-deallocation.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
buffer-hoisting.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
buffer-loop-hoisting.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00: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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
canonicalize-dce.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
canonicalize-td.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
canonicalize.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
compose-subview.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
constant-fold.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
cse.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +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 [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00: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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-2.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-3.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-4.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-dependence-check.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-slice-computation.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion-transformation.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-fusion.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop-invariant-code-motion.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
memref-bound-check.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
memref-dependence-check.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
normalize-memrefs-ops-dynamic.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
normalize-memrefs-ops.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
normalize-memrefs.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
parallel-loop-collapsing.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
pipeline-data-transfer.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
print-op-graph.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
promote-buffers-to-stack.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
sccp-callgraph.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
sccp-structured.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
sccp.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +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 [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00: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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
strip-debuginfo.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00: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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +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 [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +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 [mlir:DialectConversion] Restructure how argument/target materializations get invoked 2021-10-27 02:09:04 +00:00
test-legalize-type-conversion.mlir [mlir:DialectConversion] Restructure how argument/target materializations get invoked 2021-10-27 02:09:04 +00: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:DialectConversion] Restructure how argument/target materializations get invoked 2021-10-27 02:09:04 +00: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] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
test-pattern-selective-replacement.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
test-symbol-dce.mlir [mlir] Set the namespace of the BuiltinDialect to 'builtin' 2021-07-28 21:00:10 +00:00