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

mark calls in the unwind path as !noinline #42771

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Jun 20, 2017

The unwind path is always cold, so that should not have bad performance
implications. This avoids catastrophic exponential inlining, and also
decreases the size of librustc.so by 1.5% (OTOH, the size of libstd.so
increased by 0.5% for some reason).

Fixes #41696.

r? @nagisa

@nagisa
Copy link
Member

nagisa commented Jun 20, 2017

Any reason noinline over cold was used?

@nagisa
Copy link
Member

nagisa commented Jun 20, 2017

Either way, can always change later if there any benefits to do so.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 20, 2017

📌 Commit 485e799 has been approved by nagisa

@@ -10,7 +10,6 @@

// this used to cause exponential code-size blowup during LLVM passes.
// ignore-test FIXME #41696
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this ignore-test comment be removed, or is the test still failing?

The unwind path is always cold, so that should not have bad performance
implications.  This avoids catastrophic exponential inlining, and also
decreases the size of librustc.so by 1.5% (OTOH, the size of `libstd.so`
increased by 0.5% for some reason).

Fixes rust-lang#41696.
@arielb1 arielb1 force-pushed the no-inline-unwind branch from 485e799 to 0b93798 Compare June 20, 2017 19:03
@arielb1
Copy link
Contributor Author

arielb1 commented Jun 20, 2017

Should this ignore-test comment be removed, or is the test still failing?

Indeed.

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Jun 20, 2017

📌 Commit 0b93798 has been approved by nagisa

@arielb1
Copy link
Contributor Author

arielb1 commented Jun 20, 2017

Should this ignore-test comment be removed, or is the test still failing?

Indeed.

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Jun 20, 2017

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Contributor

bors commented Jun 20, 2017

📌 Commit 0b93798 has been approved by nagisa

@arielb1 arielb1 added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 20, 2017
@arielb1 arielb1 force-pushed the no-inline-unwind branch from 74bcee6 to 0b93798 Compare June 21, 2017 13:14
@arielb1
Copy link
Contributor Author

arielb1 commented Jun 21, 2017

Had an accidental push

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Jun 21, 2017

📌 Commit 0b93798 has been approved by nagisa

@bors
Copy link
Contributor

bors commented Jun 21, 2017

⌛ Testing commit 0b93798 with merge 6de26f4...

bors added a commit that referenced this pull request Jun 21, 2017
mark calls in the unwind path as !noinline

The unwind path is always cold, so that should not have bad performance
implications.  This avoids catastrophic exponential inlining, and also
decreases the size of librustc.so by 1.5% (OTOH, the size of `libstd.so`
increased by 0.5% for some reason).

Fixes #41696.

r? @nagisa
@bors
Copy link
Contributor

bors commented Jun 22, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nagisa
Pushing 6de26f4 to master...

@bors bors merged commit 0b93798 into rust-lang:master Jun 22, 2017
@RalfJung RalfJung mentioned this pull request Dec 10, 2017
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 1, 2022
Mark drop calls in landing pads `cold` instead of `noinline`

Now that deferred inlining has been disabled in LLVM (rust-lang#92110), this shouldn't cause catastrophic size blowup.

I confirmed that the test cases from rust-lang#41696 (comment) still compile quickly (<1s) after this change. ~Although note that I wasn't able to reproduce the original issue using a recent rustc/llvm with deferred inlining enabled, so those tests may no longer be representative. I was also unable to create a modified test case that reproduced the original issue.~ (edit: I reproduced it on CI by accident--the first commit timed out on the LLVM 12 builder, because I forgot to make it conditional on LLVM version)

r? `@nagisa`
cc `@arielb1` (this effectively reverts rust-lang#42771 "mark calls in the unwind path as !noinline")
cc `@RalfJung` (fixes rust-lang#46515)

edit: also fixes rust-lang#87055
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Feb 1, 2022
Mark drop calls in landing pads `cold` instead of `noinline`

Now that deferred inlining has been disabled in LLVM (rust-lang#92110), this shouldn't cause catastrophic size blowup.

I confirmed that the test cases from rust-lang#41696 (comment) still compile quickly (<1s) after this change. ~Although note that I wasn't able to reproduce the original issue using a recent rustc/llvm with deferred inlining enabled, so those tests may no longer be representative. I was also unable to create a modified test case that reproduced the original issue.~ (edit: I reproduced it on CI by accident--the first commit timed out on the LLVM 12 builder, because I forgot to make it conditional on LLVM version)

r? `@nagisa`
cc `@arielb1` (this effectively reverts rust-lang#42771 "mark calls in the unwind path as !noinline")
cc `@RalfJung` (fixes rust-lang#46515)

edit: also fixes rust-lang#87055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants