<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 8/7/11 2:41 AM, neda 8664 wrote:
    <blockquote
cite="mid:CAHbEVmS_4WOyyTk8Yo4JYHtXv9si60QjQJZ1shcL3aFE8QS76Q@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      i could not use <a moz-do-not-send="true"
        href="http://profile.pl">profile.pl</a>, however i did reinstall
      the llvm but didn't solve my problem. is there is another way to
      extract profilling information in llvm?<br>
    </blockquote>
    <br>
    First, I believe that profile.pl is just a script that automates the
    profiling process.  You should be able to do whatever it is that the
    script is doing (assuming that the profiling code in LLVM is
    currently well-maintained, which I suspect it is).<br>
    <br>
    Second, what do you mean by "reinstalling LLVM?"  Did you just
    rebuild it?  Did you do a "make install?"  If you did a "make
    install", what was the option to the --prefix= option on the
    configure command line?<br>
    <br>
    Are you getting the same error now, or are you getting a different
    error?<br>
    <br>
    Third, did you try my earlier suggestion of just changing profile.pl
    to look for the profile_rt.so file elsewhere?  I believe the
    necessary line of code is line 68 of profile.pl (from mainline
    LLVM).  If you tried it, did it not work?  If it didn't work, what
    error did you get?<br>
    <br>
    <blockquote
cite="mid:CAHbEVmS_4WOyyTk8Yo4JYHtXv9si60QjQJZ1shcL3aFE8QS76Q@mail.gmail.com"
      type="cite">i have another question, i want know how can estimate
      execution time for each operand such as mul ,add, ... ?<br>
    </blockquote>
    <br>
    I don't know of an analysis that does this within LLVM.  I would
    think that this is less-than-straightfoward due to instruction
    folding (e.g., merging a GEP and a load into a single x86 indexed
    mov instruction) and other machine-code specific optimizations.<br>
    <br>
    That said, if you just need to have relative differences in
    execution, you could probably write a very simple analysis that
    generates a rough estimate.  For example, fadd is probably much more
    expensive than add on any system.  Call instructions with more
    arguments probably cost more than calls with less arguments, etc.<br>
    <br>
    Another route might be to write such an analysis as a
    MachineFunctionPass.  That way, I think you can see individual
    machine instruction that were actually generated and get a better
    estimate.<br>
    <br>
    I just don't know how accurate it'd be or what level of accuracy you
    need.<br>
    <br>
    -- John T.<br>
    <br>
    <br>
  </body>
</html>