Skip to content

Remove checks in UR[M]BP.Iterator.next() #62998

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

Merged

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Jan 12, 2023

Swift tends to emit unnecessary checks and traps when iterating unsafe raw buffer pointers. These traps are confirming that the position pointer isn't nil, but this check is redundant with the bounds check that is already present. We can safely remove it.

Backport of #62965 for 5.8

Swift tends to emit unnecessary checks and traps when iterating unsafe
raw buffer pointers. These traps are confirming that the position
pointer isn't nil, but this check is redundant with the bounds check
that is already present. We can safely remove it.
@Lukasa
Copy link
Contributor Author

Lukasa commented Jan 12, 2023

@swift-ci please test

@stephentyrone
Copy link
Contributor

@swift-ci test linux

@stephentyrone stephentyrone merged commit 7632e9a into swiftlang:release/5.8 Jan 13, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants