Skip to content

[Cherry-pick into stable/20230725] [LEB128] Don't initialize error on success #7833

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

Conversation

adrian-prantl
Copy link

commit 2c07181424b45d0785002b760f9ab404b7506b57
Author: Adrian Prantl <[email protected]>
Date:   Mon Nov 27 10:42:57 2023 -0800

    [LEB128] Don't initialize error on success
    
    This change removes an unnecessary branch from a hot path. It's also
    questionable API to override any previous error unconditonally.

commit 643f25fb1d0b2153e8684354968ad358cc0e3f53
Author: Adrian Prantl <[email protected]>
Date:   Mon Nov 27 14:15:06 2023 -0800

    [LEB128] Factor out redundant code

commit 963b186951ec9b8babb924ebda6a9f193a6269c8
Author: Adrian Prantl <[email protected]>
Date:   Mon Nov 27 14:15:12 2023 -0800

    [LEB128] Don't handle edge cases in every loop iteration
    
    Previously the overflow check was done for every byte even though it
    is only needed for the case where Shift == 63.

commit efa1d0d641c770267ff4c523a450334cd24ebe15
Author: Adrian Prantl <[email protected]>
Date:   Mon Nov 27 14:46:57 2023 -0800

    [LEB128] Mark error condition with LLVM_UNLIKELY

This change removes an unnecessary branch from a hot path. It's also
questionable API to override any previous error unconditonally.

(cherry picked from commit 2c07181)
(cherry picked from commit 643f25f)
Previously the overflow check was done for every byte even though it
is only needed for the case where Shift == 63.

(cherry picked from commit 963b186)
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit b9d35f5 into swiftlang:stable/20230725 Nov 30, 2023
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.

1 participant