[PATCH] D44741: [llvm-mca] Move the logic that computes the register file usage to the BackendStatistics view.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 09:24:32 PDT 2018


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

With this patch, the "instruction dispatched" event now provides information related to the number of microarchitectural registers used by the instructio in each register file. Similarly, the "instruction retired" event is able to tell how may registers are freed in each register file.

Currently, the `BackendStatistics` view is the only consumer of register usage/pressure information. BackendStatistics uses that info to print out a few general statistics (i.e. max number of mappings used; total mapping created).
Before this patch, the `BackendStatistics` was forced to query the `Backend` to obtain the register pressure information.

This helps removes that dependency. Now views are completely independent from the Backend.
As a consequence, it should be easier to address PR36663 and further modularize the pipeline.

Added a couple of test cases in the BtVer2 specific directory.


https://reviews.llvm.org/D44741

Files:
  test/tools/llvm-mca/X86/BtVer2/register-files-1.s
  test/tools/llvm-mca/X86/BtVer2/register-files-2.s
  tools/llvm-mca/Backend.h
  tools/llvm-mca/BackendStatistics.cpp
  tools/llvm-mca/BackendStatistics.h
  tools/llvm-mca/Dispatch.cpp
  tools/llvm-mca/Dispatch.h
  tools/llvm-mca/HWEventListener.h
  tools/llvm-mca/llvm-mca.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44741.139308.patch
Type: text/x-patch
Size: 20103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180321/0802bcac/attachment.bin>


More information about the llvm-commits mailing list