[PATCH] D44686: [llvm-mca] Move the logic that computes the scheduler's queue usage to the BackendStatistics view.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 09:15:18 PDT 2018


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

This patch introduces two new callbacks in the event listener interface to handle the "buffered resource reserved" event and the "buffered resource released" event. Every time a buffered resource is used, an event is generated.

Before this patch, the Scheduler (with the help of the ResourceManager) was responsible for tracking the scheduler's queue usage. However, that design forced the Scheduler to 'publish' resource pressure information through the Backend interface.

The goal of this patch is to breaks the dependency between the BackendStatistics view, and the Backend.
Now the Scheduler knows how to notify "buffer reserved/released" events. 
The scheduler's queue usage analysis has been moved to the BackendStatistics.

No functional change intended.

Note: I didn't add other tests because scheduler-queue-usage.s in the X86/BtVer2 directory already checks that the tool reports the right scheduler usage information.


https://reviews.llvm.org/D44686

Files:
  tools/llvm-mca/Backend.cpp
  tools/llvm-mca/Backend.h
  tools/llvm-mca/BackendStatistics.cpp
  tools/llvm-mca/BackendStatistics.h
  tools/llvm-mca/HWEventListener.h
  tools/llvm-mca/Scheduler.cpp
  tools/llvm-mca/Scheduler.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44686.139133.patch
Type: text/x-patch
Size: 15346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180320/66bf4365/attachment.bin>


More information about the llvm-commits mailing list