<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Spills of implicit-defs seem useless"
   href="https://bugs.llvm.org/show_bug.cgi?id=33311">33311</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Spills of implicit-defs seem useless
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Register Allocator
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcrosier@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While analyzing the hottest function in SPEC2000/mesa I noticed the following
code sequence:

str w8, sp,#260
str w8, sp,#244
str w8, sp,#256
str w8, sp,#248
str w8, sp,#252

str s1, sp,#284
str s1, sp,#280
str s1, sp,#288
str s1, sp,#276
str s1, sp,#272

At first it wasn't clear to me why these instructions weren't being paired by
the load store optimizer.  These stores are spills of implicit-defs being
inserted by the register allocator. AFAICT these implicit-defs are coming from
variables that are undefined on some path in the CFG. I think the fix would be
to not spill these implicit-defs and update the register allocator's internal
data structures accordingly, but this is well outside my area of expertise.

To better understand how frequently this issue occurs I inserted a statistic in
the InlineSpiller to count the number of implicit-def spills. Across SPEC200X
there were ~200 static spills of which 61 came from SPEC2000/mesa.</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>