Skip to content

Commit c3b5bd5

Browse files
aviateskjpsamaroo
andcommitted
Update test/compiler/EscapeAnalysis/EAUtils.jl
Co-authored-by: Julian Samaroo <jpsamaroo@jpsamaroo.me>
1 parent 4b8f953 commit c3b5bd5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/compiler/EscapeAnalysis/EAUtils.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ function ((; escape_cache)::GetEscapeCache)(mi::MethodInstance)
182182
return cached === nothing ? nothing : cached.argescapes
183183
end
184184

185+
struct FailedAnalysis
186+
ir::IRCode
187+
nargs::Int
188+
get_escape_cache::GetEscapeCache
189+
end
190+
185191
function run_passes_ipo_safe_with_ea(interp::EscapeAnalyzer,
186192
ci::CodeInfo, sv::OptimizationState, caller::InferenceResult)
187193
@timeit "convert" ir = convert_to_ircode(ci, sv)
@@ -203,8 +209,8 @@ function run_passes_ipo_safe_with_ea(interp::EscapeAnalyzer,
203209
try
204210
@timeit "EA" estate = analyze_escapes(ir, nargs, get_escape_cache)
205211
catch err
206-
@error "error happened within EA, inspect `Main.ir` and `Main.nargs`"
207-
@eval Main (ir = $ir; nargs = $nargs)
212+
@error "error happened within EA, inspect `Main.failed_escapeanalysis`"
213+
@eval Main failed_escapeanalysis = $(FailedAnalysis(ir, nargs, get_escape_cache))
208214
rethrow(err)
209215
end
210216
if caller.linfo.specTypes === interp.entry_tt

0 commit comments

Comments
 (0)