This is an archive of the discontinued LLVM Phabricator instance.

[mlir][IR][NFC] Move CastOpInterface helpers to mlir/Interfaces
ClosedPublic

Authored by springerm on Mar 27 2023, 8:06 AM.

Details

Summary

These helpers should not be part of the IR build unit.

The interface is now implemented on builtin.unrealized_conversion_cast with an external model.

Also rename the CastOpInterfaces Bazel target name to CastInterfaces to be consistent with the CMake target name.

Diff Detail

Event Timeline

springerm created this revision.Mar 27 2023, 8:06 AM
springerm requested review of this revision.Mar 27 2023, 8:06 AM
springerm edited the summary of this revision. (Show Details)Jun 1 2023, 4:47 AM
nicolasvasilache accepted this revision.Jun 1 2023, 6:10 AM
springerm edited the summary of this revision. (Show Details)Jun 1 2023, 6:46 AM
springerm added inline comments.Jun 1 2023, 7:03 AM
mlir/include/mlir/Interfaces/CastInterfaces.h
31

Note: This registers the unrealized_conversion_cast external model. Such functions are usually located in the build target of the respective dialect, but there is no separate build target for the "builtin" dialect.

jpienaar accepted this revision.Jun 1 2023, 6:42 PM

Looks good, thanks!

This revision is now accepted and ready to land.Jun 1 2023, 6:42 PM