[PATCH] D51430: [llvm-mca] Report the number of dispatched micro opcodes in the DispatchStatistics view.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 08:33:06 PDT 2018


andreadb created this revision.
andreadb added reviewers: mattd, RKSimon, courbet, gchatelet.
Herald added subscribers: jfb, gbedwell, tschuett.

This patch introduces the following changes to the DispatchStatistics view:

1. DispatchStatistics now reports the number of dispatched opcodes instead of the number of dispatched instructions.
2. The "Dynamic Dispatch Stall Cycles" table now also reports the percentage of stall cycles against the total simulated cycles.

This change allows users to easily compare dispatch group sizes with the processor DispatchWidth.
Before this change, it was difficult to correlate the two numbers, since DispatchStatistics view reported numbers of instructions (instead of opcodes). DispatchWidth defines the maximum size of a dispatch group in terms of number of micro opcodes.

The other change introduced by this patch is related to how DispatchStage generates "instruction dispatch" events.
In particular:

1. there can be multiple dispatch events associated with a same instruction
2. each dispatch event now encapsulates the number of dispatched micro opcodes.

The number of micro opcodes declared by an instruction may exceed the processor DispatchWidth. Therefore, we cannot assume that instructions are always fully dispatched in a single cycle.
DispatchStage knows already how to handle instructions declaring a number of opcodes bigger that DispatchWidth. However, DispatchStage always emitted a single instruction dispatch event (during the first simulated dispatch cycle) for instructions dispatched.

With this patch, DispatchStage now correctly notifies multiple dispatch events for instructions that cannot be dispatched in a single cycle.

A few views had to be modified. Views can no longer assume that there can only be one dispatch event per instruction.

Tests (and docs) have been updated.

Please let me know if okay to commit

-Andrea


https://reviews.llvm.org/D51430

Files:
  docs/CommandGuide/llvm-mca.rst
  test/tools/llvm-mca/X86/BtVer2/register-files-1.s
  test/tools/llvm-mca/X86/BtVer2/register-files-2.s
  test/tools/llvm-mca/X86/BtVer2/register-files-3.s
  test/tools/llvm-mca/X86/BtVer2/register-files-4.s
  test/tools/llvm-mca/X86/BtVer2/register-files-5.s
  test/tools/llvm-mca/X86/Haswell/cmpxchg16b.s
  test/tools/llvm-mca/X86/option-all-stats-1.s
  test/tools/llvm-mca/X86/option-all-stats-2.s
  test/tools/llvm-mca/X86/option-all-views-1.s
  test/tools/llvm-mca/X86/option-all-views-2.s
  tools/llvm-mca/Views/DispatchStatistics.cpp
  tools/llvm-mca/Views/DispatchStatistics.h
  tools/llvm-mca/Views/SummaryView.cpp
  tools/llvm-mca/Views/TimelineView.cpp
  tools/llvm-mca/Views/TimelineView.h
  tools/llvm-mca/include/HWEventListener.h
  tools/llvm-mca/include/Stages/DispatchStage.h
  tools/llvm-mca/lib/Stages/DispatchStage.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51430.163089.patch
Type: text/x-patch
Size: 29713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/916b1e1f/attachment-0001.bin>


More information about the llvm-commits mailing list