llvm-project/mlir/test/Transforms
Alex Zinenko d4a53f3bfa [mlir] call target materialization more in dialect conversion
During dialect conversion, target materialization is triggered to create
cast-like operations when a type mismatch occurs between the value that
replaces a rewritten operation and the type that another operations expects as
operands processed by the type conversion. First, a dummy cast is inserted to
make sure the pattern application can proceed. The decision to trigger the
user-provided materialization hook is taken later based on the result of the
dummy cast having uses. However, it only has uses if other patterns constructed
new operations using the casted value as operand. If existing (legal)
operations use the replaced value, they may have not been updated to use the
casted value yet. The conversion infra would then delete the dummy cast first,
and then would replace the uses with now-invalid (null in the bast case) value.
When deciding whether to trigger cast materialization, check for liveness the
uses not only of the casted value, but also of all the values that it replaces.

This was discovered in the finalizing bufferize pass that cleans up
mutually-cancelling casts without touching other operations. It is not
impossible that there are other scenarios where the dialect converison infra
could produce invalid operand uses because of dummy casts erased too eagerly.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D119937
2022-02-17 10:13:23 +01:00
..
buffer-hoisting.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
buffer-loop-hoisting.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08: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] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
canonicalize-dce.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
canonicalize-td.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
canonicalize.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
compose-subview.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
constant-fold.mlir [mlir] Split std.splat into tensor.splat and vector.splat 2022-02-02 14:45:12 -08:00
control-flow-sink.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
cse.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
decompose-call-graph-types.mlir
inlining-dce.mlir
inlining-repeated-use.mlir [mlir] Don't inline calls from dead SCCs 2022-01-10 12:07:14 +01:00
inlining.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
location-snapshot.mlir
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] Fix incorrect removal of source loop in loop fusion 2021-11-23 02:54:09 +05:30
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] Fix missing check on nested op values in LICM 2022-01-05 09:31:23 -05: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] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
parallel-loop-collapsing.mlir [MLIR][NFC] Update SCF pass cmd line names to prefix scf 2022-01-31 07:09:30 +05:30
parametric-mapping.mlir
parametric-tiling.mlir [mlir] Move SelectOp from Standard to Arithmetic 2022-02-02 14:45:12 -08: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] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
sccp-callgraph.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
sccp-structured.mlir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
sccp.mlir [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
scf-if-utils.mlir
scf-loop-unroll.mlir Don't fail if unable to promote loops during unrolling 2022-01-10 22:26:21 +00:00
scf-loop-utils.mlir
single-parallel-loop-collapsing.mlir [MLIR][NFC] Update SCF pass cmd line names to prefix scf 2022-01-31 07:09:30 +05:30
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
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
test-legalize-remapped-value.mlir [mlir:DialectConversion] Restructure how argument/target materializations get invoked 2021-10-27 02:09:04 +00:00
test-legalize-target-materialization-no-uses.mlir [mlir] call target materialization more in dialect conversion 2022-02-17 10:13:23 +01:00
test-legalize-type-conversion.mlir [mlir] support recursive types in type conversion infra 2021-11-22 18:16:02 +01:00
test-legalize-unknown-root.mlir
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] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
test-legalizer.mlir [mlir] Avoid folding in OpBuilder::tryFold when types change 2021-11-03 20:35:46 +00:00
test-merge-blocks.mlir [mlir] Drop the leading space when printing regions 2022-01-18 16:52:34 +00: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] Symbol DCE ignores unknown symbols 2022-01-05 20:48:30 +00:00
test-symbol-privatize.mlir [mlir] Add pass to privatize symbols unless excluded. 2022-02-03 20:20:54 -08:00