<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 - [llvm-mca] Add binary support to llvm-mca."
   href="https://bugs.llvm.org/show_bug.cgi?id=38832">38832</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[llvm-mca] Add binary support to llvm-mca.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>matthew.davis@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently, llvm-mca operates on asm source. The goal of this bug/feature is to
give llvm-mca the ability to operate on object files and not just asm source. 
This change will require llvm-mca to enable/initialize the target disassemblers
and locate user-annotated code regions. Each code region should be executed in
a separate simulated pipeline within llvm-mca, similar to how llvm-mca
currently executes multiple code regions that have been annotated in the user's
asm source.

To locate user defined code regions in an object file, llvm will need to store
the start/end .text offsets, that represent the user's annotations, into a
MCSection of the user's object file.  For an ELF file, this can be a section
called ".mca_code_segments", where the content of this region is a set of
pairs: <.text offset begin, .text offset end>.  llvm-mca will locate these code
regions, and perform analysis on each region within a simulated pipeline.  This
change will probably require a pair of intrinsics, to represent the user's
annotations,  which will eventually be lowered into a representation that will
be used to make up the contents of the llvm-mca specific MCSection.

An example looks something like the following:

   .text
   .Lmca_segment1_start:
   ... # Code to be analyzed by mca
   .Lmca_segment1_end:
   ... # More code, not analyzed by mca
   .mca_code_segments:
    .Lmca_segment1_start,  .Lmca_segment1_end</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>