forked from OSchip/llvm-project
015192c634
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 |
||
---|---|---|
.. | ||
buffer-deallocation.mlir | ||
buffer-hoisting.mlir | ||
buffer-loop-hoisting.mlir | ||
buffer-results-to-out-params.mlir | ||
canonicalize-block-merge.mlir | ||
canonicalize-dce.mlir | ||
canonicalize-td.mlir | ||
canonicalize.mlir | ||
compose-subview.mlir | ||
constant-fold.mlir | ||
cse.mlir | ||
decompose-call-graph-types.mlir | ||
finalizing-bufferize.mlir | ||
inlining-dce.mlir | ||
inlining.mlir | ||
location-snapshot.mlir | ||
loop-coalescing.mlir | ||
loop-fusion-2.mlir | ||
loop-fusion-3.mlir | ||
loop-fusion-4.mlir | ||
loop-fusion-dependence-check.mlir | ||
loop-fusion-slice-computation.mlir | ||
loop-fusion-transformation.mlir | ||
loop-fusion.mlir | ||
loop-invariant-code-motion.mlir | ||
memref-bound-check.mlir | ||
memref-dependence-check.mlir | ||
normalize-memrefs-ops-dynamic.mlir | ||
normalize-memrefs-ops.mlir | ||
normalize-memrefs.mlir | ||
parallel-loop-collapsing.mlir | ||
parametric-mapping.mlir | ||
parametric-tiling.mlir | ||
pipeline-data-transfer.mlir | ||
print-op-graph.mlir | ||
promote-buffers-to-stack.mlir | ||
sccp-callgraph.mlir | ||
sccp-structured.mlir | ||
sccp.mlir | ||
scf-if-utils.mlir | ||
scf-loop-unroll.mlir | ||
scf-loop-utils.mlir | ||
single-parallel-loop-collapsing.mlir | ||
strip-debuginfo.mlir | ||
test-canonicalize-filter.mlir | ||
test-canonicalize.mlir | ||
test-convert-call-op.mlir | ||
test-inlining.mlir | ||
test-legalize-erased-op-with-uses.mlir | ||
test-legalize-remapped-value.mlir | ||
test-legalize-type-conversion.mlir | ||
test-legalize-unknown-root.mlir | ||
test-legalizer-analysis.mlir | ||
test-legalizer-full.mlir | ||
test-legalizer.mlir | ||
test-merge-blocks.mlir | ||
test-operation-folder.mlir | ||
test-pattern-selective-replacement.mlir | ||
test-symbol-dce.mlir |