-
Notifications
You must be signed in to change notification settings - Fork 298
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
[FIRRTL] Verify OpenAggs, fix agg-of-properties. #5508
Conversation
Enforce general requirement that all elements of something implementing FieldIDTypeInterface must also support that interface. This is true for FIRRTLBaseType, but not necessarily true for all FIRRTLType's. Test using Property types which don't implement this. Fixes llvm#5494.
Per reviewer feedback, thanks!
// We require that elements of aggregates themselves | ||
// support notion of FieldID, reject if the type does not. | ||
if (!isa<hw::FieldIDTypeInterface>(type)) | ||
return emitError(loc, "bundle elements must support fieldID's, " |
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.
I don't think the user is going to understand fieldIDs, maybe just leave it at "type 'blah' cannot be used as a field in a bundle"?
(side thought, It would be nice if we could render the type in FIRRTL-syntax, hey)
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.
You're totally right, I'll tighten this up, thank you!
(And 100% would be great to be able to render as FIRRTL!
That could be shared with the FIRRTL exporter, maybe, too?)
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.
nice
Per reviewer feedback, thank you very much!
Add verifiers for both MLIR and FIR + tests.
Fixes #5494 .