From 005ef2d1fb4999ca6ffbe9af6f011b5cbdd10ed7 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 a64fd1b1928213..e4efa220ef8102 100644 --- a/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl +++ b/base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl @@ -1104,13 +1104,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