[llvm] [Transforms][IPO] Add func suffix in ArgumentPromotion and DeadArgume… (PR #105742)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 19:41:13 PDT 2024
================
@@ -876,6 +876,8 @@ bool DeadArgumentEliminationPass::removeDeadStuffFromFunction(Function *F) {
// it again.
F->getParent()->getFunctionList().insert(F->getIterator(), NF);
NF->takeName(F);
+ if (NumArgumentsEliminated)
----------------
yonghong-song wrote:
> What cases are we excluding with the "if" here? If we don't change the signature, we don't recreate the function in the first place.
IIUC, there is another metric NumRetValsEliminated. It is possible that NumRetValsEliminated > 0 and NumArgumentsEliminated = 0. I added the above check since we really care function arguments in bpf tracing and func return value is not that important. But I can remove the above check so we do not limit the case only to bpf tracing.
https://github.com/llvm/llvm-project/pull/105742
More information about the llvm-commits
mailing list