<div dir="ltr"><div>Ok, I will switch to release_32. Thank you very much for your help!<br><br></div><div>Regards,<br></div>Thanasis Petsas<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 5, 2014 at 9:34 PM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Dear Petsas,<br>
      <br>
      I personally haven't used Poolalloc/DSA with anything after LLVM
      3.2 or later.  Others have applied patches to get it to work with
      newer versions of LLVM.<br>
      <br>
      That said, after speaking with Will, it looks like poolalloc trunk
      was patched to work with LLVM trunk.  Therefore, my best
      recommendation is to either:<br>
      <br>
      1) Switch to LLVM trunk and try it with poolalloc trunk.  It may
      or may not work, depending on how much LLVM trunk has changed.<br>
      <br>
      2) Switch to using the release_32 branch of both LLVM and
      Poolalloc.  Unless you need newer LLVM features, I'd go this route
      as LLVM 3.2 isn't changing anymore. :)<br>
      <br>
      -- John T.<div><div class="h5"><br>
      <br>
      <br>
      On 5/4/14 5:52 AM, Petsas Athanasios wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>
          <div>Thank you,<br>
            <br>
          </div>
          I tried to compile it with llvm 3.4 through these commands:<br>
          <br>
          <br>
          petsas@shinigami:~/software/poolalloc$ ./configure
          --with-llvmsrc=/home/petsas/software/llvm 
          --with-llvmobj=/home/petsas/software/llvm<br>
          <br>
          petsas@shinigami:~/software/poolalloc$ make<br>
          <br>
          but I'm getting get this error:<br>
          <br>
          make[1]: Entering directory
          `/home/petsas/software/poolalloc/lib'<br>
          make[2]: Entering directory
          `/home/petsas/software/poolalloc/lib/DSA'<br>
          llvm[2]: Compiling CallTargets.cpp for Debug+Asserts build
          (PIC)<br>
          CallTargets.cpp:35:3: error: use of undeclared identifier
          'DEBUG_TYPE'<br>
            STATISTIC (DirCall, "Number of direct calls");<br>
            ^<br>
          /home/petsas/software/llvm/include/llvm/ADT/Statistic.h:165:38:
          note: expanded from macro 'STATISTIC'<br>
            static llvm::Statistic VARNAME = { DEBUG_TYPE, DESC, 0, 0 }<br>
                                               ^<br>
          CallTargets.cpp:36:3: error: use of undeclared identifier
          'DEBUG_TYPE'<br>
            STATISTIC (IndCall, "Number of indirect calls");<br>
            ^<br>
          ...<br>
          <br>
        </div>
        Any ideas?<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Fri, May 2, 2014 at 5:53 PM, John
          Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>
                <div>On 5/2/14, 9:49 AM, Petsas Athanasios wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr"><br>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">On Mon, Apr 28, 2014 at
                        10:30 PM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div>Dear Petsas,<br>
                              <br>
                              For analyzing indirect function calls,
                              your best bet is probably to use the
                              CallGraph analysis pass that is part of
                              DSA.  DSA is included in the poolalloc
                              code; you can get directions on
                              downloading poolalloc from the SVA web
                              page: <a href="http://sva.cs.illinois.edu/docs/Install.html" target="_blank">http://sva.cs.illinois.edu/docs/Install.html</a>.<br>
                              <br>
                              The release_32 branch works with LLVM
                              3.2.  I think mainline poolalloc was
                              recently updated to work with LLVM 3.4.<br>
                            </div>
                          </div>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>Do you know where I can find mainline
                          poolalloc so as I can compile it with<br>
                        </div>
                        <div>LLVM 3.4 ?<br>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <br>
              </div>
              svn co <a href="http://llvm.org/svn/llvm-project/poolalloc/trunk" target="_blank">http://llvm.org/svn/llvm-project/poolalloc/trunk</a>
              poolalloc<br>
              <br>
              Regards,<br>
              <br>
              John Criswell
              <div>
                <div><br>
                  <br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div class="gmail_extra">
                        <div class="gmail_quote">
                          <div><br>
                          </div>
                          <div> </div>
                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                            <div bgcolor="#FFFFFF" text="#000000">
                              <div> <br>
                                Regards,<br>
                                <br>
                                John Criswell
                                <div>
                                  <div><br>
                                    <br>
                                    <br>
                                    On 4/28/14 8:10 AM, Petsas
                                    Athanasios wrote:<br>
                                  </div>
                                </div>
                              </div>
                              <blockquote type="cite">
                                <div>
                                  <div>
                                    <div dir="ltr">
                                      <div>
                                        <div>
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>Dear all,<br>
                                                    <br>
                                                  </div>
                                                  I would like to keep
                                                  track of all the
                                                  indirect calls that
                                                  may caused from
                                                  function<br>
                                                </div>
                                                pointers inside a
                                                program. I need this in
                                                order to be able to
                                                construct the control<br>
                                              </div>
                                              flow graph of all the
                                              indirect calls, that is
                                              which function is legal to
                                              call another<br>
                                            </div>
                                            function.<br>
                                            <br>
                                          </div>
                                          Is there a module that
                                          implements this functionality
                                          in llvm? If not, is there a
                                          way to<br>
                                          do it? Maybe through
                                          implementing a pass. I am new
                                          to llvm. Could you suggest me<br>
                                        </div>
                                        <div>a way to start doing this?
                                          Perhaps the llvm intermediate
                                          code can help me on this.<br>
                                        </div>
                                        <div>Do you know where this code
                                          is being produced? or what
                                          files or passes do I have<br>
                                        </div>
                                        <div>to modify for this?<br>
                                          <br>
                                        </div>
                                        <div>Until now I have used this
                                          command to produce and study
                                          the llvm bitcode for a test<br>
                                          program:<br>
                                          clang -S -emit-llvm
                                          fpointers.c -c -o
                                          fpointers.bc.text<br>
                                          <br>
                                        </div>
                                        <div>Thank you,<br>
                                        </div>
                                        <div><br>
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>-- <br>
                                                    <font color="#888888"><font face="Helvetica,
                                                        Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><span>Thanasis</span> <span>Petsas</span>
                                                          <div>
                                                          Distributed
                                                          Computing
                                                          Systems (<span>DCS</span>)<br>
                                                          Institute of
                                                          Computer
                                                          Science
                                                          (ICS/FORTH)<br>
                                                          Heraklion,
                                                          Crete<br>
                                                          <span>Greece</span>
                                                          (GR)<br>
                                                          <br>
                                                          <font color="#888888"><font face="Helvetica,

                                                          Verdana,
                                                          Arial"><span style="font-size:11pt"><font color="#888888"><a href="http://www.thanasispetsas.com/" target="_blank">http://www.thanasispetsas.com/</a></font></span></font></font><br>

                                                          </div>
                                                          </font></span></font></font>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                    <br>
                                    <fieldset></fieldset>
                                    <br>
                                  </div>
                                </div>
                                <div>
                                  <pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
                                </div>
                              </blockquote>
                              <br>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                        <br clear="all">
                        <br>
                        -- <br>
                        <font color="#888888"><font face="Helvetica,
                            Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><span>Thanasis</span> <span>Petsas</span>
                                <div> Distributed Computing Systems (<span>DCS</span>)<br>
                                  Institute of Computer Science
                                  (ICS/FORTH)<br>
                                  Heraklion, Crete<br>
                                  <span>Greece</span> (GR)<br>
                                  <br>
                                  <font color="#888888"><font face="Helvetica, Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><a href="http://www.thanasispetsas.com/" target="_blank">http://www.thanasispetsas.com/</a></font></span></font></font><br>

                                </div>
                              </font></span></font></font> </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <font color="#888888"><font face="Helvetica, Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><span>Thanasis</span>
                <span>Petsas</span>
                <div>
                  Distributed Computing Systems (<span>DCS</span>)<br>
                  Institute of Computer Science (ICS/FORTH)<br>
                  Heraklion, Crete<br>
                  <span>Greece</span> (GR)<br>
                  <br>
                  <font color="#888888"><font face="Helvetica, Verdana,
                      Arial"><span style="font-size:11pt"><font color="#888888"><a href="http://www.thanasispetsas.com/" target="_blank">http://www.thanasispetsas.com/</a></font></span></font></font><br>
                </div>
              </font></span></font></font>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><br>-- <br><font color="#888888"><font face="Helvetica, Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><span>Thanasis</span> <span>Petsas</span><div>
Distributed Computing Systems (<span>DCS</span>)<br>
Institute of Computer Science (ICS/FORTH)<br>
Heraklion, Crete<br>
<span>Greece</span> (GR)<br><br><font color="#888888"><font face="Helvetica, Verdana, Arial"><span style="font-size:11pt"><font color="#888888"><a href="http://www.thanasispetsas.com/" target="_blank">http://www.thanasispetsas.com/</a></font></span></font></font><br>
</div></font></span></font></font>
</div>