HomePhabricator

[mlir] support materialization for 1-1 type conversions

Authored by ftynse on Jun 2 2020, 4:24 AM.

Description

[mlir] support materialization for 1-1 type conversions

Dialect conversion infrastructure supports 1->N type conversions by requiring
individual conversions to provide facilities to generate operations
retrofitting N values into 1 of the original type when N > 1. This
functionality can also be used to materialize explicit "cast"-like operations,
but it did not support 1->1 type conversions until now. Modify TypeConverter to
support materialization of cast operations for 1-1 conversions.

This also makes materialization specification more extensible following the
same pattern as type conversions. Instead of overloading a virtual function,
users or subclasses of TypeConversion can now register type-specific
materialization callbacks that will be called in order for the given type.

Differential Revision: https://reviews.llvm.org/D79729

Details

Committed
ftynseJun 2 2020, 4:48 AM
Differential Revision
D79729: [mlir] support materialization for 1-1 type conversions
Parents
rGbff0c56ff921: [clangd] Copy existing includes in ReplayPreamble
Branches
Unknown
Tags
Unknown