diff options
| author | Josh Stone <jistone@redhat.com> | 2021-01-08 13:02:23 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2021-01-11 17:43:10 -0800 |
| commit | 9aa7dd1e6afc0f8c944c63458fba0ea19ae2c392 (patch) | |
| tree | 3b142ea782aa5edc03f4179fcf14c410cee6ab22 /compiler/rustc_codegen_llvm/src | |
| parent | fe531d5a5f1404281e3fb237daaf87b8180bd13d (diff) | |
| download | rust-9aa7dd1e6afc0f8c944c63458fba0ea19ae2c392.tar.gz rust-9aa7dd1e6afc0f8c944c63458fba0ea19ae2c392.zip | |
Specialize Box clones to try to avoid locals
For generic `T: Clone`, we can allocate an uninitialized box beforehand, which gives the optimizer a chance to create the clone directly in the heap. For `T: Copy`, we can go further and do a simple memory copy, regardless of optimization level.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
