Skip to content

Commit

Permalink
AbstractInterpreter: remove dead logic within `transform_result_for…
Browse files Browse the repository at this point in the history
…_cache` (#41884)
  • Loading branch information
aviatesk authored Aug 14, 2021
1 parent 6bb978e commit 6f8bb64
Showing 1 changed file with 1 addition and 7 deletions.
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

0 comments on commit 6f8bb64

Please sign in to comment.