https://github.com/JuliaLang/julia
Revision 2e876fc7f665cd660aeb8f0c260523c1a1ca6d29 authored by Shuhei Kadowaki on 13 March 2024, 16:23:57 UTC, committed by GitHub on 13 March 2024, 16:23:57 UTC
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 318b21b09b..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 3d34f11
History
Tip revision: 2e876fc7f665cd660aeb8f0c260523c1a1ca6d29 authored by Shuhei Kadowaki on 13 March 2024, 16:23:57 UTC
inlining: remove ineffective handling for unmatched params (#52092)
Tip revision: 2e876fc
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 1012 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.1 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.1 KB
Makefile -rw-r--r-- 30.3 KB
NEWS.md -rw-r--r-- 3.7 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 1.4 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top