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
[RTL] Adding struct, union, and enum types to the RTL dialect #124
Conversation
Waiting on #117 to compile and run successfully. |
4170019
to
37feea7
Compare
Testing the clang-tidy fix on the PR in which I discovered the bug.
clang-tidy-diff aparantly only looks for the build database if there are revelant changes in the diff.
{exInt, i1}, | ||
{exFP, f32} | ||
> | ||
!exStruct2 = type !rtl.struct<{sint2, si2}, {float1, f32}> |
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.
Should the field names be quoted?
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.
Personally, I prefer no quotes, and parsing them with parseKeyword
. That does preclude some strings, but IMO those strings would not make readable field names. Perhaps there is a need for the names to be machine-generated where it would be better to quote it?
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 guess we're still discussing this at a higher level, but left some comments aside from the general usefulness of having these types in this dialect.
static Type parseFieldInfoType(MLIRContext *ctxt, DialectAsmParser &parser) { | ||
SmallVector<FieldInfo, 4> parameters; | ||
if (parser.parseLess()) | ||
return ::mlir::Type(); |
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 we need the ::mlir::
prefix since we're using namespace mlir
{exInt, i1}, | ||
{exFP, f32} | ||
> | ||
!exStruct2 = type !rtl.struct<{sint2, si2}, {float1, f32}> |
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.
Personally, I prefer no quotes, and parsing them with parseKeyword
. That does preclude some strings, but IMO those strings would not make readable field names. Perhaps there is a need for the names to be machine-generated where it would be better to quote it?
No description provided.