1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/docs/CommandGuide
Roman Lebedev 079fdb41d4 [llvm-exegesis] Introduce a 'naive' clustering algorithm (PR40880)
Summary:
This is an alternative to D59539.

Let's suppose we have measured 4 different opcodes, and got: `0.5`, `1.0`, `1.5`, `2.0`.
Let's suppose we are using `-analysis-clustering-epsilon=0.5`.
By default now we will start processing the `0.5` point, find that `1.0` is it's neighbor, add them to a new cluster.
Then we will notice that `1.5` is a neighbor of `1.0` and add it to that same cluster.
Then we will notice that `2.0` is a neighbor of `1.5` and add it to that same cluster.
So all these points ended up in the same cluster.
This may or may not be a correct implementation of dbscan clustering algorithm.

But this is rather horribly broken for the reasons of comparing the clusters with the LLVM sched data.
Let's suppose all those opcodes are currently in the same sched cluster.
If i specify `-analysis-inconsistency-epsilon=0.5`, then no matter
the LLVM values this cluster will **never** match the LLVM values,
and thus this cluster will **always** be displayed as inconsistent.

The solution is obviously to split off some of these opcodes into different sched cluster.
But how do i do that? Out of 4 opcodes displayed in the inconsistency report,
which ones are the "bad ones"? Which ones are the most different from the checked-in data?
I'd need to go in to the `.yaml` and look it up manually.

The trivial solution is to, when creating clusters, don't use the full dbscan algorithm,
but instead "pick some unclustered point, pick all unclustered points that are it's neighbor,
put them all into a new cluster, repeat". And just so as it happens, we can arrive
at that algorithm by not performing the "add neighbors of a neighbor to the cluster" step.

But that won't work well once we teach analyze mode to operate in on-1D mode
(i.e. on more than a single measurement type at a time), because the clustering would
depend on the order of the measurements.

Instead, let's just create a single cluster per opcode, and put all the points of that opcode into said cluster.
And simultaneously check that every point in that cluster is a neighbor of every other point in the cluster,
and if they are not, the cluster (==opcode) is unstable.

This is //yet another// step to bring me closer to being able to continue cleanup of bdver2 sched model..

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40880 | PR40880 ]].

Reviewers: courbet, gchatelet

Reviewed By: courbet

Subscribers: tschuett, jdoerfert, RKSimon, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59820

llvm-svn: 357152
2019-03-28 08:55:01 +00:00
..
bugpoint.rst
dsymutil.rst [dsymutil] Upstream emitting of papertrail warnings. 2018-04-02 10:40:43 +00:00
FileCheck.rst [FileCheck] Suppress old -v/-vv diags if dumping input 2019-01-22 21:41:42 +00:00
index.rst Add flag to llvm-profdata to allow symbols in profile data to be remapped, and 2018-09-13 20:22:02 +00:00
lit.rst [llvm] Document "%T" as deprecated in CommandGuide/lit.rst 2018-08-25 01:27:48 +00:00
llc.rst [Remarks] Emit a section containing remark diagnostics metadata 2019-03-27 01:13:59 +00:00
lli.rst [AArch64] Add Tiny Code Model for AArch64 2018-08-22 11:31:39 +00:00
llvm-ar.rst
llvm-as.rst
llvm-bcanalyzer.rst
llvm-build.rst
llvm-config.rst
llvm-cov.rst Speeding up llvm-cov export with multithreaded renderFiles implementation. 2019-03-14 17:49:27 +00:00
llvm-cxxmap.rst Add flag to llvm-profdata to allow symbols in profile data to be remapped, and 2018-09-13 20:22:02 +00:00
llvm-diff.rst
llvm-dis.rst
llvm-dwarfdump.rst Remove duplicate option from documentation. 2017-12-09 19:09:59 +00:00
llvm-exegesis-analysis.png [llvm-exegesis] Show sched class details in analysis. 2018-05-24 10:47:05 +00:00
llvm-exegesis.rst [llvm-exegesis] Introduce a 'naive' clustering algorithm (PR40880) 2019-03-28 08:55:01 +00:00
llvm-extract.rst
llvm-lib.rst
llvm-link.rst
llvm-mca.rst [MCA] Highlight kernel bottlenecks in the summary view. 2019-03-04 11:52:34 +00:00
llvm-nm.rst nm: Add -no-weak flag for hiding weak symbols 2018-07-02 17:24:37 +00:00
llvm-objdump.rst llvm-objdump -m -D should disassemble all text segments 2019-01-15 20:41:30 +00:00
llvm-pdbutil.rst [docs] Update code block for compatibility with Sphinx 1.5.1 2017-11-06 11:47:24 +00:00
llvm-profdata.rst [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
llvm-readobj.rst [llvm-readobj][ELF]Add demangling support 2019-01-17 15:34:12 +00:00
llvm-stress.rst
llvm-symbolizer.rst [llvm-symbolizer][doc] Tweak wording of --adjust-vma switch description 2019-01-29 10:43:48 +00:00
opt.rst Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
tblgen.rst [MCSched] Bind PFM Counters to the CPUs instead of the SchedModel. 2018-10-25 07:44:01 +00:00