Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/MachineScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ class SchedBoundary {
getNextResourceCycle(const MCSchedClassDesc *SC, unsigned PIdx,
unsigned ReleaseAtCycle, unsigned AcquireAtCycle);

bool isUnbufferedGroup(unsigned PIdx) const {
bool isReservedGroup(unsigned PIdx) const {
return SchedModel->getProcResource(PIdx)->SubUnitsIdxBegin &&
!SchedModel->getProcResource(PIdx)->BufferSize;
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/CodeGen/MachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@ init(ScheduleDAGMI *dag, const TargetSchedModel *smodel, SchedRemainder *rem) {
for (unsigned i = 0; i < ResourceCount; ++i) {
ReservedCyclesIndex[i] = NumUnits;
NumUnits += SchedModel->getProcResource(i)->NumUnits;
if (isUnbufferedGroup(i)) {
if (isReservedGroup(i)) {
auto SubUnits = SchedModel->getProcResource(i)->SubUnitsIdxBegin;
for (unsigned U = 0, UE = SchedModel->getProcResource(i)->NumUnits;
U != UE; ++U)
Expand Down Expand Up @@ -2631,7 +2631,7 @@ SchedBoundary::getNextResourceCycle(const MCSchedClassDesc *SC, unsigned PIdx,
assert(NumberOfInstances > 0 &&
"Cannot have zero instances of a ProcResource");

if (isUnbufferedGroup(PIdx)) {
if (isReservedGroup(PIdx)) {
// If any subunits are used by the instruction, report that the
// subunits of the resource group are available at the first cycle
// in which the unit is available, effectively removing the group
Expand Down