This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Enable delayed registration of attribute/operation/type interfaces
ClosedPublic

Authored by ftynse on Jun 16 2021, 9:56 AM.

Details

Summary

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.

Diff Detail

Event Timeline

ftynse created this revision.Jun 16 2021, 9:56 AM
ftynse requested review of this revision.Jun 16 2021, 9:56 AM
rriddle accepted this revision.Jun 17 2021, 1:59 AM
rriddle added inline comments.
mlir/include/mlir/IR/Dialect.h
373–378

Could we just have attachInterface ignore duplicates?

415–419

Same here.

mlir/unittests/IR/InterfaceAttachmentTest.cpp
342

typo: expceted

This revision is now accepted and ready to land.Jun 17 2021, 1:59 AM
ftynse updated this revision to Diff 352673.Jun 17 2021, 4:18 AM
ftynse marked 2 inline comments as done.

Address review

This revision was landed with ongoing or failed builds.Jun 17 2021, 4:19 AM
This revision was automatically updated to reflect the committed changes.

Hi @ftynse ,

It looks like this change is causing all our Flang BuildBot workers to fail :( You can take a look here:

Would you be able to either fix or revert? Thank you!

awarzynski added inline comments.Jun 17 2021, 5:58 AM
mlir/include/mlir/Support/InterfaceSupport.h
241

I think that you are missing DEBUG_TYPE in this file: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/Debug.h#L15

LLVM_DEBUG() requires the DEBUG_TYPE macro to be defined

Hi @ftynse ,

It looks like this change is causing all our Flang BuildBot workers to fail :( You can take a look here:

Would you be able to either fix or revert? Thank you!

This was fixed forward.