-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
Any reason noinline over cold was used? |
Either way, can always change later if there any benefits to do so. @bors r+ |
📌 Commit 485e799 has been approved by |
src/test/run-pass/issue-41696.rs
Outdated
@@ -10,7 +10,6 @@ | |||
|
|||
// this used to cause exponential code-size blowup during LLVM passes. | |||
// ignore-test FIXME #41696 |
There was a problem hiding this comment.
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.
485e799
to
0b93798
Compare
Indeed. @bors r=nagisa |
📌 Commit 0b93798 has been approved by |
Indeed. @bors r=nagisa |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 0b93798 has been approved by |
74bcee6
to
0b93798
Compare
Had an accidental push @bors r=nagisa |
📌 Commit 0b93798 has been approved by |
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
☀️ Test successful - status-appveyor, status-travis |
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
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
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