Port the global copy optimization from the SROA pass to InstCombine.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 21 Aug 2012 08:39:44 +0000 (08:39 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 21 Aug 2012 08:39:44 +0000 (08:39 +0000)
commitec68f552f2a5c1df10813a80929995185eb98243
treec3960340d84c9a4b85f2719aaa6f95d81d43a25c
parent4dea906e1aa019b8fdb999744bf1cf8333b85890
Port the global copy optimization from the SROA pass to InstCombine.
This optimization is really just replacing allocas wholesale with
globals, there is no scalarization.

The underlying motivation for this patch is to simplify the SROA pass
and focus it on splitting and promoting allocas.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162271 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/InstCombine/memcpy-from-global.ll [new file with mode: 0644]
test/Transforms/ScalarRepl/memcpy-from-global.ll [deleted file]