Skip to content

Commit 6f8bb64

Browse files
authored
AbstractInterpreter: remove dead logic within transform_result_for_cache (#41884)
1 parent 6bb978e commit 6f8bb64

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

base/compiler/typeinfer.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,10 @@ end
354354

355355
function transform_result_for_cache(interp::AbstractInterpreter, linfo::MethodInstance,
356356
valid_worlds::WorldRange, @nospecialize(inferred_result))
357-
local const_flags::Int32
358357
# If we decided not to optimize, drop the OptimizationState now.
359358
# External interpreters can override as necessary to cache additional information
360359
if inferred_result isa OptimizationState
361-
opt = inferred_result
362-
if isa(opt.src, CodeInfo)
363-
inferred_result = ir_to_codeinf!(opt)
364-
else
365-
inferred_result = opt.src
366-
end
360+
inferred_result = ir_to_codeinf!(inferred_result)
367361
end
368362
if inferred_result isa CodeInfo
369363
inferred_result.min_world = first(valid_worlds)

0 commit comments

Comments
 (0)