Skip to content

AbstractInterpreter: remove dead logic within transform_result_for_cache #41884

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
merged 1 commit into from
Aug 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,10 @@ end

function transform_result_for_cache(interp::AbstractInterpreter, linfo::MethodInstance,
valid_worlds::WorldRange, @nospecialize(inferred_result))
local const_flags::Int32
# If we decided not to optimize, drop the OptimizationState now.
# External interpreters can override as necessary to cache additional information
if inferred_result isa OptimizationState
opt = inferred_result
if isa(opt.src, CodeInfo)
inferred_result = ir_to_codeinf!(opt)
else
inferred_result = opt.src
end
inferred_result = ir_to_codeinf!(inferred_result)
end
if inferred_result isa CodeInfo
inferred_result.min_world = first(valid_worlds)
Expand Down