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.
can we hoist this out in a separate static function ?