https://github.com/JuliaLang/julia
Revision 429a885e74e8327e6e257f3625aa5c90378b2483 authored by Jarrett Revels on 04 May 2018, 14:50:08 UTC, committed by GitHub on 04 May 2018, 14:50:08 UTC
- Store varargs type information in the InferenceResult object, such that the info can be used during inference/optimization

- Hack in a more precise return type for getfield of a vararg tuple. Ideally, we would handle this by teaching inference to track the types of the individual fields of a Tuple, which would make this unnecessary, but until then, this hack is helpful.

- Spoof parents as well as children during recursion limiting, so that higher degree cycles are appropriately spoofed

- A broadcast test marked as broken is now no longer broken, presumably due to the optimizations in this commit

- Fix relationship between depth/mindepth in limit_type_size/is_derived_type. The relationship should have been inverse over the domain in which they overlap, but was not maintained consistently. An example of problematic case was:

t = Tuple{X,X} where X<:Tuple{Tuple{Int64,Vararg{Int64,N} where N},Tuple{Int64,Vararg{Int64,N} where N}}
c = Tuple{X,X} where X<:Tuple{Int64,Vararg{Int64,N} where N}

because is_derived_type was computing the depth of usage rather than the depth of definition. This change thus makes the depth/mindepth calculations more consistent, and causes the limiting heuristic to return strictly wider types than it did before.

- Move the optimizer's "varargs types to tuple type" rewrite to after cache lookup.Inference is populating the InferenceResult cache using the varargs form, so the optimizer needs to do the lookup before writing the atypes in order to avoid cache misses.

Co-authored-by: Jameson Nash <vtjnash@users.noreply.github.com>
Co-authored-by: Keno Fischer <keno@alumni.harvard.edu>
1 parent 598ebff
History
Tip revision: 429a885e74e8327e6e257f3625aa5c90378b2483 authored by Jarrett Revels on 04 May 2018, 14:50:08 UTC
enable/improve constant propagation through varargs methods (#26826)
Tip revision: 429a885
File Mode Size
.circleci
.github
base
contrib
deps
doc
etc
src
stdlib
test
ui
.freebsdci.sh -rwxr-xr-x 1.0 KB
.gitattributes -rw-r--r-- 67 bytes
.gitignore -rw-r--r-- 213 bytes
.mailmap -rw-r--r-- 9.5 KB
.travis.yml -rw-r--r-- 6.4 KB
CONTRIBUTING.md -rw-r--r-- 20.4 KB
DISTRIBUTING.md -rw-r--r-- 23.6 KB
HISTORY.md -rw-r--r-- 144.9 KB
LICENSE.md -rw-r--r-- 5.4 KB
Make.inc -rw-r--r-- 35.3 KB
Makefile -rw-r--r-- 25.0 KB
NEWS.md -rw-r--r-- 78.4 KB
README.arm.md -rw-r--r-- 5.7 KB
README.md -rw-r--r-- 29.5 KB
README.windows.md -rw-r--r-- 13.0 KB
VERSION -rw-r--r-- 10 bytes
Windows.inc -rw-r--r-- 1.5 KB
appveyor.yml -rw-r--r-- 2.2 KB

README.md

back to top