[DeadArgElim] Remove allocsize attributes on callsites
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 12 Apr 2018 02:06:01 +0000 (02:06 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Thu, 12 Apr 2018 02:06:01 +0000 (02:06 +0000)
commit48ee59b6f05d46a0d4996e920ca702374a979873
tree636c87855d5bff244ce54136eb0d809c284aea32
parenta8c689e70cc7413d5c985f9bc330804d0a0b1266
[DeadArgElim] Remove allocsize attributes on callsites

We're already removing allocsize attributes from Functions that we
remove args from, since removing arguments from a function may make the
allocsize attribute incorrect. It appears we forgot to also remove them
from callsites.

Without this, I get verifier errors on `@Test2`.

It probably wouldn't be too hard to make DAE properly update allocsize
attributes instead of dropping them, but I can't think of a scenario
where that'd be useful in practice.

llvm-svn: 329868
llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/test/Transforms/DeadArgElim/allocsize.ll