This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by andreadb on Mar 20 2018, 9:12 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

andreadb created this revision.Mar 20 2018, 9:12 AM
andreadb updated this revision to Diff 139164.Mar 20 2018, 11:07 AM

Patch updated.

This revision is now accepted and ready to land.Mar 20 2018, 11:16 AM
This revision was automatically updated to reflect the committed changes.