Video Link: C++ Weekly - Ep 14 Standard Library Gems: next and exchange Optimization Case https://gitee.com/harmonyos/OpenArkCompiler/blob/master/src/maple_ir/src/mir_lower.cpp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 BlockNode *MIRLower::LowerBlock(BlockNode &block) { auto *newBlock = mirModule.CurFuncCodeMemPool()->New<BlockNode>(); BlockNode *tmp = nullptr; if (block.GetFirst() == nullptr) { return newBlock; } StmtNode *nextStmt = block.GetFirst(); ASSERT(nextStmt != nullptr, "nullptr check"); do { StmtNode *stmt = nextStmt; nextStmt = stmt->GetNext(); //