Implement load to store => memcpy in MemCpyOpt for aggregates
authorAmaury Sechet <deadalnix@gmail.com>
Tue, 5 Jan 2016 20:17:48 +0000 (20:17 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Tue, 5 Jan 2016 20:17:48 +0000 (20:17 +0000)
commit4b4923953554f6bd467b09b540963e38c5446c82
tree790181e2235da92f9404fab19f282029714985aa
parente597ffa521de978642946160fa5cf05a16d83b7e
Implement load to store => memcpy in MemCpyOpt for aggregates

Summary:
Most of the tool chain is able to optimize scalar and memcpy like operation effisciently while it isn't that good with aggregates. In order to improve the support of aggregate, we try to change aggregate manipulation into either scalar or memcpy like ones whenever possible without loosing informations.

This is one such opportunity.

Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15894

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