-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Compiler
: abstract_eval_invoke_inst
: type assert Expr
#57860
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
topolarity
merged 2 commits into
JuliaLang:master
from
nsajko:Compiler_ssair_irinterp_typeassert_Int_before_Colon
Mar 27, 2025
Merged
Compiler
: abstract_eval_invoke_inst
: type assert Expr
#57860
topolarity
merged 2 commits into
JuliaLang:master
from
nsajko:Compiler_ssair_irinterp_typeassert_Int_before_Colon
Mar 27, 2025
Conversation
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
Prevents these invalidations (the method instance signatures seem identical, but that's what SnoopCompile gives me): {
"method_instance": {
"method": "abstract_eval_invoke_inst(interp::Compiler.AbstractInterpreter, inst::Compiler.Instruction, irsv::Compiler.IRInterpretationState) @ Compiler ../usr/share/julia/Compiler/src/ssair/irinterp.jl:34",
"method_instance": "MethodInstance for Compiler.abstract_eval_invoke_inst(::Compiler.AbstractInterpreter, ::Compiler.Instruction, ::Compiler.IRInterpretationState)"
},
"children": [
]
},
{
"method_instance": {
"method": "abstract_eval_invoke_inst(interp::Compiler.AbstractInterpreter, inst::Compiler.Instruction, irsv::Compiler.IRInterpretationState) @ Compiler ../usr/share/julia/Compiler/src/ssair/irinterp.jl:34",
"method_instance": "MethodInstance for Compiler.abstract_eval_invoke_inst(::Compiler.NativeInterpreter, ::Compiler.Instruction, ::Compiler.IRInterpretationState)"
},
"children": [
]
} The total invalidation count somehow doesn't change, staying at 739. |
KristofferC
reviewed
Mar 25, 2025
Compiler
: abstract_eval_invoke_inst
: type assert Int
Compiler
: abstract_eval_invoke_inst
: type assert Expr
Should make the code less vulnerable to invalidation.
40dc34f
to
1040d0c
Compare
The latest version of this PR additionally prevents these invalidations 🚀 {
"method_instance": {
"method": "isempty(r::StepRange) @ Base range.jl:685",
"method_instance": "MethodInstance for isempty(::StepRange{Tuple{LineNumberNode, Expr}})"
},
"children": [
{
"method_instance": {
"method": "iterate(r::OrdinalRange) @ Base range.jl:917",
"method_instance": "MethodInstance for iterate(::OrdinalRange{Tuple{LineNumberNode, Expr}})"
},
"children": [
{
"method_instance": {
"method": "Vector{T}(r::AbstractRange{T}) where T @ Base range.jl:1395",
"method_instance": "MethodInstance for Vector{Tuple{LineNumberNode, Expr}}(::AbstractRange{Tuple{LineNumberNode, Expr}})"
},
"children": [
]
}
]
}
]
} |
topolarity
approved these changes
Mar 27, 2025
Thanks @nsajko ! |
KristofferC
pushed a commit
that referenced
this pull request
Mar 31, 2025
Should make the code less vulnerable to invalidation. (cherry picked from commit ed3fccc)
KristofferC
pushed a commit
that referenced
this pull request
Mar 31, 2025
Should make the code less vulnerable to invalidation. (cherry picked from commit ed3fccc)
51 tasks
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.
Should make the code less vulnerable to invalidation.