From ad727df1aaafc7e98a30154219cb8667e9cd04f3 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Sun, 23 Jan 2022 03:18:03 +0900 Subject: [PATCH] conservatively escape direct arguments of foreigncall --- base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl b/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl index 725e5404d7f4a..d727c88449797 100644 --- a/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl +++ b/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl @@ -1234,13 +1234,15 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any}) add_escape_change!(astate, name, name_info) add_liveness_change!(astate, name, pc) for i = 1:nargs + # COMBAK # we should escape this argument if it is directly called, # otherwise just impose ThrownEscape if not nothrow - if argtypes[i] === Any - arg_info = ⊤ - else - arg_info = nothrow ? ⊥ : ThrownEscape(pc) - end + # if argtypes[i] === Any + # arg_info = ⊤ + # else + # arg_info = nothrow ? ⊥ : ThrownEscape(pc) + # end + arg_info = nothrow ? ⊥ : ⊤ add_escape_change!(astate, args[5+i], arg_info) add_liveness_change!(astate, args[5+i], pc) end