[PATCH] D15640: [MachineScheduler] Make it easy to derive from GenericScheduler

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 05:39:13 PST 2015


jonpa created this revision.
jonpa added a subscriber: llvm-commits.

As I am working on a scheduler for SystemZ, I have found that the GenericScheduler is not giving a good performance out-of-the-box. 

In order to experiment and develop a good MIScheduler for SystemZ, I found that I could not reuse the existing code easily. I therefore made some static functions member functions instead, and also some other minor changes. I wonder if this is the right way to go.

NextSUs is public to let a SchedStrategy insert a node when it is released.

updateLatencyCounters() is a new method broken out of SchedBoundary::bumpNode(), to let a SchedStrategy do this in SchedNode()

new GenericSchedulerBase member methods:
 tryLess(), tryGreater(), tryLatency(), tracePic(), biasPhysRegCopy(), tryPressure()

GenericScheduler:
new method initTryCandRPDelta() broken out of GenericScheduler::tryCandidate, so that SchedStrategy can do this in its implementation of tryCandidate(), which has been made virtual.


---
[MachineScheduler] Make it easy to derive from GenericScheduler

Static methods formerly in MachineScheduler.cpp have been made member methods
in GenericSchedulerBase. Some functionality has been broken out into new
methods.
    
With this, it is easy to derive a new SchedStrategy and reuse these
functions.


http://reviews.llvm.org/D15640

Files:
  include/llvm/CodeGen/MachineScheduler.h
  lib/CodeGen/MachineScheduler.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15640.43222.patch
Type: text/x-patch
Size: 11720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151218/57d82f4a/attachment.bin>


More information about the llvm-commits mailing list