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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 13:06:02 PST 2021


fhahn 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;
----------------
jdoerfert wrote:
> 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.
That sounds like a good idea. There are just too many intrinsics to update. I started updating X86 but did not have a chance to finish that yet. I'll update the patch.


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