DeadArgElim: aggregate Return assessment properly.
authorTim Northover <tnorthover@apple.com>
Wed, 11 Feb 2015 23:13:11 +0000 (23:13 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 11 Feb 2015 23:13:11 +0000 (23:13 +0000)
commit7f75841a739bb92d2913b7529061eb395a33bb64
treec2c65ce1c11474397acf33f907506e4f30b49883
parente3199deda2bba697a4020a73825bffd9e900274e
DeadArgElim: aggregate Return assessment properly.

I mistakenly thought the liveness of each "RetVal(F, i)" depended only on F. It
actually depends on the index too, which means we need to be careful about how
the results are combined before return. In particular if a single Use returns
Live, that counts for the entire object, at the granularity we're considering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228885 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/DeadArgumentElimination.cpp
test/Transforms/DeadArgElim/aggregates.ll