diff options
| author | bors <bors@rust-lang.org> | 2018-11-06 04:04:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-11-06 04:04:33 +0000 |
| commit | 24e66c28980442a48d9458f1a4f9b76cc722dc8a (patch) | |
| tree | c1c32d1146a30ac22231e69f4e5cb67f2f9abe6d /src/rustllvm/RustWrapper.cpp | |
| parent | 8aa926729e68ef03316e81c9309b670a25e37b48 (diff) | |
| parent | 0c3d08e9676a7defd16b88307838f7294d28c3e5 (diff) | |
| download | rust-24e66c28980442a48d9458f1a4f9b76cc722dc8a.tar.gz rust-24e66c28980442a48d9458f1a4f9b76cc722dc8a.zip | |
Auto merge of #55518 - alexcrichton:smaller-wasm, r=sfackler
std: Improve codegen size of accessing TLS Some code in the TLS implementation in libstd stores `Some(val)` into an `&mut Option<T>` (effectively) and then pulls out `&T`, but it currently uses `.unwrap()` which can codegen into a panic even though it can never panic. With sufficient optimizations enabled (like LTO) the compiler can see through this but this commit helps it along in normal mode (`--release` with Cargo by default) to avoid codegen'ing the panic path. This ends up improving the optimized codegen on wasm by ensuring that a call to panic pulling in more file size doesn't stick around.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
