[mlir] separable registration of operation interfaces
authorAlex Zinenko <zinenko@google.com>
Tue, 15 Jun 2021 13:27:01 +0000 (15:27 +0200)
committerAlex Zinenko <zinenko@google.com>
Thu, 17 Jun 2021 10:00:31 +0000 (12:00 +0200)
commit23cdf7b6ed9781040ef7923372247ce30b250f29
treed5e1017c27d7a163d1a5cd9e874671a99121fc72
parentdcd23d875a7e3750903ca4ec865508544757dd99
[mlir] separable registration of operation interfaces

This is similar to attribute and type interfaces and mostly the same mechanism
(FallbackModel / ExternalModel, ODS generation). There are minor differences in
how the concept-based polymorphism is implemented for operations that are
accounted for by ODS backends, and this essentially adds a test and exposes the
API.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D104294
mlir/docs/Interfaces.md
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/OperationSupport.h
mlir/lib/IR/MLIRContext.cpp
mlir/test/lib/Dialect/Test/TestInterfaces.td
mlir/unittests/IR/InterfaceAttachmentTest.cpp