Make DAE not wipe out attributes on calls, and not drop
authorDuncan Sands <baldrick@free.fr>
Fri, 21 Dec 2007 19:16:16 +0000 (19:16 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 21 Dec 2007 19:16:16 +0000 (19:16 +0000)
commit110c8350394df3222307fbebe608ff9ed88ea487
tree67af4837ccc6c7a87f0bad8e1561bb9ee31a5f52
parent5a6c91a3eceb701396c30dd126079903006c5e0b
Make DAE not wipe out attributes on calls, and not drop
return attributes on the floor.  In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped.  I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45285 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ParameterAttributes.h
lib/Transforms/IPO/DeadArgumentElimination.cpp
test/Transforms/DeadArgElim/2007-12-20-ParamAttrs.ll [new file with mode: 0644]