Files
rust/library/std/src
Chris Denton a9f8f8b070 Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet
Use `UnsafeCell` for fast constant thread locals

This uses `UnsafeCell` instead of `static mut` for fast constant thread locals. This changes the type of the TLS shims to return `&UnsafeCell<T>` instead of `*mut T` which means they are always non-null so LLVM can optimize away the check for `Some` in `LocalKey::with` if `T` has no destructor.

LLVM is currently unable to do this optimization as we lose the fact that `__getit` always returns `Some` as it gets optimized to just returning the value of the TLS shim.
2024-03-16 18:27:34 +00:00
..
2023-12-10 10:56:22 +08:00
2023-12-10 10:56:22 +08:00
2023-08-13 13:07:53 -06:00
2024-03-12 16:05:59 +00:00
2023-12-22 11:01:42 +01:00
2024-03-06 18:01:09 +01:00
2024-01-11 11:30:12 -05:00
2023-12-10 10:56:22 +08:00
2023-05-03 22:09:33 -07:00
2024-02-29 14:28:47 -05:00
2023-11-26 09:25:07 +08:00
2023-12-12 18:12:23 +08:00
2024-01-27 16:38:57 +01:00
2024-02-28 14:56:36 -08:00
2023-12-15 16:17:28 +00:00
2024-03-07 07:49:22 +01:00