[all-commits] [llvm/llvm-project] 762253: [DAE] Don't DAE if we musttail call a "live" (non-...
Mircea Trofin via All-commits
all-commits at lists.llvm.org
Thu Mar 16 13:59:42 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 762253b048e9f760624dea3537535c3657435902
https://github.com/llvm/llvm-project/commit/762253b048e9f760624dea3537535c3657435902
Author: Mircea Trofin <mtrofin at google.com>
Date: 2023-03-16 (Thu, 16 Mar 2023)
Changed paths:
M llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h
M llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
A llvm/test/Transforms/DeadArgElim/musttail-indirect.ll
Log Message:
-----------
[DAE] Don't DAE if we musttail call a "live" (non-DAE-able) function
There are 2 such base cases: indirect calls and calls to functions external
to the module; and then any musttail calls to live functions (because of
the first 2 reasons or otherwise).
The IR validator reports, in these cases, that it "cannot guarantee tail
call due to mismatched parameter counts".
The fix is two-fold: first, we mark as "live" (i.e. non-DAE-able)
functions that make an indirect musttail call.
Then, we propagate live-ness to musttail callers of live functions.
Declared functions are already marked "live".
Differential Revision: https://reviews.llvm.org/D145209
More information about the All-commits
mailing list