This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2 Commits for 2 changes:
Performance Enhancement
Time required to parse and emit CHIRRTL
Note a huge gain for performance, but a wash or strict improvement. Still much slower than
.pb
parsing but could probably be helped by more (or any) parallelism.Memory Use Enhancement
Required heap to parse and emit CHIRRTL
Still not quite as good as
.pb
but a massive improvement. In profiling, the main objects being created in parsing are refs and subrefs, so perhaps we tweak the parsing rules again to not fully parse them and maybe parse them as part of a 2nd phase / during the CST => AST step?Contributor Checklist
Type of Improvement
API Impact
Technically the generated Listener code (not the one I added, but the stuff generated by ANTLR) is public. I don't think it should be considered part of the FIRRTL public API but it's possible people would use it directly. We should probably move these files to package
firrtl.internal.antlr
or something to stop users from using them.Backend Code Generation Impact
No impact
Desired Merge Strategy
Release Notes
Improve performance and vastly reduce memory usage of
.fir
parserReviewer Checklist (only modified by reviewer)
Please Merge
?