This is an archive of the discontinued LLVM Phabricator instance.

MachineScheduler: Remember top/bottom choice in bidirectional scheduling
ClosedPublic

Authored by MatzeB on Apr 20 2016, 6:40 PM.

Details

Summary

Remember the last choice for the top/bottom scheduling boundary in
bidirectional scheduling mode. The top choice should not change if we
schedule at the bottom and vice versa.

In practice however it may change, since we can get slightly weaker
"reasons" out of tryCand when rerunning a pickNode() with less nodes in
the queue because some have been scheduled in the other boundary.
This can lead to slightly different choices but the new choice should be
better since the cached values is from a time when more nodes were in
the queue so we should have an exacter reason.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 54450.Apr 20 2016, 6:40 PM
MatzeB retitled this revision from to MachineScheduler: Remember top/bottom choice in bidirectional scheduling.
MatzeB updated this object.
MatzeB added a reviewer: atrick.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
atrick edited edge metadata.Apr 20 2016, 8:23 PM

Are you handling the case when the previous Top pick is scheduled at the bottom and vice-versa? I'm afraid the Candidate is keeping a pointer to a potentially already scheduled instruction.

It is not taking the previous candidate if the SU is marked scheduled.

atrick accepted this revision.Apr 20 2016, 10:09 PM
atrick edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 20 2016, 10:09 PM

Now that r273755 has landed, we have the top/bottom boundary picks are truly independent of the candidates in the other queue.

This revision was automatically updated to reflect the committed changes.