void Function::setScheduledBlocks(const QVector<BasicBlock *> &scheduled) { Q_ASSERT(!_allBasicBlocks); _allBasicBlocks = new QVector<BasicBlock *>(basicBlocks()); _basicBlocks = scheduled; for (int i = 0, ei = basicBlockCount(); i != ei; ++i) basicBlock(i)->changeIndex(i); }
int Function::liveBasicBlocksCount() const { int count = 0; for (BasicBlock *bb : basicBlocks()) if (!bb->isRemoved()) ++count; return count; }
void Program::print(QTextStream &out) const { out << "digraph Program" << this << " {" << endl; out << CFG(basicBlocks()); out << "}" << endl; }