aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2022-04-29 13:53:36 -0700
committerQuentin Colombet <qcolombet@apple.com>2022-05-02 11:16:32 -0700
commite547a333a43348a8a7ec9460f37696ecc5453e56 (patch)
tree1957ac7adc00f2271abd56ad1b8d11e656d5640b /llvm/lib/Object/Binary.cpp
parent45c07db31cc76802a1a2e41bed1ce9c1b8198181 (diff)
downloadllvm-e547a333a43348a8a7ec9460f37696ecc5453e56.zip
llvm-e547a333a43348a8a7ec9460f37696ecc5453e56.tar.gz
llvm-e547a333a43348a8a7ec9460f37696ecc5453e56.tar.bz2
[DeadArgElim] Set unused arguments for internal functions
Prior to this patch we would only set to undef the unused arguments of the external functions. The rationale was that unused arguments of internal functions wouldn't need to be turned into undef arguments because they should have been simply eliminated by the time we reach that code. This is actually not true because there are plenty of cases where we can't remove unused arguments. For instance, if the internal function is used in an indirect call, it may not be possible to change the function signature. Yet, for statically known call-sites we would still like to mark the unused arguments as undef. This patch enables the "set undef arguments" optimization on internal functions when we encounter cases where internal functions cannot be optimized. I.e., whenever an internal function is marked "live". Differential Revision: https://reviews.llvm.org/D124699
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
0 files changed, 0 insertions, 0 deletions