Enable ThinLTO for rustc on x64 msvc by lqd · Pull Request #103591 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation21 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

lqd

Member

@lqd lqd commented

Oct 26, 2022

• Loading

This applies the great work from @bjorn3 and @Kobzol in #101403 to x64 msvc.

Here are the local results for the try build 68c5c85ed759334a11f0b0e586f5032a23f85ce4, compared to its parent 0a6b941df354c59b546ec4c0d27f2b9b0cb1162c. Looking better than my previous local builds.

image

(I can't show cycle counts, as that option is failing on the windows version of the perf collector, but I'll try to analyze and debug this soon)

This will be the first of a few tests for rustc / llvm / both ThinLTO on the windows and mac targets.

@lqd

@rustbot rustbot added A-testsuite

Area: The testsuite used to check the correctness of rustc

T-infra

Relevant to the infrastructure team, which will review and decide on the PR/issue.

labels

Oct 26, 2022

@lqd

@bors

⌛ Trying commit 0abf95bdd7e7f98b53c310649ecb03bc60d986f6 with merge 00df0000c5e43d256786737e9f49379e1b3054c4...

@bors

@bors bors added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Oct 26, 2022

@rust-log-analyzer

This comment was marked as outdated.

@lqd

@bors

⌛ Trying commit 0e16a37a9f376091f4573feb33d0bcd603c811e8 with merge 68c5c85ed759334a11f0b0e586f5032a23f85ce4...

@lqd lqd mentioned this pull request

Oct 26, 2022

30 tasks

@bors

☀️ Try build successful - checks-actions
Build commit: 68c5c85ed759334a11f0b0e586f5032a23f85ce4 (68c5c85ed759334a11f0b0e586f5032a23f85ce4)

@lqd

To compare with the size increase we see on linux:

@lqd lqd changed the title[perf] Enable ThinLTO for rustc on x64 msvc Enable ThinLTO for rustc on x64 msvc

Oct 26, 2022

@lqd

Member Author

lqd commented

Oct 26, 2022

• Loading

I've updated the PR description with the results of the try build, and dropped the temporary CI hacks.

I will look at CI time tomorrow, as well as the sizes of the rustc-dev component, just in case we see an increase like we did on linux. Otherwise, I think this is ready to review, feel free to re-roll:

r? @Mark-Simulacrum

@lqd lqd marked this pull request as ready for review

October 26, 2022 23:41

@lqd

For CI time, it's going to be hard to say with a sample of 1, and t-infra should have better data like the variance on that builder, but here goes: on the 5 most recent merged PRs on the dist-x86_64-msvc builder, the "run the build" step took: 1h46, 2h09, 1h45, 2h10, 2h02. The try build above took 2h15.

For the rustup rustc-dev component:

So it's a similar scale to #103538, which saw an 80MB increase. The possible fix mentioned in that issue would work on all targets I assume.

I wouldn't think it's a blocking issue though.

@lqd

@rustbot ready

I don't have access to the MSVC builder times graph that t-infra has, but from the tests above, it seems the additional time wouldn't necessarily be impactful on CI times, and that we could land this change @Mark-Simulacrum ?

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Dec 7, 2022

@Mark-Simulacrum

This is the current state of the world:

image

So msvc dist is ~3rd slowest today. I think this should be OK to merge though, we can adjust further as we iterate on the CI times -- I expect our planned improvements around LLVM caching on Linux should fairly cleanly map directly to the msvc builder here.

@bors r+

@bors

📌 Commit 684663e has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Dec 8, 2022

@bors

⌛ Testing commit 684663e with merge da2270c1464b4af6c57a1193a1600cd7dd352c98...

@bors

@bors bors added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Dec 8, 2022

@ChrisDenton

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Dec 8, 2022

@rust-log-analyzer

This comment was marked as outdated.

@bors

@bors

@rust-timer

Finished benchmarking commit (657eefe): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌ (primary) - - 0
Regressions ❌ (secondary) 3.0% [3.0%, 3.0%] 1
Improvements ✅ (primary) - - 0
Improvements ✅ (secondary) -1.3% [-2.0%, -0.7%] 2
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌ (primary) - - 0
Regressions ❌ (secondary) - - 0
Improvements ✅ (primary) - - 0
Improvements ✅ (secondary) -2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

@lqd lqd deleted the win-lto branch

December 11, 2022 22:06

@nnethercote

Note: the perf CI result showed no change because it only measures on Windows. See the image at the top of this PR for some previously-measured Windows results.

This was referenced

Dec 13, 2022

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request

Jan 6, 2023

@bors

Enable ThinLTO for rustc on x64 msvc

This applies the great work from @bjorn3 and @Kobzol in rust-lang#101403 to x64 msvc.

Here are the local results for the try build 68c5c85ed759334a11f0b0e586f5032a23f85ce4, compared to its parent 0a6b941df354c59b546ec4c0d27f2b9b0cb1162c. Looking better than my previous local builds.

image

(I can't show cycle counts, as that option is failing on the windows version of the perf collector, but I'll try to analyze and debug this soon)

This will be the first of a few tests for rustc / llvm / both ThinLTO on the windows and mac targets.

@ehuss ehuss mentioned this pull request

Mar 13, 2023

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 13, 2023

@bors

…jyn514

Revert "enable ThinLTO for rustc on x86_64-pc-windows-msvc dist builds"

This lead to a miscompilation in at least char::is_whitespace and probably in more unknown places.....

See rust-lang#109067

This reverts commit 684663e, PR rust-lang#103591.

wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request

Mar 20, 2023

@he32

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request

Apr 8, 2023

@he32

Pkgsrc changes:

Upstream changes:

Version 1.68.2 (2023-03-28)

Version 1.68.1 (2023-03-23)

Version 1.68.0 (2023-03-09)

Language

Compiler

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Cargo

Misc

Compatibility Notes

nternal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Version 1.67.0 (2023-01-26)

Language

Compiler

Added and removed targets:

Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.

Libraries

Stabilized APIs

These APIs are now stable in const contexts:

Compatibility Notes

Internal Changes

These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.

Labels

A-testsuite

Area: The testsuite used to check the correctness of rustc

merged-by-bors

This PR was explicitly merged by bors.

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-infra

Relevant to the infrastructure team, which will review and decide on the PR/issue.