Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OM] Implement OM linker pass #5743

Merged
merged 2 commits into from
Aug 2, 2023
Merged

[OM] Implement OM linker pass #5743

merged 2 commits into from
Aug 2, 2023

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Aug 1, 2023

This implements LinkModulesPass that is a core logic of om-linker. The input IR consists of multiple mlir::ModuleOp that have their own symbol namespaces.

We consider a symbol used as an external module to be "public" thus we cannot rename such symbols when symbols collide. We require a public symbol to have exactly one definition so otherwise raise an error.

This implements LinkModulesPass that is a core logic of `om-linker`.
The input IR consists of multiple mlir::ModuleOp that have their own
symbol namespaces.

We consider a symbol used as an external module to be "public" thus we
cannot rename such symbols when symbols collide. We require a public symbol
to have exactly one definition so otherwise raise an error.
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good in general, just pointing out we may want stricter type checking. Curious what others think.

lib/Dialect/OM/Transforms/LinkModules.cpp Outdated Show resolved Hide resolved
This commit implements a stricter check for class resolution. This commit forbids
linking between classes with different fields.
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the stricter checking, it looks good to me. Just one minor question.

lib/Dialect/OM/Transforms/LinkModules.cpp Show resolved Hide resolved
@uenoku uenoku merged commit 380ed1d into main Aug 2, 2023
5 checks passed
@uenoku uenoku deleted the dev/uenoku/om-linker-pass branch August 2, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants