<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:pedro.ferreira@imgtec.com" title="Pedro Ferreira <pedro.ferreira@imgtec.com>"> <span class="fn">Pedro Ferreira</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - CloneFunction ovewrites requested replacements - PATCH"
   href="https://llvm.org/bugs/show_bug.cgi?id=24065">bug 24065</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - CloneFunction ovewrites requested replacements - PATCH"
   href="https://llvm.org/bugs/show_bug.cgi?id=24065#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - CloneFunction ovewrites requested replacements - PATCH"
   href="https://llvm.org/bugs/show_bug.cgi?id=24065">bug 24065</a>
              from <span class="vcard"><a class="email" href="mailto:pedro.ferreira@imgtec.com" title="Pedro Ferreira <pedro.ferreira@imgtec.com>"> <span class="fn">Pedro Ferreira</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=24065#c2">comment #2</a>)
<span class="quote">> Nicolas, I think that this is actually intended behavior. The map should
> only be used once per cloning of a given basic block, so the find() should
> actually always return VMap.end(). When it doesn't it means that you passed
> in an already used VMap, which cloned this basic block already. Even if you
> were reusing VMap, the code as committed would retain the proper mapping of
> existing instructions in a basic block to the newly cloned equivalents
> (rather than referring to a prior cloning of the block).</span >

I'm confused. By code inspection, the VMap is per function cloning, not per
block.


In any case, thank you for your reply. I just think this peculiarity should be
documented (unless I missed it), as I was expecting to be able to arbitrarily
replace instructions of the cloned function though the VMap.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>