-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Effects: Add :nothrow_if_inbounds effect #43899
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
Closed
Closed
Conversation
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
bbdb280
to
17d0507
Compare
17d0507
to
e98e5a6
Compare
081bef4
to
e591ba0
Compare
3281ce4
to
b30e99c
Compare
Does this need anything other than a rebase? |
Keno
commented
Mar 21, 2022
This adds a new effect :nothrow_if_inbounds that basically does what it says on the tin. Running #43852 through its paces, I've found it highly effective, except in cases where a function was only nothrow because of a boundscheck with unknown bounds. This PR adds support to make use of @inbounds annotations to still let inlining remove calls that are nothrow except for an unknown boundscheck.
Is this still in-progress or dead? There look like a lot of conflicting files |
I think this is dead. We changed the way that inbounds and effects interact, so we'd have to rethink this anyway. |
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.
Review note: Against #43852 while that is still pending.
This adds a new effect
:nothrow_if_inbounds
that basically does what it says on the tin.Running #43852 through its paces, I've found it highly effective, except in cases where
a function was only nothrow because of a boundscheck with unknown bounds. This PR
adds support to make use of
@inbounds
annotations to still let inlining remove callsthat are nothrow except for an unknown boundscheck.