@@ -1168,7 +1168,6 @@ function analyze_single_call!(
1168
1168
sig:: Signature , state:: InliningState , todo:: Vector{Pair{Int, Any}} )
1169
1169
argtypes = sig. argtypes
1170
1170
cases = InliningCase[]
1171
- local signature_union = Bottom
1172
1171
local only_method = nothing # keep track of whether there is one matching method
1173
1172
local meth:: MethodLookupResult
1174
1173
local fully_covered = true
@@ -1180,6 +1179,7 @@ function analyze_single_call!(
1180
1179
return nothing
1181
1180
elseif length (meth) == 0
1182
1181
# No applicable methods; try next union split
1182
+ fully_covered = false
1183
1183
continue
1184
1184
else
1185
1185
if length (meth) == 1 && only_method != = false
@@ -1193,8 +1193,8 @@ function analyze_single_call!(
1193
1193
end
1194
1194
end
1195
1195
for match in meth
1196
- signature_union = Union{signature_union, match. spec_types}
1197
1196
fully_covered &= handle_match! (match, argtypes, flag, state, cases)
1197
+ fully_covered &= match. fully_covers
1198
1198
end
1199
1199
end
1200
1200
@@ -1214,8 +1214,6 @@ function analyze_single_call!(
1214
1214
item === nothing && return nothing
1215
1215
push! (cases, InliningCase (match. spec_types, item))
1216
1216
fully_covered = match. fully_covers
1217
- else
1218
- fully_covered &= atype <: signature_union
1219
1217
end
1220
1218
1221
1219
handle_cases! (ir, idx, stmt, atype, cases, fully_covered, todo, state. params)
@@ -1230,7 +1228,6 @@ function handle_const_call!(
1230
1228
infos = isa (call, MethodMatchInfo) ? MethodMatchInfo[call] : call. matches
1231
1229
cases = InliningCase[]
1232
1230
local fully_covered = true
1233
- local signature_union = Bottom
1234
1231
local j = 0
1235
1232
for i in 1 : length (infos)
1236
1233
meth = infos[i]. results
@@ -1240,24 +1237,22 @@ function handle_const_call!(
1240
1237
return nothing
1241
1238
elseif length (meth) == 0
1242
1239
# No applicable methods; try next union split
1240
+ fully_covered = false
1243
1241
continue
1244
1242
end
1245
1243
for match in meth
1246
1244
j += 1
1247
1245
result = results[j]
1248
1246
if isa (result, ConstResult)
1249
1247
case = const_result_item (result, state)
1250
- signature_union = Union{signature_union, result. mi. specTypes}
1251
1248
push! (cases, InliningCase (result. mi. specTypes, case))
1252
- continue
1253
1249
elseif isa (result, InferenceResult)
1254
- signature_union = Union{signature_union, result. linfo. specTypes}
1255
1250
fully_covered &= handle_inf_result! (result, argtypes, flag, state, cases)
1256
1251
else
1257
1252
@assert result === nothing
1258
- signature_union = Union{signature_union, match. spec_types}
1259
1253
fully_covered &= handle_match! (match, argtypes, flag, state, cases)
1260
1254
end
1255
+ fully_covered &= match. fully_covers
1261
1256
end
1262
1257
end
1263
1258
@@ -1271,8 +1266,6 @@ function handle_const_call!(
1271
1266
item === nothing && return nothing
1272
1267
push! (cases, InliningCase (mi. specTypes, item))
1273
1268
fully_covered = atype <: mi.specTypes
1274
- else
1275
- fully_covered &= atype <: signature_union
1276
1269
end
1277
1270
1278
1271
handle_cases! (ir, idx, stmt, atype, cases, fully_covered, todo, state. params)
0 commit comments