-
Notifications
You must be signed in to change notification settings - Fork 302
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][FIRParser] Add deprecation warning about printf/when-encoding. #6792
[FIRRTL][FIRParser] Add deprecation warning about printf/when-encoding. #6792
Conversation
If we know what release we plan to remove it, clarifying that would be an improvement. |
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.
LGTM! Love to see the deprecation warning and that you factored the corresponding tests into a separate file that will be easy to delete once we entirely nuke the printf-encoded verif statements.
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.
LGTM!
Marking draft until move off printf-encoded verif is completed. |
{ | ||
// Gather PrintFOps and then process to avoid walking while mutating. | ||
SmallVector<PrintFOp> buffer; | ||
deferredModule.moduleOp.walk( |
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.
This walk seems unnecessary. Should we be collecting printfs during parse in something in the statement parser? I realize this is a pre-existing condition.
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.
Agreed. Inclined to leave as-is for now with plan to phase all of this out soon (and so would rather not thread that through just to remove it).
"module contains ") | ||
<< numVerifPrintfs | ||
<< " printf-encoded verification operation(s), which are deprecated " | ||
"and will be removed in the future"; |
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.
Once per module might be annoying (but do we care since they are going away?) and could be once per circuit.
We might consider having a generic deprecated feature use collector.
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.
Good idea!
Are there other feature we want to deprecate and warn on? Intrinsic modules maybe?
Not sure it's too important to limit the warnings here -- looking forward to dropping all of this "soon", starting with a warning but will promote to an error next, and then we can drop it entirely.
However this is a good idea and I think such a warning infrastructure would be useful generally.
Only warn once per module to keep it from being entirely overwhelming. (and report how many, in terms of printf's, to convey magnitude) Split out when-encoding parser behavior to dedicated file, and look for the deprecation diagnostics in tests that use them.
4353ef7
to
0ffa2ca
Compare
Only warn once per module to keep it from being entirely overwhelming. (and report how many, in terms of printf's, to convey magnitude)
Split out when-encoding parser behavior to dedicated file, and look for the deprecation diagnostics in tests that use them.