GenTreeStmt* BasicBlock::lastTopLevelStmt() { if (bbTreeList == nullptr) return nullptr; GenTreePtr stmt = lastStmt(); #ifndef LEGACY_BACKEND while ((stmt->gtFlags & GTF_STMT_TOP_LEVEL) == 0) { stmt = stmt->gtPrev; } #endif // !LEGACY_BACKEND return stmt->AsStmt(); }
//------------------------------------------------------------------------ // BasicBlock::lastNode: Returns the last node in the block. // GenTree* BasicBlock::lastNode() { return IsLIR() ? m_lastNode : lastStmt()->gtStmtExpr; }