<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Please ignore this email. Later, I myself figured out that to some extent, what I had asked was a meaningless question :(</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Thanks,<br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="trebuchet ms, sans-serif">Mahesha</font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 14, 2021 at 10:21 AM Mahesha S <<a href="mailto:mahesha.comp@gmail.com">mahesha.comp@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">Hi-</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">The llvm call graph infrastructure within the file `llvm/include/llvm/Analysis/CallGraph.h` has a class `CallGraphNode` which represents a unique function (of call graph) by means of a pointer member `Function *F;`. Which basically tells that the call site (if any) associated with
`CallGraphNode` actually calls `F`. But in case of an indirect call site, F is actually NULL since no compile time information is available about callee in this case. Here comes the problem.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">For example, when we collect SCC for a particular `CallGraphNode` (of call graph) for example via `scc_iterator`, we get a set of
`CallGraphNode` which are reachable. But, then, `CallGraphNode` representing an indirect call site has completely lost information about `function type` which I think could be avoided if we had explicitly captured it within `CallGraphNode`.</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">Now my questions are:</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">(1) Is there any particular reason for not explicitly capturing function type within `CallGraphNode` which is useful in case of indirect call sites? OR </div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">(2) Is it just missed and there is no issue if we will add this facility within `CallGraphNode? OR<br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small">(3) Am I missing something here which actually makes my asking here a meaningless question?</div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif;font-size:small"><br></div><div><div dir="ltr"><div dir="ltr"><font face="trebuchet ms, sans-serif">Thanks,</font><div><font face="trebuchet ms, sans-serif">Mahesha</font></div></div></div></div></div>
</blockquote></div>