-
Notifications
You must be signed in to change notification settings - Fork 177
Modify and optimize performance of propagate annotations #2393
Conversation
So this means that |
That is correct. I personally find them annoying when debugging but I grant others may disagree. Adding them back under |
What would make sense is to have special handling for |
It was nothing but pointless copying.
There was lots of expensive logic for very little benefit.
531cd33
to
11416c8
Compare
I've revived this PR, it should be passing tests now. I know this is a bit of a change, but I think it's worth including in 1.5.0-RC2 and then if people have issues with it we can either revert or add an option to include the old |
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
I was never a fan of the "DeletedAnnotation". Seemed like a memory leak to me.
Lets go for it. We can revert or fix later if it's an issue |
I believe this PR has exposed a previously hidden bug, you can see it manifest in the chisel3 integration tests: https://github.com/chipsalliance/chisel3/runs/4563876893?check_suite_focus=true It also manifests in chiseltest's own tests... I'm looking into it. |
This is basically just deletes all of the logic we had determining which annotations were added or deleted between transforms. This does not change any Scala APIs, but it very much changes what sorts of DeletedAnnotations are created. The deleted behavior could be useful for debugging and technically could be relied upon someone, but my hunch is that no one cares and we're harming performance and burning carbon for nothing. If it turns out someone relies on this, I think we should add it back under some sort of "debug" annotation.
This change only really affects annotation-heavy flows. I found that with small designs with moderate numbers of annotations, it improves performance ~2-7%. For large designs with tons of annotations however, it improved performance by 34% (15m45 -> 10m20s)
This is a bit aggressive, but I think it's worth it.
Contributor Checklist
Type of Improvement
API Impact
Annotations that are deleted between transforms are no longer automatically captured as
DeletedAnnotations
Backend Code Generation Impact
No direct impact
Desired Merge Strategy
Release Notes
When a transform deletes an
Annotation
, aDeletedAnnotation
is no longer created. Furthermore, debug-mode logging no longer captures any information about annotation changes between transforms. If any of this behavior is desired, please file an issue to restore it under a debug flag.Reviewer Checklist (only modified by reviewer)
Please Merge
?