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

Add semantic loop unrolling analysis #1370

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

sim642
Copy link
Member

@sim642 sim642 commented Feb 22, 2024

Frustrated with the syntactic loop unrolling (#563), this is a quick shot at a semantic one that I've wanted for a long time: just use path sensitivity to count and keep loop iterations separate.

The benefits are obvious:

  1. This is a lot simpler than Loop Unrolling for the first exp.unrolling-factor Iterations #563.
  2. It automatically provides a clean fix to Witness invariants for unrolled loops are incorrect #1225, etc.
  3. We avoid creating large ASTs, CFGs and constraint systems, especially if the loop has a finite bound and all subsequent iterations are dead.
  4. It allows the unrolling factor to depend on any semantic information that we want because it can be determined during the analysis.

TODO

  • Figure out interprocedural behavior (contexts, enter, combine).
  • Integrate with autotuning again.
  • Check sv-benchmarks results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant