[PATCH] D115138: [llvm-mca] Compare multiple files

Milica Matic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 7 07:44:13 PST 2021


mmatic05 updated this revision to Diff 392398.
mmatic05 added a comment.

Script (llvm-mca-pretty-printer.py) uses llvm-mca tool to print statistics in console for multiple files (when  diff option is used), or for single file (without diff option).
Options: -iterations, -mcpu, -mtriple or -useMca (specified relative path to llvm-mca) can also be used.

The script is used as follows:

  $  llvm-project/llvm/utils/llvm-mca-pretty-printer/llvm-mca-pretty-printer.py file1.s -useMca=build/bin/llvm-mca

  Input files:
  [f1]: file1.s
  
  ITERATIONS: 100
  
  +-------------------+--------+
  |                   | [f1]:  |
  +===================+========+
  | Instructions:     | 1100   |
  +-------------------+--------+
  | Total Cycles:     | 1097   |
  +-------------------+--------+
  | Total uOps:       | 1900   |
  +-------------------+--------+
  | Dispatch Width:   | 6      |
  +-------------------+--------+
  | uOps Per Cycle:   | 1.73   |
  +-------------------+--------+
  | IPC:              | 1.0    |
  +-------------------+--------+
  | Block RThroughp:  | 3.17   |
  +-------------------+--------+



  $ llvm-project/llvm/utils/llvm-mca-pretty-printer/llvm-mca-pretty-printer.py file1.s file2.s file3.s file4.s  -useMca=build/bin/llvm-mca -diff

  Input files:
  [f1]: file1.s
  
  [f2]: file2.s
  
  [f3]: file3.s
  
  [f4]: file4.s
  
  ITERATIONS: 100
  
  +-------------------+--------+--------+--------+--------+
  |                   | [f1]:  | [f2]:  | [f3]:  | [f4]:  |
  +===================+========+========+========+========+
  | Instructions:     | 1100   | 600    | 2800   | 1200   |
  +-------------------+--------+--------+--------+--------+
  | Total Cycles:     | 1097   | 897    | 2192   | 1096   |
  +-------------------+--------+--------+--------+--------+
  | Total uOps:       | 1900   | 1400   | 4500   | 2200   |
  +-------------------+--------+--------+--------+--------+
  | Dispatch Width:   | 6      | 6      | 6      | 6      |
  +-------------------+--------+--------+--------+--------+
  | uOps Per Cycle:   | 1.73   | 1.56   | 2.05   | 2.01   |
  +-------------------+--------+--------+--------+--------+
  | IPC:              | 1.0    | 0.67   | 1.28   | 1.09   |
  +-------------------+--------+--------+--------+--------+
  | Block RThroughp:  | 3.17   | 2.33   | 10     | 3.67   |
  +-------------------+--------+--------+--------+--------+

Used assembly files:
F20937354: file2.s <https://reviews.llvm.org/F20937354>

F20937353: file3.s <https://reviews.llvm.org/F20937353>

F20937352: file4.s <https://reviews.llvm.org/F20937352>

F20937351: file1.s <https://reviews.llvm.org/F20937351>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115138/new/

https://reviews.llvm.org/D115138

Files:
  llvm/utils/llvm-mca-pretty-printer/llvm-mca-pretty-printer.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115138.392398.patch
Type: text/x-patch
Size: 6346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211207/4c1a8eb9/attachment-0001.bin>


More information about the llvm-commits mailing list