[PATCH] D141190: [CallGraph][FIX] Ensure generic intrinsics are represented in the CG

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 7 05:35:10 PST 2023


arsenm added a comment.

Should include the GVN testcase



================
Comment at: llvm/lib/Analysis/CallGraph.cpp:102
         const Function *Callee = Call->getCalledFunction();
-        if (!Callee || Callee->isIntrinsic())
-          // Indirect calls of intrinsics are not allowed so no need to check.
-          // We can be more precise here by using TargetArg returned by
-          // Intrinsic::isLeaf.
+        if (!Callee)
           Node->addCalledFunction(Call, CallsExternalNode.get());
----------------
This is only tangentially related but this misses call targets from constantexpr casted functions, and aliases. I was debugging some issue related to this not long ago


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141190/new/

https://reviews.llvm.org/D141190



More information about the llvm-commits mailing list