fix potential access of a null pointer
@@ -685,6 +685,7 @@ SequentialScheduler::createBasicBlocks(
}
}
+ if (currentBB != nullptr) {
// at end, add last BB if non-empty
if (currentBB->instructionCount() != 0) {
basicBlocks.push_back(currentBB);
@@ -693,6 +694,7 @@ SequentialScheduler::createBasicBlocks(
delete currentBB;
}
}
+}
void
SequentialScheduler::copyBasicBlocksToProcedure(
