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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 11:43:22 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/CallGraph.cpp:37
   for (Function &F : M)
-    if (!isDbgInfoIntrinsic(F.getIntrinsicID()))
+    if (!isAssumeLikeIntrinsic(F.getIntrinsicID()))
       addToCallGraph(&F);
----------------
So this means that for example `llvm.umax` is part of the call graph but `llvm.objectsize` is not -- the intended logic here isn't clear to me.


================
Comment at: llvm/test/Transforms/GVN/intrinsics_in_cg.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
+; RUN: opt < %s -passes='require<globals-aa>,gvn' -S | FileCheck %s
----------------
Precommit test.


================
Comment at: llvm/test/Transforms/GVN/intrinsics_in_cg.ll:9
+
+define i32 @direct_inrinsic(i1 %c) {
+; CHECK-LABEL: define {{[^@]+}}@direct_inrinsic
----------------
intrinsic


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

https://reviews.llvm.org/D141190



More information about the llvm-commits mailing list