Skip to content

Conversation

jackkoenig
Copy link
Contributor

@jackkoenig jackkoenig commented Jan 24, 2025

Now depends on #4717.

Because views may not map 1-1 to FIRRTL targets and that annotations are so heavily exposed to the user (esp. via Stage/Phase), we have to generate a RenameMap for any views that are annotated. Previously, we couldn't know what views might be annotated (the .toTarget call is after Chisel elaboration) so we had to conservatively generate a RenameMap for all views that don't map 1-1. This is ludicriously expensive.

With #4643, we now require that annotations report what Data will be annotated up front, so now we only need to rename views that are actually annotated. Much more elegant and efficient at the cost of a minor API change.

I guess technically we shouldn't merge this until the deprecated APIs are removed... 🙈

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Performance improvement

Desired Merge Strategy

  • Squash

Release Notes

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you do one of the following when ready to merge:
    • Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@jackkoenig jackkoenig added the Performance Improves performance, will be included in release notes label Jan 24, 2025
@jackkoenig jackkoenig added this to the 7.0 milestone Jan 24, 2025
@jackkoenig jackkoenig marked this pull request as draft January 24, 2025 23:17
@jackkoenig jackkoenig force-pushed the selective-view-renaming branch from a2ecbb1 to 473fe35 Compare January 25, 2025 01:20
@jackkoenig jackkoenig mentioned this pull request Feb 21, 2025
14 tasks
@jackkoenig jackkoenig force-pushed the selective-view-renaming branch 3 times, most recently from 6b7fbb9 to 323fb2d Compare February 24, 2025 20:58
@jackkoenig jackkoenig marked this pull request as ready for review February 24, 2025 20:58
@jackkoenig jackkoenig requested a review from seldridge February 24, 2025 20:58
Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This should make the view renaming _much_ cheaper.
@jackkoenig jackkoenig force-pushed the selective-view-renaming branch from 323fb2d to 937a9a5 Compare February 24, 2025 21:57
@jackkoenig jackkoenig merged commit 9da0bfe into main Feb 24, 2025
15 checks passed
@jackkoenig jackkoenig deleted the selective-view-renaming branch February 24, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Improves performance, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants