about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-11 18:14:59 +0000
committerbors <bors@rust-lang.org>2021-03-11 18:14:59 +0000
commit4a8b6f708c38342a6c74aa00cf4323774c7381a6 (patch)
treede3803426f6d30d3b796923ab5122a4158c9d702 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent61365c06250e2ba6e0a578ae990f055ac5339107 (diff)
parent623ca84ab78542f9e5785b7f3f75429c692adf2d (diff)
downloadrust-4a8b6f708c38342a6c74aa00cf4323774c7381a6.tar.gz
rust-4a8b6f708c38342a6c74aa00cf4323774c7381a6.zip
Auto merge of #82806 - nikic:memcpyopt-mssa, r=nagisa
Enable MemorySSA in MemCpyOpt

LLVM 12 ships with an implementation of MemCpyOpt which is based on MSSA instead of MDA. This implementation can eliminate memcpys across blocks, and as such fixes many (but not all) failures to eliminate redundant memcpys for Rust code. Unfortunately this was only enabled by default shortly after LLVM 12 was cut. This backports the enablement to our LLVM fork.

Perf results: https://perf.rust-lang.org/compare.html?start=8fd946c63a6c3aae9788bd459d278cb2efa77099&end=0628b91ce17035fb5b6a1a99a4f2ab9ab69be7a8

There are improvements on check and debug builds, which indicate that rustc itself has become faster. For opt builds this is, on average, a very minor improvement as well, although there is one significant outlier with deep-vector-opt. This benchmark creates ~140000 zero stores, which are now coalesced into a memset slightly later, resulting in longer compile-time for intermediate passes.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions