<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 7/28/11 4:03 PM, gkumar.patel wrote:
    <blockquote
cite="mid:CACAiJQhHDw7aPzDvhcnnC2H3Q51uC3Acm9VaRJr3XH22zoJAsQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div class="gmail_quote"><br>
        Hi, I am a student at IIT Kanpur. I am working on Path
        Profiling, i just came with a need to know about the number of
        static paths in a program(actually in a function) before it's
        actually get run. As i saw in PathProfiling.c file in
        llvm\runtime\libprofile they are just storing the path
        information at run time and dynamically adding entries for the
        new path. But i need to know the number of static paths (total
        paths in a function ) whether they are executed or not. Please
        help me know that, can LLVM provide me with number of static
        paths or not.<br clear="all">
      </div>
    </blockquote>
    <br>
    I don't think LLVM has an analysis pass to do this.  However,
    writing a new LLVM analysis pass to count the number of paths should
    be pretty straightforward.<br>
    <br>
    If you decide to write such an analysis, I recommending reading the
    relevant portions of:<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a><br>
    <a class="moz-txt-link-freetext" href="http://llvm.org/docs/LangRef.html">http://llvm.org/docs/LangRef.html</a><br>
    <a class="moz-txt-link-freetext" href="http://llvm.org/docs/ProgrammersManual.html">http://llvm.org/docs/ProgrammersManual.html</a><br>
    <br>
    -- John T.<br>
    <blockquote
cite="mid:CACAiJQhHDw7aPzDvhcnnC2H3Q51uC3Acm9VaRJr3XH22zoJAsQ@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <font color="#888888">
          <br>
          -- <br>
          <img moz-do-not-send="true"
            src="http://www.itimes.com/files/blogfiles/523074/best%20regards.gif">
          <div>Gaurav Kumar<br>
            MTech CSE <br>
            IIT Kanpur<br>
            +918960440344</div>
          <div><a moz-do-not-send="true"
              href="http://www.cse.iitk.ac.in/users/gourav/"
              target="_blank">http://www.cse.iitk.ac.in/users/gourav/</a><br>
          </div>
          <br>
        </font></div>
      <br>
      <br clear="all">
      <br>
      -- <br>
      <img moz-do-not-send="true"
        src="http://www.itimes.com/files/blogfiles/523074/best%20regards.gif">
      <div>Gaurav Kumar<br>
        MTech CSE <br>
        IIT Kanpur<br>
        +918960440344</div>
      <div><a moz-do-not-send="true"
          href="http://www.cse.iitk.ac.in/users/gourav/" target="_blank">http://www.cse.iitk.ac.in/users/gourav/</a><br>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>