Use optimized overflow operation everywhere#2405
Merged
celinval merged 7 commits intomodel-checking:mainfrom Apr 28, 2023
Merged
Use optimized overflow operation everywhere#2405celinval merged 7 commits intomodel-checking:mainfrom
celinval merged 7 commits intomodel-checking:mainfrom
Conversation
This is related to the performance degradation we are seeing in the toolchain upgrade: model-checking#2293
Contributor
Author
|
It looks like the performance is not always better... :( |
Contributor
Author
|
I do wonder if this proof is also somewhat unstable. I noticed that in my other PR (#2407) that had minimum changes to the model, there was also a performance degradation of 47% for the same test. |
tautschnig
requested changes
Apr 27, 2023
Member
tautschnig
left a comment
There was a problem hiding this comment.
I'd like to ask for an explanation as to why the no-longer-failing checks are ok.
zhassan-aws
approved these changes
Apr 27, 2023
- Revert shift checks expectations that were removed. - Improve comments
Contributor
Author
That's fair! My bad, I should've added an explanation before. I added it as part of an answer to one of your question and addressed the issue in the call-out section. In a nutshell, the arithmetic check that was being added by CBMC was redundant. |
4 tasks
tautschnig
approved these changes
Apr 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes:
This is related to the performance degradation we are seeing in the toolchain upgrade: #2293
Resolved issues:
Towards #1483. There are a few remaining instances of add_overflow and mul_overflow in intrinsics.rs.
Related RFC:
Optional #ISSUE-NUMBER.
Call-outs:
This PR has a side effect of removing redundant checks inserted by CBMC for checked arithmetic operations.
Testing:
How is this change tested? Existing tests and manual tests with my other branch where I'm doing the upgrade
Is this a refactor change? yes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.