OSDN Git Service

[memcpyopt] Teach memcpyopt to optimize across basic blocks
authorDan Gohman <dan433584@gmail.com>
Thu, 30 Nov 2017 22:10:53 +0000 (22:10 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 30 Nov 2017 22:10:53 +0000 (22:10 +0000)
commit7a991ca87c7b21aede6a0eb4d71839136c3010fe
tree3e837974f72c356e96c11042e04d2dd9ac5a4995
parent156f91323f9db898256484d1bd503bed23a1a5e1
[memcpyopt] Teach memcpyopt to optimize across basic blocks

This teaches memcpyopt to make a non-local memdep query when a local query
indicates that the dependency is non-local. This notably allows it to
eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.

Fixes PR28958.

Differential Revision: https://reviews.llvm.org/D38374

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319482 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemoryDependenceAnalysis.cpp
lib/Transforms/Scalar/MemCpyOptimizer.cpp
test/Transforms/MemCpyOpt/memcpy-invoke-memcpy.ll [new file with mode: 0644]
test/Transforms/MemCpyOpt/nonlocal-memcpy-memcpy.ll [new file with mode: 0644]