<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 12/1/14, 11:15 PM, Rahman Lavaee
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAERV3kNMdySJ2VA9ZKUiSmkHCZCBGFcr5xZ3rjx8FTBSHGX6Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>I am trying to use CloneFunction to clone every IR
            function in a program, give the cloned versions a prefix and
            call the clones from the original functions (redirect the
            calls).<br>
          </div>
          <br>
          Surprisingly, I see that after the LTO optimizations, the
          number of machine basic blocks in the two functions differ in
          some cases. <br>
          <br>
          Is this reasonable at all, given that the two functions must
          be exactly the same in the IR level.<br>
          <br>
        </div>
        Or it might happen because of the interprocedural optimizations?
        <br>
      </div>
    </blockquote>
    <br>
    Have you verified that the old and new functions are identical at
    the LLVM IR level right before code generation in libLTO (you can
    easily modify libLTO to dump out the LLVM IR right before code
    generation).  It might happen because of inter-procedural
    optimizations.  If the old functions are no longer called, then
    inter-procedural constant propagation and other inter-procedural
    optimizations may change the new functions but not the old
    functions.<br>
    <br>
    I don't know if the code generators do any inter-procedural
    analysis; my impression was that they did not.  However, someone
    else needs to answer that question.<br>
    <br>
    Regards,<br>
    <br>
    John Criswell<br>
    <br>
    <blockquote
cite="mid:CAERV3kNMdySJ2VA9ZKUiSmkHCZCBGFcr5xZ3rjx8FTBSHGX6Ng@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
          <div>
            <div>
              <div>
                <div>
                  <div>-- <br>
                    <div class="gmail_signature"><font face="tahoma,
                        sans-serif">Rahman</font></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <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>
    <br>
    <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>