From 4659d48013213a299edc582adf4fc4279908109e Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 23 Sep 2021 11:25:12 +0900 Subject: [PATCH] enable optimization analysis tests --- test/runtests.jl | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index e402f73a2..d36eae378 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -80,26 +80,25 @@ include("setup.jl") test_call(JET.report_package, (Union{String,Module,Nothing},); target_modules) - # TODO enable once https://github.com/JuliaLang/julia/issues/42258 is resolved - # # optimization analysis - # # ===================== - # - # function function_filter(@nospecialize ft) - # if ft === typeof(JET.widenconst) || - # ft === typeof(JET.print) || - # ft === typeof(Base.CoreLogging.handle_message) || - # ft == Type{<:JET.InferenceErrorReport} # the constructor used in `restore_cached_report` is very dynamic - # return false - # end - # return true - # end - # # JETAnalyzer - # test_opt(JET.analyze_frame!, (JETAnalyzerT, InferenceState); - # target_modules, - # function_filter) - # # OptAnalyzer - # test_opt(JET.analyze_frame!, (OptAnalyzerT, InferenceState); - # target_modules, - # function_filter) + # optimization analysis + # ===================== + + function function_filter(@nospecialize ft) + if ft === typeof(JET.widenconst) || + ft === typeof(JET.print) || + ft === typeof(Base.CoreLogging.handle_message) || + ft == Type{<:JET.InferenceErrorReport} # the constructor used in `restore_cached_report` is very dynamic + return false + end + return true + end + # JETAnalyzer + test_opt(JET.analyze_frame!, (JETAnalyzerT, InferenceState); + target_modules, + function_filter) + # OptAnalyzer + test_opt(JET.analyze_frame!, (OptAnalyzerT, InferenceState); + target_modules, + function_filter) end end