<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 10/27/16 11:18 AM, Aliaksei Zasenka
      via llvm-dev wrote:<br>
    </div>
    <blockquote
cite="mid:CAJGtzLOM+z+yz=sQJ+CjzvKnXreOgMVdvUyJc0SXv-8cVhaLNQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi all,<br>
            </div>
            Can anyone give me advice about an appropriate way for
            extracting number of functions from module recursively
            (starting from entry point). Actually it may be more than
            one entry point so all dependent functions and global values
            must be extracted. <br>
            <br>
            I've tried llvm-extract tool but it can't do work
            recursively. Maybe it would be good to write some Call Graph
            pass or something. Any thoughts?<br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I thought llvm-extract conservatively extracted anything that was
    relevant to what it was asked to extract.<br>
    <br>
    In any event, if you need a call graph analysis, there are two call
    graph passes available for LLVM.<br>
    <br>
    The first is the CallGraph pass that comes in the LLVM source tree. 
    It is very conservative with function pointers, but its results are
    conservatively correct.<br>
    <br>
    The second is the CallGraph analysis within DSA.  You should be able
    to find a copy for LLVM 3.7 or LLVM 3.8 here
    (<a class="moz-txt-link-freetext" href="https://github.com/jtcriswell/safecode-llvm37">https://github.com/jtcriswell/safecode-llvm37</a>) and here
    (<a class="moz-txt-link-freetext" href="https://github.com/jtcriswell/llvm-dsa">https://github.com/jtcriswell/llvm-dsa</a>).<br>
    <br>
    Regards,<br>
    <br>
    John Criswell<br>
    <blockquote
cite="mid:CAJGtzLOM+z+yz=sQJ+CjzvKnXreOgMVdvUyJc0SXv-8cVhaLNQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div><br>
          </div>
          Thanks in advance,<br>
        </div>
        Alexey Zasenko<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
  </body>
</html>