Conversation
…ptrs There were 2 issues with determination of variables used in the declared bounds of an _Nt_array_ptr: 1. Bounds variables were being determined only for _Nt_array_ptrs declared in the current block. As a result, if another block kills a particular variable then the widened bounds in the successor blocks could not be killed. 2. Bounds variables for function parameters were not getting determined correctly. Also performed minor NFC code cleanups. Fixes #895
added 2 commits
August 11, 2020 18:50
kkjeer
approved these changes
Aug 13, 2020
dtarditi
approved these changes
Aug 14, 2020
Member
dtarditi
left a comment
There was a problem hiding this comment.
Overall looks good. I had some questions about the clean up. It was a little difficult to follow the clean up intermixed with the bug fix. It is helpful to keep them separate.
| // CHECK: upper_bound(q) = 1 | ||
|
|
||
| // Declared bounds (INT_MIN) and deref offset (INT_MAX - 1). No sequential deref tests. No widening. | ||
| // Declared bounds |
Member
There was a problem hiding this comment.
I don't understand why you deleted the rest of the comment. Same goes for other changes in this file.
Author
There was a problem hiding this comment.
Thanks for catching this. The comments should not have been deleted. Not sure how that happened. I will fix this.
added 2 commits
August 16, 2020 13:29
Early calculation of bounds vars for nt_array_ptrs with invalid bounds caused two checkedc runtime tests to fail. Moving the calculation of bounds vars to FillGenSetForEdge fixes this as this function is not invoked for nt_array_ptrs with invalid bounds. Also fixed indentation and comments in tests.
kkjeer
approved these changes
Aug 18, 2020
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.
There were 3 issues with the handling of variables used in the declared bounds
of an
nt_array_ptr:Bounds variables were being determined only for
nt_array_ptrs declared inthe current block. As a result, if a variable is killed in a block then the
widened bounds in the successor blocks could not be killed. This is fixed by
storing the bounds variables along with the
nt_array_ptrs for the entirefunction instead of per block.
Bounds variables for function parameters were not getting determined
correctly. This is fixed by uniforming the logic to determine bounds
variables for function parameters and local variables.
Bounds declared as
CountBoundsExprwere not being handled. This is fixed byreading the
NormalizedBoundsinstead of invokingExpandBoundsToRange.Also performed minor NFC code cleanups.
Fixes #895