You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inlining: remove ineffective handling for unmatched params (#52092)
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)
```
0 commit comments