about summary refs log tree commit diff
path: root/src/libsyntax/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-20 02:36:49 +0000
committerbors <bors@rust-lang.org>2019-06-20 02:36:49 +0000
commit3c805ce183840bd20bd81a54a02b3c8b6dccc9dd (patch)
treea0a847566bd4884f4909343779a67e833a5ca7d6 /src/libsyntax/lib.rs
parent7d107613498c500699dcf89aab7231c28a8fa3af (diff)
parentb148c25cacd05a0268537ead29881357317a4073 (diff)
downloadrust-3c805ce183840bd20bd81a54a02b3c8b6dccc9dd.tar.gz
rust-3c805ce183840bd20bd81a54a02b3c8b6dccc9dd.zip
Auto merge of #60341 - mtak-:macos-tlv-workaround, r=alexcrichton
macos tlv workaround

fixes: #60141

Includes:
* remove dead code: `requires_move_before_drop`. This hasn't been needed for a while now (oops I should have removed it in #57655)
* redox had a copy of `fast::Key` (not sure why?). That has been removed.
* Perform a `read_volatile` on OSX to reduce `tlv_get_addr` calls per `__getit` from (4-2 depending on context) to 1.

`tlv_get_addr` is relatively expensive (~1.5ns on my machine).

Previously, in contexts where `__getit` was inlined, 4 calls to `tlv_get_addr` were performed per lookup. For some reason when `__getit` is not inlined this is reduced to 2x - and performance improves to match.

After this PR, I have only ever seen 1x call to `tlv_get_addr` per `__getit`, and macos now benefits from situations where `__getit` is inlined.

I'm not sure if the `read_volatile(&&__KEY)` trick is working around an LLVM bug, or a rustc bug, or neither.

r? @alexcrichton
Diffstat (limited to 'src/libsyntax/lib.rs')
0 files changed, 0 insertions, 0 deletions