-
Notifications
You must be signed in to change notification settings - Fork 341
[OM] Add field_locs array attribute for ClassFieldsOp locations #8439
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, just a couple minor things from my end. I guess one question is if this should go on the ClassOp (like we do for HWModuleOp) or on the ClassFieldsOp. I don't have any particularly strong reason to go one way or another. Keeping it on ClassFieldsOp like this PR does seems reasonable, since existing code expects to get field locations from the ClassFieldsOp.
Also please update the description / commit message (really, the commit message when this merges), to explain why we want to make this change. |
Re: putting this in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more minor comments. I think this would be fine to go in now, but a couple minor niceties that could help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
This changes the
ClassFieldsOp
logic to use an inherent attribute to store an array mapping field to location by index. This avoids the issue whereFusedLoc
merges non-unique locations (preventing us from retrieving a fields location by mapping it to an index). It also avoids an issue wheremetadata
is removed from theFusedLoc
that was previously being used to store this information.