[llvm-bugs] [Bug 40715] New: [llvm-exegesis] If the same instruction lies in multiple clusters, it's noise

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 13 02:46:19 PST 2019


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

            Bug ID: 40715
           Summary: [llvm-exegesis] If the same instruction lies in
                    multiple clusters, it's noise
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-exegesis
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: clement.courbet at gmail.com, gchatelet at google.com,
                    llvm-bugs at lists.llvm.org

If you measure e.g. latency of some instruction N (>1) times, and feed
that into analysis mode, if the latency is non-identical,
you will get several different clusters with the same instruction.

It's not really actionable.

I think, something like this could work:
1. Go through all the clusters
   * record (in a map, with key being instruction ID, so it's an array)
     the cluster id's in which we have encountered this instruction.
2. Go through the map.
   * If the instruction was encountered in less than 2 clusters,
     skip to the next instruction.
   * Else go through the each cluster
     in which we have encountered this instruction:
       * duplicate the cluster ("by splitting it into two halves")
       * remove the instruction from original cluster
       * and only keep the instruction in the new cluster.
       * Mark new cluster as noise.
This way we will effectively hide such instructions from the report,
(because currently all non-valid clusters are not reported)
while not destroying the "good" part of the report.

This should also be the fastest way, only one linear scan through the clusters,
and one linear scan over the instruction map.

Since currently analysis only works with all the measurements
being of the same type, this is somewhat simple, for now.

Thoughts?

-- 
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/20190213/c0095928/attachment.html>


More information about the llvm-bugs mailing list