[all-commits] [llvm/llvm-project] 6163fa: [mlir] DialectConversion: remove vtable from TypeC...

ftynse via All-commits all-commits at lists.llvm.org
Wed Jun 3 06:31:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6163fa79268dcdcb7131d2b2f28d49a2c574f29a
      https://github.com/llvm/llvm-project/commit/6163fa79268dcdcb7131d2b2f28d49a2c574f29a
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list