allow eliminating an alloca that is just copied from an constant global
authorChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2010 06:41:51 +0000 (06:41 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2010 06:41:51 +0000 (06:41 +0000)
commit6248065194778c866164b0c10f09f0f0d91b91ac
treeeec283653b335667e90bc163995d1d3b7339829f
parenta9be1df6d7a9b5a07253d83a634ae5876e7e5550
allow eliminating an alloca that is just copied from an constant global
if it is passed as a byval argument.  The byval argument will just be a
read, so it is safe to read from the original global instead.  This allows
us to promote away the %agg.tmp alloca in PR8582

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119686 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/memcpy-from-global.ll