about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2021-01-08 13:02:23 -0800
committerJosh Stone <jistone@redhat.com>2021-01-11 17:43:10 -0800
commit9aa7dd1e6afc0f8c944c63458fba0ea19ae2c392 (patch)
tree3b142ea782aa5edc03f4179fcf14c410cee6ab22 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentfe531d5a5f1404281e3fb237daaf87b8180bd13d (diff)
downloadrust-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_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions