-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lowering: Optimize lowering of tryfinally with trivial finally block (#…
…52593) 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). The only problem with this is that it violates the lowering assumptions I made in #52527, so we'll probably need to fix that first.
- Loading branch information
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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