HomePhabricator

[MachineScheduler] improve reuse of 'releaseNode'method

Authored by DoktorC on Jan 1 2020, 11:53 AM.

Description

[MachineScheduler] improve reuse of 'releaseNode'method

The 'SchedBoundary::releaseNode' is merely invoked for releasing the Top/Bottom root nodes.
However, 'SchedBoundary::releasePending' uses its same logic to check if the Pending queue
has any releasable SUnit.
It is possible to slightly modify the body of the two, allowing re-use of the former ('releaseNode')
in the latter.

Patch by Lorenzo Casalino <lorenzo.casalino93@gmail.com>

Reviewers: MatzeB, fhahn, atrick

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D65506

Details

Committed
fhahnJan 1 2020, 12:22 PM
Reviewer
fhahn
Differential Revision
D65506: [MachineScheduler] improve reuse of 'releaseNode'method
Parents
rG11552433ebfc: [InstCombine] Add tests for PR44423 and PR44425; NFC
Branches
Unknown
Tags
Unknown

Event Timeline

qiucf added a subscriber: qiucf.Jan 1 2020, 11:53 PM

This causes build failure (using GCC 8.2.1), complaining undefined reference to releaseNode, since this patch splits declaration and definition of the template method.

Also, although this works well with Clang currently, further issue may arise if any compilation unit other than MachineScheduler.cpp also references the method.