about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-01 13:28:13 +0000
committerbors <bors@rust-lang.org>2022-01-01 13:28:13 +0000
commitda4a39264beea6305720100448cccd78c4eba737 (patch)
tree939fe89699cce79804e4a397b098f9e9ee6d4315
parente6e46055df8707e4780510f5f3794b4fbee07203 (diff)
parentf3e1f33e3c725da999fc9b9b45ed5008a87a0149 (diff)
downloadrust-da4a39264beea6305720100448cccd78c4eba737.tar.gz
rust-da4a39264beea6305720100448cccd78c4eba737.zip
Auto merge of #92419 - erikdesjardins:coldland, r=nagisa
Mark drop calls in landing pads `cold` instead of `noinline`

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

I confirmed that the test cases from https://github.com/rust-lang/rust/issues/41696#issuecomment-298696944 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 #42771 "mark calls in the unwind path as !noinline")
cc `@RalfJung` (fixes #46515)

edit: also fixes #87055
-rw-r--r--src/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builder.rs b/src/builder.rs
index ccf8123000c..379c88bbd40 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -1403,7 +1403,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
         self.cx
     }
 
-    fn do_not_inline(&mut self, _llret: RValue<'gcc>) {
+    fn apply_attrs_to_cleanup_callsite(&mut self, _llret: RValue<'gcc>) {
         unimplemented!();
     }