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: unassignedb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: clement.cour...@gmail.com, gchate...@google.com,
                    llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to