Skip to content

Commit

Permalink
wip: start working on inter-procedural AA
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Dec 25, 2024
1 parent 0f14eda commit b3bc64f
Show file tree
Hide file tree
Showing 7 changed files with 838 additions and 381 deletions.
4 changes: 2 additions & 2 deletions Compiler/src/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ function ((; code_cache)::GetNativeEscapeCache)(codeinst::Union{CodeInstance,Met
codeinst isa CodeInstance || return false
end
argescapes = traverse_analysis_results(codeinst) do @nospecialize result
return result isa EscapeAnalysis.ArgEscapeCache ? result : nothing
return result isa EscapeAnalysis.EscapeCache ? result : nothing
end
if argescapes !== nothing
return argescapes
Expand All @@ -674,7 +674,7 @@ function refine_effects!(interp::AbstractInterpreter, opt::OptimizationState, sv
ir = sv.ir
nargs = Int(opt.src.nargs)
eresult = EscapeAnalysis.analyze_escapes(ir, nargs, get_escape_cache(interp))
argescapes = EscapeAnalysis.ArgEscapeCache(eresult)
argescapes = EscapeAnalysis.EscapeCache(eresult)
stack_analysis_result!(sv.result, argescapes)
validate_mutable_arg_escapes!(eresult, sv)
end
Expand Down
Loading

0 comments on commit b3bc64f

Please sign in to comment.