HomePhabricator

[mlir] DialectConversion: remove vtable from TypeConverter

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

Description

[mlir] DialectConversion: remove vtable from TypeConverter

The original design of TypeConverter expected specific converters to derive the
class and override virtual functions for conversions and materializations. This
did not scale well to multi-dialect conversions, so the design was changed to
register a list of converter and materializer functions, removing the need for
virtual functions. The only remaining virtual function, convertSignatureArg
is never overridden in-tree. Make it non-virtual, drop the virtual destructor
and thus remove vtable from TypeConverter.

If there exist TypeConverter users that need custom convertSignatureArg
behavior, it should be implemented using the callback registration mechanism
similar to that of conversions and materializations.

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