This is an archive of the discontinued LLVM Phabricator instance.

Add `mlirModuleFromOperation` to C API
ClosedPublic

Authored by apaszke on May 14 2021, 6:51 AM.

Details

Summary

At the moment MlirModules can be converted to MlirOperations, but not
the other way around (at least not without going around the C API). This
makes it impossible to e.g. run passes over a ModuleOp created through
mlirOperationCreate.

Diff Detail

Event Timeline

apaszke created this revision.May 14 2021, 6:51 AM
apaszke requested review of this revision.May 14 2021, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2021, 6:51 AM

Can you add a C unit-test with this?

This revision is now accepted and ready to land.May 14 2021, 10:06 AM
apaszke updated this revision to Diff 345480.May 14 2021, 10:08 AM

Added tests, as requested

This revision was automatically updated to reflect the committed changes.