Skip to content

Commit

Permalink
JETAnalyzer: discard sources always
Browse files Browse the repository at this point in the history
Might be more memory efficient.
  • Loading branch information
aviatesk committed Feb 13, 2024
1 parent 5dd6e1d commit 6936e58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/abstractinterpret/abstractanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ CC.InferenceParams(analyzer::AbstractAnalyzer) = get_inf_params(analyzer)
CC.OptimizationParams(analyzer::AbstractAnalyzer) = get_opt_params(analyzer)
#=CC.=#get_inference_world(analyzer::AbstractAnalyzer) = get_world(analyzer)

CC.may_compress(analyzer::AbstractAnalyzer) = false
# this overload is necessary to avoid caching with the const ABI
CC.may_discard_trees(analyzer::AbstractAnalyzer) = false

let # overload `inlining_policy`
Expand Down
3 changes: 3 additions & 0 deletions src/analyzers/jetanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ struct JETAnalyzer{RP<:ReportPass} <: AbstractAnalyzer
end
end

# JETAnalyzer does not need any sources, so discard them always
CC.maybe_compress_codeinfo(interp::JETAnalyzer, mi::MethodInstance, ci::CodeInfo) = nothing

# JETAnalyzer hooks on abstract interpretation only,
# and so the cost of running the optimization passes is just unnecessary
CC.may_optimize(::JETAnalyzer) = false
Expand Down

0 comments on commit 6936e58

Please sign in to comment.