This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Refactor handling of dialect libraries
ClosedPublic

Authored by stephenneuendorffer on Feb 26 2020, 5:01 PM.

Details

Summary

Instead of creating extra libraries we don't really need, collect a
list of all dialects and use that instead.

Diff Detail

Event Timeline

mehdi_amini added inline comments.Feb 27 2020, 8:23 PM
mlir/cmake/modules/AddMLIR.cmake
56

Did you need to separate the add_mlir_dialect from add_mlir_dialect_library because some of them don't use add_mlir_dialect / don't have an entry in the include directory? Otherwise why not setting the MLIR_DIALECT_LIBS property in the add_mlir_dialect function?

stephenneuendorffer marked an inline comment as done.Feb 27 2020, 8:47 PM
stephenneuendorffer added inline comments.
mlir/cmake/modules/AddMLIR.cmake
56

It does seem odd at first sight, but in the current scheme, there are multiple libraries for some dialects, so it's not a 1:1 relationship.. Even if there was a 1:1 relationship it seems odd to me that a declaration about a library shows up in the include directory. This way is consistent with the corresponding change for Conversions, and I think a similar scheme could be done for Transforms.

mehdi_amini accepted this revision.Feb 27 2020, 10:28 PM
This revision is now accepted and ready to land.Feb 27 2020, 10:28 PM
This revision was automatically updated to reflect the committed changes.