This is an archive of the discontinued LLVM Phabricator instance.

[MachineScheduler] Make it easy to derive from GenericScheduler
Needs ReviewPublic

Authored by jonpa on Dec 18 2015, 5:39 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

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.

Diff Detail

Event Timeline

jonpa updated this revision to Diff 43222.Dec 18 2015, 5:39 AM
jonpa retitled this revision from to [MachineScheduler] Make it easy to derive from GenericScheduler.
jonpa updated this object.
jonpa added a subscriber: llvm-commits.