Sean Silva 57b338c08a [mlir][shape] Split out structural type conversions for shape dialect.
A "structural" type conversion is one where the underlying ops are
completely agnostic to the actual types involved and simply need to update
their types. An example of this is shape.assuming -- the shape.assuming op
and the corresponding shape.assuming_yield op need to update their types
accordingly to the TypeConverter, but otherwise don't care what type
conversions are happening.

Also, the previous conversion code would not correctly materialize
conversions for the shape.assuming_yield op. This should have caused a
verification failure, but shape.assuming's verifier wasn't calling
RegionBranchOpInterface::verifyTypes (which for reasons can't be called
automatically as part of the trait verification, and requires being
called manually). This patch also adds that verification.

Differential Revision: https://reviews.llvm.org/D89833
2020-10-21 11:58:27 -07:00

22 lines
403 B
CMake

add_mlir_dialect_library(MLIRShapeOpsTransforms
Bufferize.cpp
RemoveShapeConstraints.cpp
ShapeToShapeLowering.cpp
StructuralTypeConversions.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/ShapeOps/Transforms
DEPENDS
MLIRShapeTransformsIncGen
)
target_link_libraries(MLIRShapeOpsTransforms
PUBLIC
MLIRIR
MLIRPass
MLIRShape
MLIRSupport
MLIRTransforms
)