-
Notifications
You must be signed in to change notification settings - Fork 354
[FIRRTL] FIRParser: parse tagExtract operations #8728
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
base: main
Are you sure you want to change the base?
Conversation
2bacd94
to
1e1a6ce
Compare
// Check argument is an enum-type value. | ||
if (!type_isa<FEnumType>(input.getType())) | ||
return emitError(startTok.getLoc(), | ||
"expected enum-type expression in 'tagExtract', got ") | ||
<< input.getType(); |
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.
Its not clear to me if we should be checking this here or relying on the op verifiers. I think I will remove this check for now.
1e1a6ce
to
970dbec
Compare
if (isLeadingStmt) | ||
return emitError("unexpected tagExtract() as start of statement"); |
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 I need this but its a little unclear. Without it you get a flow checking error.
if (requireFeature(missingSpecFIRVersion, "tagExtract")) | ||
return failure(); |
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.
It would be nice to parse this as a prim op and save some typing, but then you can't check for the spec version.
970dbec
to
d874be1
Compare
Depends on #8724