Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some precompilation improvements #43415

Merged
merged 2 commits into from
Dec 17, 2021
Merged

some precompilation improvements #43415

merged 2 commits into from
Dec 17, 2021

Conversation

JeffBezanson
Copy link
Member

Should probably be kept as 2 separate commits.

The first commit makes sure compilation signatures (e.g. for nospecialize or varargs) are inferred eagerly, which we didn't always do before. Increases the system image by 4-5%, but that's probably a good thing since it means we are precompiling more code that is hopefully useful.

The second commit adds some missing precompile statements from --trace-compile, in particular functions using the const_return calling convention (which don't need to be compiled at all, but we do need to know about them). That's not a big deal normally, but it's needed to make --strip-ir work in more cases. In any case, the printed trace is not really specific to compilation but to tell us which signatures arose that we could not figure out in advance.

@timholy timholy added the compiler:precompilation Precompilation of modules label Dec 13, 2021
@aviatesk aviatesk closed this Dec 17, 2021
@aviatesk aviatesk reopened this Dec 17, 2021
@aviatesk
Copy link
Member

Needs rebasing.

@aviatesk aviatesk merged commit 073900d into master Dec 17, 2021
@aviatesk aviatesk deleted the jb/precompile2 branch December 17, 2021 23:32
@DilumAluthge
Copy link
Member

Looks like this PR broke llvmpasses: https://buildkite.com/julialang/julia-master/builds/6711#d4da1755-9ff3-4b86-8757-5df8a72a5d96

This is entirely my fault. I disabled Buildkite commit statuses while I work to move the Buildkite folder to a separate repo (https://github.com/JuliaCI/julia-buildkite). As soon as that work is done, I'll re-enable Buildkite commit statuses.

vtjnash added a commit that referenced this pull request Sep 1, 2022
Added in #43415, this was too aggressive for many cases. Unlike the
comment suggested, it is unneeded in many cases, so only do it when it
is expected to be maximally profitable.

julia> @time norm(C_212)
before 45.959497 seconds (81.85 M allocations: 6.976 GiB, 6.31% gc time, 100.00% compilation time)
after  15.781804 seconds (20.81 M allocations: 1.294 GiB, 6.32% gc time, 100.00% compilation time)
vtjnash added a commit that referenced this pull request Sep 1, 2022
Added in #43415, this was too aggressive for many cases. Unlike the
comment suggested, it is unneeded in many cases, so only do it when it
is expected to be maximally profitable.

Fixes #46492

julia> @time norm(C_212)
before 45.959497 seconds (81.85 M allocations: 6.976 GiB, 6.31% gc time, 100.00% compilation time)
after  15.781804 seconds (20.81 M allocations: 1.294 GiB, 6.32% gc time, 100.00% compilation time)
vtjnash added a commit that referenced this pull request Sep 2, 2022
…#46581)

Added in #43415, this was too aggressive for many cases. Unlike the
comment suggested, it is unneeded in many cases, so only do it when it
is expected to be maximally profitable.

Fixes #46492

```
julia> @time norm(C_212)
before 45.959497 seconds (81.85 M allocations: 6.976 GiB, 6.31% gc time, 100.00% compilation time)
after  15.781804 seconds (20.81 M allocations: 1.294 GiB, 6.32% gc time, 100.00% compilation time)
```
aviatesk pushed a commit that referenced this pull request Sep 9, 2022
…#46581)

Added in #43415, this was too aggressive for many cases. Unlike the
comment suggested, it is unneeded in many cases, so only do it when it
is expected to be maximally profitable.

Fixes #46492

```
julia> @time norm(C_212)
before 45.959497 seconds (81.85 M allocations: 6.976 GiB, 6.31% gc time, 100.00% compilation time)
after  15.781804 seconds (20.81 M allocations: 1.294 GiB, 6.32% gc time, 100.00% compilation time)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants