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

Optimize performance of Combinational.ssa driver search #443

Merged
merged 8 commits into from
Dec 13, 2023

Conversation

mkorbel1
Copy link
Contributor

@mkorbel1 mkorbel1 commented Dec 8, 2023

Description & Motivation

For sufficiently large and complex designs, a substantial performance penalty was paid for constructing Combinational.ssa due to the search algorithm for potential SSA drivers. The algorithm had to search backwards from inputs to Conditionals for potential SSA drivers. This was especially expensive when using the Pipeline abstraction, since that chained multiple Combinational.ssas together.

This PR changes the algorithm to search outwards from SSA drivers to cache signals that are driven by it. This trades the performance glass jaws:

  • originally, if you had much logic defined before a Combinational.ssa, you could pay a performance penalty proportional to the size of that logic
  • now, if you have a substantial amount of unrelated logic connected to an SSA driver (at the time of Combinational.ssa construction, you could pay a performance penalty proportional to the size of that logic.

The latter glass jaw should be substantially smaller, less likely, and less frequent.

This PR also adds a benchmark which demonstrates a large performance improvement in a somewhat good example of common use cases.

Related Issue(s)

N/A

Testing

Existing tests cover functionality, new benchmark covers performance

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No

@mkorbel1 mkorbel1 merged commit 7d29852 into intel:main Dec 13, 2023
2 checks passed
@mkorbel1 mkorbel1 deleted the ssaoptmemo branch December 13, 2023 22:58
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.

1 participant