<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3 Patchpoint and Check opcodes should be able to specify Air::Arg::LateUse for their stackmap"
   href="https://bugs.webkit.org/show_bug.cgi?id=151335">bug 151335</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;">Summary</td>
           <td>B3::Patchpoints should be able to specify Air::Arg::LateUse
           </td>
           <td>B3 Patchpoint and Check opcodes should be able to specify Air::Arg::LateUse for their stackmap
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3 Patchpoint and Check opcodes should be able to specify Air::Arg::LateUse for their stackmap"
   href="https://bugs.webkit.org/show_bug.cgi?id=151335#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - B3 Patchpoint and Check opcodes should be able to specify Air::Arg::LateUse for their stackmap"
   href="https://bugs.webkit.org/show_bug.cgi?id=151335">bug 151335</a>
              from <span class="vcard"><a class="email" href="mailto:fpizlo&#64;apple.com" title="Filip Pizlo &lt;fpizlo&#64;apple.com&gt;"> <span class="fn">Filip Pizlo</span></a>
</span></b>
        <pre>This is a bit tricky.  Currently, we have five opcodes that have stackmaps:

Patchpoint
Check
CheckAdd
CheckSub
CheckMul

CheckMul already uses LateUse for its stackmap, because the multiply cannot be undone.  Hence we need to ensure that if we want to recover any of the input values, they cannot overlap with the result.

The other opcodes currently have no way of specifying LateUse for their stackmaps.  It's tricky because currently the machinery for forcing LateUse in CheckMul relies on making the *entire* stackmap into LateUse.  Specifying LateUse on the entire stackmap is super dangerous because it also implies cold use, which is incompatible with constraints like SomeRegister.  What we really want is to specify LateUse on only some of the stackmap arguments. Ideally, there would be some way of saying LateUse in the ValueRep input constraints.  For example, we could have a ValueRep::Late, which is like Any but means LateUse.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>