From c3241d0ba03ff1e90ffdb4cd434660f81194b438 Mon Sep 17 00:00:00 2001 From: tyler Date: Sat, 11 May 2019 10:14:40 -0700 Subject: [PATCH] cold was necessary on try_initialize_nodrop to get more straight line asm --- src/libstd/thread/local.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index e6f096a8da53..998d9dcc6833 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -432,6 +432,7 @@ pub mod fast { // performed for every call to `Key::get`. // LLVM issue: https://bugs.llvm.org/show_bug.cgi?id=41722 #[inline(never)] + #[cold] unsafe fn try_initialize_drop T>(&self, init: F) -> Option<&'static T> { // We don't put a `needs_drop` check around this and call it a day // because this function is not inlined. Unwrapping code gets