[PATCH] D94106: [Local] Treat calls that may not return as being alive (WIP).

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 07:54:01 PST 2021


jdoerfert 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:
> 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.
I'm not against this but just FTR, most target independent intrinsics have been updated (IIRC). We should ping target owners to do the same for their intrinsics, such as @fhahn did for aarch64.


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