<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - assembly files do not preserve order of use lists"
   href="http://llvm.org/bugs/show_bug.cgi?id=20515">20515</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>assembly files do not preserve order of use lists
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM assembly language parser
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dexonsmith@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - bitcode files do not preserve order of use lists"
   href="show_bug.cgi?id=5680">Bug 5680</a> allows use-list order to be preserved when round-tripping to bitcode. 
Now that it's wrapping up, the next job is to add support for assembly, which I
imagine can work quite similarly.  My initial idea is to add an assembly
construct that looks something like this:

    shuffleuselist i8* %a, [4 x i32] [i32 0, i32 3, i32 1, i32 2]
    shuffleuselist i64 0, [4 x i32] [i32 0, i32 3, i32 1, i32 2]

This construct can be at the function or global level.  The first argument is a
Value and the second is a use-list shuffle-vector.  The LLParser would apply
these at the point they're encountered.

I'm (naively?) assuming the same approach will work here -- predict in the
AssemblyWriter how the LLParser will see the use-lists, and write out shuffles
at a point where the full use-list will have been reconstructed.  Once I've had
a chance to read the LLParser (and AsmWriter) to confirm just how naive this
idea is I'll throw a post on llvmdev to bikeshed the instruction format.</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>