Commit 11c72c0
committed
inlining: remove (probably) dead handling for unmatched params
The deleted branch was added in #45062, although it had not been tested.
I tried the following diff to find cases optimized by that, but I just
found the handling proved to be in vain in all cases I tried.
```diff
diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl
index 318b21b..7e42a65aa4 100644
--- a/base/compiler/ssair/inlining.jl
+++ b/base/compiler/ssair/inlining.jl
@@ -1473,6 +1473,14 @@ function compute_inlining_cases(@nospecialize(info::CallInfo), flag::UInt32, sig
handle_any_const_result!(cases,
result, match, argtypes, info, flag, state; allow_abstract=true, allow_typevars=true)
fully_covered = handled_all_cases = match.fully_covers
+ if length(cases) == 1 && fully_covered
+ println("first case: ", only_method)
+ elseif length(cases) == 1
+ atype = argtypes_to_type(sig.argtypes)
+ if atype isa DataType && cases[1].sig isa DataType
+ println("second case: ", only_method)
+ end
+ end
elseif !handled_all_cases
# if we've not seen all candidates, union split is valid only for dispatch tuples
filter!(case::InliningCase->isdispatchtuple(case.sig), cases)
```1 parent 85d7cca commit 11c72c0
1 file changed
Lines changed: 14 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1382 | 1382 | | |
1383 | 1383 | | |
1384 | 1384 | | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
| 1385 | + | |
| 1386 | + | |
1388 | 1387 | | |
1389 | | - | |
1390 | | - | |
| 1388 | + | |
1391 | 1389 | | |
1392 | 1390 | | |
1393 | 1391 | | |
| |||
1398 | 1396 | | |
1399 | 1397 | | |
1400 | 1398 | | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | 1399 | | |
1412 | | - | |
| 1400 | + | |
1413 | 1401 | | |
1414 | 1402 | | |
1415 | 1403 | | |
| |||
1436 | 1424 | | |
1437 | 1425 | | |
1438 | 1426 | | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
1460 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1461 | 1436 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
| 1437 | + | |
1466 | 1438 | | |
1467 | 1439 | | |
1468 | 1440 | | |
| |||
0 commit comments