https://github.com/JuliaLang/julia
Revision 18b7fee975a14ed21e653dc7ec09dede7bb0f0a4 authored by Keno Fischer on 07 December 2020, 19:25:25 UTC, committed by GitHub on 07 December 2020, 19:25:25 UTC
Currently we only inline constants (i.e. replace Const() yielding
statements by the constants themselves) if the constant in question
is isbits. We do this to avoid blowing up the size of the IR by
inlining constants that are too large. However, there are some
useful small constants that this definition ignores. E.g. I
was working with structs of the form:
```
struct Dims
    d::NTuple{N, Int} where N
end
```
and the IR was littered with various pure statements that the
optimizer wouldn't inline because this struct isn't considered
isbits (side-note, I want to change that, but that's a separate
issue). Here I'm proposing changing the criteria for a struct
to be eligible for inlining slightly: Rather than just looking
for isbits, we recurse through any immutable, isbits fields and
as long as the size of all structs combined isn't too large, we
allow the inlining.
1 parent 5e048f3
History
Tip revision: 18b7fee975a14ed21e653dc7ec09dede7bb0f0a4 authored by Keno Fischer on 07 December 2020, 19:25:25 UTC
Allow a slightly wider class of constants to be inlined (#38732)
Tip revision: 18b7fee
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