inalloca: Don't remove dead arguments in the presence of inalloca args
authorReid Kleckner <reid@kleckner.net>
Mon, 3 Feb 2014 20:42:49 +0000 (20:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 3 Feb 2014 20:42:49 +0000 (20:42 +0000)
commit81558937d774db688a8d2b46264761e5b61ac473
tree942cddb8ccb16742940faba485cfb285536dacde
parent07786c2f091c5179719b56e74a51dfa8ba5e3dc4
inalloca: Don't remove dead arguments in the presence of inalloca args

It disturbs the layout of the parameters in memory and registers,
leading to problems in the backend.

The plan for optimizing internal inalloca functions going forward is to
essentially SROA the argument memory and demote any captured arguments
(things that aren't trivially written by a load or store) to an indirect
pointer to a static alloca.

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