forked from OSchip/llvm-project
AMDGPU/SI: Fix SI scheduler refcount issue
Without this fix, releaseSuccessors when InOrOutBlock is false could release SUs outside the schedule BasicBlock. Patch by Axel Davy llvm-svn: 275935
This commit is contained in:
parent
cb540bc03c
commit
fe358066ea
|
@ -464,6 +464,9 @@ void SIScheduleBlock::releaseSuccessors(SUnit *SU, bool InOrOutBlock) {
|
|||
for (SDep& Succ : SU->Succs) {
|
||||
SUnit *SuccSU = Succ.getSUnit();
|
||||
|
||||
if (SuccSU->NodeNum >= DAG->SUnits.size())
|
||||
continue;
|
||||
|
||||
if (BC->isSUInBlock(SuccSU, ID) != InOrOutBlock)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue