[PATCH] D94106: [Local] Treat calls that may not return as being alive (WIP).
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 22 07:47:57 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:425
+ // Treat calls that may not return as alive.
+ if (!I->getFunction()->willReturn() && !CB->willReturn())
+ return false;
----------------
nikic wrote:
> Why does this check for willreturn on the calling function as well? It's not wrong, but it's also not clear to me under what circumstances the extra check would be useful.
What do you think about making this condition `if (!CB->willReturn() && !isa<IntrinsicInst>(CB))`, with a FIXME to drop the intrinsic check later? That avoids the need to block this on intrinsic updates for now, but should be enough to avoid practical miscompiles.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94106/new/
https://reviews.llvm.org/D94106
More information about the llvm-commits
mailing list