<div dir="ltr"><div dir="ltr">Hi<div><br></div><div>I am looking at the library related to the call graph. I noticed that in the source code CallGraph.cpp, there is a check inside the function addToCallGraph.</div><div><br></div><div><div>  83   for (BasicBlock &BB : *F)</div><div>  84     for (Instruction &I : BB) {</div><div>  85       if (auto CS = CallSite(&I)) {</div><div>  86         const Function *Callee = CS.getCalledFunction();</div><div>  87         if (!Callee || !Intrinsic::isLeaf(Callee->getIntrinsicID()))</div><div>  88           // Indirect calls of intrinsics are not allowed so no need to check.</div><div>  89           // We can be more precise here by using TargetArg returned by</div><div>  90           // Intrinsic::isLeaf.</div><div>  91           Node->addCalledFunction(CS, CallsExternalNode.get());</div><div>  92         else if (!Callee->isIntrinsic())</div><div>  93           Node->addCalledFunction(CS, getOrInsertFunction(Callee));</div><div>  94       }</div><div>  95     }</div></div><div><br></div><div>In  line 87 and line 92. There are two checks that will add the callee to the function. Could you please explain in detail why we need these two different checks. What does Intrinsic mean? Many Thanks</div><div><br></div><div>Regards</div><div>Muhui</div></div></div>