forked from OSchip/llvm-project
[SLP] Add assert that entities are scheduled as expected
Requested in D118538
This commit is contained in:
parent
b077ee9240
commit
2e50760775
|
@ -7952,6 +7952,17 @@ void BoUpSLP::scheduleBlock(BlockScheduling *BS) {
|
|||
BS->verify();
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Check that all schedulable entities got scheduled
|
||||
for (auto *I = BS->ScheduleStart; I != BS->ScheduleEnd; I = I->getNextNode()) {
|
||||
BS->doForAllOpcodes(I, [&](ScheduleData *SD) {
|
||||
if (SD->isSchedulingEntity() && SD->hasValidDependencies()) {
|
||||
assert(SD->IsScheduled && "must be scheduled at this point");
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
// Avoid duplicate scheduling of the block.
|
||||
BS->ScheduleStart = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue