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

Eliminate some unnecessary clamping in ClampUnsafeAccesses (#6297) #6654

Merged
merged 4 commits into from
Mar 22, 2022

Conversation

steven-johnson
Copy link
Contributor

My attempt at @abadams suggestion for a simple improvement.

@abadams
Copy link
Member

abadams commented Mar 18, 2022

It looks right to me but I would like @alexreinking to chime in too, if he has time.

@alexreinking
Copy link
Member

This seems fine given our current (plans for the) bounds inference implementation, but the property this optimization exploits isn't inherent to the concept. We could one day analyze overcompute more precisely in these cases and then this code would silently break.

@steven-johnson
Copy link
Contributor Author

this code would silently break

...I'm reluctant to check in code that could silently break. Let me see if I can come up with a test that would catch breakage...

@steven-johnson
Copy link
Contributor Author

Landing per offline discussion with @alexreinking

@steven-johnson steven-johnson merged commit 650554a into main Mar 22, 2022
@steven-johnson steven-johnson deleted the srj/better-clamping branch March 22, 2022 00:31
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.

3 participants