inlining: follow #45272, improve the finalizer inlining implementation#45934
Merged
inlining: follow #45272, improve the finalizer inlining implementation#45934
Conversation
e9eff5c to
38f028e
Compare
Member
Author
|
@nanosoldier |
Collaborator
|
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
7c49f16 to
352121c
Compare
aviatesk
commented
Jul 11, 2022
Comment on lines
+1354
to
+1368
| # Test that we can inline a finalizer that just returns a constant value | ||
| mutable struct DoAllocConst | ||
| function DoAllocConst() | ||
| finalizer(new()) do this | ||
| return nothing | ||
| end | ||
| end | ||
| end | ||
| let src = code_typed1() do | ||
| for i = 1:1000 | ||
| DoAllocConst() | ||
| end | ||
| end | ||
| @test count(isnew, src.code) == 0 | ||
| end |
Member
Author
There was a problem hiding this comment.
I added some more test cases. They are all working on the master except for this DoAllocConst case, and it's fixed by the second commit.
352121c to
df51157
Compare
finalizer inlining robustness
Member
Author
|
@nanosoldier |
Collaborator
|
Your benchmark job has completed - no performance regressions were detected. A full report can be found here. |
- added more comments to explain the purpose of code - properly handle `ConstantCase` - erase `Core.finalizer` call more aggressively - improved type stabilities by handling edge cases - renamed `AddFianlizerUse` to `FinalizerUse` - removed dead pieces of code
df51157 to
7bab5d5
Compare
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
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.
ConstantCaseCore.finalizercall more aggressivelyAddFianlizerUsetoFinalizerUse