Skip to content

Commit

Permalink
a bit of simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed May 17, 2023
1 parent 1e01833 commit 2180732
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/find_unstable_api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function UnstableAPIAnalyzer(world::UInt = Base.get_world_counter();
state = AnalyzerState(world; jetconfigs...)
## use a globalized code cache (, which is separated by `InferenceParams` configurations)
cache_key = JET.compute_hash(state.inf_params)
analysis_cache = get!(()->AnalysisCache(), UNSTABLE_API_ANALYZER_CACHE, cache_key)
analysis_cache = get!(AnalysisCache, UNSTABLE_API_ANALYZER_CACHE, cache_key)
return UnstableAPIAnalyzer(state, analysis_cache, is_target_module)
end
function report_unstable_api(args...; jetconfigs...)
Expand Down
2 changes: 1 addition & 1 deletion src/analyzers/jetanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct JETAnalyzer{RP<:ReportPass} <: AbstractAnalyzer
analysis_cache = AnalysisCache()
else
cache_key = compute_hash(state.inf_params, report_pass)
analysis_cache = get!(()->AnalysisCache(), JET_ANALYZER_CACHE, cache_key)
analysis_cache = get!(AnalysisCache, JET_ANALYZER_CACHE, cache_key)
end
return JETAnalyzer(state, analysis_cache, report_pass)
end
Expand Down
2 changes: 1 addition & 1 deletion src/analyzers/optanalyzer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ struct OptAnalyzer{RP<:ReportPass,FF} <: AbstractAnalyzer
cache_key = compute_hash(state.inf_params, state.opt_params, report_pass,
skip_noncompileable_calls, skip_unoptimized_throw_blocks)
cache_key = @invoke hash(function_filter::Any, cache_key::UInt) # HACK avoid dynamic dispatch
analysis_cache = get!(()->AnalysisCache(), OPT_ANALYZER_CACHE, cache_key)
analysis_cache = get!(AnalysisCache, OPT_ANALYZER_CACHE, cache_key)
end
return new{RP,FF}(state,
analysis_cache,
Expand Down

0 comments on commit 2180732

Please sign in to comment.