[mlir] Enable delayed registration of attribute/operation/type interfaces
authorAlex Zinenko <zinenko@google.com>
Wed, 16 Jun 2021 16:53:21 +0000 (18:53 +0200)
committerAlex Zinenko <zinenko@google.com>
Thu, 17 Jun 2021 11:19:24 +0000 (13:19 +0200)
commitd7e891213444e2990397c623fb0250a470421fce
treede982e15958ac4e20ac444be93b9b4e50fa94f6c
parentccc0f777f6967c557ba066070f40e5fac9e0127d
[mlir] Enable delayed registration of attribute/operation/type interfaces

This functionality is similar to delayed registration of dialect interfaces. It
allows external interface models to be registered before the dialect containing
the attribute/operation/type interface is loaded, or even before the context is
created.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D104397
mlir/include/mlir/IR/AttributeSupport.h
mlir/include/mlir/IR/Dialect.h
mlir/include/mlir/IR/TypeSupport.h
mlir/include/mlir/Support/InterfaceSupport.h
mlir/lib/IR/Dialect.cpp
mlir/lib/IR/MLIRContext.cpp
mlir/unittests/IR/InterfaceAttachmentTest.cpp