-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
improve bunch of type stabilities in Core.Compiler
#39549
Conversation
cti, info = precise_container_type(interp, itft, ti, sv) | ||
cti_info = precise_container_type(interp, itft, ti, sv) | ||
cti = cti_info[1]::Vector{Any} | ||
info = cti_info[2]::Union{Nothing,AbstractIterationInfo} | ||
else | ||
cti, info = precise_container_type(interp, itft, unwrapva(ti), sv) | ||
cti_info = precise_container_type(interp, itft, unwrapva(ti), sv) | ||
cti = cti_info[1]::Vector{Any} | ||
info = cti_info[2]::Union{Nothing,AbstractIterationInfo} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will not need these hacks once #39305 gets merged.
@@ -371,7 +371,7 @@ function statement_cost(ex::Expr, line::Int, src::CodeInfo, sptypes::Vector{Any} | |||
end | |||
a = ex.args[2] | |||
if a isa Expr | |||
cost = plus_saturate(cost, statement_cost(a, -1, src, sptypes, slottypes, params, error_path)) | |||
cost = plus_saturate(cost, statement_cost(a, -1, src, sptypes, slottypes, union_penalties, params, error_path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a true error; otherwise will yield NoMethodError
.
def_bb = block_for_inst(ir.cfg, ir.new_nodes[op.id - length(ir.stmts)].pos) | ||
def_bb = block_for_inst(ir.cfg, ir.new_nodes.info[op.id - length(ir.stmts)].pos) | ||
else | ||
def_bb = block_for_inst(ir.cfg, op.id) | ||
end | ||
if (def_bb == use_bb) | ||
if op.id > length(ir.stmts) | ||
@assert ir.new_nodes[op.id - length(ir.stmts)].pos <= use_idx | ||
@assert ir.new_nodes.info[op.id - length(ir.stmts)].pos <= use_idx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are another "true" errors.
9ff11fd
to
98a6c33
Compare
All of them are detected by JET.jl's self-profiling. The following code will print type-instabilities/type-errors for all code paths reachable from `typeinf(::NativeInterpreter, ::InferenceState)`. ```julia julia> using JET julia> report_call(Core.Compiler.typeinf, (Core.Compiler.NativeInterpreter, Core.Compiler.InferenceState); annotate_types = true) ``` The remaining error reports (e.g. `variable Core.Compiler.string is not defined`) are because of missing imports.
All of them are detected by JET.jl's self-profiling. The following code will print type-instabilities/type-errors for all code paths reachable from `typeinf(::NativeInterpreter, ::InferenceState)`. ```julia julia> using JET julia> report_call(Core.Compiler.typeinf, (Core.Compiler.NativeInterpreter, Core.Compiler.InferenceState); annotate_types = true) ``` The remaining error reports (e.g. `variable Core.Compiler.string is not defined`) are because of missing functionality on error paths. (cherry picked from part of commit 1bc7f43)
…9549) All of them are detected by JET.jl's self-profiling. The following code will print type-instabilities/type-errors for all code paths reachable from `typeinf(::NativeInterpreter, ::InferenceState)`. ```julia julia> using JET julia> report_call(Core.Compiler.typeinf, (Core.Compiler.NativeInterpreter, Core.Compiler.InferenceState); annotate_types = true) ``` The remaining error reports (e.g. `variable Core.Compiler.string is not defined`) are because of missing functionality on error paths.
…9549) All of them are detected by JET.jl's self-profiling. The following code will print type-instabilities/type-errors for all code paths reachable from `typeinf(::NativeInterpreter, ::InferenceState)`. ```julia julia> using JET julia> report_call(Core.Compiler.typeinf, (Core.Compiler.NativeInterpreter, Core.Compiler.InferenceState); annotate_types = true) ``` The remaining error reports (e.g. `variable Core.Compiler.string is not defined`) are because of missing functionality on error paths.
All of them are detected by JET.jl's self-profiling. The following code will print type-instabilities/type-errors for all code paths reachable from `typeinf(::NativeInterpreter, ::InferenceState)`. ```julia julia> using JET julia> report_call(Core.Compiler.typeinf, (Core.Compiler.NativeInterpreter, Core.Compiler.InferenceState); annotate_types = true) ``` The remaining error reports (e.g. `variable Core.Compiler.string is not defined`) are because of missing functionality on error paths. (cherry picked from part of commit 1bc7f43)
All of them are detected by JET.jl's self-profiling.
The following code will print type-instabilities/type-errors for
code paths reachable from
typeinf(::NativeInterpreter, ::InferenceState)
.The remaining error reports (e.g.
variable Core.Compiler.string is not defined
)are because of missing imports.
101 possible errors found
20 possible errors found