Skip to content

Commit

Permalink
compiler: use _uncompressed_ir instead of direct ccall (#51972)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Nov 2, 2023
1 parent c019132 commit 013311c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/compiler/inferencestate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ function IRInterpretationState(interp::AbstractInterpreter,
@assert code.def === mi
src = @atomic :monotonic code.inferred
if isa(src, String)
src = ccall(:jl_uncompress_ir, Any, (Any, Ptr{Cvoid}, Any), mi.def, C_NULL, src)::CodeInfo
src = _uncompressed_ir(mi.def, src)
else
isa(src, CodeInfo) || return nothing
end
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ function analyze_method!(match::MethodMatch, argtypes::Vector{Any},
end

function retrieve_ir_for_inlining(mi::MethodInstance, src::String)
src = ccall(:jl_uncompress_ir, Any, (Any, Ptr{Cvoid}, Any), mi.def, C_NULL, src)::CodeInfo
src = _uncompressed_ir(mi.def, src)
return inflate_ir!(src, mi)
end
retrieve_ir_for_inlining(mi::MethodInstance, src::CodeInfo) = inflate_ir(src, mi)
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function retrieve_code_info(linfo::MethodInstance, world::UInt)
# can happen in images built with --strip-ir
return nothing
elseif isa(src, String)
c = ccall(:jl_uncompress_ir, Any, (Any, Ptr{Cvoid}, Any), m, C_NULL, src)
c = _uncompressed_ir(m, src)
else
c = copy(src::CodeInfo)
end
Expand Down

0 comments on commit 013311c

Please sign in to comment.