[PATCH] D51051: [llvm-mca] Add the ability to customize the instruction selection strategy in the Scheduler.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 10:45:38 PDT 2018


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

The constructor of Scheduler now accepts a `SchedulerStrategy` object, which is used internally by method `Scheduler::select()` to drive the instruction selection process.

The goal of this patch is to enable the definition of custom selection strategies while reusing the same algorithms implemented by class Scheduler.
The motivation is that, on some targets, the default strategy may not well approximate the selection logic in the hardware schedulers.

This patch also adds the ability to pass a ResourceManager object to the constructor of Scheduler. This gives a bit more flexibility to the design, and potentially it allows to expose processor resources to SchedulerStrategy objects.

Please let me know if okay to commit.

-Andrea


https://reviews.llvm.org/D51051

Files:
  tools/llvm-mca/Scheduler.cpp
  tools/llvm-mca/Scheduler.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51051.161762.patch
Type: text/x-patch
Size: 6125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180821/0b6159a7/attachment.bin>


More information about the llvm-commits mailing list