[llvm-bugs] [Bug 38832] New: [llvm-mca] Add binary support to llvm-mca.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 4 13:58:29 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38832

            Bug ID: 38832
           Summary: [llvm-mca] Add binary support to llvm-mca.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: matthew.davis at sony.com
                CC: llvm-bugs at lists.llvm.org

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180904/3777e378/attachment.html>


More information about the llvm-bugs mailing list