From 43e32b53462e139c560672102724e8a8c859dbf7 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 20 Nov 2017 15:55:31 +0100 Subject: [PATCH] Remove comment about a branch being optimized out, fix #45831 Most often, this code is used through the `std::heap::Heap` and `#[gloabal_allocator]` indirection, so this branch is not optimized out anymore. --- src/liballoc_jemalloc/lib.rs | 3 +-- src/liballoc_system/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index e8a844228ba..d7370ae400d 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -72,8 +72,7 @@ mod contents { const MALLOCX_ZERO: c_int = 0x40; // The minimum alignment guaranteed by the architecture. This value is used to - // add fast paths for low alignment values. In practice, the alignment is a - // constant at the call site and the branch will be optimized out. + // add fast paths for low alignment values. #[cfg(all(any(target_arch = "arm", target_arch = "mips", target_arch = "powerpc")))] diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 8077ab2063d..27259cc31a5 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -25,8 +25,7 @@ #![rustc_alloc_kind = "lib"] // The minimum alignment guaranteed by the architecture. This value is used to -// add fast paths for low alignment values. In practice, the alignment is a -// constant at the call site and the branch will be optimized out. +// add fast paths for low alignment values. #[cfg(all(any(target_arch = "x86", target_arch = "arm", target_arch = "mips",