Skip to content
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

[NFC] Massive Export Verilog Speedup #6886

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Conversation

darthscsi
Copy link
Contributor

@darthscsi darthscsi commented Apr 1, 2024

Getting all the ports to lookup one attribute is very expensive. Mainly from GetAllPortLocs requiring several lookups and allocations. Just avoid doing this by not using the summary functions and looking up individual ports directly (as should generally be done to avoid the overly broad expensive functions). Granted that getPort goes through the summary functions isn't obvious or ideal. It should be fixed.

Getting all the ports to lookup one attribute is very expensive.  Mainly from GetAllPortLocs requiring several lookups and allocations.  Just avoid doing this by not using the summary functions and looking up individual ports directly (as should generally be done to avoid the overly broad expensive functions).
lib/Conversion/ExportVerilog/ExportVerilog.cpp Outdated Show resolved Hide resolved
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

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

Change LGTM but just seconding that yes this points out there's definitely room for improvement so we don't have to hand-roll this sort of thing to avoid performance bugs lurking in the friendlier accessors.
This and the internal use of deprecated accessors, let's see if we can't chart a path out and see this through 👍 .

Thanks for work on all this, and of course specifically for tracking this down and fixing it!

@darthscsi darthscsi merged commit e55c5d5 into main Apr 1, 2024
4 checks passed
@darthscsi darthscsi deleted the dev/darthscsi/ev_speedup branch April 11, 2024 17:14
cepheus69 pushed a commit to cepheus69/circt that referenced this pull request Apr 22, 2024
Getting all the ports to lookup one attribute is very expensive.  Mainly from GetAllPortLocs requiring several lookups and allocations.  Just avoid doing this by not using the summary functions and looking up individual ports directly (as should generally be done to avoid the overly broad expensive functions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants