From 4986154a1cff1e884a3ee9404e326f9ed4cd5f70 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 21 Jun 2023 09:38:29 -0700 Subject: [PATCH] `get_effects()` should pull from optimized cache if `optimize == true` Without this, a custom interpreter that has better effects analysis after optimization is unable to surface its effects information to Cthulhu. --- src/reflection.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reflection.jl b/src/reflection.jl index f330c4e2..d0dc39dd 100644 --- a/src/reflection.jl +++ b/src/reflection.jl @@ -162,7 +162,7 @@ function process_info(interp::AbstractInterpreter, @nospecialize(info::CCCallInf matches = info.results.matches return mapany(matches) do match::Core.MethodMatch mi = specialize_method(match) - effects = get_effects(interp, mi, false) + effects = get_effects(interp, mi, optimize) mici = MICallInfo(mi, rt, effects) return is_cached(mi) ? mici : UncachedCallInfo(mici) end