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

lowering: Optimize lowering of tryfinally with trivial finally block #52593

Merged
merged 1 commit into from
Dec 23, 2023

Commits on Dec 23, 2023

  1. lowering: Optimize lowering of tryfinally with trivial finally block

    This optimizes the lowering of a tryfinally block with empty finally
    block to instead use the try/catch lowering, where the catch block
    is given as simply `rethrow()`. This is equivalent semantically to
    try/finally in this case, but the code structure is a lot simpler
    with fewer basic blocks and without the auxiliary slot for tracking
    the finally slot. The motivation here is to help the compiler optimize
    better when using the `@with` macro, which has an empty `finally` block
    (but uses the scope argument of 'tryfinally).
    Keno committed Dec 23, 2023
    Configuration menu
    Copy the full SHA
    3121abf View commit details
    Browse the repository at this point in the history