https://github.com/JuliaLang/julia
Revision 5e048f3e537387fd388a5360ce6163c8f7c61ccf authored by Keno Fischer on 07 December 2020, 19:24:48 UTC, committed by GitHub on 07 December 2020, 19:24:48 UTC
Consider the included test case:
```
f_partial_struct_constprop(a, b) = (a[1]+b[1], 2)
g_partial_struct_constprop() = Val{f_partial_struct_constprop((1,), (1,))[1]}()
```

The function `f_partial_struct_constprop` used to infer to `Tuple{Int, Int}`
be eligible for constprop and then get improved to `Const((2,2))`. However,
at some point we sharpened the original inference to `PartialStrict((::Int, 2))`,
which caused an early-out that prevented the consideration of this method
for constant propagation purposes, regressing the overall inference result
to `Tuple{Int, Int}`. Fix that by allowing `PartialStruct` to pass through
the early out. I'm not seeing any impact on inference times.
1 parent 057c316
History
Tip revision: 5e048f3e537387fd388a5360ce6163c8f7c61ccf authored by Keno Fischer on 07 December 2020, 19:24:48 UTC
Fix inference precision regression for functions returning PartialStruct (#38731)
Tip revision: 5e048f3
File Mode Size
.devcontainer
base
cli
contrib
deps
doc
etc
src
stdlib
test
.clang-format -rw-r--r-- 3.3 KB
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 283 bytes
.mailmap -rw-r--r-- 11.0 KB
CITATION.bib -rw-r--r-- 2.6 KB
CONTRIBUTING.md -rw-r--r-- 19.9 KB
HISTORY.md -rw-r--r-- 292.0 KB
LICENSE.md -rw-r--r-- 5.0 KB
Make.inc -rw-r--r-- 49.1 KB
Makefile -rw-r--r-- 24.6 KB
NEWS.md -rw-r--r-- 19.9 KB
README.md -rw-r--r-- 6.9 KB
VERSION -rw-r--r-- 10 bytes
sysimage.mk -rw-r--r-- 3.9 KB

README.md

back to top