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] Bypass constant ops referencing symbols in ExportVerilog #5314

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

nandor
Copy link
Contributor

@nandor nandor commented Jun 5, 2023

Fixes an issue with emission when symbols are used with om.

@nandor nandor requested a review from mikeurbach June 5, 2023 18:57
@nandor nandor requested a review from dtzSiFive as a code owner June 5, 2023 18:57
@dtzSiFive
Copy link
Contributor

Nit: This bypasses all constant ops as they may reference symbols (as comment in the code says), it does not "bypass constant ops referencing symbols" as commit message suggests?

Otherwise LGTM (can't speak for OM authoritatively but that's okay 👍)

@nandor nandor merged commit 4eb6fc0 into main Jun 5, 2023
5 checks passed
@nandor nandor deleted the dev/nandor/fix-om branch June 5, 2023 19:44
@@ -5730,6 +5730,9 @@ void SharedEmitterState::gatherFiles(bool separateModules) {
.Case<om::ClassOp>([&](auto op) {
symbolCache.addDefinition(op.getSymNameAttr(), op);
})
.Case<om::ConstantOp>([&](auto op) {
Copy link
Member

Choose a reason for hiding this comment

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

Just wondering, do we create arbitrary OM operations under the top-level operations? I'm not sure it's expected but if so, I think we might want to just accept all OM operations not only limited to constant.

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

4 participants