Commit bcfdb3e4 authored by Matthias Springer's avatar Matthias Springer
Browse files

[mlir][transform] Add apply_conversion_patterns op

This transform op applies a dialect conversion to the targeted ops. Its design is similar to `apply_patterns`.

Patterns are specified in the first region of `apply_conversion_patterns`. They must implement the `ConversionPatternDescriptorOpInterface`. Regular rewrite patterns and dialect conversion patterns should not be mixed, so the interface is separate from the `PatternDescriptorOpInterface`.

The type converter is specified as the single op of the second region. It is optional; if no type converter is specified, it is expected that pattern descriptors provide their own type converters. If both the pattern descriptors and the `apply_conversion_patterns` op specify a type converter, the type converter of the pattern descriptor is used.

Differential Revision: https://reviews.llvm.org/D157109
parent 7a4b12e3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment